From d5a39092d37326fdf46f30ecb3bd40ebb8c09129 Mon Sep 17 00:00:00 2001 From: fuguobin Date: Mon, 25 Mar 2024 09:22:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E9=80=81=E9=80=BB=E8=BE=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.ts | 16 +- .../monitoring/screen/components/main.vue | 15 +- .../monitoring/screenData/components/main.vue | 39 ++- .../monitoring/screenData/components/menu.vue | 260 ++++++++++++++++-- .../screenData/components/showTree.vue | 36 ++- src/views/monitoring/screenData/index.vue | 6 +- tsconfig.json | 4 +- 7 files changed, 316 insertions(+), 60 deletions(-) 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 @@