Commit 09985688 authored by 李苏's avatar 李苏 💬

调整

parent 1b534eff
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
</div> </div>
<!-- 视角工具栏--> <!-- 视角工具栏-->
<div class="toolButton2"> <div class="toolButton2">
<div class="flex1 text-center">
<el-checkbox v-model="xzjj">选中时近景</el-checkbox>
</div>
<div class="flex1 text-center"> <div class="flex1 text-center">
<el-select :popper-append-to-body='false' style="width: 100px;background-color: rgba(0, 0, 0, 0.0);" <el-select :popper-append-to-body='false' style="width: 100px;background-color: rgba(0, 0, 0, 0.0);"
@change="flowPieDataChange" v-model="flowPieData" clearable placeholder="绘制流动"> @change="flowPieDataChange" v-model="flowPieData" clearable placeholder="绘制流动">
...@@ -18,9 +21,7 @@ ...@@ -18,9 +21,7 @@
<el-switch style="color: #fff ;font-size: 12px;" v-model="flowDirection" active-text="正向" inactive-text="反向"> <el-switch style="color: #fff ;font-size: 12px;" v-model="flowDirection" active-text="正向" inactive-text="反向">
</el-switch> </el-switch>
</div> </div>
<div class="flex1 text-center">
<el-checkbox v-model="xzjj">选中时近景</el-checkbox>
</div>
</div> </div>
...@@ -134,6 +135,7 @@ ...@@ -134,6 +135,7 @@
this.canNotMousedown([ this.canNotMousedown([
this.$refs.rightOpt this.$refs.rightOpt
]) ])
}) })
}, },
...@@ -172,6 +174,7 @@ ...@@ -172,6 +174,7 @@
modelLoader: null, modelLoader: null,
/* */ /* */
reMaterialQue: [], reMaterialQue: [],
jzReMaterialQue: [],
allFlowObject: [] allFlowObject: []
} }
...@@ -180,12 +183,51 @@ ...@@ -180,12 +183,51 @@
flowDirection() { flowDirection() {
if (this.allFlowObject) { if (this.allFlowObject) {
this.allFlowObject.forEach((item) => { this.allFlowObject.forEach((item) => {
item.reverseMapRotation(); item.reverseMapRotation();
}); });
} }
} }
}, },
methods: { methods: {
apiJzbm(){
/* 先清空 选中的机组*/
this.jzReMaterialQue.forEach(item => {
item.revert()
})
this.$post('ksh/query',{
jzbm:1
}).then(res=>{
if(res.success){
let sbxxList=res.data.records||[]
const sbxxCodeList=sbxxList.map(item=>item.sbxxCode)
this.viewer.scene.traverse((model)=>{
if (model.isMesh) {
if(sbxxCodeList.includes(model.name)){
let jzReMaterialQueItem = {
model,
material: model.material.clone(),
revert: function() {
this.model.material = this.material
}
}
this.jzReMaterialQue.push(jzReMaterialQueItem)
model.material = new THREE.MeshPhongMaterial({
color: new THREE.Color('rgba(255, 164, 7, 0.8)'),
transparent: true,
opacity: 0.8,
wireframe: false,
})
}
}
});
}
})
},
/* 解决com和 相机控制器事件冲突的问题*/ /* 解决com和 相机控制器事件冲突的问题*/
canNotMousedown(domList) { canNotMousedown(domList) {
domList.forEach(vdom => { domList.forEach(vdom => {
...@@ -272,8 +314,8 @@ ...@@ -272,8 +314,8 @@
color: "lightgreen", color: "lightgreen",
side: 2, side: 2,
map: { map: {
image: "vt/resources/texture/arrow.png", image: "vt/resources/texture/arrow2.png",
repeat: [1, 4], repeat: [2, 8],
// rotation: direction ? Math.PI : 0, // rotation: direction ? Math.PI : 0,
wrapS: THREE.RepeatWrapping, wrapS: THREE.RepeatWrapping,
wrapT: THREE.RepeatWrapping, wrapT: THREE.RepeatWrapping,
...@@ -368,6 +410,11 @@ ...@@ -368,6 +410,11 @@
let showNum = num * 100 let showNum = num * 100
if (showNum == 100) { if (showNum == 100) {
this.loadingText = `模型加载完毕,请稍等!` this.loadingText = `模型加载完毕,请稍等!`
/* 机组高亮测试*/
setTimeout(()=>{
this.apiJzbm()
},2000)
} else { } else {
this.loadingText = `正在加载模型${showNum}%!` this.loadingText = `正在加载模型${showNum}%!`
} }
......
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