|
@@ -281,6 +281,15 @@
|
|
|
<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>
|
|
|
|
|
|
<!-- 占位标签 -->
|
|
@@ -556,8 +565,8 @@ import { useSocket } from '@/utils/websocket';
|
|
|
import mittBus from '@/utils/mitt';
|
|
|
import { voiceAssistant } from '@/api/todo/voiceAssistant';
|
|
|
import { submitLog } from '@/api/public/log';
|
|
|
-import { B } from '@vueuse/motion/dist/shared/motion.5ee44005';
|
|
|
import { getDataByCode } from '@/api/system/dict';
|
|
|
+import { useTransition ,useDocumentVisibility } from '@vueuse/core'
|
|
|
// 引入组件
|
|
|
const CommonAdvice = defineAsyncComponent(() => import('@/components/CommonAdvice/index.vue')); // 常用意见
|
|
|
const AnnexList = defineAsyncComponent(() => import('@/components/AnnexList/index.vue'));
|
|
@@ -736,15 +745,12 @@ const RestApplyPassFn = (data: any) => {
|
|
|
};
|
|
|
// 查询所有分机
|
|
|
const getTelsLists = async () => {
|
|
|
- state.loading = true;
|
|
|
try {
|
|
|
const { result } = await getTelList();
|
|
|
state.telsList = result ?? [];
|
|
|
- state.loading = false;
|
|
|
return state.telsList;
|
|
|
} catch (err) {
|
|
|
console.log(err);
|
|
|
- state.loading = false;
|
|
|
}
|
|
|
};
|
|
|
// 查询三方会议和转接的号码
|
|
@@ -1998,6 +2004,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('欢迎回来')
|
|
|
+ }
|
|
|
+})
|
|
|
onMounted(async () => {
|
|
|
await getReason(); // 获取小休原因
|
|
|
await signalRStart(); //开启消息监听
|
|
@@ -2100,6 +2122,18 @@ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss">
|