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