修改自动拨打bug
This commit is contained in:
parent
3094020d60
commit
1ec604fa22
@ -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)
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user