siyouyou 4 miesięcy temu
rodzic
commit
5ce5ce2213
1 zmienionych plików z 8 dodań i 8 usunięć
  1. 8 8
      src/layout/index.vue

+ 8 - 8
src/layout/index.vue

@@ -106,6 +106,7 @@ export default {
       warnNum: 0,
       getNewerTime:'',
       warningSocketList: null,
+      dialogShow:false,
     }
   },
   computed: {
@@ -143,8 +144,10 @@ export default {
     });
   },
   mounted() {
-    this.getWtsAlarm()
+      this.getWtsAlarm()
     this.startWebSocket();
+    const close = document.getElementById('close');
+      close.style.display='none'
   },
   methods: {
    getWtsAlarm(){
@@ -174,9 +177,11 @@ export default {
         }
       })
       if (res.data.records.length > 0) {
-        // this.warnVisible = true
-        
         this.warnNum = res.data.records.length
+        if(this.warnNum>0){
+        const close = document.getElementById('close');
+      close.style.display='block'
+       }
       this.getNewerTime= this.getTime(closestTime)
       const closeBox = document.getElementById('close');
         closeBox.style.display='block'
@@ -234,10 +239,6 @@ return  `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
               // this.warningSocket.show = true
               // this.warningSocket.data = res.data
               // console.log(this.warningSocket.data)
-               await msgAlarmWebAlarm().then((res) => {
-                this.warnNum =res.data.webAlarmNum
-                }
-              )
               this.getWtsAlarm()
               // this.warnVisible = true
               const closeBox = document.getElementById('close');
@@ -308,7 +309,6 @@ return  `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
     },
     toClose(){
       const close = document.getElementById('close');
-      console.log(close,'vvvvv');
       close.style.display='none'
       // this.warnVisible=false
       // alert(this.warnVisible)