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