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

模型操作页面相关调整

parent 62f333a7
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: * @Description:
* @Author: lisu lisu@gavelinfo.com * @Author: lisu lisu@gavelinfo.com
* @LastEditors: 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 * @FilePath: /zghywpc-vue/src/views/yhlywsytst/yhlywsytst/index.vue
--> -->
<template> <template>
...@@ -303,8 +303,8 @@ ...@@ -303,8 +303,8 @@
<div class="search-item"> <div class="search-item">
<span class="search-span">近期引入:</span> <span class="search-span">近期引入:</span>
<RelSelect placeholder='' style="width: 100%;" :optionsData="[ <RelSelect placeholder='' style="width: 100%;" :optionsData="[
{id:'Y',name:'是'}, {id:true,name:'是'},
{id:'N',name:'否'} {id:false,name:'否'}
]" filterable clearable :match="{value:'id',label:'name'}" v-model='sypcQueryParams.isrRecentImport'> ]" filterable clearable :match="{value:'id',label:'name'}" v-model='sypcQueryParams.isrRecentImport'>
</RelSelect> </RelSelect>
</div> </div>
...@@ -314,8 +314,8 @@ ...@@ -314,8 +314,8 @@
<el-col :span="8" class="search-col"> <el-col :span="8" class="search-col">
<div class="search-item"> <div class="search-item">
<span class="search-span">规格:</span> <span class="search-span">规格:</span>
<RelSelect placeholder='' style="width: 100%;" src='sbgl/usbxx/init/ggxh ' filterable clearable <RelSelect placeholder='' style="width: 100%;" src='sbgl/usbxx/init/gg' filterable clearable
:match="{value:'id',label:'name'}" v-model='sypcQueryParams.gg'></RelSelect> :match="{value:'name',label:'name'}" v-model='sypcQueryParams.gg'></RelSelect>
</div> </div>
</el-col> </el-col>
<el-col :span="8" class="search-col"> <el-col :span="8" class="search-col">
...@@ -354,9 +354,11 @@ ...@@ -354,9 +354,11 @@
</el-col> </el-col>
<el-col :span="8" class="search-col flex-center"> <el-col :span="8" class="search-col flex-center">
<el-col :span="14" 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" 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>
<el-col :span="10" class="search-col flex-center"> <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;" <el-button style="background-color: rgba(7,32,96,0.0);border: 1px solid #68D8FE; color: #68D8FE;"
...@@ -543,7 +545,7 @@ ...@@ -543,7 +545,7 @@
}, },
sypcQueryParams: { sypcQueryParams: {
gnwz: '', gnwz: '',
isrRecentImport: false, isrRecentImport: '',
gj: '', gj: '',
ldtx: '', ldtx: '',
gg: '', gg: '',
...@@ -607,6 +609,21 @@ ...@@ -607,6 +609,21 @@
} }
}, },
methods: { 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() { xsqbmx() {
this.viewer.scene.traverse((model) => { this.viewer.scene.traverse((model) => {
if (model.isMesh) { if (model.isMesh) {
...@@ -621,27 +638,10 @@ ...@@ -621,27 +638,10 @@
this.apiJzbm() this.apiJzbm()
}, },
/* 点击按钮弹出异物,然后选中*/ /* 点击按钮弹出异物,然后选中*/
sypc() { sypcMethods(res) {
if (!this.sypcQueryParams.gnwz) { let sbxxList = res.data.records.kshSbInfos || []
this.$warning('请输入功能位置后进行查询!') let zbInfos = res.data.records.zbInfos || []
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 || []
this.$success(`已标记${sbxxList.length}个设备`) this.$success(`已标记${sbxxList.length}个设备`)
const sbxxCodeList = sbxxList.map(item => item.sbxxCode) const sbxxCodeList = sbxxList.map(item => item.sbxxCode)
/* 匹配设备信息length==0 */ /* 匹配设备信息length==0 */
...@@ -689,7 +689,6 @@ ...@@ -689,7 +689,6 @@
} }
} }
}); });
/* 绘制全部流向图*/
/* 显示展示全部按钮*/ /* 显示展示全部按钮*/
this.mxbshow = true this.mxbshow = true
/* 匹配展示数据和本地数据*/ /* 匹配展示数据和本地数据*/
...@@ -703,12 +702,90 @@ ...@@ -703,12 +702,90 @@
if (sbxxList.length > 0 && (this.jzReMaterialQue.length != sbxxList.length)) { if (sbxxList.length > 0 && (this.jzReMaterialQue.length != sbxxList.length)) {
this.$warning('存在与模型数据不匹配的数据!') 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() { apiGetLbjxx() {
this.$post('sbgl/usbxx/query', { 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