|  | @@ -43,6 +43,8 @@ import YzTag from "@/components/zhu-yuan-yi-sheng/YzTag.vue";
 | 
	
		
			
				|  |  |  import {useElementSize} from "@vueuse/core";
 | 
	
		
			
				|  |  |  import router from "@/router";
 | 
	
		
			
				|  |  |  import {shortcutTrigger, xcEvent} from "@/utils/xckeydown";
 | 
	
		
			
				|  |  | +import {initWebSocket} from "@/utils/websocket";
 | 
	
		
			
				|  |  | +import {uuid} from "@/utils/getUuid";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  const windowSize = computed(() => {
 | 
	
		
			
				|  |  |      return store.state.app.windowSize
 | 
	
	
		
			
				|  | @@ -59,7 +61,7 @@ let shortcutKeyRegistration = {
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  onDeactivated(() => {
 | 
	
		
			
				|  |  | -    if (keyWatch != null){
 | 
	
		
			
				|  |  | +    if (keyWatch != null) {
 | 
	
		
			
				|  |  |          keyWatch()
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  })
 | 
	
	
		
			
				|  | @@ -74,7 +76,19 @@ watch(() => yzHeaderHeight.value, () => {
 | 
	
		
			
				|  |  |      yzHeaderSize.value = yzHeaderHeight.value
 | 
	
		
			
				|  |  |  }, {immediate: true})
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +const initSocket = () => {
 | 
	
		
			
				|  |  | +    const sid = store.getters['user/sid']
 | 
	
		
			
				|  |  | +    if (sid && sid !== 'undefined') {
 | 
	
		
			
				|  |  | +        initWebSocket(sid + uuid(8, 62))
 | 
	
		
			
				|  |  | +    } else {
 | 
	
		
			
				|  |  | +        router.push('/login')
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  onMounted(async () => {
 | 
	
		
			
				|  |  | +    if (store.getters['user/token']) {
 | 
	
		
			
				|  |  | +        initSocket()
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |      await nextTick()
 | 
	
		
			
				|  |  |      getJyJcZdTree().then((res) => {
 | 
	
		
			
				|  |  |          jyTree.value = res.jy
 |