zjy 3 жил өмнө
parent
commit
f3f55a31b4

+ 160 - 76
src/views/huanjingjiankong/huanjingjiankong.vue

@@ -58,9 +58,16 @@
               :class="[item.ifshow == 'false' ? 'contentshow' : 'content']"
               v-show="item.run == 1"
             >
-            <!-- <div class="contentshow"> -->
-              <div class="envir-conditoin" v-show="item.temp?true:false">温度:{{ item.temp }}</div>
-              <div class="envir-conditoin" v-show="item.humidness?true:false">湿度:{{ item.humidness }}</div>
+              <!-- <div class="contentshow"> -->
+              <div class="envir-conditoin" v-show="item.temp ? true : false">
+                温度:{{ item.temp }}
+              </div>
+              <div
+                class="envir-conditoin"
+                v-show="item.humidness ? true : false"
+              >
+                湿度:{{ item.humidness }}
+              </div>
               <div class="envir-conditoin">气压:{{ item.airPressure }}</div>
             </div>
           </div>
@@ -199,16 +206,15 @@ export default {
           x: 584,
           y: 480,
         },
-        {
-          x: 640,
-          y: 465,
-        },
+        // {
+        //   x: 640,
+        //   y: 465,
+        // },
         {
           x: 710,
           y: 480,
         },
         {
-          
           x: 710,
           y: 420,
         },
@@ -229,12 +235,12 @@ export default {
           x: 1495,
           y: 570,
         },
-        {//支原体检测->更
+        {
+          //支原体检测->更
           x: 850,
           y: 250,
         },
         {
-          
           x: 780,
           y: 290,
         },
@@ -252,16 +258,16 @@ export default {
           x: 850,
           y: 70,
         },
-        { //产物分析室->更
+        {
+          //产物分析室->更
           x: 1098,
           y: 270,
         },
-        { 
+        {
           x: 1355,
           y: 270,
         },
         {
-         
           x: 965,
           y: 220,
         },
@@ -300,7 +306,6 @@ export default {
           x: 250,
           y: 280,
         },
-
       ],
       domsize: [
         {
@@ -453,17 +458,17 @@ export default {
         this_.timeData();
       }, 300000); /// 300000
     },
-    returnifShow(t, h, p,qiya) {
-       let ifshow = "";
-       if(t==999&&h===999){
+    returnifShow(t, h, p, qiya) {
+      let ifshow = "";
+      if (t == 999 && h === 999) {
         ifshow = "true";
         return ifshow;
-       }
+      }
       let temp = t.toFixed(2);
       let humidness = h.toFixed(2);
       let airPressure = p.toFixed(2);
       // let ifshow = "";
-     
+
       if (temp > 999 || temp <= 0) {
         //不给予赋值
       } else if (temp >= 18 && temp <= 26) {
@@ -538,30 +543,54 @@ export default {
           data[0].p9,
           5
         );
-        this_.newweizhi[14].airPressure = data[0].p1;
-        this_.newweizhi[14].ifshow = this_.returnifShow(999,999,data[0].p1,10);
+        this_.newweizhi[14].airPressure = data[0].p1; //; 1更
+        this_.newweizhi[14].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p1,
+          10
+        );
         this_.newweizhi[14].run = data[0].run;
 
-        this_.newweizhi[15].airPressure = data[0].p2;
-        this_.newweizhi[15].ifshow = this_.returnifShow(999,999,data[0].p2,10);
+        this_.newweizhi[15].airPressure = data[0].p3; //2更
+        this_.newweizhi[15].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p2,
+          10
+        );
         this_.newweizhi[15].run = data[0].run;
 
-        this_.newweizhi[16].airPressure = data[0].p3;
-        this_.newweizhi[16].ifshow = this_.returnifShow(999,999,data[0].p3,5);
-        this_.newweizhi[16].run = data[0].run;
+        // this_.newweizhi[16].airPressure =2323 //data[0].p3;
+        // this_.newweizhi[16].ifshow = this_.returnifShow(999,999,data[0].p3,5);
+        // this_.newweizhi[16].run =1 //data[0].run;
 
-        this_.newweizhi[17].airPressure =data[0].p4;
-        this_.newweizhi[17].ifshow = this_.returnifShow(999,999,data[0].p4,5);
+        this_.newweizhi[17].airPressure = data[0].p4; //缓冲出
+        this_.newweizhi[17].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p4,
+          5
+        );
         this_.newweizhi[17].run = data[0].run;
 
-        this_.newweizhi[18].airPressure = data[0].p5;
-        this_.newweizhi[18].ifshow = this_.returnifShow(999,999,data[0].p5,10);
+        this_.newweizhi[18].airPressure = data[0].p5; //退更
+        this_.newweizhi[18].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p5,
+          10
+        );
         this_.newweizhi[18].run = data[0].run;
 
-        this_.newweizhi[19].airPressure = 6666;
-        this_.newweizhi[19].ifshow = this_.returnifShow(999,999,data[0].p10,10);
+        this_.newweizhi[19].airPressure = data[0].p1; //p1; //p1 万
+        this_.newweizhi[19].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p10,
+          10
+        );
         this_.newweizhi[19].run = data[0].run;
