|
@@ -861,6 +861,10 @@ const onConnect = () => {
|
|
|
ola.subscribe('ola.caller.' + currentTel.value.telNo);
|
|
|
ola.get_agent_state(currentTel.value.telNo);
|
|
|
|
|
|
+ pingTimer.value = setInterval(() => {
|
|
|
+ ola.ping();
|
|
|
+ }, 5000);
|
|
|
+
|
|
|
ola.logout(currentTel.value.telNo); //连接之后,先登出一次,防止其他地方已经登陆
|
|
|
let array_ola_queue: EmptyArrayType = []; // 队列
|
|
|
if (currentTel.value.queue) {
|
|
@@ -894,7 +898,7 @@ const onMessage = async (event: any) => {
|
|
|
// 设置分机号和坐席组
|
|
|
useTelStatusStore.setCallInfo({ telsNo: currentTel.value.telNo });
|
|
|
state.loading = true;
|
|
|
- await connectVoiceAssistant(currentTel.value.telNo); // 坐席助手开启
|
|
|
+ await connectVoiceAssistant(currentTel.value.telNo); // 坐席助手开启
|
|
|
setTimeout(() => {
|
|
|
// 设置示闲状态
|
|
|
ola.go_ready();
|
|
@@ -903,9 +907,6 @@ const onMessage = async (event: any) => {
|
|
|
console.log('呼叫中心:已签入');
|
|
|
ElMessage.success('签入成功');
|
|
|
sendMsg('login');
|
|
|
- pingTimer.value = setInterval(function () {
|
|
|
- ola.ping();
|
|
|
- }, 5000);
|
|
|
} else if (data.state == 'logout') {
|
|
|
// 签出
|
|
|
// 重置所有状态
|