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

调整

parent 1b534eff
......@@ -6,6 +6,9 @@
</div>
<!-- 视角工具栏-->
<div class="toolButton2">
<div class="flex1 text-center">
<el-checkbox v-model="xzjj">选中时近景</el-checkbox>
</div>
<div class="flex1 text-center">
<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="绘制流动">
......@@ -18,9 +21,7 @@
<el-switch style="color: #fff ;font-size: 12px;" v-model="flowDirection" active-text="正向" inactive-text="反向">
</el-switch>
</div>
<div class="flex1 text-center">
<el-checkbox v-model="xzjj">选中时近景</el-checkbox>
</div>
</div>
......@@ -134,6 +135,7 @@
this.canNotMousedown([
this.$refs.rightOpt
])
})
},
......@@ -172,6 +174,7 @@
modelLoader: null,
/* */
reMaterialQue: [],
jzReMaterialQue: [],
allFlowObject: []
}
......@@ -180,12 +183,51 @@
flowDirection() {
if (this.allFlowObject) {
this.allFlowObject.forEach((item) => {
item.reverseMapRotation();
});
}
}
},
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和 相机控制器事件冲突的问题*/
canNotMousedown(domList) {
domList.forEach(vdom => {
......@@ -272,8 +314,8 @@
color: "lightgreen",
side: 2,
map: {
image: "vt/resources/texture/arrow.png",
repeat: [1, 4],
image: "vt/resources/texture/arrow2.png",
repeat: [2, 8],
// rotation: direction ? Math.PI : 0,
wrapS: THREE.RepeatWrapping,
wrapT: THREE.RepeatWrapping,
......@@ -368,6 +410,11 @@
let showNum = num * 100
if (showNum == 100) {
this.loadingText = `模型加载完毕,请稍等!`
/* 机组高亮测试*/
setTimeout(()=>{
this.apiJzbm()
},2000)
} else {
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