自动拨打bug
This commit is contained in:
parent
84f15332ac
commit
d79a2e04ec
@ -32,7 +32,7 @@
|
|||||||
<div v-if="!queue" class="wrap-btn-left-dial-f2f3f5 f14 flex-row justify-content-between ml-16">
|
<div v-if="!queue" class="wrap-btn-left-dial-f2f3f5 f14 flex-row justify-content-between ml-16">
|
||||||
<el-button v-if="!calling" type="success" icon="el-icon-phone-outline" circle @click="startCall()"></el-button>
|
<el-button v-if="!calling" type="success" icon="el-icon-phone-outline" circle @click="startCall()"></el-button>
|
||||||
<div v-else class="flex-row justify-content-between align-items-center">
|
<div v-else class="flex-row justify-content-between align-items-center">
|
||||||
<div class="mr-8 color-fff wrap-btn-left-dial-f56c6c flex-row justify-content-between align-items-center" @click="hungUp()">
|
<div class="mr-8 color-fff wrap-btn-left-dial-f56c6c flex-row justify-content-between align-items-center" @click="hungUp(0)">
|
||||||
<i class="el-icon-phone-outline f20 mr-4"></i>
|
<i class="el-icon-phone-outline f20 mr-4"></i>
|
||||||
<span class="f12 ">挂断电话</span>
|
<span class="f12 ">挂断电话</span>
|
||||||
</div>
|
</div>
|
||||||
@ -52,7 +52,7 @@
|
|||||||
<div class="mr-8 cursor-p" v-if="calling" @click="pauseTimer()">暂停拨打</div>
|
<div class="mr-8 cursor-p" v-if="calling" @click="pauseTimer()">暂停拨打</div>
|
||||||
<div class="mr-8 cursor-p" v-else @click="startCall()">开始拨打</div>
|
<div class="mr-8 cursor-p" v-else @click="startCall()">开始拨打</div>
|
||||||
<div class="mr-8 f12 color-000" v-if="calling">{{formattedTime || '00:00'}}</div>
|
<div class="mr-8 f12 color-000" v-if="calling">{{formattedTime || '00:00'}}</div>
|
||||||
<div class="mr-8 f20 cursor-p" v-if="calling" @click="hungUp()"><i class="el-icon-phone"></i></div>
|
<div class="mr-8 f20 cursor-p" v-if="calling" @click="hungUp(1)"><i class="el-icon-phone"></i></div>
|
||||||
<div class="mr-8 f20 cursor-p" v-if="calling && !isMute" @click="muteMic()"><i class="el-icon-microphone"></i></div>
|
<div class="mr-8 f20 cursor-p" v-if="calling && !isMute" @click="muteMic()"><i class="el-icon-microphone"></i></div>
|
||||||
<div class="mr-8 f20 cursor-p" v-if="calling && isMute" @click="unmuteMic()"><i class="el-icon-turn-off-microphone"></i></div>
|
<div class="mr-8 f20 cursor-p" v-if="calling && isMute" @click="unmuteMic()"><i class="el-icon-turn-off-microphone"></i></div>
|
||||||
<div class="mr-8 ai-logo-img" v-if="calling"></div>
|
<div class="mr-8 ai-logo-img" v-if="calling"></div>
|
||||||
@ -688,13 +688,15 @@ export default {
|
|||||||
async startOutboundCall(params) {
|
async startOutboundCall(params) {
|
||||||
// this.phoneNumber = this.queue ? this.queueList[this.index].phone : this.baseInfo.phone
|
// this.phoneNumber = this.queue ? this.queueList[this.index].phone : this.baseInfo.phone
|
||||||
if (this.calling) return
|
if (this.calling) return
|
||||||
|
|
||||||
this.phoneNumber = params.phone
|
this.phoneNumber = params.phone
|
||||||
this.contactId= params.contactId
|
this.contactId= params.contactId
|
||||||
// console.log('进入呼叫电话:', this.phoneNumber)
|
console.log('进入呼叫电话:', params)
|
||||||
try {
|
try {
|
||||||
let res = await window.tccc.Call.startOutboundCall({phoneNumber: this.phoneNumber})
|
let res = await window.tccc.Call.startOutboundCall({phoneNumber: this.phoneNumber})
|
||||||
this.sessionId = res.data.sessionId
|
this.sessionId = res.data.sessionId
|
||||||
// console.log('呼叫成功', res.data)
|
console.log('呼叫成功', res.data)
|
||||||
|
|
||||||
this.calling = true
|
this.calling = true
|
||||||
if (res.status === 'success') {
|
if (res.status === 'success') {
|
||||||
this.callingSuccess()
|
this.callingSuccess()
|
||||||
@ -715,7 +717,7 @@ export default {
|
|||||||
console.log('呼叫成功请求接口==callingSuccess:', res)
|
console.log('呼叫成功请求接口==callingSuccess:', res)
|
||||||
// this.getmediate_record()
|
// this.getmediate_record()
|
||||||
this.$refs.layoutContent.getmediate_record();
|
this.$refs.layoutContent.getmediate_record();
|
||||||
this.$refs.layoutContent.openRecordDialog(res.data);
|
this.$refs.layoutContent.openRecordDialog(res);
|
||||||
} catch (err) { }
|
} catch (err) { }
|
||||||
},
|
},
|
||||||
// 呼叫失败
|
// 呼叫失败
|
||||||
@ -725,13 +727,12 @@ export default {
|
|||||||
} catch (err) { }
|
} catch (err) { }
|
||||||
},
|
},
|
||||||
// 挂断会话
|
// 挂断会话
|
||||||
async hungUp() {
|
async hungUp(type) {
|
||||||
if (!this.$clickThrottle()) {
|
if (!this.$clickThrottle()) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await window.tccc.Call.hungUp({sessionId: this.sessionId})
|
let res = await window.tccc.Call.hungUp({sessionId: this.sessionId})
|
||||||
this.calling = false
|
|
||||||
this.resetTimer()
|
this.resetTimer()
|
||||||
this.nextCall()
|
this.nextCall()
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@ -752,7 +753,9 @@ export default {
|
|||||||
if (that.index <= that.queueList.length - 1) {
|
if (that.index <= that.queueList.length - 1) {
|
||||||
that.caseId = String(that.queueList[that.index].caseId) || ''
|
that.caseId = String(that.queueList[that.index].caseId) || ''
|
||||||
that.getCaseInfoById()
|
that.getCaseInfoById()
|
||||||
that.startOutboundCall()
|
console.log(that.queueList[that.index],'that.queueList[that.index]')
|
||||||
|
that.startOutboundCall({phone:that.queueList[that.index].phone,contactId:that.queueList[that.index].contactId})
|
||||||
|
|
||||||
}
|
}
|
||||||
}, 5000)
|
}, 5000)
|
||||||
},
|
},
|
||||||
|
|||||||
@ -55,7 +55,7 @@ module.exports = {
|
|||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
"/mediate": {
|
"/mediate": {
|
||||||
target: "https://mediate.dev.trydotec.com/mediate", // 调解
|
target: "https://mediate.test.trydotec.com/mediate", // 调解
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
"^/mediate": "/",
|
"^/mediate": "/",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user