telephone-clients 3.0.104-1 → 3.0.104-10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telephone-clients",
3
- "version": "3.0.104-1",
3
+ "version": "3.0.104-10",
4
4
  "description": "呼叫模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -179,7 +179,16 @@
179
179
  }
180
180
  this.showip = !this.showip
181
181
  },
182
+ created() {
183
+ window.addEventListener('beforeunload', this.handleBeforeUnload);
184
+ },
182
185
  methods: {
186
+ handleBeforeUnload(){
187
+ if(this.$webSocket){
188
+ this.zhimang();
189
+ this.$webSocket.closeWebsocket()
190
+ }
191
+ },
183
192
  changeGroup(){
184
193
  let name = this.groupName == '话务分组' ? '值班分组':'话务分组'
185
194
  this.$showMessage(`确定要更改分组为${name}吗?`, ['confirm', 'cancel']).then(res=>{