呼出接口调试
This commit is contained in:
parent
b1b5bf3a67
commit
cb08f91def
@ -32,9 +32,9 @@
|
|||||||
<div class="wrap-btn-left-dial pl-22 pr-24 f14 flex-row justify-content-between ml-16">
|
<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 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-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-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 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" @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>
|
<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) {
|
if (this.queue) {
|
||||||
await this.callingQueue() //呼叫队列
|
await this.callingQueue() //呼叫队列
|
||||||
await this.callingInfo() //呼叫统计
|
await this.callingInfo() //呼叫统计
|
||||||
|
} else {
|
||||||
|
await this.callingCaseList() //案件列表
|
||||||
}
|
}
|
||||||
const that = this
|
const that = this
|
||||||
window.tccc.on('sessionEnded', (options) => {
|
window.tccc.on('sessionEnded', (options) => {
|
||||||
@ -410,7 +412,7 @@ export default {
|
|||||||
await api.getCaseInfoById(this.$route.query.caseId).then(res => {
|
await api.getCaseInfoById(this.$route.query.caseId).then(res => {
|
||||||
if (!res.code) {
|
if (!res.code) {
|
||||||
this.baseInfo = res
|
this.baseInfo = res
|
||||||
|
this.phoneNumber = res.debtorEntityList.find(item => item.role == 'DEBTOR').phone
|
||||||
if(res.jointDebt == 1){
|
if(res.jointDebt == 1){
|
||||||
// 有共债 mainCaseId
|
// 有共债 mainCaseId
|
||||||
this.caseId = res.mainCaseId.toString()
|
this.caseId = res.mainCaseId.toString()
|
||||||
@ -498,6 +500,11 @@ export default {
|
|||||||
this.todayCountData = res
|
this.todayCountData = res
|
||||||
} catch (err) {}
|
} catch (err) {}
|
||||||
},
|
},
|
||||||
|
callingCaseList() {
|
||||||
|
api.callingCaseList({}).then(res => {
|
||||||
|
this.queueList = res.queue || []
|
||||||
|
})
|
||||||
|
},
|
||||||
// 当前呼叫队列
|
// 当前呼叫队列
|
||||||
callingQueue() {
|
callingQueue() {
|
||||||
api.callingQueue({}).then(res => {
|
api.callingQueue({}).then(res => {
|
||||||
@ -508,19 +515,27 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
startCall () {
|
startCall () {
|
||||||
|
if (!this.$clickThrottle()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
console.log('queueList==================',this.queueList)
|
console.log('queueList==================',this.queueList)
|
||||||
for (let i=0; i < this.queueList.length; i++) {
|
if (this.queue) {
|
||||||
if (this.queueList[i].status.code === 1) {
|
for (let i=0; i < this.queueList.length; i++) {
|
||||||
console.log('定位到可拨打的案件',i)
|
if (this.queueList[i].status.code === 1) {
|
||||||
this.index = i
|
console.log('定位到可拨打的案件',i)
|
||||||
this.startOutboundCall()
|
this.index = i
|
||||||
return
|
this.startOutboundCall()
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.startOutboundCall()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 电话呼出
|
// 电话呼出
|
||||||
async 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
|
this.calling = true
|
||||||
console.log('进入呼叫电话:', this.phoneNumber)
|
console.log('进入呼叫电话:', this.phoneNumber)
|
||||||
try {
|
try {
|
||||||
@ -550,6 +565,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 挂断会话
|
// 挂断会话
|
||||||
async hungUp() {
|
async hungUp() {
|
||||||
|
if (!this.$clickThrottle()) {
|
||||||
|
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.calling = false
|
||||||
@ -590,6 +608,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 静音会话
|
// 静音会话
|
||||||
async muteMic() {
|
async muteMic() {
|
||||||
|
if (!this.$clickThrottle()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
let data = await window.tccc.Call.muteMic({sessionId: this.sessionId})
|
let data = await window.tccc.Call.muteMic({sessionId: this.sessionId})
|
||||||
this.isMute = true
|
this.isMute = true
|
||||||
@ -601,6 +622,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 取消静音
|
// 取消静音
|
||||||
async unmuteMic() {
|
async unmuteMic() {
|
||||||
|
if (!this.$clickThrottle()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
let data = await window.tccc.Call.unmuteMic({sessionId: this.sessionId})
|
let data = await window.tccc.Call.unmuteMic({sessionId: this.sessionId})
|
||||||
this.isMute = false
|
this.isMute = false
|
||||||
|
|||||||
@ -322,6 +322,10 @@ const caseManagementApi = {
|
|||||||
callingTodayCount: data => {
|
callingTodayCount: data => {
|
||||||
return service.service.post(`${apiAdmin}api/trace/calling/todayCount`, data)
|
return service.service.post(`${apiAdmin}api/trace/calling/todayCount`, data)
|
||||||
},
|
},
|
||||||
|
// 当前调解员案件列表
|
||||||
|
callingCaseList: data => {
|
||||||
|
return service.service.post(`${apiAdmin}api/trace/calling/caseList`, data)
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user