Browse Source

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

lxh 5 hours ago
parent
commit
8109ce8682

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

@@ -96,6 +96,16 @@ export const list = (params) => {
     if (res.device_arr) {
       res.device_arr = Object.values(res.device);
     }
+    if (res.sys_wind) {
+      res.sys_wind.forEach((e) => {
+        if (e.readData.m3) {
+          e.readData.m3 = Math.abs(parseFloat(e.readData.m3));
+        }
+        if (e.readData.va) {
+          e.readData.va = Math.abs(parseFloat(e.readData.va));
+        }
+      });
+    }
 
     return res;
   });

+ 4 - 1
src/views/vent/monitorManager/compressor/nitrogen.dixia.threejs.ts

@@ -66,9 +66,12 @@ class NitrogenUnderground {
             // if (i == 2) nitrogenMonitorCSS3D.position.set(-0.89, 0.31, 0.08);
             // if (i == 3) nitrogenMonitorCSS3D.position.set(-0.89, 0.31, 0.12);
             this.group.add(nitrogenMonitorCSS3D);
-          } else {
           }
         }
+        // 而如若此项超出了已绑定的注氮机数量,则隐藏或销毁
+        if (this.group && i >= this.nitrogenNum && this.group.getObjectByName('monitorNitrogenText' + i)) {
+          this.group.remove(this.group.getObjectByName('monitorNitrogenText' + i) as THREE.Object3D);
+        }
       }
     }
     if (this.group && !this.group.getObjectByName('downWindMonitor')) {