模型库、军标库、路径规划修改
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
<el-input
|
||||
v-model="modelName"
|
||||
class="w-50 m-2"
|
||||
placeholder="请输入模型名称进行搜索"
|
||||
placeholder="请输入模型类型进行搜索"
|
||||
:suffix-icon="Search"
|
||||
/>
|
||||
<button @click="setting" class="btn">
|
||||
@ -35,6 +35,7 @@
|
||||
:data="typeTreeData"
|
||||
ref="treeRef"
|
||||
node-key="id"
|
||||
empty-text=""
|
||||
@node-click="handleTypeClick"
|
||||
:filter-node-method="filterNode"
|
||||
>
|
||||
@ -48,6 +49,8 @@
|
||||
}"
|
||||
@click.stop="toggleExpand(node)"
|
||||
class="allowDrag"
|
||||
style="width: 100%; text-overflow: ellipsis; overflow: hidden"
|
||||
:title="node.label"
|
||||
>
|
||||
<svg-icon
|
||||
:name="node.expanded ? 'arrow' : 'more'"
|
||||
@ -64,7 +67,7 @@
|
||||
</div>
|
||||
|
||||
<div class="model-gallery" ref="galleryRef">
|
||||
<div class="model-section">
|
||||
<div class="model-section" v-if="categories.length != 0">
|
||||
<!-- <h2 class="section-title">{{ categories[Number(currentTypeId)].name }}</h2> -->
|
||||
<div class="model-grid">
|
||||
<div
|
||||
@ -75,7 +78,7 @@
|
||||
>
|
||||
<div class="imgbg">
|
||||
<el-image
|
||||
:src="'http://127.0.0.1:8848' + model.poster"
|
||||
:src="'http://127.0.0.1:8848' + model.posterDataUrl"
|
||||
fit="contain"
|
||||
class="thumbnail"
|
||||
>
|
||||
@ -85,13 +88,22 @@
|
||||
</el-image>
|
||||
</div>
|
||||
|
||||
<div class="model-name" :class="{ isactive: activeIndex == mIndex }">
|
||||
<div
|
||||
class="model-name"
|
||||
:class="{ isactive: activeIndex == mIndex }"
|
||||
:title="model.modelName"
|
||||
>
|
||||
{{ model.modelName }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="loading" class="loading-more">加载中...</div>
|
||||
<div v-if="categories.length == 0">
|
||||
<div class="custom-empty">
|
||||
<img src="@/assets/images/noData.png" alt="暂无数据" />
|
||||
<div class="noData">暂无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -112,6 +124,7 @@ const { findParentId, findTreeIndex, cusAddNodes } = useTreeNode()
|
||||
const isShowPup = ref(false)
|
||||
const eventBus: any = inject('bus')
|
||||
var modelName = ref('')
|
||||
var clickTreeNode: any = ref('')
|
||||
|
||||
//tab
|
||||
interface Model {
|
||||
@ -252,6 +265,7 @@ const toggleExpand = (row: any) => {
|
||||
}
|
||||
}
|
||||
getModelListByType(row.data.id)
|
||||
clickTreeNode.value = row.data.id
|
||||
currentTypeId.value = row.id
|
||||
// loadModelsByType(row.id)
|
||||
}
|
||||
@ -259,6 +273,7 @@ const addType = ref('')
|
||||
|
||||
const handleTypeClick = (row: any) => {
|
||||
getModelListByType(row.id)
|
||||
clickTreeNode.value = row.id
|
||||
currentTypeId.value = row.$treeNodeId
|
||||
}
|
||||
|
||||
@ -281,7 +296,7 @@ const modelClick = (index, row) => {
|
||||
typeof selectCallback === 'function' &&
|
||||
addType.value === 'trajectoryMotion'
|
||||
) {
|
||||
selectCallback('http://127.0.0.1:8848' + row.data)
|
||||
selectCallback('http://127.0.0.1:8848' + row.modelDataUrl)
|
||||
close()
|
||||
return
|
||||
}
|
||||
@ -299,7 +314,7 @@ const modelClick = (index, row) => {
|
||||
id: id,
|
||||
type: typeArr[isSetting.key],
|
||||
spacing: isSetting['value'] * 1,
|
||||
url: 'http://127.0.0.1:8848' + isSetting[row.data]
|
||||
url: 'http://127.0.0.1:8848' + isSetting[row.modelDataUrl]
|
||||
},
|
||||
function (data) {
|
||||
// posiArr.forEach((item, index) => {
|
||||
@ -325,9 +340,9 @@ const renderModel = async (data, model) => {
|
||||
// let source_id = this.$md5(new Date().getTime() + model.model_name+index);
|
||||
let id = new YJ.Tools().randomString()
|
||||
if (data.type == '面') {
|
||||
z = data.rotate.z
|
||||
z = data.rotate - 90
|
||||
} else if (data.type == '线') {
|
||||
z = data.rotate[index]
|
||||
z = data.rotate[index] - 90
|
||||
}
|
||||
|
||||
let option = {
|
||||
@ -336,7 +351,7 @@ const renderModel = async (data, model) => {
|
||||
name: model.modelName + index,
|
||||
show: true,
|
||||
scale: { x: 1, y: 1, z: 1 },
|
||||
url: model.data,
|
||||
url: 'http://127.0.0.1:8848' + model.modelDataUrl,
|
||||
maximumScale: 1,
|
||||
// host: 'http://127.0.0.1:8848',
|
||||
rotate: {
|
||||
@ -438,6 +453,7 @@ eventBus.on('closeModelSet', (data) => {
|
||||
isShowPup.value = data
|
||||
if (data) {
|
||||
getSetting()
|
||||
clickTreeNode.value && getModelListByType(clickTreeNode.value)
|
||||
}
|
||||
})
|
||||
|
||||
@ -691,6 +707,7 @@ defineExpose({
|
||||
height: 100%;
|
||||
float: left;
|
||||
border-right: 1px solid rgba(204, 204, 204, 0.2);
|
||||
overflow-x: hidden;
|
||||
}
|
||||
.model-gallery {
|
||||
flex: 1;
|
||||
@ -700,6 +717,17 @@ defineExpose({
|
||||
width: calc(100% - 160px);
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
.custom-empty {
|
||||
display: flex;
|
||||
justify-content: center; /* 水平居中 */
|
||||
align-items: center; /* 垂直居中 */
|
||||
flex-direction: column;
|
||||
height: 300px;
|
||||
}
|
||||
.custom-empty img {
|
||||
display: block;
|
||||
width: 130px;
|
||||
}
|
||||
}
|
||||
.model-section {
|
||||
min-height: 10vh;
|
||||
|
||||
Reference in New Issue
Block a user