|
@@ -281,15 +281,17 @@
|
|
|
<span class="duty-on-time-label">签入时长</span>
|
|
|
<el-text class="duty-on-time-time" tag="b" type="danger" v-if="onDutyTime">{{ formatDuration(onDutyTime) }}</el-text>
|
|
|
</div>
|
|
|
- <!-- 等待人数 -->
|
|
|
- <div class="wait-box">
|
|
|
- <div class="today-wait">
|
|
|
- <span class="today-wait-label">今日等待:</span><el-text class="today-wait-num ml5" tag="b" type="danger">{{ todayWaitValue.toFixed(0) }}</el-text>
|
|
|
- </div>
|
|
|
- <div class="current-wait">
|
|
|
- <span class="current-wait-label">当前等待:</span><el-text class="current-wait-time ml5" tag="b" type="danger">{{ currentWaitValue.toFixed(0) }}</el-text>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <!-- 等待人数 -->
|
|
|
+ <div class="wait-box">
|
|
|
+ <div class="today-wait">
|
|
|
+ <span class="today-wait-label">今日等待:</span
|
|
|
+ ><el-text class="today-wait-num ml5" tag="b" type="danger">{{ todayWaitValue.toFixed(0) }}</el-text>
|
|
|
+ </div>
|
|
|
+ <div class="current-wait">
|
|
|
+ <span class="current-wait-label">当前等待:</span
|
|
|
+ ><el-text class="current-wait-time ml5" tag="b" type="danger">{{ currentWaitValue.toFixed(0) }}</el-text>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<!-- 占位标签 -->
|
|
@@ -566,7 +568,7 @@ import mittBus from '@/utils/mitt';
|
|
|
import { voiceAssistant } from '@/api/todo/voiceAssistant';
|
|
|
import { submitLog } from '@/api/public/log';
|
|
|
import { getDataByCode } from '@/api/system/dict';
|
|
|
-import { useTransition ,useDocumentVisibility } from '@vueuse/core'
|
|
|
+import { useTransition, useDocumentVisibility } from '@vueuse/core';
|
|
|
// 引入组件
|
|
|
const CommonAdvice = defineAsyncComponent(() => import('@/components/CommonAdvice/index.vue')); // 常用意见
|
|
|
const AnnexList = defineAsyncComponent(() => import('@/components/AnnexList/index.vue'));
|
|
@@ -2004,22 +2006,22 @@ const getWithList = async () => {
|
|
|
console.log(err);
|
|
|
}
|
|
|
};
|
|
|
-// 今日等待
|
|
|
-const todayWait = ref(0);
|
|
|
-const todayWaitValue = useTransition(todayWait, {
|
|
|
- duration: 1500,
|
|
|
-})
|
|
|
-// 当前等待
|
|
|
-const currentWait = ref<number>(0);
|
|
|
-const currentWaitValue = useTransition(currentWait, {
|
|
|
- duration: 1500,
|
|
|
-})
|
|
|
// const visibility = useDocumentVisibility();
|
|
|
// watch(visibility, (current, previous) => {
|
|
|
// if (current === 'visible' && previous === 'hidden') {
|
|
|
// console.log('欢迎回来')
|
|
|
// }
|
|
|
// })
|
|
|
+// 今日等待
|
|
|
+const todayWait = ref(0);
|
|
|
+const todayWaitValue = useTransition(todayWait, {
|
|
|
+ duration: 1500,
|
|
|
+});
|
|
|
+// 当前等待
|
|
|
+const currentWait = ref<number>(0);
|
|
|
+const currentWaitValue = useTransition(currentWait, {
|
|
|
+ duration: 1500,
|
|
|
+});
|
|
|
onMounted(async () => {
|
|
|
await getReason(); // 获取小休原因
|
|
|
await signalRStart(); //开启消息监听
|
|
@@ -2029,6 +2031,14 @@ onMounted(async () => {
|
|
|
await callCenterConnect(); // 呼叫中心链接
|
|
|
// 加入分组
|
|
|
await signalR.joinGroup('CallCenter');
|
|
|
+ mittBus.on('ToDayWaitNum', (data: number) => {
|
|
|
+ console.log(data, '今日等待数量');
|
|
|
+ todayWait.value = data;
|
|
|
+ });
|
|
|
+ mittBus.on('CurrentWaitNum', (data:number) => {
|
|
|
+ console.log(data, '当前等待数量');
|
|
|
+ currentWait.value = data;
|
|
|
+ });
|
|
|
});
|
|
|
watch(
|
|
|
() => isReconnect.value,
|
|
@@ -2039,6 +2049,8 @@ watch(
|
|
|
);
|
|
|
onBeforeUnmount(() => {
|
|
|
mittBus.off('RestApplyPass');
|
|
|
+ mittBus.off('ToDayWaitNum');
|
|
|
+ mittBus.off('CurrentWaitNum');
|
|
|
if (ola.ws) ola.close();
|
|
|
});
|
|
|
</script>
|
|
@@ -2122,18 +2134,19 @@ onBeforeUnmount(() => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .wait-box{
|
|
|
- width: 120px;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- justify-content: center;
|
|
|
- .today-wait{
|
|
|
- margin-bottom: 10px;
|
|
|
- }
|
|
|
- .today-wait-num,.current-wait-time{
|
|
|
- font-size: var(--el-font-size-medium);
|
|
|
- }
|
|
|
- }
|
|
|
+ .wait-box {
|
|
|
+ width: 120px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ .today-wait {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+ .today-wait-num,
|
|
|
+ .current-wait-time {
|
|
|
+ font-size: var(--el-font-size-medium);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss">
|