云前置改成在线

This commit is contained in:
sjl
2025-10-14 09:51:42 +08:00
parent a3b6a5c0be
commit 82838eccaa
6 changed files with 11 additions and 11 deletions

View File

@@ -38,8 +38,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;
}

View File

@@ -82,7 +82,7 @@ getDeviceTree().then(res => {
// })
})
})
}else if (item.name == '云前置设备') {
}else if (item.name == '在线设备') {
item.children.forEach((item: any) => {
item.icon = 'el-icon-HomeFilled'
item.color = config.getColorVal('elementUiPrimary')

View File

@@ -71,7 +71,7 @@ const info = () => {
arr2.push(item2)
})
})
} else if (item.name == '云前置设备') {
} else if (item.name == '在线设备') {
item.children.forEach((item: any) => {
item.icon = 'el-icon-HomeFilled'
item.level = 1