Browse Source

Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base

hongrunxia 5 tháng trước cách đây
mục cha
commit
b026adba6a

+ 7 - 0
src/views/vent/home/configurable/configurable.api.ts

@@ -60,6 +60,13 @@ export const getBDFireData = (params) => {
     res.sgGxObj.devGxcw.forEach((e) => {
       e.fibreTemperatureArr = JSON.parse(e.fibreTemperature);
     });
+    res.sgGxObj.devSgjc.forEach((e) => {
+      e.o2val = e.o2Val || 0;
+      e.coval = e.coVal || 0;
+      e.gasval = e.gasVal || 0;
+      e.ch2val = e.ch2Val || 0;
+      e.chval = e.chVal || 0;
+    });
     return res;
   });
 };

+ 1 - 1
src/views/vent/home/configurable/configurable.data.ts

@@ -2619,7 +2619,7 @@ export const testConfigBDFire: Config[] = [
       slice: {
         direction: 'column',
         ignoreOverflow: true,
-        basis: ['35%', '65%'],
+        basis: ['30%', '70%'],
       },
       layout: ['board', 'chart'],
       board: [

+ 23 - 27
src/views/vent/monitorManager/deviceMonitor/components/device/modal/blastDelta.vue

@@ -350,43 +350,39 @@
         (parseFloat(coordinateB.y) - parseFloat(coordinateA.y))
     );
   }
-  function update(newV) {
-    if (newV.btTriBlast) {
-      maxY1.value = parseFloat(newV.o2val);
-      maxX1.value = parseFloat(newV.coval) * 0.0001 + parseFloat(newV.gasval) + parseFloat(newV.ch2val) * 0.0001 + parseFloat(newV.chval) * 0.0001;
-      let btTriBlasts = JSON.parse(newV.btTriBlast);
-      coordinateA.x = btTriBlasts.A_x;
-      coordinateA.y = btTriBlasts.A_y;
-      coordinateB.x = btTriBlasts.B_x;
-      coordinateB.y = btTriBlasts.B_y;
-      coordinateE.x = btTriBlasts.E_x;
-      coordinateE.y = btTriBlasts.E_y;
-      coordinateF.x = btTriBlasts.F_x;
-      coordinateF.y = btTriBlasts.F_y;
-      coordinateG.x = btTriBlasts.G_x;
-      coordinateG.y = btTriBlasts.G_y;
-      if (
-        !((coordinateA.y - coordinateB.y) / (coordinateA.x - coordinateB.x)) ||
-        (coordinateA.y - coordinateB.y) / (coordinateA.x - coordinateB.x) == 1
-      ) {
-        getUnblast();
-      } else {
-        getBlast();
-      }
-    }
-  }
 
   watch(
     () => props.posMonitor,
     (newV, oldV) => {
-      update(newV);
+      if (newV.btTriBlast) {
+        maxY1.value = parseFloat(newV.o2val);
+        maxX1.value = parseFloat(newV.coval) * 0.0001 + parseFloat(newV.gasval) + parseFloat(newV.ch2val) * 0.0001 + parseFloat(newV.chval) * 0.0001;
+        let btTriBlasts = JSON.parse(newV.btTriBlast);
+        coordinateA.x = btTriBlasts.A_x;
+        coordinateA.y = btTriBlasts.A_y;
+        coordinateB.x = btTriBlasts.B_x;
+        coordinateB.y = btTriBlasts.B_y;
+        coordinateE.x = btTriBlasts.E_x;
+        coordinateE.y = btTriBlasts.E_y;
+        coordinateF.x = btTriBlasts.F_x;
+        coordinateF.y = btTriBlasts.F_y;
+        coordinateG.x = btTriBlasts.G_x;
+        coordinateG.y = btTriBlasts.G_y;
+        if (
+          !((coordinateA.y - coordinateB.y) / (coordinateA.x - coordinateB.x)) ||
+          (coordinateA.y - coordinateB.y) / (coordinateA.x - coordinateB.x) == 1
+        ) {
+          getUnblast();
+        } else {
+          getBlast();
+        }
+      }
     },
     { deep: true }
   );
 
   onMounted(() => {
     getAreas();
-    update(props.posMonitor);
   });
 </script>