Browse Source

reactor:新增工单修改;

zhangchong 6 tháng trước cách đây
mục cha
commit
03fe035cdd
1 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 5 2
      src/layout/components/main.vue

+ 5 - 2
src/layout/components/main.vue

@@ -11,7 +11,7 @@
 </template>
 
 <script setup lang="ts" name="layoutMain">
-import { defineAsyncComponent, onMounted, computed, ref } from 'vue';
+import { defineAsyncComponent, onMounted, computed, ref, nextTick } from 'vue';
 import { useRoute } from 'vue-router';
 import { storeToRefs } from 'pinia';
 import { useTagsViewRoutes } from '@/stores/tagsViewRoutes';
@@ -19,6 +19,7 @@ import { useThemeConfig } from '@/stores/themeConfig';
 import { useUserInfo } from '@/stores/userInfo';
 import { NextLoading } from '@/utils/loading';
 import mittBus from '@/utils/mitt';
+import signalR from '@/utils/signalR';
 
 // 引入组件
 const LayoutParentView = defineAsyncComponent(() => import('@/layout/routerView/parent.vue'));
@@ -63,12 +64,14 @@ const setBacktopClass = computed(() => {
 	else return `.layout-backtop .el-scrollbar__wrap`;
 });
 // 页面加载前
-onMounted(() => {
+onMounted(async () => {
 	NextLoading.done(600);
 	// 监听页面需要滚动事件
 	mittBus.on('scrollTopEmit', (res: any) => {
 		layoutMainScrollbarRef.value?.scrollTo(res.top ? res.top : 0, res.left ? res.left : 0)// 滚动到一组特定坐标(x,y)
 	});
+	await nextTick();
+	await signalR.joinGroup('CallCenter'); // 加入分组
 });
 // 暴露变量
 defineExpose({