deepsea пре 1 година
родитељ
комит
fe2b46c29a
1 измењених фајлова са 22 додато и 24 уклоњено
  1. 22 24
      src/views/ordinaryPage/index.vue

+ 22 - 24
src/views/ordinaryPage/index.vue

@@ -787,6 +787,7 @@ export default {
       if (count % 5 == 0) {
         window.getsqlData(window.sdkInstance, window.uwbInstance)
       }
+      this.refreshBenchStatus()
       if (count > 30000) {
         console.log("end");
         that.clearMyInterval(that.timerId);
@@ -2470,6 +2471,27 @@ export default {
       }
     },
     getAutoPlanResult(key) {},
+    refreshBenchStatus() {
+      var readyCount = 0;
+      var occupiedCount = 0;
+      var offlineCount = 0;
+      console.log("this.benchList", this.benchList.length);
+      this.benchList.forEach((element) => {
+        //console.log('element',element);
+        if (element.status == "ready") {
+          readyCount++;
+        } else if (element.status == "error") {
+          offlineCount++;
+        } else if (element.status == "offline") {
+          offlineCount++;
+        } else {
+          occupiedCount++;
+        }
+      });
+      this.readyCount = readyCount;
+      this.offlineCount = offlineCount;
+      this.occupiedCount = occupiedCount;
+    }
   },
   watch: {
     benchDisplayVisible(newValue, oldValue) {
@@ -2499,30 +2521,6 @@ export default {
           this.getImgList(objRBLReverse);
         }, 300);
       }
-      var readyCount = 0;
-      var occupiedCount = 0;
-      var offlineCount = 0;
-      let newStr = newValue.map(s => s.status).join();
-      let oldStr = oldValue.map(s => s.status).join();
-      if (newStr != oldStr) {
-        window.getsqlData(window.sdkInstance, window.uwbInstance)
-      }
-      console.log("this.benchList", this.benchList.length);
-      this.benchList.forEach((element) => {
-        //console.log('element',element);
-        if (element.status == "ready") {
-          readyCount++;
-        } else if (element.status == "error") {
-          offlineCount++;
-        } else if (element.status == "offline") {
-          offlineCount++;
-        } else {
-          occupiedCount++;
-        }
-      });
-      this.readyCount = readyCount;
-      this.offlineCount = offlineCount;
-      this.occupiedCount = occupiedCount;
     },
     isOpen3d(newValue, oldValue) {
       // if (!newValue) {