|
@@ -877,6 +877,7 @@ const sendMsg = (msg: any) => {
|
|
|
};
|
|
|
const router = useRouter();
|
|
|
const talkDealTimer = ref<any>(null); // 话后整理定时器
|
|
|
+const pingTimer = ref<any>(null); // 心跳定时器
|
|
|
// 呼叫中心消息
|
|
|
const onMessage = async (event: any) => {
|
|
|
const data = JSON.parse(event.data);
|
|
@@ -901,7 +902,7 @@ const onMessage = async (event: any) => {
|
|
|
console.log('呼叫中心:已签入');
|
|
|
ElMessage.success('签入成功');
|
|
|
sendMsg('login');
|
|
|
- const pingTimer = setInterval(function () {
|
|
|
+ pingTimer.value = setInterval(function () {
|
|
|
ola.ping();
|
|
|
}, 5000);
|
|
|
await connectVoiceAssistant(currentTel.value.telNo); // 坐席助手开启
|
|
@@ -1138,6 +1139,7 @@ const onClose = () => {
|
|
|
removeTimerOnDuty(); // 移除签入时长定时器
|
|
|
removeTimer(); // 移除通话计时器
|
|
|
clearTimeout(talkDealTimer.value); // 清除话后整理定时器
|
|
|
+ clearInterval(pingTimer.value); // 清除心跳定时器
|
|
|
ElNotification({
|
|
|
title: '呼叫中心断开链接',
|
|
|
message: '如非主动签出,请刷新后重新签入',
|
|
@@ -1595,6 +1597,7 @@ onMounted(async () => {
|
|
|
removeTimerOnDuty(); // 移除签入时长定时器
|
|
|
removeTimer(); // 移除通话计时器
|
|
|
clearTimeout(talkDealTimer.value); // 清除话后整理定时器
|
|
|
+ clearInterval(pingTimer.value); // 清除心跳定时器
|
|
|
await getTelsLists(); // 查询所有分机
|
|
|
await callCenterConnect(); // 呼叫中心链接
|
|
|
// 加入分组
|