From 23053a70cc811b084483c851e73e441a3e8d6b8e Mon Sep 17 00:00:00 2001 From: liuxi <357439530@qq.com> Date: Fri, 28 Feb 2025 10:22:37 +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/MediationRecordDialog.vue | 13 ++-- .../components/MediationRoom.vue | 64 +++++++++++-------- src/services/index.js | 4 +- 3 files changed, 46 insertions(+), 35 deletions(-) diff --git a/src/pages/mediation-page/components/MediationRecordDialog.vue b/src/pages/mediation-page/components/MediationRecordDialog.vue index 9b3e645..af7305b 100644 --- a/src/pages/mediation-page/components/MediationRecordDialog.vue +++ b/src/pages/mediation-page/components/MediationRecordDialog.vue @@ -183,12 +183,15 @@ export default { this.mrObj.nextFollowDate = this.visiblemediatRecordObj.nextFollowDate this.mrObj.linkedPerson = this.visiblemediatRecordObj.linkedPerson // console.log(this.visiblemediatRecordObj,'this.visiblemediatRecordObj') - this.visiblemediatRecordObj.files.forEach(item =>{ - this.fileList.push({ - url: item, - fileName: '文件', + if(this.visiblemediatRecordObj.files != undefined) + { + this.visiblemediatRecordObj.files.forEach(item =>{ + this.fileList.push({ + url: item, + fileName: '文件', + }) }) - }) + } } if(this.mrObj.id == ''){ // 获取当前日期 diff --git a/src/pages/mediation-page/components/MediationRoom.vue b/src/pages/mediation-page/components/MediationRoom.vue index ec62544..dbe326e 100644 --- a/src/pages/mediation-page/components/MediationRoom.vue +++ b/src/pages/mediation-page/components/MediationRoom.vue @@ -489,10 +489,27 @@ export default { }, methods: { handleBeforeUnload(event) { - // 刷新及离开挂断电话 - if(this.calling){ - window.tccc.Call.hungUp({sessionId: this.sessionId}) - } + this.handleBack() + }, + // 退出调解室 + async handleBack() { + try { + if(this.timerInterval) { //如果定时器还在运行 或者直接关闭,不用判断 + clearInterval(this.timerInterval); //关闭 + } + if (this.videoCallInterval) { + clearInterval(this.videoCallInterval) + } + this.isPause = true + if(this.calling){ + let res = await window.tccc.Call.hungUp({sessionId: this.sessionId}) + this.$router.push('/mediation-management') + } else { + this.$router.push('/mediation-management') + } + } catch (err) {} + // this.$route.query.sourcePage == 'mediationManagement' + // this.$router.push('/mediation-management') }, getSetTimeWritCaseList(){ this.updateUnm ++; @@ -600,26 +617,7 @@ export default { // } // }) }, - // 退出调解室 - async handleBack() { - try { - if(this.timerInterval) { //如果定时器还在运行 或者直接关闭,不用判断 - clearInterval(this.timerInterval); //关闭 - } - if (this.videoCallInterval) { - clearInterval(this.videoCallInterval) - } - if(this.calling){ - let res = await window.tccc.Call.hungUp({sessionId: this.sessionId}) - console.log('挂断电话', res) - this.$router.push('/mediation-management') - } else { - this.$router.push('/mediation-management') - } - } catch (err) {} - // this.$route.query.sourcePage == 'mediationManagement' - // this.$router.push('/mediation-management') - }, + // 获取调解记录 getmediate_record() { this.mediaterecordpm.caseId = this.caseId @@ -728,13 +726,22 @@ export default { } console.log('queueList==================',this.queueList) if (this.queue) { - for (let i=0; i < this.queueList.length; i++) { + + if(this.queueList.find(item=>{return item.status.code == 1})!=undefined) + { + for (let i=0; i < this.queueList.length; i++) { if (this.queueList[i].status.code === 1) { - this.index = i - this.startOutboundCall({phone:this.queueList[i].phone,contactId:this.queueList[i].contactId,queueName:this.queueList[i].queueName}) - return + this.index = i + this.startOutboundCall({phone:this.queueList[i].phone,contactId:this.queueList[i].contactId,queueName:this.queueList[i].queueName}) + return + } } } + else + { + this.$message.warning('该队列已呼叫完成!') + } + } else { let phone = this.baseInfo.debtorEntityList.find(item => (item.role == 'DEBTOR' && item.type == '本人')).phone @@ -794,6 +801,7 @@ export default { } try { let res = await window.tccc.Call.hungUp({sessionId: this.sessionId}) + console.log('挂断会话-hungUp') this.calling = false this.resetTimer() this.nextCall() diff --git a/src/services/index.js b/src/services/index.js index 13fd53d..69d433c 100644 --- a/src/services/index.js +++ b/src/services/index.js @@ -60,7 +60,7 @@ setTimeout(() => { hideLoading() }, 200); - console.log('请求返回结果:', response) + // console.log('请求返回结果:', response) // 处理Blob格式的数据 const res = response.data @@ -77,7 +77,7 @@ reject(dealResponseError(result)) } else { resolve(response) - console.log('请求返回结果11111:', response) + // console.log('请求返回结果11111:', response) } } })