diff --git a/src/pages/layout/components/LayoutHeader.vue b/src/pages/layout/components/LayoutHeader.vue index 830e3f5..16fe14d 100644 --- a/src/pages/layout/components/LayoutHeader.vue +++ b/src/pages/layout/components/LayoutHeader.vue @@ -34,9 +34,9 @@ 空闲 - + 话后整理 @@ -49,23 +49,6 @@ - @@ -331,11 +314,14 @@ export default { // console.log('获取当前登录人的信息',this.userInfo) // console.log(this.userInfo.showName) console.log('判断是否绑定坐席agent',this.agent) - // if (this.agent) { - // setTimeout(() => { - // this.getStatus() - // }, 2000) - // } + if (this.agent) { + setTimeout(() => { + window.tccc.Agent.online().then(res => { + console.log('坐席上线', res) + // this.getStatus() + }) + }, 2000) + } }, methods: { // 个人信息 @@ -413,11 +399,12 @@ export default { }, handleCommand(command) { console.log(command) + if (this.agentStatus === command) { + return + } this.agentStatus = command if (command === 'free') { this.agentStatusName = '空闲' - } else if (command === 'busy') { - this.agentStatusName = '忙碌' } else if (command === 'arrange') { this.agentStatusName = '话后整理' } else if (command === 'notReady') {