Browse Source

[修正] 复制素材tree数据更新, 素材名称显隐, 素材厚度BUG修正

master
陈鹏飞 4 years ago
parent
commit
4b81d409bf
  1. 6
      src/app/ui/collection-tools/collection-tools.component.html
  2. 17
      src/app/ui/collection-tools/collection-tools.component.ts

6
src/app/ui/collection-tools/collection-tools.component.html

@ -15,9 +15,9 @@
<mat-icon style="padding-bottom: 7px;">screen_share</mat-icon>
</button>
<span title="基本信息名称显示/隐藏" style="margin-right:20px;user-select: none;margin-left: 12px;" class="nameShow" (click)="basicInfoClick()">
<span [ngClass]="{'icongray': !basicInfo}" title="基本信息名称显示/隐藏" style="margin-right:20px;user-select: none;margin-left: 12px;" class="nameShow" (click)="basicInfoClick()">
基本信息名称
<mat-icon [ngClass]="{'icongray': !basicInfo}">visibility</mat-icon>
<mat-icon>visibility</mat-icon>
</span>
<span style="position: absolute;right: 60px;cursor: pointer;">
@ -164,7 +164,7 @@
</div>
</div>
<!-- 如果是多点连线 -->
<div *ngIf="canvasAssetObj.InteractiveMode == 1 || canvasAssetObj.InteractiveMode == 3">
<div *ngIf="canvasAssetObj.Name == '普通墙' || canvasAssetObj.Name == '承重墙'">
<p>厚度</p>
<div style="width: 100%;display: flex;vertical-align: top;height: 22px;">
<input type="number" class="smallinput" [(ngModel)]="sliderValueThickness"

17
src/app/ui/collection-tools/collection-tools.component.ts

@ -91,7 +91,6 @@ export class CollectionToolsComponent implements OnInit {
this.imagesArrNum = ""
this.canvasAssetObj = obj //将选中素材对象存到本地变量
// console.log(666,this.canvasAssetObj)
this.assetName = obj.Name
this.assetWidth = obj.Width
this.assetHeight = obj.Height
@ -476,22 +475,16 @@ export class CollectionToolsComponent implements OnInit {
this.canvas.paste(companyId,buildingId,floorId)
this.canvasData.isChange = true
this.renovateTreeData(false)
}
basicInfo:boolean = true //基本信息名称显隐
wantToWork:boolean = true //想定作业名称显隐
//点击基本信息名称
basicInfoClick(){
this.basicInfo = !this.basicInfo
this.canvas.setNameVisible(this.basicInfo,0)
}
//点击想定作业名称
wantToWorkClick(){
this.wantToWork = !this.wantToWork
this.canvas.setNameVisible(this.basicInfo,1)
}
isEditPattern:boolean = true //是否为编辑模式
//进入编辑模式
editpat(){
@ -862,8 +855,6 @@ export class CollectionToolsComponent implements OnInit {
//处理 tree 数据结构
handleTreeData (storeyData) {
this.canvas.setNameVisible(this.basicInfo,0)
this.storeyData = storeyData
let data = this.allFireElements //所有消防要素模板
let treeData = [] //tree型 处理完成后的数据
@ -1025,13 +1016,13 @@ export class CollectionToolsComponent implements OnInit {
}
//封装 刷新 tree 数据
renovateTreeData (isRefresh:boolean = true) {
async renovateTreeData (isRefresh:boolean = true) {
this.allFireElements[this.allFireElements.length-1].children = []
isRefresh? this.canvas.refresh() : null
isRefresh? await this.canvas.refresh() : null
isRefresh? this.canvasData.isChange = false : null //服务中 数据是否改动 改为false
isRefresh? this.isShowProperty = true : null
isRefresh? this.isShowAttribute = true : null
this.canvas.setNameVisible(this.basicInfo,0)
let beforeOneId = this.selectingSitePlan.id || '' //当前 选中 平面图 楼层/区域 id
let companyBuildingData = JSON.parse(JSON.stringify( this.canvasData.originalcompanyBuildingData || {} )) // 当前 单位/建筑 数据
let storeyData = JSON.parse(JSON.stringify( this.canvasData.originaleveryStoreyData || {} )) //当前 楼层 数据

Loading…
Cancel
Save