Ver código fonte

714水泵选择巷道,灾源点切换消失

tangjunhao 1 mês atrás
pai
commit
9e127d0aa3

+ 14 - 1
src/control/vtkModel.js

@@ -534,12 +534,13 @@ delSensor(){
   actor.setMapper(mapper);
     // 旋转actor
   actor.rotateZ(90);// 绕y轴旋转
-  actor.setScale(0.3,0.3,0.3);//放大
+  actor.setScale(0.1,0.1,0.1);//放大
   this.soureActors.push(actor);
   // this.renderer.addActor(actor);
  }
  //显示灾源点
 showSoure(){
+  console.log('灾源点',this.soureActors)
   this.soureActors.forEach((actor)=>{
     this.renderer.addActor(actor);
   });
@@ -1346,6 +1347,7 @@ safetypathremove(){
     this.isSelectPipe = false;
     this.isSelectSensor = false;
     this.isSelectJC = false;
+    this.isJg = false;
     this.modelShow();
     document.addEventListener("mousemove", throttleMouseHandler);
     this.renderWindow.render();
@@ -1355,6 +1357,7 @@ safetypathremove(){
     this.isSelectPipe = true;
     this.isSelectSensor = false;
     this.isSelectJC = false;
+    this.isJg = false;
      document.addEventListener("mousemove", throttleMouseHandler);
     this.modelShow();
     this.renderWindow.render();
@@ -1469,6 +1472,16 @@ safetypathremove(){
     this.renderWindow.render();
   }
 
+  // 清除显示
+  delshow() {
+    // this.removejc();
+    // this.removeSensor();
+    // this.removeSoure();
+    this.removepump();
+    this.removedoor();
+    this.removefan();
+  }
+
   delAll() {
     this.deljc();
     this.delSensor();

+ 29 - 8
src/view/components/InfoDisaster.vue

@@ -1261,7 +1261,7 @@
             controls-position="right"
             class="w-50 m-2"
             placeholder="相对位置"
-            @change="inputnuberChange"
+            @change="inputnuberChange1"
           />
         </el-form-item>
       </div>
@@ -2012,15 +2012,20 @@ const Dtext=(val)=>{
   console.log(val);
   selectstr.value=val.name;
   firepid.value=val.id;
+
+  vtkmodel.addpipPump(firepid.value, source.site|| 0.0);
 }
 // 3D弹屏
 const Dclick = (val) => {
   let ws=val;
   console.log(ws);
   dialogtrue.value.dialoglog = true;
-  // vtkmodel.clearJgAddMode() ;
+  vtkmodel.clearJgAddMode() ;
+  vtkmodel.clearpipPump();
+  vtkmodel.selectNoting();
+
    vtkmodel.selectPipes();
-   vtkmodel.clearpipsite();
+   
    console.log(zhtext.value);
   //dialogtrue.value.jgSelect();
 if(ws=='ws'){
@@ -2117,6 +2122,16 @@ const inputnuberChange = (number) => {
 //   vtkmodel.addpipsite2( wasi.value.pid, wasi.value.esite);
 
 }
+
+const inputnuberChange1 = (number) => {
+  dsite.value=number;
+  dialogtrue.value.jgSelenum();
+
+  vtkmodel.addpipPump(firepid.value,number)
+
+}
+
+
 // 3D关闭弹窗
 const fun3D = () => {
  state.value=sessionStorage.getItem("state");
@@ -2138,6 +2153,8 @@ state.value=sessionStorage.getItem("state");
     vtkmodel.selectNoting();
   }//节点图形
   vtkmodel.clearpipsite();//清除选择巷道的位置
+  vtkmodel.clearpipPump();
+  vtkmodel.selectNoting();
   dialogtrue.value.timintclaer();
 }
 //添加保存
@@ -2372,12 +2389,13 @@ const queding = () => {
 const selectfun = () => {
   selectstr.value = "";
   currentPage4.value = 1;
-  console.log();
+  console.log("选择巷道数据",multipleSelection.value);
   if (multipleSelection.value.length != 0) {
     firepid.value = multipleSelection.value[0].id;
     selectstr.value = multipleSelection.value[0].name;
     vtkmodel.selectByPipeId( firepid.value);
-    //vtkmodel.addpipsite( firepid.value,site.value);
+    
+    vtkmodel.addpipPump(firepid.value,source.site || 0.0);
   } else {
     // selectstr.value='';
   }
@@ -2954,9 +2972,7 @@ const pumpxiugai=(val)=>{
     message.error("你还没有选中修改的项目");
   } else {
      sdialog.value.addpump = true;
-    vtkmodel.clearJgAddMode() ;
-    // vtkmodel.selectPipes();
-    // dialogtrue.value.jgSelect();
+
     pumpobj.value.pumpid=pumpobj.value.xzobj.pumpid;
     pumpobj.value.pumpname=pumpobj.value.xzobj.pumpname;
     pumpobj.value.openhig=pumpobj.value.xzobj.openhig;
@@ -2965,6 +2981,11 @@ const pumpxiugai=(val)=>{
     firepid.value=pumpobj.value.xzobj.pid;
     aid.value=pumpobj.value.xzobj.aid;
     source.site=pumpobj.value.xzobj.site;
+
+    vtkmodel.clearJgAddMode() ;
+    vtkmodel.delAll();
+    vtkmodel.selectByPipeId(firepid.value);
+    vtkmodel.addpipPump(firepid.value, source.site|| 0.0);
   }
 }
 

+ 2 - 2
src/view/components/tool.vue

@@ -120,7 +120,7 @@ const changecheckbox2 = (val) => {
 const changecheckbox3 = async (val) => {
   if (checked3.value) {
     uncheckOthers(checked3);
-    await delay(10); // 等待 500ms
+    await delay(10); // 等待
     vtkmodel.showjc();
     // 选中出弹窗
     dialogtrue1.value.dialoglog = true;
@@ -135,7 +135,7 @@ const changecheckbox3 = async (val) => {
 const changecheckbox4 = async (val) => {
   if (checked4.value) {
     uncheckOthers(checked4);
-    await delay(10); // 等待 500ms
+    await delay(10); // 等待
     vtkmodel.showSensor(); // 延时后执行
     
     // 其他逻辑

+ 2 - 2
src/view/index/index.vue

@@ -64,13 +64,13 @@ const changeColor=(index)=>{
       emit("hiadden", null);
       towrightref.value.huoaid(props.aid);
 
-      vtkmodel.delAll();//清除风机风门等选中
+      vtkmodel.delshow();//清除风机风门等选中
    
     }else if(btnindex.value==2){
       firstleftref.value.isshow=false;
         emit("hiadden", null);
 
-        vtkmodel.delAll();
+        vtkmodel.delshow();
     }else{
       firstleftref.value.isshow=false;
         emit("hiadden", null);