云前置改成在线
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user