Browse Source

指挥中心问题

Shannon_mu 2 years ago
parent
commit
5ba1a46a96

+ 25 - 1
commandCenter/src/views/commandDispatch/pop/tableList.vue

@@ -1,6 +1,7 @@
 <template>
     <zz-table
         :settings="{ showIndex: true, stripe: true }"
+        emptyText="暂无告警结果"
         :cols="cols"
         :data="mixins_list"
         :pageset="mixins_pageset"
@@ -43,6 +44,9 @@ export default {
                     if (0 === status) {
                         this.mixins_list = list;
                         this.mixins_pageset.total = total * 1;
+                        if (list.length == 0) {
+                            this.setHideButton();
+                        }
                     } else {
                         this.$message.error(msg);
                     }
@@ -69,9 +73,12 @@ export default {
                     this.cols[0].prop = 'alarmName';
                     this.cols[1].prop = 'waringDate';
 
-                    if (0 === status) {
+                    if (0 == status) {
                         this.mixins_list = list;
                         this.mixins_pageset.total = total * 1;
+                        if (list.length == 0) {
+                            this.setHideButton();
+                        }
                     } else {
                         this.$message.error(msg);
                     }
@@ -88,6 +95,9 @@ export default {
                     if (0 === status) {
                         this.mixins_list = list;
                         this.mixins_pageset.total = total * 1;
+                        if (list.length == 0) {
+                            this.setHideButton();
+                        }
                     } else {
                         this.$message.error(msg);
                     }
@@ -111,6 +121,20 @@ export default {
                 //水电告警
                 this.getHydropower();
             }
+        },
+        setHideButton() {
+            let thisPopArr = this.$store.getters['getPopups'];
+            let thisPop = thisPopArr[this.modePop(this.$parent.$parent.params.id)];
+            thisPop.showConfirmButton = true;
+        },
+        modePop(id) {
+            let indexs = null;
+            this.$store.getters['getPopups'].map((item, index) => {
+                if (item.id == id) {
+                    indexs = index;
+                }
+            });
+            return indexs;
         }
     },
     created() {

+ 1 - 1
commandCenter/src/views/commandDispatch/pop/typeAccessControl.vue

@@ -96,6 +96,7 @@ export default {
                 width: '5rem',
                 height: '4rem',
                 confirmButtonText: '添加工单',
+                showConfirmButton:false,
                 showCancelButton: true,
                 props: {
                     row: this.params.row,
@@ -109,7 +110,6 @@ export default {
     created() {
         let ids = JSON.parse(JSON.stringify(this.params.row.deviceId));
         let newIds = ids.split(',');
-        debugger;
         this.formData.nodeId = newIds[0];
         this.formData.tenantId = newIds[1];
         this.getData(newIds[0]);

+ 0 - 1
commandCenter/src/views/commandDispatch/pop/typeCamera.vue

@@ -16,7 +16,6 @@ export default {
                 .then(({ status, data, msg }) => {
                     if (status == 0) {
                         this.formData = data;
-                        console.log(data);
                     } else {
                         this.$message.error(msg);
                     }

+ 2 - 2
commandCenter/src/views/commandDispatch/pop/typeHydropower.vue

@@ -40,7 +40,6 @@ export default {
                 .then(({ status, data, msg }) => {
                     if (status == 0) {
                         this.formData = data;
-                        console.log(data);
                     } else {
                         this.$message.error(msg);
                     }
@@ -48,7 +47,7 @@ export default {
                 .catch(() => {});
         },
         valveToggle(satus, id) {
-            this.$msgBox(`远程${satus ==0 ?'开':'关'}阀`, `是否远程${satus ==0 ?'开':'关'}阀?`)
+            this.$msgBox(`远程${satus == 0 ? '开' : '关'}阀`, `是否远程${satus == 0 ? '开' : '关'}阀?`)
                 .then(() => {
                     this.$http
                         .post('/sc-energy/device/batchValve', {
@@ -73,6 +72,7 @@ export default {
                 width: '5rem',
                 height: '4rem',
                 confirmButtonText: '添加工单',
+                showConfirmButton: false,
                 showCancelButton: true,
                 props: {
                     row: this.params.row