From 1ec604fa22bc865eeb095501f1db68d85a12cf03 Mon Sep 17 00:00:00 2001 From: liuxi <357439530@qq.com> Date: Fri, 28 Feb 2025 17:58:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=87=AA=E5=8A=A8=E6=8B=A8?= =?UTF-8?q?=E6=89=93bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/MediationRoom.vue | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/pages/mediation-page/components/MediationRoom.vue b/src/pages/mediation-page/components/MediationRoom.vue index b287493..ace434f 100644 --- a/src/pages/mediation-page/components/MediationRoom.vue +++ b/src/pages/mediation-page/components/MediationRoom.vue @@ -471,9 +471,14 @@ export default { const that = this window.tccc.on('sessionEnded', (options) => { console.log('监听挂断事件', options) - that.calling = false - that.resetTimer() - that.nextCall() + + if(that.calling) + { + that.calling = false + that.resetTimer() + that.nextCall() + } + }) }, beforeDestroy() { @@ -733,6 +738,7 @@ export default { for (let i=0; i < this.queueList.length; i++) { if (this.queueList[i].status.code === 1) { this.index = i + console.log('startOutboundCall1') this.startOutboundCall({phone:this.queueList[i].phone,contactId:this.queueList[i].contactId,queueName:this.queueList[i].queueName}) return } @@ -747,6 +753,7 @@ export default { let phone = this.baseInfo.debtorEntityList.find(item => (item.role == 'DEBTOR' && item.type == '本人')).phone let contactId = this.baseInfo.debtorEntityList.find(item => (item.role == 'DEBTOR' && item.type == '本人')).id + console.log('startOutboundCall2') this.startOutboundCall({phone:phone,contactId:contactId}) } }, @@ -803,16 +810,20 @@ export default { try { let res = await window.tccc.Call.hungUp({sessionId: this.sessionId}) console.log('挂断会话-hungUp') - this.calling = false - this.resetTimer() - this.nextCall() + if(this.calling) + { + this.calling = false + this.resetTimer() + this.nextCall() + } + } catch (err) { // 挂断失败 } finally {} }, // 自动拨打下一个会话 nextCall() { - console.log('进入自动拨打下一个会话,','queue=',this.queue, ' isPause=', this.isPause) + // console.log('进入自动拨打下一个会话,','queue=',this.queue, ' isPause=', this.isPause) if (!this.queue) return if (this.isPause) { this.isPause = false @@ -827,7 +838,7 @@ export default { that.caseId = String(that.queueList[that.index].caseId) || '' that.getCaseInfoById() console.log('将会自动拨打下一个会话====',that.queueList[that.index]) - that.startOutboundCall({phone:that.queueList[that.index].phone,contactId:that.queueList[that.index].contactId}) + that.startOutboundCall({phone:that.queueList[that.index].phone,contactId:that.queueList[that.index].contactId,queueName:this.queueList[that.index].queueName}) } }, 5000) },