修改在线设备

This commit is contained in:
guanj
2026-01-08 11:33:40 +08:00
parent 0d155c8680
commit c2d0faea08
7 changed files with 13 additions and 13 deletions

View File

@@ -39,8 +39,8 @@ const info = (selectedNodeId?: string) => {
let rootData = null;
if (Array.isArray(res.data)) {
// 旧的数据结构 - 数组
rootData = res.data.find((item: any) => item.name == '在线设备');
} else if (res.data && res.data.name == '在线设备') {
rootData = res.data.find((item: any) => item.name == '监测设备');
} else if (res.data && res.data.name == '监测设备') {
// 新的数据结构 - 单个对象
rootData = res.data;
}