Commit 23f82264 authored by 李苏's avatar 李苏 💬

模型操作页面相关调整

parent 62f333a7
......@@ -2,7 +2,7 @@
* @Description:
* @Author: lisu lisu@gavelinfo.com
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-09-19 14:40:49
* @LastEditTime: 2024-09-19 15:31:39
* @FilePath: /zghywpc-vue/src/views/yhlywsytst/yhlywsytst/index.vue
-->
<template>
......@@ -303,8 +303,8 @@
<div class="search-item">
<span class="search-span">近期引入:</span>
<RelSelect placeholder='' style="width: 100%;" :optionsData="[
{id:'Y',name:'是'},
{id:'N',name:'否'}
{id:true,name:'是'},
{id:false,name:'否'}
]" filterable clearable :match="{value:'id',label:'name'}" v-model='sypcQueryParams.isrRecentImport'>
</RelSelect>
</div>
......@@ -314,8 +314,8 @@
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span">规格:</span>
<RelSelect placeholder='' style="width: 100%;" src='sbgl/usbxx/init/ggxh ' filterable clearable
:match="{value:'id',label:'name'}" v-model='sypcQueryParams.gg'></RelSelect>
<RelSelect placeholder='' style="width: 100%;" src='sbgl/usbxx/init/gg' filterable clearable
:match="{value:'name',label:'name'}" v-model='sypcQueryParams.gg'></RelSelect>
</div>
</el-col>
<el-col :span="8" class="search-col">
......@@ -354,9 +354,11 @@
</el-col>
<el-col :span="8" class="search-col flex-center">
<el-col :span="14" class="search-col flex-center">
<el-button v-show='mxbshow'
<!-- <el-button v-show='mxbshow'
style="background-color: rgba(7,32,96,0.0);border: 1px solid #68D8FE; color: #68D8FE;" size="mini"
@click="xsqbmx()" type="primary">显示全部模型</el-button>
@click="xsqbmx()" type="primary">显示全部模型</el-button> -->
<el-button style="background-color: rgba(7,32,96,0.0);border: 1px solid #68D8FE; color: #68D8FE;"
size="mini" @click="czmx()" type="primary">重置模型</el-button>
</el-col>
<el-col :span="10" class="search-col flex-center">
<el-button style="background-color: rgba(7,32,96,0.0);border: 1px solid #68D8FE; color: #68D8FE;"
......@@ -543,7 +545,7 @@
},
sypcQueryParams: {
gnwz: '',
isrRecentImport: false,
isrRecentImport: '',
gj: '',
ldtx: '',
gg: '',
......@@ -607,6 +609,21 @@
}
},
methods: {
czmx() {
this.viewer.scene.traverse((model) => {
if (model.isMesh) {
model.visible = true
}
});
if (this.allFlowObject.length) {
this.allFlowObject.forEach((item) => {
item.removeFromParent();
});
this.allFlowObject = [];
}
},
/* xsqbmx相关设置废除*/
xsqbmx() {
this.viewer.scene.traverse((model) => {
if (model.isMesh) {
......@@ -621,27 +638,10 @@
this.apiJzbm()
},
/* 点击按钮弹出异物,然后选中*/
sypc() {
if (!this.sypcQueryParams.gnwz) {
this.$warning('请输入功能位置后进行查询!')
return
}
/* 先清空 选中的机组*/
this.jzReMaterialQue.forEach(item => {
item.revert()
})
this.jzReMaterialQue.splice(0, this.jzReMaterialQue.length)
this.$post('ksh/query',
this.sypcQueryParams
).then(res => {
if (res.success) {
/* 绘制流向*/
let sbxxList = res.data.records || []
sypcMethods(res) {
let sbxxList = res.data.records.kshSbInfos || []
let zbInfos = res.data.records.zbInfos || []
/* 进行标记设备*/
this.$success(`已标记${sbxxList.length}个设备`)
const sbxxCodeList = sbxxList.map(item => item.sbxxCode)
/* 匹配设备信息length==0 */
......@@ -689,7 +689,6 @@
}
}
});
/* 绘制全部流向图*/
/* 显示展示全部按钮*/
this.mxbshow = true
/* 匹配展示数据和本地数据*/
......@@ -703,12 +702,90 @@
if (sbxxList.length > 0 && (this.jzReMaterialQue.length != sbxxList.length)) {
this.$warning('存在与模型数据不匹配的数据!')
}
/* 绘制全部流向*/
this.allPieData = zbInfos.filter((item) => {
return item.children.some((child) => child.data.length >= 2);
});
/* 绘制全部信息*/
if (this.allFlowObject.length) {
this.allFlowObject.forEach((item) => {
item.removeFromParent();
});
this.allFlowObject = [];
}
let flowPieDatas = this.allPieData
flowPieDatas.forEach(flowPieData => {
const children = this.allPieData.find((item) => item.name === flowPieData.name)?.children;
if (!children) {
return;
}
children.forEach((item) => {
if (item.data.length >= 2) {
const o = this.drawPipe(
item.data.map((item) => [item.x, item.y, item.z]),
item.radius,
this.flowDirection,
);
o.traverse((node) => {
if (node.isMesh) {
node._thing_tag = "helper";
}
});
this.allFlowObject.push(o);
const box = new THREE.Box3();
o.points.forEach((item) => {
box.expandByPoint(new THREE.Vector3(...item));
});
o.points.forEach((item) => {
box.expandByPoint(new THREE.Vector3(...item));
});
}
});
})
},
sypc() {
if (!this.sypcQueryParams.gnwz) {
this.$warning('请输入功能位置后进行查询!')
return
}
/* 先清空 选中的机组*/
this.jzReMaterialQue.forEach(item => {
item.revert()
})
this.jzReMaterialQue.splice(0, this.jzReMaterialQue.length)
this.loading = true
this.loadingText = '正在处理,请稍等。'
if (this.sypcQueryParams.isrRecentImport) {
this.$post('ksh/query',
this.sypcQueryParams
).then(res => {
if (res.success) {
this.sypcMethods(res)
}
})
}
/* 另外一个接口*/
else {
this.$post('ksh/check/workOrder',
this.sypcQueryParams
).then(res => {
if (res.success) {
/* 获取加载数据*/
this.sypcMethods(res)
}
}).finally(() => {
this.loading = false
})
}
},
apiGetLbjxx() {
this.$post('sbgl/usbxx/query', {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment