|
@@ -159,17 +159,18 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.wsinit();
|
|
|
- // this.timer = setInterval(() => {
|
|
|
- // this.wsinit();
|
|
|
- // }, 2000);
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ this.wsinit();
|
|
|
+ }, 60000);
|
|
|
},
|
|
|
unmounted() {
|
|
|
console.log("离开标记", this.socketLeaveFlag);
|
|
|
- // clearInterval(this.timer);
|
|
|
- // this.timer = null;
|
|
|
+ clearInterval(this.timer);
|
|
|
+ this.timer = null;
|
|
|
},
|
|
|
methods: {
|
|
|
wsinit() {
|
|
|
+ this.$store.commit("setWarningList", []);
|
|
|
this.getAlarmConfig();
|
|
|
this.x = 80;
|
|
|
this.y = 80;
|
|
@@ -197,7 +198,7 @@ export default {
|
|
|
if (!this.socketLeaveFlag1) {
|
|
|
// 没有离开——重连
|
|
|
// websocket重连
|
|
|
- this.socketReconnect1();
|
|
|
+ // this.socketReconnect1();
|
|
|
}
|
|
|
})
|
|
|
.catch(() => {
|