修改ws请求地址

main
suixy 2 months ago
parent de232b8d90
commit 1c519dce0f

@ -1,6 +1,9 @@
<template>
<div class="content">
<div class="bg"></div>
<div class="backBtn">
<el-button @click="toIndex" class="toIndex">返回首页</el-button>
</div>
<div class="logo"></div>
<div class="time">
<div class="time1">{{ time.time }}</div>
@ -76,6 +79,12 @@ import trbg from '@/assets/chart/trbg.png';
import TreeItem from './treeItem.vue';
import { vue3ScrollSeamless } from 'vue3-scroll-seamless';
import { parseTime } from '@/utils/ruoyi.js';
import { useRouter } from 'vue-router';
const router = useRouter();
const toIndex = () => {
router.push('index');
};
import { getRealtimeStats, getLocationTree, getSuccessRateTrends } from '@/api/rfid/dashboard';
@ -402,7 +411,7 @@ const getSocket = () => {
alarmTime: parseTime(data.recordTime),
deviceName: wsData.value[data.deviceId]?.epcStr.trimStart() || '',
location: centerData.value.flatMap((item) => item.children || []).find((child) => child.deviceId === targetDeviceId)?.locationAlias || '',
alarmAction: '未获取到标签'
alarmAction: data.alarmAction
});
if (data.dataType === '2') {
wsData.value[data.deviceId] = data;
@ -413,7 +422,7 @@ const getSocket = () => {
alarmTime: parseTime(data.recordTime),
deviceName: wsData.value[data.deviceId]?.epcStr.trimStart() || '',
location: centerData.value.flatMap((item) => item.children || []).find((child) => child.deviceId === targetDeviceId)?.locationAlias || '',
alarmAction: '链接断开'
alarmAction: data.alarmAction
});
if (data.dataType === '2') {
wsData.value[data.deviceId] = data;
@ -622,6 +631,25 @@ onMounted(() => {
}
}
.backBtn {
position: absolute;
right: 0;
top: 0;
width: 5%;
height: 5%;
&:hover .toIndex {
display: inline-block;
}
.toIndex {
display: none;
position: absolute;
right: 0;
top: 0;
}
}
/deep/ .el-menu {
border: none;
}

Loading…
Cancel
Save