Browse Source

修改socket 监控中心

JX.LI 2 years ago
parent
commit
517178e3b7
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/components/vBottomMenu.vue

+ 7 - 0
src/components/vBottomMenu.vue

@@ -513,6 +513,13 @@
 				this.deptOptionsLiandong = response.data
 			})
 		},
+    destroyed() { //离开页面关闭Socket连接
+      if (this.websock) {
+        clearInterval(this.setIntervalWesocketPush)
+        this.websock.close()
+        this.websock = null
+      }
+    },
     mounted() {
       this.websockSid.userId=Cookies.get("userId")
     },