diff --git a/src/assets/image/phone-hang-up.png b/src/assets/image/phone-hang-up.png new file mode 100644 index 0000000..226370f Binary files /dev/null and b/src/assets/image/phone-hang-up.png differ diff --git a/src/pages/mediation-page/components/MediationRoom.vue b/src/pages/mediation-page/components/MediationRoom.vue index 33ef5c6..a64053f 100644 --- a/src/pages/mediation-page/components/MediationRoom.vue +++ b/src/pages/mediation-page/components/MediationRoom.vue @@ -52,7 +52,7 @@
已暂停自动拨打
开始拨打
{{formattedTime || '00:00'}}
-
+
@@ -442,6 +442,7 @@ export default { } }, async created() { + window.addEventListener('beforeunload', this.handleBeforeUnload); // if(this.$route.query.caseId != null && this.$route.query.caseId != undefined) { // this.caseId = this.$route.query.caseId || null // this.queue = this.$route.query.queue || null @@ -477,8 +478,17 @@ export default { if (this.videoCallInterval) { clearInterval(this.videoCallInterval) } + window.removeEventListener('beforeunload', this.handleBeforeUnload); + }, methods: { + handleBeforeUnload(event) { + // 刷新及离开挂断电话 + if(this.sessionId !='') + { + window.tccc.Call.hungUp({sessionId: this.sessionId}) + } + }, getSetTimeWritCaseList(){ this.updateUnm ++; }, @@ -728,6 +738,8 @@ export default { }, // 挂断会话 async hungUp(type) { + + console.log(this.calling,'挂断会话挂断会话挂断会话挂断会话挂断会话') if (!this.$clickThrottle()) { return } @@ -742,6 +754,7 @@ export default { }, // 自动拨打下一个会话 nextCall() { + console.log('自动拨打下一个会话') if (!this.queue) return if (this.isPause) { this.isPause = false @@ -843,6 +856,12 @@ export default { background: url('~@/assets/image/ai-logo.png') no-repeat; background-size: 100%,100%; } +.el-icon-phone-up{ + width: 29px; + height: 29px; + background: url('~@/assets/image/phone-hang-up.png') no-repeat; + background-size: 100%,100%; +} .bg-F2F3F5{ background-color: #F2F3F5;