-
+
@@ -125,23 +125,35 @@
-
-
-
-
-
-
-
@@ -419,8 +431,9 @@
-
+
+
+
+
+
+
+
+
+
-
-
+ {{items.name}}
-
+
+
+
+
+
+
+
-
-
-
+ {{items.name}}
+
+
+
+
+
+ {{items.name}}
+
+ 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 7105247..1f400df 100644
--- a/src/app/ui/collection-tools-building/collection-tools.component.ts
+++ b/src/app/ui/collection-tools-building/collection-tools.component.ts
@@ -692,7 +692,7 @@ export class CollectionToolsBuildingComponent implements OnInit {
let that = this
window.setTimeout(()=>{
- document.getElementById("functionalDomainContent").oncontextmenu = function (event) {
+ document.getElementById("functionalDomainContentTwo").oncontextmenu = function (event) {
// that.canvas.cancelPaint()
that.selectImageIndex = -1
event.preventDefault();
@@ -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){
@@ -1398,9 +1413,8 @@ export class CollectionToolsBuildingComponent implements OnInit {
console.log(node)
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 }
})
}
@@ -2040,6 +2054,23 @@ export class CollectionToolsBuildingComponent implements OnInit {
selectLibrary:any; //选中的素材库
selectImage:any; //选中的素材库图片
selectImageIndex:number; //选中的素材库图片index
+ searchSettimeout:any; //延时器
+ searchInput:string = null; //模糊搜索 input
+ searchLibrary:any = []; //模糊搜索 素材
+
+ //输入框 输入事件
+ libraryChange () {
+ window.clearTimeout(this.searchSettimeout)
+ this.searchSettimeout = window.setTimeout(()=>{
+ if (this.searchInput === "") {
+ this.searchLibrary = []
+ } else {
+ this.http.get(`/api/Assets?assetName=${this.searchInput}`).subscribe((data:any)=>{
+ this.searchLibrary = data
+ })
+ }
+ },500)
+ }
//获取素材库
getAllLibrary (type:string='input') {
diff --git a/src/app/ui/collection-tools-building/panel.scss b/src/app/ui/collection-tools-building/panel.scss
index fe2f0b7..2b1fed4 100644
--- a/src/app/ui/collection-tools-building/panel.scss
+++ b/src/app/ui/collection-tools-building/panel.scss
@@ -212,6 +212,18 @@
box-sizing: border-box;
margin-left: 10px;
}
+//模糊搜索 input
+.searchLibrary {
+ display: block;
+ border: 1px solid rgb(219, 212, 212);
+ border-radius: 5px;
+ outline: none;
+ box-sizing: border-box;
+ margin: 5px auto;
+ padding-left: 5px;
+ width: 95%;
+ height: 30px;
+}
.panelLibraryFlex {
display: flex;
flex-direction: row;
diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.html b/src/app/ui/collection-tools-plan/collection-tools.component.html
index 0fdc889..9cc69c0 100644
--- a/src/app/ui/collection-tools-plan/collection-tools.component.html
+++ b/src/app/ui/collection-tools-plan/collection-tools.component.html
@@ -103,23 +103,34 @@
-
-
-
-
-
-
-
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 5bd8a51..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 }
})
}
@@ -2043,6 +2042,23 @@ export class CollectionToolsPlanComponent implements OnInit {
selectLibrary:any; //选中的素材库
selectImage:any; //选中的素材库图片
selectImageIndex:number; //选中的素材库图片index
+ searchSettimeout:any; //延时器
+ searchInput:string = null; //模糊搜索 input
+ searchLibrary:any = []; //模糊搜索 素材
+
+ //输入框 输入事件
+ libraryChange () {
+ window.clearTimeout(this.searchSettimeout)
+ this.searchSettimeout = window.setTimeout(()=>{
+ if (this.searchInput === "") {
+ this.searchLibrary = []
+ } else {
+ this.http.get(`/api/Assets?assetName=${this.searchInput}`).subscribe((data:any)=>{
+ this.searchLibrary = data
+ })
+ }
+ },500)
+ }
//获取素材库
getAllLibrary (type:string='input') {
diff --git a/src/app/ui/collection-tools-plan/panel.scss b/src/app/ui/collection-tools-plan/panel.scss
index 822d0e6..09b8ceb 100644
--- a/src/app/ui/collection-tools-plan/panel.scss
+++ b/src/app/ui/collection-tools-plan/panel.scss
@@ -212,6 +212,18 @@
box-sizing: border-box;
margin-left: 10px;
}
+//模糊搜索 input
+.searchLibrary {
+ display: block;
+ border: 1px solid rgb(219, 212, 212);
+ border-radius: 5px;
+ outline: none;
+ box-sizing: border-box;
+ margin: 5px auto;
+ padding-left: 5px;
+ width: 95%;
+ height: 30px;
+}
.panelLibraryFlex {
display: flex;
flex-direction: row;
diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html
index 169b3b2..4b65115 100644
--- a/src/app/ui/collection-tools/collection-tools.component.html
+++ b/src/app/ui/collection-tools/collection-tools.component.html
@@ -202,23 +202,35 @@
-
+
+
+
+
+
+
+
+
+
-
-
+ {{items.name}}
-
+
+
+
+
+
+
+
-
-
-
+ {{items.name}}
+
+
+
+
+
+ {{items.name}}
+
-
-
-
-
-
-
-
@@ -504,6 +516,7 @@
-
+
+
+
+
+
+
+
+
+
-
-
+ {{items.name}}
-
+
+
+
+
+
+
+
-
-
-
+ {{items.name}}
+
+
+
+
+
+ {{items.name}}
+
+ visibility
diff --git a/src/app/ui/collection-tools/collection-tools.component.scss b/src/app/ui/collection-tools/collection-tools.component.scss
index 8df231d..2ca8282 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 d5a1ca8..641f566 100644
--- a/src/app/ui/collection-tools/collection-tools.component.ts
+++ b/src/app/ui/collection-tools/collection-tools.component.ts
@@ -1343,6 +1343,7 @@ export class CollectionToolsComponent implements OnInit {
selectPanelPoint //传过来的处置素材
//处理 tree 数据结构
handleTreeData (storeyData,selectPanelPoint) {
+ this.hideAllTreenode = true
this.storeyData = storeyData
this.selectPanelPoint = selectPanelPoint
let data = this.allFireElements //所有消防要素模板
@@ -1434,6 +1435,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属性
@@ -1453,9 +1470,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 }
})
}
@@ -2106,6 +2122,23 @@ export class CollectionToolsComponent implements OnInit {
selectLibrary:any; //选中的素材库
selectImage:any; //选中的素材库图片
selectImageIndex:number; //选中的素材库图片index
+ searchSettimeout:any; //延时器
+ searchInput:string = null; //模糊搜索 input
+ searchLibrary:any = []; //模糊搜索 素材
+
+ //输入框 输入事件
+ libraryChange () {
+ window.clearTimeout(this.searchSettimeout)
+ this.searchSettimeout = window.setTimeout(()=>{
+ if (this.searchInput === "") {
+ this.searchLibrary = []
+ } else {
+ this.http.get(`/api/Assets?assetName=${this.searchInput}`).subscribe((data:any)=>{
+ this.searchLibrary = data
+ })
+ }
+ },500)
+ }
//获取素材库
getAllLibrary (type:string='input') {
diff --git a/src/app/ui/collection-tools/panel.scss b/src/app/ui/collection-tools/panel.scss
index dc0e63c..666a2ad 100644
--- a/src/app/ui/collection-tools/panel.scss
+++ b/src/app/ui/collection-tools/panel.scss
@@ -209,6 +209,18 @@
box-sizing: border-box;
margin-left: 10px;
}
+//模糊搜索 input
+.searchLibrary {
+ display: block;
+ border: 1px solid rgb(219, 212, 212);
+ border-radius: 5px;
+ outline: none;
+ box-sizing: border-box;
+ margin: 5px auto;
+ padding-left: 5px;
+ width: 95%;
+ height: 30px;
+}
.panelLibraryFlex {
display: flex;
flex-direction: row;