-
       });
       let sql1 =
         "select * FROM DATA WHERE deviceName ='HAU02'  ORDER BY saveTime ASC LIMIT 1";
@@ -587,24 +616,36 @@ export default {
           data[0].p5,
           5
         );
-        
+
         this_.newweizhi[20].airPressure = data[0].p1;
-        this_.newweizhi[20].ifshow = this_.returnifShow(999,999,data[0].p1,10);
+        this_.newweizhi[20].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p1,
+          10
+        );
         this_.newweizhi[20].run = data[0].run;
 
         this_.newweizhi[21].airPressure = data[0].p2;
-        this_.newweizhi[21].ifshow = this_.returnifShow(999,999,data[0].p2,10);
+        this_.newweizhi[21].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p2,
+          10
+        );
         this_.newweizhi[21].run = data[0].run;
 
         this_.newweizhi[22].airPressure = data[0].p3;
-        this_.newweizhi[22].ifshow = this_.returnifShow(999,999,data[0].p3,5);
+        this_.newweizhi[22].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p3,
+          5
+        );
         this_.newweizhi[22].run = data[0].run;
-
-
-
       });
       let sql2 =
-        "select * FROM DATA WHERE deviceName ='HAU03' ORDER BY saveTime DESC LIMIT 1";//支原体室
+        "select * FROM DATA WHERE deviceName ='HAU03' ORDER BY saveTime DESC LIMIT 1"; //支原体室
       curdPost("sql", sql2).then((res) => {
         let data = res.variables.data;
         this_.newweizhi[6].temp = data[0].t1;
@@ -617,19 +658,32 @@ export default {
           data[0].p4,
           5
         );
-        this_.newweizhi[23].airPressure = data[0].p1
-        this_.newweizhi[23].ifshow = this_.returnifShow(999,999,data[0].p1,10);
+        this_.newweizhi[23].airPressure = data[0].p1;
+        this_.newweizhi[23].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p1,
+          10
+        );
         this_.newweizhi[23].run = data[0].run;
 
-        this_.newweizhi[24].airPressure = data[0].p2
-        this_.newweizhi[24].ifshow = this_.returnifShow(999,999,data[0].p2,10);
+        this_.newweizhi[24].airPressure = data[0].p2;
+        this_.newweizhi[24].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p2,
+          10
+        );
         this_.newweizhi[24].run = data[0].run;
 
         this_.newweizhi[25].airPressure = data[0].p3;
-        this_.newweizhi[25].ifshow = this_.returnifShow(999,999,data[0].p3,5);
+        this_.newweizhi[25].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p3,
+          5
+        );
         this_.newweizhi[25].run = data[0].run;
-
-
       });
       let sql3 =
         "select * FROM DATA WHERE deviceName ='HAU04'  ORDER BY saveTime DESC LIMIT 1";
@@ -645,17 +699,23 @@ export default {
           data[0].p3,
           5
         );
-        this_.newweizhi[26].airPressure = data[0].p1
-        this_.newweizhi[26].ifshow = this_.returnifShow(999,999,data[0].p1,10);
+        this_.newweizhi[26].airPressure = data[0].p1;
+        this_.newweizhi[26].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p1,
+          10
+        );
         this_.newweizhi[26].run = data[0].run;
 
         this_.newweizhi[27].airPressure = data[0].p2;
-        this_.newweizhi[27].ifshow = this_.returnifShow(999,999,data[0].p2,5);
+        this_.newweizhi[27].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p2,
+          5
+        );
         this_.newweizhi[27].run = data[0].run;
-
-
-
-
       });
       let sql4 =
         "select * FROM DATA WHERE deviceName ='PAU01'  ORDER BY saveTime DESC LIMIT 1";
