浏览代码

fix:环境监控

zhangjingyuan 3 年之前
父节点
当前提交
94c60b2ee8
共有 1 个文件被更改,包括 166 次插入137 次删除
  1. 166 137
      src/views/huanjingjiankong/huanjingjiankong.vue

+ 166 - 137
src/views/huanjingjiankong/huanjingjiankong.vue

@@ -149,7 +149,7 @@ export default {
           y: 653,
         },
         {
-          x: 847,
+          x: 847,//3
           y: 653,
         },
         {
@@ -158,7 +158,7 @@ export default {
           y: 655,
         },
         {
-          x: 1460,
+          x: 1460,//5
           y: 450,
         },
         {
@@ -173,7 +173,7 @@ export default {
         },
         //产物分析室
         {
-          x: 950,
+          x: 950,//8
           y: 127,
         },
         {
@@ -185,7 +185,7 @@ export default {
           y: 127,
         },
         {
-          x: 1353,
+          x: 1353,//11
           y: 127,
         },
         {
@@ -194,37 +194,33 @@ export default {
           y: 99,
         },
         {
-          x: 357,
+          x: 357,//13
           y: 200,
         },
         //细胞->更
         {
-          x: 584,
+          x: 584,//14
           y: 420,
         },
         {
           x: 584,
           y: 480,
         },
-        // {
-        //   x: 640,
-        //   y: 465,
-        // },
         {
           x: 710,
-          y: 480,
+          y: 480//退更缓冲
         },
         {
-          x: 710,
+          x: 710,//退更
           y: 420,
         },
         {
-          x: 584,
+          x: 584,//万级
           y: 547,
         },
         // 分练区 ->更
         {
-          x: 1390,
+          x: 1390,//19
           y: 560,
         },
         {
@@ -237,7 +233,7 @@ export default {
         },
         {
           //支原体检测->更
-          x: 850,
+          x: 850,//22
           y: 250,
         },
         {
@@ -246,16 +242,16 @@ export default {
         },
         {
           x: 780,
-          y: 235,
+          y: 235,//24
         },
 
         {
           //无菌检测->更
-          x: 850,
+          x: 850,//25
           y: 180,
         },
         {
-          x: 850,
+          x: 850,//26
           y: 70,
         },
         {
@@ -268,7 +264,7 @@ export default {
           y: 270,
         },
         {
-          x: 965,
+          x: 965,//29
           y: 220,
         },
         {
@@ -276,7 +272,7 @@ export default {
           y: 220,
         },
         {
-          x: 1190,
+          x: 1190,//31
           y: 220,
         },
         //无菌阳性->
@@ -492,12 +488,13 @@ export default {
       return ifshow;
     },
 
-    timeData() {
+   async timeData() {
       // 大屏数据列表赋值
       let this_ = this;
+      let zhi_wu_yi_run='';
       let sql =
-        "select * FROM DATA WHERE deviceName = 'HAU01'  ORDER BY saveTime DESC LIMIT 1";
-      curdPost("sql", sql).then((res) => {
+        "select * FROM DATA WHERE deviceName = 'HAU01'  ORDER BY saveTime DESC LIMIT 1";//细胞的退更缓冲区域
+    await  curdPost("sql", sql).then((res) => {
         let data = res.variables.data;
         this_.newweizhi[0].temp = data[0].t1;
         this_.newweizhi[0].humidness = data[0].h1;
@@ -547,7 +544,7 @@ export default {
         this_.newweizhi[14].ifshow = this_.returnifShow(
           999,
           999,
-          data[0].p1,
+          data[0].p2,
           10
         );
         this_.newweizhi[14].run = data[0].run;
@@ -556,299 +553,331 @@ export default {
         this_.newweizhi[15].ifshow = this_.returnifShow(
           999,
           999,
-          data[0].p2,
+          data[0].p3,
           10
         );
         this_.newweizhi[15].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(
+        this_.newweizhi[16].airPressure = data[0].p4; //退更缓冲
+        this_.newweizhi[16].ifshow = this_.returnifShow(
           999,
           999,
           data[0].p4,
           5
         );
-        this_.newweizhi[17].run = data[0].run;
+        this_.newweizhi[16].run = data[0].run;
 
-        this_.newweizhi[18].airPressure = data[0].p5; //退更
-        this_.newweizhi[18].ifshow = this_.returnifShow(
+        this_.newweizhi[17].airPressure = data[0].p5; //退更
+        this_.newweizhi[17].ifshow = this_.returnifShow(
           999,
           999,
           data[0].p5,
           10
         );
-        this_.newweizhi[18].run = data[0].run;
-
-        this_.newweizhi[19].airPressure = data[0].p1; //p1; //p1 万
-        this_.newweizhi[19].ifshow = this_.returnifShow(
+        this_.newweizhi[17].run = data[0].run;
+        this_.newweizhi[18].airPressure = data[0].p1; //p1; //p1 万
+        this_.newweizhi[18].ifshow = this_.returnifShow(
           999,
           999,
-          data[0].p10,
+          data[0].p1,
           10
         );
-        this_.newweizhi[19].run = data[0].run;
+        this_.newweizhi[18].run = data[0].run;
       });
-      let sql1 =
-        "select * FROM DATA WHERE deviceName ='HAU02'  ORDER BY saveTime ASC LIMIT 1";
-      curdPost("sql", sql1).then((res) => {
+      let sql1 ="select * FROM DATA WHERE deviceName ='HAU02'  ORDER BY saveTime DESC LIMIT 1";
+    await  curdPost("sql", sql1).then((res) => {
         let data = res.variables.data;
         this_.newweizhi[4].temp = data[0].t1;
         this_.newweizhi[4].humidness = data[0].h1;
-        this_.newweizhi[4].airPressure = data[0].p4;
+        this_.newweizhi[4].airPressure = data[0].p1;
         this_.newweizhi[4].run = data[0].run;
         this_.newweizhi[4].ifshow = this_.returnifShow(
           data[0].t1,
           data[0].h1,
-          data[0].p4,
+          data[0].p1,
           5
         );
         this_.newweizhi[5].temp = data[0].t2;
         this_.newweizhi[5].humidness = data[0].h2;
-        this_.newweizhi[5].airPressure = data[0].p5;
+        this_.newweizhi[5].airPressure = data[0].p2;
         this_.newweizhi[5].run = data[0].run;
+
         this_.newweizhi[5].ifshow = this_.returnifShow(
           data[0].t2,
           data[0].h2,
-          data[0].p5,
+          data[0].p2,
           5
         );
 
-        this_.newweizhi[20].airPressure = data[0].p1;
-        this_.newweizhi[20].ifshow = this_.returnifShow(
+        this_.newweizhi[19].airPressure = data[0].p3;
+        this_.newweizhi[19].ifshow = this_.returnifShow(
           999,
           999,
-          data[0].p1,
+          data[0].p3,
           10
         );
-        this_.newweizhi[20].run = data[0].run;
-
-        this_.newweizhi[21].airPressure = data[0].p2;
-        this_.newweizhi[21].ifshow = this_.returnifShow(
+        this_.newweizhi[19].run = data[0].run;    
+  
+        this_.newweizhi[20].airPressure = data[0].p4;
+        this_.newweizhi[20].ifshow = this_.returnifShow(
           999,
           999,
-          data[0].p2,
+          data[0].p4,
           10
         );
-        this_.newweizhi[21].run = data[0].run;
-
-        this_.newweizhi[22].airPressure = data[0].p3;
-        this_.newweizhi[22].ifshow = this_.returnifShow(
+        this_.newweizhi[20].run = data[0].run;
+        this_.newweizhi[21].airPressure = data[0].p5;
+        this_.newweizhi[21].ifshow = this_.returnifShow(
           999,
           999,
-          data[0].p3,
+          data[0].p5,
           5
         );
-        this_.newweizhi[22].run = data[0].run;
+        this_.newweizhi[21].run = data[0].run;
+        
       });
       let sql2 =
         "select * FROM DATA WHERE deviceName ='HAU03' ORDER BY saveTime DESC LIMIT 1"; //支原体室
-      curdPost("sql", sql2).then((res) => {
+      await curdPost("sql", sql2).then((res) => {
         let data = res.variables.data;
         this_.newweizhi[6].temp = data[0].t1;
         this_.newweizhi[6].humidness = data[0].h1;
-        this_.newweizhi[6].airPressure = data[0].p4;
+        this_.newweizhi[6].airPressure = data[0].p1;
         this_.newweizhi[6].run = data[0].run;
         this_.newweizhi[6].ifshow = this_.returnifShow(
           data[0].t1,
           data[0].h1,
-          data[0].p4,
+          data[0].p1,
           5
         );
-        this_.newweizhi[23].airPressure = data[0].p1;
+        this_.newweizhi[22].airPressure = data[0].p2;//支原体 与无菌共用一更
+        this_.newweizhi[22].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p2,
+          5
+        );
+        this_.newweizhi[22].run = data[0].run;
+        
+        zhi_wu_yi_run=data[0].run;
+        
+        this_.newweizhi[23].airPressure = data[0].p3;
         this_.newweizhi[23].ifshow = this_.returnifShow(
           999,
           999,
-          data[0].p1,
+          data[0].p3,
           10
         );
         this_.newweizhi[23].run = data[0].run;
-
-        this_.newweizhi[24].airPressure = data[0].p2;
+        
+        this_.newweizhi[24].airPressure = data[0].p4;
         this_.newweizhi[24].ifshow = this_.returnifShow(
           999,
           999,
-          data[0].p2,
+          data[0].p4,
           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].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].run = data[0].run;
+        
       });
-      let sql3 =
-        "select * FROM DATA WHERE deviceName ='HAU04'  ORDER BY saveTime DESC LIMIT 1";
-      curdPost("sql", sql3).then((res) => {
+      let sql3 ="select * FROM DATA WHERE deviceName ='HAU04'  ORDER BY saveTime DESC LIMIT 1";
+      await curdPost("sql", sql3).then((res) => {
         let data = res.variables.data;
         this_.newweizhi[7].temp = data[0].t1;
         this_.newweizhi[7].humidness = data[0].h1;
-        this_.newweizhi[7].airPressure = data[0].p3;
-        this_.newweizhi[7].run = data[0].run;
+        this_.newweizhi[7].airPressure = data[0].p1;
+        this_.newweizhi[7].run = data[0].run;       
         this_.newweizhi[7].ifshow = this_.returnifShow(
           data[0].t1,
           data[0].h1,
-          data[0].p3,
+          data[0].p1,
           5
         );
-        this_.newweizhi[26].airPressure = data[0].p1;
-        this_.newweizhi[26].ifshow = this_.returnifShow(
+        this_.newweizhi[22].airPressure = data[0].p4;//支原体 与无菌共用一更
+        this_.newweizhi[22].ifshow = this_.returnifShow(
           999,
           999,
-          data[0].p1,
-          10
+          data[0].p4,
+          5
         );
-        this_.newweizhi[26].run = data[0].run;
-
-        this_.newweizhi[27].airPressure = data[0].p2;
-        this_.newweizhi[27].ifshow = this_.returnifShow(
+        zhi_wu_yi_run !=1?this_.newweizhi[22].run = data[0].run:'';
+        
+        this_.newweizhi[25].airPressure = data[0].p2;
+        this_.newweizhi[25].ifshow = this_.returnifShow(
           999,
           999,
           data[0].p2,
           5
         );
-        this_.newweizhi[27].run = data[0].run;
+        this_.newweizhi[25].run = data[0].run;
+        
+
+        this_.newweizhi[26].airPressure = data[0].p3;
+        this_.newweizhi[26].ifshow = this_.returnifShow(
+          999,
+          999,
+          data[0].p3,
+          10
+        );
+        this_.newweizhi[26].run = data[0].run;
+        
+
+        
       });
       let sql4 =
         "select * FROM DATA WHERE deviceName ='PAU01'  ORDER BY saveTime DESC LIMIT 1";
-      curdPost("sql", sql4).then((res) => {
+      await curdPost("sql", sql4).then((res) => {
         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].p1; //产物
         this_.newweizhi[8].run = data[0].run;
         this_.newweizhi[8].ifshow = this_.returnifShow(
           data[0].t1,
           data[0].h1,
-          data[0].p9,
+          data[0].p1,
           -10
         );
+
         this_.newweizhi[9].temp = data[0].t2;
         this_.newweizhi[9].humidness = data[0].h2;
-        this_.newweizhi[9].airPressure = data[0].p7; //扩增
-        this_.newweizhi[9].run = data[0].run;
+        this_.newweizhi[9].airPressure = data[0].p2; //扩增
+        this_.newweizhi[9].run = data[0].run;    
         this_.newweizhi[9].ifshow = this_.returnifShow(
           data[0].t2,
           data[0].h2,
-          data[0].p7,
+          data[0].p2,
           -25
         );
+
         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].p3; //样本制备
         this_.newweizhi[10].run = data[0].run;
         this_.newweizhi[10].ifshow = this_.returnifShow(
           data[0].t3,
           data[0].h3,
-          data[0].p5,
+          data[0].p3,
           5
         );
+
         this_.newweizhi[11].temp = data[0].t4;
         this_.newweizhi[11].humidness = data[0].h4;
-        this_.newweizhi[11].airPressure = data[0].p3; //试剂准备
-        this_.newweizhi[11].run = data[0].run;
+        this_.newweizhi[11].airPressure = 66 //试剂准备
+        this_.newweizhi[11].run = data[0].run;    
         this_.newweizhi[11].ifshow = this_.returnifShow(
           data[0].t4,
           data[0].h4,
-          data[0].p3,
+          66,
           15
         );
-        this_.newweizhi[28].airPressure = data[0].p1; //pcr
+
+        this_.newweizhi[28].airPressure = data[0].p4; //pcr
         this_.newweizhi[28].ifshow = this_.returnifShow(
           999,
           999,
-          data[0].p1,
+          data[0].p4,
           5
         );
         this_.newweizhi[28].run = data[0].run;
-
-        this_.newweizhi[29].airPressure = data[0].p2; //试剂准备缓冲
+        
+        this_.newweizhi[29].airPressure = data[0].p6; //试剂准备缓冲
         this_.newweizhi[29].ifshow = this_.returnifShow(
           999,
           999,
-          data[0].p2,
+          data[0].p6,
           5
         );
         this_.newweizhi[29].run = data[0].run;
-
-        this_.newweizhi[30].airPressure = data[0].p8; //产物缓冲
+        
+        this_.newweizhi[30].airPressure = data[0].p7 //产物缓冲
         this_.newweizhi[30].ifshow = this_.returnifShow(
           999,
           999,
-          data[0].p8,
+          data[0].p7,
           5
         );
         this_.newweizhi[30].run = data[0].run;
-
-        this_.newweizhi[31].airPressure = data[0].p6; //扩增缓冲
+        
+        this_.newweizhi[31].airPressure = data[0].p8; //缓冲三
         this_.newweizhi[31].ifshow = this_.returnifShow(
           999,
           999,
-          data[0].p6,
+          data[0].p8,
           5
         );
         this_.newweizhi[31].run = data[0].run;
+        
 
-        this_.newweizhi[32].airPressure = data[0].p4; //样本制备缓冲
-        this_.newweizhi[32].ifshow = this_.returnifShow(
+        this_.newweizhi[27].run = data[0].run;
+        this_.newweizhi[27].airPressure = data[0].p9; //PCR走廊
+        this_.newweizhi[27].ifshow = this_.returnifShow(
           999,
           999,
-          data[0].p4s,
+          data[0].p9,
           5
         );
-        this_.newweizhi[32].run = data[0].run;
+        this_.newweizhi[27].run = data[0].run;
+        
       });
       let sql5 =
         "select * FROM DATA WHERE deviceName ='PAU02'  ORDER BY saveTime DESC LIMIT 1";
-      curdPost("sql", sql5).then((res) => {
+      await curdPost("sql", sql5).then((res) => {
         let data = res.variables.data;
         this_.newweizhi[12].temp = data[0].t1;
         this_.newweizhi[12].humidness = data[0].h1;
-        this_.newweizhi[12].airPressure = data[0].p4;
+        this_.newweizhi[12].airPressure = data[0].p2;
         this_.newweizhi[12].run = data[0].run;
         this_.newweizhi[12].ifshow = this_.returnifShow(
           data[0].t1,
           data[0].h1,
-          data[0].p1
+          data[0].p2
         );
         this_.newweizhi[13].temp = data[0].t2;
         this_.newweizhi[13].humidness = data[0].h2;
-        this_.newweizhi[13].airPressure = data[0].p2;
+        this_.newweizhi[13].airPressure = data[0].p1;
         this_.newweizhi[13].run = data[0].run;
+        
         this_.newweizhi[13].ifshow = this_.returnifShow(
           data[0].t2,
           data[0].h2,
-          data[0].p2
+          data[0].p1
         );
 
+
+        
         this_.newweizhi[33].airPressure = data[0].p1;
         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].airPressure = 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[36].run = data[0].run;
+        this_.newweizhi[35].airPressure = data[0].p4; //支原体二更
+        this_.newweizhi[35].ifshow = this_.returnifShow(999, 999, data[0].p4);
+        this_.newweizhi[35].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].airPressure = data[0].p3; //一更
+        this_.newweizhi[37].ifshow = this_.returnifShow(999, 999, data[0].p3);
         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].run = data[0].run;
-
+        
+        
+        this_.newweizhi[36].airPressure = data[0].p6;
+        this_.newweizhi[36].ifshow = this_.returnifShow(999, 999, data[0].p6);
+        this_.newweizhi[36].run = data[0].run;
+       
         // this_.newweizhi[37].airPressure = data[0].p1;
         // this_.newweizhi[31].ifshow = this_.returnifShow(999,999,data[0].p5);
         // this_.newweizhi[37].run = data[0].run;