|
|
@ -1023,6 +1023,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
//处理 tree 数据结构
|
|
|
|
//处理 tree 数据结构
|
|
|
|
handleTreeData (storeyData) { |
|
|
|
handleTreeData (storeyData) { |
|
|
|
|
|
|
|
this.hideAllTreenode = true |
|
|
|
this.storeyData = storeyData |
|
|
|
this.storeyData = storeyData |
|
|
|
let data = this.allFireElements //所有消防要素模板
|
|
|
|
let data = this.allFireElements //所有消防要素模板
|
|
|
|
let treeData = [] //tree型 处理完成后的数据
|
|
|
|
let treeData = [] //tree型 处理完成后的数据
|
|
|
@ -1090,6 +1091,22 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
this.canvas.setHighlight(iconHighLightArr) |
|
|
|
this.canvas.setHighlight(iconHighLightArr) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hideAllTreenode:boolean = true; //全部显示/隐藏tree节点
|
|
|
|
|
|
|
|
toggoleAllTreenode () { |
|
|
|
|
|
|
|
this.hideAllTreenode = !this.hideAllTreenode |
|
|
|
|
|
|
|
let list = [] |
|
|
|
|
|
|
|
this.allFireElements.forEach(element=>{ |
|
|
|
|
|
|
|
if (element.isTemplate) { this.hideAllTreenode? element.isLook = false : element.isLook = true } |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.treeControl.dataNodes.forEach(item=>{ |
|
|
|
|
|
|
|
this.hideAllTreenode? item.isLook = false : item.isLook = true |
|
|
|
|
|
|
|
item.level === 0 ? list.push(item) : null |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
list.forEach(item=>{ |
|
|
|
|
|
|
|
this.clickLookItem(item) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//点击数节点的显示隐藏icon
|
|
|
|
//点击数节点的显示隐藏icon
|
|
|
|
clickLookItem(node){ |
|
|
|
clickLookItem(node){ |
|
|
|
|
|
|
|
|
|
|
@ -1103,9 +1120,8 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
//所有消防要素模板变化islook值
|
|
|
|
//所有消防要素模板变化islook值
|
|
|
|
if(node.isTemplate){ |
|
|
|
if(node.isTemplate){ |
|
|
|
this.allFireElements.forEach(item=>{ |
|
|
|
this.allFireElements.forEach(item=>{ |
|
|
|
if(item.id == node.id || item.name == "其他"){ |
|
|
|
if(item.id == node.id){ item.isLook = !item.isLook } |
|
|
|
item.isLook = !item.isLook |
|
|
|
if (item.name == '其他' && node.name == '其他') { item.isLook = !item.isLook } |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|