-
+
暂停拨打
-
开始拨打
+
开始拨打
{{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)
+ },