@@ -663,7 +723,7 @@ export default {
         let data = res.variables.data;
         this_.newweizhi[8].temp = data[0].t1;
         this_.newweizhi[8].humidness = data[0].h1;
-        this_.newweizhi[8].airPressure = data[0].p9;//产物
+        this_.newweizhi[8].airPressure = data[0].p9; //产物
         this_.newweizhi[8].run = data[0].run;
         this_.newweizhi[8].ifshow = this_.returnifShow(
           data[0].t1,
@@ -673,7 +733,7 @@ export default {
         );
         this_.newweizhi[9].temp = data[0].t2;
         this_.newweizhi[9].humidness = data[0].h2;
-        this_.newweizhi[9].airPressure = data[0].p7;//扩增
+        this_.newweizhi[9].airPressure = data[0].p7; //扩增
         this_.newweizhi[9].run = data[0].run;
         this_.newweizhi[9].ifshow = this_.returnifShow(
           data[0].t2,
@@ -683,7 +743,7 @@ export default {
         );
         this_.newweizhi[10].temp = data[0].t3;
         this_.newweizhi[10].humidness = data[0].h3;
-        this_.newweizhi[10].airPressure = data[0].p5;//样本制备
+        this_.newweizhi[10].airPressure = data[0].p5; //样本制备
         this_.newweizhi[10].run = data[0].run;
         this_.newweizhi[10].ifshow = this_.returnifShow(
           data[0].t3,
@@ -693,7 +753,7 @@ export default {
         );
         this_.newweizhi[11].temp = data[0].t4;
         this_.newweizhi[11].humidness = data[0].h4;
-        this_.newweizhi[11].airPressure = data[0].p3;//试剂准备
+        this_.newweizhi[11].airPressure = data[0].p3; //试剂准备
         this_.newweizhi[11].run = data[0].run;
         this_.newweizhi[11].ifshow = this_.returnifShow(
           data[0].t4,
@@ -702,26 +762,49 @@ export default {
           15
         );
         this_.newweizhi[28].airPressure = data[0].p1; //pcr
-        this_.newweizhi[28].ifshow = this_.returnifShow(999,999,data[0].p1,5);
+        this_.newweizhi[28].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p1,
+          5
+        );
         this_.newweizhi[28].run = data[0].run;
 
-        this_.newweizhi[29].airPressure = data[0].p2;//试剂准备缓冲
-        this_.newweizhi[29].ifshow = this_.returnifShow(999,999,data[0].p2,5);
+        this_.newweizhi[29].airPressure = data[0].p2; //试剂准备缓冲
+        this_.newweizhi[29].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p2,
+          5
+        );
         this_.newweizhi[29].run = data[0].run;
 
-        this_.newweizhi[30].airPressure = data[0].p8//产物缓冲
-        this_.newweizhi[30].ifshow = this_.returnifShow(999,999,data[0].p8,5);
+        this_.newweizhi[30].airPressure = data[0].p8; //产物缓冲
+        this_.newweizhi[30].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p8,
+          5
+        );
         this_.newweizhi[30].run = data[0].run;
 
-        this_.newweizhi[31].airPressure = data[0].p6;//扩增缓冲
-        this_.newweizhi[31].ifshow = this_.returnifShow(999,999,data[0].p6,5);
+        this_.newweizhi[31].airPressure = data[0].p6; //扩增缓冲
+        this_.newweizhi[31].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p6,
+          5
+        );
         this_.newweizhi[31].run = data[0].run;
 
-        this_.newweizhi[32].airPressure = data[0].p4//样本制备缓冲
-        this_.newweizhi[32].ifshow = this_.returnifShow(999,999,data[0].p4s,5);
+        this_.newweizhi[32].airPressure = data[0].p4; //样本制备缓冲
+        this_.newweizhi[32].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p4s,
+          5
+        );
         this_.newweizhi[32].run = data[0].run;
-
-
       });
       let sql5 =
         "select * FROM DATA WHERE deviceName ='PAU02'  ORDER BY saveTime DESC LIMIT 1";
@@ -747,23 +830,23 @@ export default {
         );
 
         this_.newweizhi[33].airPressure = data[0].p1;
-        this_.newweizhi[33].ifshow = this_.returnifShow(999,999,data[0].p5);
+        this_.newweizhi[33].ifshow = this_.returnifShow(999, 999, data[0].p5);
         this_.newweizhi[33].run = data[0].run;
 
         this_.newweizhi[34].airPressure = data[0].p2;
-        this_.newweizhi[34].ifshow = this_.returnifShow(999,999,data[0].p5);
+        this_.newweizhi[34].ifshow = this_.returnifShow(999, 999, data[0].p5);
         this_.newweizhi[34].run = data[0].run;
 
         this_.newweizhi[35].airPressure = data[0].p3;
-        this_.newweizhi[35].ifshow = this_.returnifShow(999,999,data[0].p5);
+        this_.newweizhi[35].ifshow = this_.returnifShow(999, 999, data[0].p5);
         this_.newweizhi[36].run = data[0].run;
 
         this_.newweizhi[37].airPressure = data[0].p5;
-        this_.newweizhi[37].ifshow = this_.returnifShow(999,999,data[0].p5);
+        this_.newweizhi[37].ifshow = this_.returnifShow(999, 999, data[0].p5);
         this_.newweizhi[37].run = data[0].run;
 
         this_.newweizhi[38].airPressure = data[0].p6;
-        this_.newweizhi[38].ifshow = this_.returnifShow(999,999,data[0].p5);
+        this_.newweizhi[38].ifshow = this_.returnifShow(999, 999, data[0].p5);
         this_.newweizhi[38].run = data[0].run;
 
         // this_.newweizhi[37].airPressure = data[0].p1;
@@ -1045,10 +1128,11 @@ li {
         position: absolute;
         z-index: 99;
         width: 90px;
-        left: 30px;
+        left: 0px;
         top: 0px;
         color: black;
         opacity: 0;
+        padding-left: 20px;
       }
       .content:hover {
         opacity: 1;