|
@@ -44,16 +44,18 @@ const handlePopoverItem = async ({ state, label }) => {
|
|
|
workbenchApi.getSeatsByUser({ userId: userStore.id }).then(async({ data }) => {
|
|
|
if (!data) return;
|
|
|
await useVoice.HS_CTI_INSTANCE(data.outId);
|
|
|
- await voiceStore.getAgentStatus();
|
|
|
- // console.log( "坐席状态 下", voiceStore.AGENTSTATUS );
|
|
|
- // console.log( "系统状态 下", voiceStore.HSCTIERRORCODE );
|
|
|
- // if ( !([100001, 100002].includes( Number(voiceStore.HSCTIERRORCODE)) ) ) {
|
|
|
+ setTimeout(async() => {
|
|
|
+ await voiceStore.getAgentStatus();
|
|
|
+ // console.log( "坐席状态 下", voiceStore.AGENTSTATUS );
|
|
|
+ // console.log( "系统状态 下", voiceStore.HSCTIERRORCODE );
|
|
|
+ // if ( !([100001, 100002].includes( Number(voiceStore.HSCTIERRORCODE)) ) ) {
|
|
|
if ( voiceStore.AGENTSTATUS != 0 ) {
|
|
|
state ? await voiceStore.setIdle() : await voiceStore.setBusy();
|
|
|
proxy.$modal[state ? 'msgSuccess' : 'msgWarning']('当前坐席状态: ' + label);
|
|
|
} else {
|
|
|
voiceStore.systemState = false;
|
|
|
}
|
|
|
+ }, 1000);
|
|
|
})
|
|
|
} else {
|
|
|
/**
|