From cb08f91def576516800040f42ff804aae119b6fa Mon Sep 17 00:00:00 2001 From: tangchengming <445785772@qq.com> Date: Fri, 17 Jan 2025 09:54:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=BC=E5=87=BA=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/MediationRoom.vue | 44 ++++++++++++++----- src/services/caseManagement.js | 4 ++ 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/src/pages/mediation-page/components/MediationRoom.vue b/src/pages/mediation-page/components/MediationRoom.vue index ded64ab..cd3750c 100644 --- a/src/pages/mediation-page/components/MediationRoom.vue +++ b/src/pages/mediation-page/components/MediationRoom.vue @@ -32,9 +32,9 @@
-
+
暂停拨打
-
开始拨打
+
开始拨打
{{formattedTime || '00:00'}}
@@ -375,6 +375,8 @@ export default { if (this.queue) { await this.callingQueue() //呼叫队列 await this.callingInfo() //呼叫统计 + } else { + await this.callingCaseList() //案件列表 } const that = this window.tccc.on('sessionEnded', (options) => { @@ -410,7 +412,7 @@ export default { await api.getCaseInfoById(this.$route.query.caseId).then(res => { if (!res.code) { this.baseInfo = res - + this.phoneNumber = res.debtorEntityList.find(item => item.role == 'DEBTOR').phone if(res.jointDebt == 1){ // 有共债 mainCaseId this.caseId = res.mainCaseId.toString() @@ -498,6 +500,11 @@ export default { this.todayCountData = res } catch (err) {} }, + callingCaseList() { + api.callingCaseList({}).then(res => { + this.queueList = res.queue || [] + }) + }, // 当前呼叫队列 callingQueue() { api.callingQueue({}).then(res => { @@ -508,19 +515,27 @@ export default { }) }, startCall () { + if (!this.$clickThrottle()) { + return + } console.log('queueList==================',this.queueList) - for (let i=0; i < this.queueList.length; i++) { - if (this.queueList[i].status.code === 1) { - console.log('定位到可拨打的案件',i) - this.index = i - this.startOutboundCall() - return + if (this.queue) { + for (let i=0; i < this.queueList.length; i++) { + if (this.queueList[i].status.code === 1) { + console.log('定位到可拨打的案件',i) + this.index = i + this.startOutboundCall() + return + } } + } else { + this.startOutboundCall() } }, // 电话呼出 async startOutboundCall() { - // this.phoneNumber = this.queueList[this.index].phone + // this.phoneNumber = this.queue ? this.queueList[this.index].phone : this.baseInfo.phone + this.calling = true console.log('进入呼叫电话:', this.phoneNumber) try { @@ -550,6 +565,9 @@ export default { }, // 挂断会话 async hungUp() { + if (!this.$clickThrottle()) { + return + } try { let res = await window.tccc.Call.hungUp({sessionId: this.sessionId}) this.calling = false @@ -590,6 +608,9 @@ export default { }, // 静音会话 async muteMic() { + if (!this.$clickThrottle()) { + return + } try { let data = await window.tccc.Call.muteMic({sessionId: this.sessionId}) this.isMute = true @@ -601,6 +622,9 @@ export default { }, // 取消静音 async unmuteMic() { + if (!this.$clickThrottle()) { + return + } try { let data = await window.tccc.Call.unmuteMic({sessionId: this.sessionId}) this.isMute = false diff --git a/src/services/caseManagement.js b/src/services/caseManagement.js index 173ffd6..e9ee009 100644 --- a/src/services/caseManagement.js +++ b/src/services/caseManagement.js @@ -322,6 +322,10 @@ const caseManagementApi = { callingTodayCount: data => { return service.service.post(`${apiAdmin}api/trace/calling/todayCount`, data) }, + // 当前调解员案件列表 + callingCaseList: data => { + return service.service.post(`${apiAdmin}api/trace/calling/caseList`, data) + },