Browse Source

工程现场 大屏界面修改

zhanghao 1 month ago
parent
commit
76f717cd18
2 changed files with 16 additions and 4 deletions
  1. 8 2
      src/views/pad/engineering/main.vue
  2. 8 2
      src/views/screen/engineering/main.vue

+ 8 - 2
src/views/pad/engineering/main.vue

@@ -412,11 +412,14 @@ export default {
       });
     },
     getProjectNumX() {
+      for (let i = 0; i < this.parest.length; i++){
+        this.parest[i].num = 0
+      }
       getProjectNumX(this.appOrg).then((res) => {
         if (Number(res.code) === 200) {
           const fetchedData = res.data;
           if (res.data.length > 0) {
-            for (let i = 0; i < fetchedData.length; i++) {
+            for (let i = 0; i < this.parest.length; i++) {
               this.parest[fetchedData[i].subdivision - 1].num = fetchedData[i].num;
             }
           }
@@ -429,11 +432,14 @@ export default {
       });
     },
     getProjectNumY() {
+      for (let i = 0; i < this.parest1.length; i++){
+        this.parest1[i].num = 0
+      }
       getProjectNumY(this.appOrg).then((res) => {
         if (Number(res.code) === 200) {
           const fetchedData = res.data;
           if (res.data.length > 0){
-            for (let i = 0; i < fetchedData.length; i++) {
+            for (let i = 0; i < this.parest1.length; i++) {
               this.parest1[fetchedData[i].subdivision-11].num= fetchedData[i].num;
             }
           }

+ 8 - 2
src/views/screen/engineering/main.vue

@@ -413,11 +413,14 @@ export default {
       });
     },
     getProjectNumX() {
+      for (let i = 0; i < this.parest.length; i++){
+        this.parest[i].num = 0
+      }
       getProjectNumX(this.appOrg).then((res) => {
         if (Number(res.code) === 200) {
           const fetchedData = res.data;
           if (res.data.length > 0) {
-            for (let i = 0; i < fetchedData.length; i++) {
+            for (let i = 0; i < this.parest.length; i++) {
               this.parest[fetchedData[i].subdivision - 1].num = fetchedData[i].num;
             }
           }
@@ -430,11 +433,14 @@ export default {
       });
     },
     getProjectNumY() {
+      for (let i = 0; i < this.parest1.length; i++){
+        this.parest1[i].num = 0
+      }
       getProjectNumY(this.appOrg).then((res) => {
         if (Number(res.code) === 200) {
           const fetchedData = res.data;
           if (res.data.length > 0){
-            for (let i = 0; i < fetchedData.length; i++) {
+            for (let i = 0; i < this.parest1.length; i++) {
               this.parest1[fetchedData[i].subdivision-11].num= fetchedData[i].num;
             }
           }