同步电网一张图代码
This commit is contained in:
@@ -171,7 +171,9 @@ const tableStore = new TableStore({
|
||||
let treeData = []
|
||||
tableStore.table.data.forEach((item: any) => {
|
||||
if (item.children.length > 0) {
|
||||
item.id = item.children[0].pid
|
||||
item.children.forEach((k: any) => {
|
||||
k.pid = item.id
|
||||
})
|
||||
}
|
||||
})
|
||||
treeData = tree2List(tableStore.table.data)
|
||||
@@ -195,7 +197,6 @@ const tree2List = (list: any) => {
|
||||
// 遍历 tree 数组
|
||||
list.forEach((item: any) => {
|
||||
item.comFlag = item.comFlag == null ? 3 : item.comFlag
|
||||
|
||||
item.assess = item.onlineRate == 3.14159 ? 0 : item.onlineRate < 60 ? 1 : item.onlineRate < 90 ? 2 : 3
|
||||
// 判断item是否存在children
|
||||
if (!item.children) return arr.push(item)
|
||||
|
||||
Reference in New Issue
Block a user