Эх сурвалжийг харах

工程现场 大屏界面修改

zhanghao 1 сар өмнө
parent
commit
92f1e2577c

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

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

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

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