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); }