diff --git a/src/app/ui/collection-tools-building/collection-tools.component.html b/src/app/ui/collection-tools-building/collection-tools.component.html
index b79704f..8b7ff63 100644
--- a/src/app/ui/collection-tools-building/collection-tools.component.html
+++ b/src/app/ui/collection-tools-building/collection-tools.component.html
@@ -431,8 +431,9 @@
+
visibility
-
+
diff --git a/src/app/ui/collection-tools-building/collection-tools.component.scss b/src/app/ui/collection-tools-building/collection-tools.component.scss
index 2c39cc0..25373a9 100644
--- a/src/app/ui/collection-tools-building/collection-tools.component.scss
+++ b/src/app/ui/collection-tools-building/collection-tools.component.scss
@@ -191,7 +191,6 @@
}
}
-
//右侧属性
.property{
display: flex;
@@ -314,6 +313,16 @@
}
}
+.hideAllTreeNode {
+ box-sizing: border-box;
+ margin: 3px 0;
+ padding: 0 6px 0 10px;
+ font-size: 14px;
+ height: 24px;
+ line-height: 24px;
+ display: flex;
+ label { display: inline-block; flex: 1; cursor: pointer; }
+}
//右侧消防要素
.firecategories{
background-color: #fff;
diff --git a/src/app/ui/collection-tools-building/collection-tools.component.ts b/src/app/ui/collection-tools-building/collection-tools.component.ts
index 8339bb4..17de288 100644
--- a/src/app/ui/collection-tools-building/collection-tools.component.ts
+++ b/src/app/ui/collection-tools-building/collection-tools.component.ts
@@ -1316,7 +1316,7 @@ export class CollectionToolsBuildingComponent implements OnInit {
//处理 tree 数据结构
handleTreeData (storeyData) {
-
+ this.hideAllTreenode = true
this.storeyData = storeyData
let data = this.allFireElements //所有消防要素模板
let treeData = [] //tree型 处理完成后的数据
@@ -1384,9 +1384,24 @@ export class CollectionToolsBuildingComponent implements OnInit {
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
clickLookItem(node){
-
//修改真实素材islook属性
for(let key in this.storeyData.data){
if(key == node.id){
@@ -1397,9 +1412,8 @@ export class CollectionToolsBuildingComponent implements OnInit {
//所有消防要素模板变化islook值
if(node.isTemplate){
this.allFireElements.forEach(item=>{
- if(item.id == node.id || item.name == "其他"){
- item.isLook = !item.isLook
- }
+ if(item.id == node.id){ item.isLook = !item.isLook }
+ if (item.name == '其他' && node.name == '其他') { item.isLook = !item.isLook }
})
}
diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.ts b/src/app/ui/collection-tools-plan/collection-tools.component.ts
index 79f35e0..c75df3a 100644
--- a/src/app/ui/collection-tools-plan/collection-tools.component.ts
+++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts
@@ -1409,9 +1409,8 @@ export class CollectionToolsPlanComponent implements OnInit {
//所有消防要素模板变化islook值
if(node.isTemplate){
this.allFireElements.forEach(item=>{
- if(item.id == node.id || item.name == "其他"){
- item.isLook = !item.isLook
- }
+ if(item.id == node.id){ item.isLook = !item.isLook }
+ if (item.name == '其他' && node.name == '其他') { item.isLook = !item.isLook }
})
}
diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html
index 21f7a4b..9d261ba 100644
--- a/src/app/ui/collection-tools/collection-tools.component.html
+++ b/src/app/ui/collection-tools/collection-tools.component.html
@@ -507,6 +507,7 @@
+
visibility
diff --git a/src/app/ui/collection-tools/collection-tools.component.scss b/src/app/ui/collection-tools/collection-tools.component.scss
index c7c80a4..8da000d 100644
--- a/src/app/ui/collection-tools/collection-tools.component.scss
+++ b/src/app/ui/collection-tools/collection-tools.component.scss
@@ -357,6 +357,16 @@
}
}
+.hideAllTreeNode {
+ box-sizing: border-box;
+ margin: 3px 0;
+ padding: 0 6px 0 10px;
+ font-size: 14px;
+ height: 24px;
+ line-height: 24px;
+ display: flex;
+ label { display: inline-block; flex: 1; cursor: pointer; }
+}
//右侧消防要素
.firecategories{
position: relative;
diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts
index 9502f08..328f1ae 100644
--- a/src/app/ui/collection-tools/collection-tools.component.ts
+++ b/src/app/ui/collection-tools/collection-tools.component.ts
@@ -1329,6 +1329,7 @@ export class CollectionToolsComponent implements OnInit {
selectPanelPoint //传过来的处置素材
//处理 tree 数据结构
handleTreeData (storeyData,selectPanelPoint) {
+ this.hideAllTreenode = true
this.storeyData = storeyData
this.selectPanelPoint = selectPanelPoint
let data = this.allFireElements //所有消防要素模板
@@ -1420,6 +1421,22 @@ export class CollectionToolsComponent implements OnInit {
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
clickLookItem(node){
//修改真实素材islook属性
@@ -1439,9 +1456,8 @@ export class CollectionToolsComponent implements OnInit {
//所有消防要素模板变化islook值
if(node.isTemplate){
this.allFireElements.forEach(item=>{
- if(item.id == node.id || item.name == "其他"){
- item.isLook = !item.isLook
- }
+ if ( item.id == node.id ) { item.isLook = !item.isLook }
+ if (item.name == '其他' && node.name == '其他') { item.isLook = !item.isLook }
})
}