提交: 处理监控大屏 重复 告警ws 返回 success 问题

This commit is contained in:
23688nl 2022-09-08 17:58:00 +08:00
parent 129a14cb0d
commit aa26f98808
1 changed files with 6 additions and 4 deletions

View File

@ -76,7 +76,8 @@ export default {
projectName: '中海创项目',
projectAddress: '福建省福州市闽侯县高新区软件园二',
alarmContent: '电池异常高温告警'
}
},
isOpen: true
};
},
watch: {},
@ -127,11 +128,12 @@ export default {
this.stompClient.onclose = this.socket_onclose;
},
socket_message(evt) {
if (evt.data === 'success') {
if (evt.data === 'success' && this.isOpen) {
if(this.getExploreName() === 'Chrome') {
this.$alert('告警已连接,请开启声音接听...', '提示', {
confirmButtonText: '确定',
});
confirmButtonText: '确定',
});
this.isOpen = false;
}
} else {
const data = JSON.parse(evt.data);