ソースを参照

6.25 添加瓦斯点击数据

liuqiao 1 年間 前
コミット
a874fdefc8

+ 1 - 1
public/static/TemplateData/style.css

@@ -1,5 +1,5 @@
 body { padding: 0; margin: 0 }
-#unity-container { position: fixed; width: 100%; height: 100%; }
+#unity-container { width: 100%; height: 100%; }
 #unity-canvas { width: 100%; height: 100%; background: #231F20 }
 #unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
 #unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }

+ 1 - 1
src/view/index/first-left.vue

@@ -285,7 +285,7 @@ const indexinit= (id,radio)=>{
   // getMonitor();
   // vtkmodel.clearModeAddJg();
   // vtkGridRead()
-if(props.classradio=='Fire'){
+if(props.classradio=='Fire'||props.classradio=='Gass'){
   formInline.value.region="Temperature";
 }else if(props.classradio=='Water'){
   formInline.value.region="Height";

+ 1 - 3
src/view/index/htmldialog.vue

@@ -8,7 +8,6 @@
       :style="{ left:X}"
       ref="dialogRef"
       :top="Y"
-      custom-class="no-shadow"
       :close-on-click-modal="false"
       :append-to-body="true"
       draggable
@@ -139,7 +138,7 @@ const getdatahtml = (val) => {
   jghrfe=url+"static/index.html?camera=1&water="+ water.value;
   jghrfe2=url+"static/index.html?camera=0&water="+ water.value;
   msgval.value = val;
-  }else if(props.classradio=='Fire'){
+  }else if(props.classradio=='Fire'||props.classradio=='Gass'){
           val.map((item) => {
           item.name=obj2[item.name]
         item.value = item.value.toFixed(2);
@@ -148,7 +147,6 @@ const getdatahtml = (val) => {
     fire.value=Number(val[0].value);
     msgval.value = val;  
   }else{
-
   }
 
 };

+ 21 - 2
src/views/home/index.vue

@@ -144,8 +144,24 @@ function changeFire(lv){
   }
     window.postMessage('changeWater:0');
     window.postMessage('changeLaneHeight:4');
+  window.postMessage('toggleExplosion:false');
+  // window.postMessage('toggleExplosion:true');
+}
+/**
+ * lv 瓦斯温度
+ */
+ function changeGass(lv){
+  if(lv>25){
+    window.postMessage('toggleExplosion:true');
+    }else{
+
+      window.postMessage('toggleExplosion:false');
+    window.postMessage('changeFire:0');
+    window.postMessage('changeLaneHeight:4');
+    } 
+   
   // window.postMessage('toggleExplosion:false');
-  window.postMessage('toggleExplosion:true');
+ 
 }
 /**
  * lv 0 1
@@ -166,7 +182,10 @@ watch(
     }else if(props.classradio=='Fire'){
       changeCamera(newVal[0])
       changeFire(newVal[2])
-    }else{
+    }else if(props.classradio=='Gass'){
+      changeCamera(newVal[0])
+      console.log("这是我的温度"+newVal[2])
+      changeGass(newVal[2])
 
     }