From dfb4d761a0897f1ceccc53317ef6b637938ca62f Mon Sep 17 00:00:00 2001 From: fuguobin Date: Wed, 13 Mar 2024 09:12:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.ts | 4 ++-- src/views/monitoring/screen/components/main.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/permission.ts b/src/permission.ts index 1bee866..11876cf 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -54,8 +54,8 @@ router.beforeEach(async (to, from, next) => { //登录后连接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://10.10.10.56:9010/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); next({ ...to, replace: true }); } catch (error) { diff --git a/src/views/monitoring/screen/components/main.vue b/src/views/monitoring/screen/components/main.vue index 35d7954..0fde07a 100644 --- a/src/views/monitoring/screen/components/main.vue +++ b/src/views/monitoring/screen/components/main.vue @@ -303,7 +303,7 @@ mitt.on('tableMessage', (res: any) => { if ($table) { console.log('tableRef--', tableRef.value); res.data.map((item: any) => { - const index = tableArray.findIndex(obj => obj.id === item.id); + const index = tableArray.findIndex(obj => obj.assetInfo.id === item.assetInfo.id); if (index !== -1) { tableArray.splice(index, 1, item); }