Browse Source

[完善]消防要素眼睛bug 切换楼层消防要素tree bug

master
邵佳豪 4 years ago
parent
commit
ab212243a9
  1. 29
      src/app/ui/collection-tools-read/collection-tools.component.html
  2. 15
      src/app/ui/collection-tools-read/collection-tools.component.ts

29
src/app/ui/collection-tools-read/collection-tools.component.html

@ -118,35 +118,6 @@
</div>
</ng-template>
<!-- 消防列表树 -->
<!-- 消防列表树 -->
<!-- <mat-tree [dataSource]="renderData" [treeControl]="treeControl">
<mat-tree-node *matTreeNodeDef="let node;" matTreeNodePadding cdkTreeNodePaddingIndent='26' (click)="clickTreeNode(node)" class="treeNode">
<button mat-icon-button disabled></button>
<span title="{{node.name}}" [ngClass]="{'treeText': !node.isTemplate}">
{{node.name || node.Name}}
</span>
<span *ngIf="node.isTemplate">({{node.children.length}})</span>
<span class="isLookCss" (click)="clickLookItem(node)"><mat-icon [ngClass]="{'icongray': node.isLook == false}">visibility</mat-icon></span>
</mat-tree-node>
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)="clickTreeNode(node)"class="treeNode" >
<button mat-icon-button
matTreeNodeToggle
[attr.aria-label]="'toggle ' + node.name">
<mat-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
</button>
<span title="{{node.name}}" [ngClass]="{'treeText': !node.isTemplate}">
{{node.name || node.Name}}
</span>
<span *ngIf="node.isTemplate && node.isNewElement">({{node.children.length}})</span>
<span class="isLookCss" (click)="clickLookItem(node)"><mat-icon [ngClass]="{'icongray': node.isLook == false}">visibility</mat-icon></span>
</mat-tree-node>
</mat-tree> -->
<!-- 消防列表树 -->
</div>
</div>
<!-- 消防设施 -->

15
src/app/ui/collection-tools-read/collection-tools.component.ts

@ -433,7 +433,7 @@ export class CollectionToolsReadComponent implements OnInit {
console.log(iconVisibleArr)
console.log(678,this.renderData)
this.canvas.setIconVisible(iconVisibleArr,true)
}
//打开消防设施考题设定
@ -541,7 +541,6 @@ export class CollectionToolsReadComponent implements OnInit {
renderData:any = []//当前层默认隐藏的基本信息考试题目
//封装 刷新 tree 数据
async renovateTreeData (isRefresh:boolean = true) {
this.allFireElements[this.allFireElements.length-1].children = []
this.beforeOneCheckedBuildingIsShow = false
isRefresh? await this.canvas.refresh() : null
@ -563,9 +562,18 @@ export class CollectionToolsReadComponent implements OnInit {
this.canvasData.hiddenBasicInfoFacilities = arr
console.log('这层有',item)
let allFireElements = JSON.parse(JSON.stringify(this.allFireElements))
this.renderData = this.processingData(allFireElements,item.children)
this.renderData = []
setTimeout(() => {
this.renderData = [...this.processingData(allFireElements,item.children)]
}, 0);
this.canvas.loadExamineeData()
// this.canvas.createBackground(this.canvasData.selectStorey.imageUrl, this.canvasData.selectStorey.imageAngle);
// this.canvas.createFloorShape(this.canvasData.examOriginaleveryStoreyData.data);
// this.canvas.processinghiddenData();
// this.canvas.createNodeShape(this.canvasData.selectPanelPoint.Data);
// this.canvas.setNameVisible(false, 0);
// this.canvas.setNameVisible(false, 1);
return true
} else{
console.log('这层没有tree')
@ -626,6 +634,7 @@ export class CollectionToolsReadComponent implements OnInit {
allFireElements.forEach(item => { if (item.parentId == element.id) {element.children.push(item)} });
});
allFireElements.forEach(element => {
element.isLook = false
if (!element.parentId) {
element.isLook = false
treeData.push(element)

Loading…
Cancel
Save