From 066184274760e8e6f350b5f9a20f1486f5f13550 Mon Sep 17 00:00:00 2001 From: tangchengming <445785772@qq.com> Date: Mon, 20 Jan 2025 15:59:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=B0=E5=9C=A8=E4=B8=8A=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E4=B8=8B=E4=B8=80=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/LayoutContentNew.vue | 13 ++++ .../components/MediationRoom.vue | 63 ++++++++++++------- .../mediation-page/components/SidebarTool.vue | 9 +++ 3 files changed, 62 insertions(+), 23 deletions(-) diff --git a/src/pages/mediation-page/components/LayoutContentNew.vue b/src/pages/mediation-page/components/LayoutContentNew.vue index 7f44b7d..9cee73e 100644 --- a/src/pages/mediation-page/components/LayoutContentNew.vue +++ b/src/pages/mediation-page/components/LayoutContentNew.vue @@ -365,6 +365,17 @@ export default { return oh - 57 - 128 }, }, + watch: { + caseId: { + handler(val) { + this.mediaterecordpm.caseId = val + this.getCaseInfoById();//获取详情 + this.getmediate_record() + }, + immediate: true, + deep: true + }, + }, async created() { this.mediaterecordpm.caseId = this.caseId this.eventDialog.caseId = this.caseId @@ -441,6 +452,8 @@ export default { api.mediate_record_list(this.mediaterecordpm).then(res => { if (!res.code) { this.communicationRecord = res + } else { + this.communicationRecord = [] } }) }, diff --git a/src/pages/mediation-page/components/MediationRoom.vue b/src/pages/mediation-page/components/MediationRoom.vue index d2a6df0..7871094 100644 --- a/src/pages/mediation-page/components/MediationRoom.vue +++ b/src/pages/mediation-page/components/MediationRoom.vue @@ -6,7 +6,7 @@
- +
{{ baseInfo.debtorEntityList.find(item => item.role == 'DEBTOR').name }}
@@ -16,7 +16,7 @@
- +
- +
@@ -68,7 +68,12 @@ - + + + @@ -471,7 +476,8 @@ export default { }, // 获取详情 async getCaseInfoById() { - await api.getCaseInfoById(this.$route.query.caseId).then(res => { + // this.$loading(true) + await api.getCaseInfoById(this.caseId).then(res => { if (!res.code) { this.baseInfo = res this.phoneNumber = res.debtorEntityList.find(item => item.role == 'DEBTOR').phone @@ -479,14 +485,14 @@ export default { if(res.jointDebt == 1){ // 有共债 mainCaseId this.caseId = res.mainCaseId.toString() - } else - { + } else { this.caseId = res.id.toString() } } + // this.$loading.close() this.eventDialog.caseId = this.caseId - this.getmediate_record() + // this.getmediate_record() }) }, // 获取上一件案件 @@ -494,23 +500,34 @@ export default { if (!this.$clickThrottle()) { return }//防止重复点击 - api.getFrontCaseById({id: this.caseId}).then(res => { - if (!res.code) { - // let caseChangeData = res - this.detailData(res) - } - }) + if(this.queue || this.index === 0) return + this.index-- + this.caseId = String(this.queueList[this.index].caseId) + this.getCaseInfoById() + // api.getFrontCaseById({id: this.caseId}).then(res => { + // if (!res.code) { + // // let caseChangeData = res + // this.detailData(res) + // } + // }) }, // 获取下一件案件 getNextCaseById() { if (!this.$clickThrottle()) { return }//防止重复点击 - api.getNextCaseById({id: this.caseId}).then(res => { - if (!res.code) { - this.detailData(res) - } - }) + if(this.queue || this.index >= this.queueList.length - 1) return + this.index++ + this.caseId = String(this.queueList[this.index].caseId) + console.log('下一个案件id: ' + this.caseId, this.index, this.queueList) + + this.getCaseInfoById() + + // api.getNextCaseById({id: this.caseId}).then(res => { + // if (!res.code) { + // this.detailData(res) + // } + // }) }, handleBack() { // this.$route.query.sourcePage == 'mediationManagement' @@ -562,18 +579,18 @@ export default { this.todayCountData = res } catch (err) {} }, + // 获取案件列表 callingCaseList() { api.callingCaseList({}).then(res => { this.queueList = res.queue || [] }) }, - // 当前呼叫队列 + // 当前自动呼叫队列 callingQueue() { api.callingQueue({}).then(res => { this.queueList = res.queue || [] this.caseId = String(res.queue[0].caseId) || '' this.getCaseInfoById() - this.getmediate_record() }) }, startCall () { @@ -622,7 +639,8 @@ export default { try { let res = await api.callingSuccess({caseId: this.caseId,contactId: this.contactId}) console.log('呼叫成功请求接口==callingSuccess:', res) - this.getmediate_record() + // this.getmediate_record() + this.$refs.layoutContent.getmediate_record(); this.$refs.layoutContent.openRecordDialog(res.data); } catch (err) { } }, @@ -660,7 +678,6 @@ export default { if (that.index <= that.queueList.length - 1) { that.caseId = String(that.queueList[that.index].caseId) || '' that.getCaseInfoById() - that.getmediate_record() that.startOutboundCall() } }, 5000) diff --git a/src/pages/mediation-page/components/SidebarTool.vue b/src/pages/mediation-page/components/SidebarTool.vue index 345c712..e7255cc 100644 --- a/src/pages/mediation-page/components/SidebarTool.vue +++ b/src/pages/mediation-page/components/SidebarTool.vue @@ -313,6 +313,15 @@ export default { }, }, + watch: { + caseId: { + handler(val) { + this.getmediate_record() + }, + immediate: true, + deep: true + }, + }, data(){ return{ fileDialog:null,