呼出接口调试

This commit is contained in:
张运江 2025-01-17 09:54:42 +08:00
parent b1b5bf3a67
commit cb08f91def
2 changed files with 38 additions and 10 deletions

View File

@ -32,9 +32,9 @@
<div class="wrap-btn-left-dial pl-22 pr-24 f14 flex-row justify-content-between ml-16">
<div class="flex-row justify-content-between align-items-center">
<div v-if="calling" class="mr-8 f16 color-F53F3F cursor-p" @click="pauseTimer()"><i class="el-icon-video-pause"></i></div>
<div v-else class="mr-8 f16 color-F53F3F cursor-p" @cilck="startCall()"><i class="el-icon-video-play"></i></div>
<div v-else class="mr-8 f16 color-F53F3F cursor-p" @click="startCall()"><i class="el-icon-video-play"></i></div>
<div class="mr-8 cursor-p" v-if="calling" @click="pauseTimer()">暂停拨打</div>
<div class="mr-8 cursor-p" v-else @cilck="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 f20 cursor-p" v-if="calling" @click="hungUp()"><i class="el-icon-phone-outline"></i></div>
<div class="mr-8 f20 cursor-p" v-if="calling && !isMute" @click="muteMic()"><i class="el-icon-microphone"></i></div>
@ -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

View File

@ -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)
},