diff --git a/src/permission.ts b/src/permission.ts index 1bee866..6177198 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -35,11 +35,11 @@ router.beforeEach(async (to, from, next) => { if (to.matched.length === 0) { from.name ? next({ name: from.name }) : next('/404'); } else { - console.log('切换页面发送websocket信息'); - const exitStatu = { - code: 'exitDataMonitor' - }; - socket.onSend(exitStatu); + // console.log('切换页面发送websocket信息'); + // const exitStatu = { + // code: 'exitDataMonitor' + // }; + // socket.onSend(exitStatu); next(); } } else { @@ -50,13 +50,13 @@ router.beforeEach(async (to, from, next) => { router.addRoute(route); }); - console.log('登录后链接websocket'); + // console.log('登录后链接websocket'); //登录后连接webSocket const userStorageInfo = sessionStorage.getItem('userInfo'); const userInfo = JSON.parse(userStorageInfo === null ? '' : userStorageInfo); - const wsUrl = `ws://${window.location.host}/ws/websocket/${userInfo.userName}`; //websocket地址 + // const wsUrl = `ws://${window.location.host}/ws/websocket/${userInfo.userName}`; //websocket地址 // const wsUrl = `ws://10.10.10.56:9010/websocket/${userInfo.userName}`; //websocket地址 - socket.initialize(wsUrl); + // socket.initialize(wsUrl); next({ ...to, replace: true }); } catch (error) { // 移除 token 并跳转登录页 diff --git a/src/views/monitoring/screen/components/main.vue b/src/views/monitoring/screen/components/main.vue index 8ef22ff..0d6719b 100644 --- a/src/views/monitoring/screen/components/main.vue +++ b/src/views/monitoring/screen/components/main.vue @@ -116,6 +116,7 @@ diff --git a/src/views/monitoring/screenData/components/showTree.vue b/src/views/monitoring/screenData/components/showTree.vue index aa5bb54..9a02ef1 100644 --- a/src/views/monitoring/screenData/components/showTree.vue +++ b/src/views/monitoring/screenData/components/showTree.vue @@ -1,8 +1,18 @@