修改bug
This commit is contained in:
parent
b0dc4072f1
commit
3ae9c3bd8b
@ -397,22 +397,28 @@ export default {
|
||||
|
||||
|
||||
},
|
||||
handleCommand(command) {
|
||||
async handleCommand(command) {
|
||||
console.log(command)
|
||||
if (this.agentStatus === command) {
|
||||
return
|
||||
}
|
||||
this.agentStatus = command
|
||||
if (command === 'free') {
|
||||
this.agentStatusName = '空闲'
|
||||
} else if (command === 'arrange') {
|
||||
this.agentStatusName = '话后整理'
|
||||
} else if (command === 'notReady') {
|
||||
this.agentStatusName = '示忙'
|
||||
} else if (command === 'rest') {
|
||||
this.agentStatusName = '小休'
|
||||
try {
|
||||
let res = await window.tccc.Agent.setStatus({status: command})
|
||||
console.log('设置座席状态:', res)
|
||||
this.agentStatus = command
|
||||
if (command === 'free') {
|
||||
this.agentStatusName = '空闲'
|
||||
} else if (command === 'arrange') {
|
||||
this.agentStatusName = '话后整理'
|
||||
} else if (command === 'notReady') {
|
||||
this.agentStatusName = '示忙'
|
||||
} else if (command === 'rest') {
|
||||
this.agentStatusName = '小休'
|
||||
}
|
||||
} catch (error) {
|
||||
this.$message.error('设置座席状态失败' + error.message)
|
||||
console.log('设置座席状态失败',error.message)
|
||||
}
|
||||
this.setStatus()
|
||||
},
|
||||
// 关闭
|
||||
handleClose() {
|
||||
@ -447,16 +453,6 @@ export default {
|
||||
console.log('获取座席状态失败',error.message)
|
||||
}
|
||||
},
|
||||
// 设置座席状态
|
||||
async setStatus() {
|
||||
try {
|
||||
let res = await window.tccc.Agent.setStatus({status: this.agentStatus})
|
||||
console.log('设置座席状态:', res)
|
||||
} catch (err) {
|
||||
this.$message.error('设置座席状态失败' + err.message)
|
||||
console.log('设置座席状态失败',err.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user