邵佳豪 4 years ago
parent
commit
2743997ddc
  1. 2
      src/app/navigation/navigation.component.html
  2. 21
      src/app/ui/collection-tools/collection-tools.component.html
  3. 16
      src/app/ui/collection-tools/collection-tools.component.scss
  4. 37
      src/app/ui/collection-tools/collection-tools.component.ts

2
src/app/navigation/navigation.component.html

@ -8,7 +8,7 @@
<!-- basicinfo -->
<li [routerLink]="['/datacollection/basicinfo']" routerLinkActive="router-link-active">基本信息</li>
<!-- plan -->
<li [routerLink]="['/datacollection/collectionTools']" routerLinkActive="router-link-active">平面图</li>
<li [routerLink]="['/datacollection/collectionTools']" routerLinkActive="router-link-active">平面图</li>
<!-- allaround -->
<li [routerLink]="['/datacollection/allaround']" routerLinkActive="router-link-active">四周毗邻</li>
<!-- fire-fighting-device -->

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

@ -7,21 +7,26 @@
<button mat-button (click)="toggle2()">
<mat-icon style="vertical-align: middle;">list</mat-icon>
</button>
<button (click)="copyAsset()" class="copytobutn" mat-button title="复制" style="margin:0 5px;" *ngIf="isEditPattern">
<mat-icon style="padding-bottom: 7px;">library_books</mat-icon>
</button>
<button (click)="pasteAsset()" class="copytobutn" mat-button title="粘贴" *ngIf="isEditPattern">
<mat-icon style="padding-bottom: 7px;">screen_share</mat-icon>
</button>
<span [ngClass]="{'icongray': !basicInfo}" title="基本信息名称显示/隐藏" style="margin-right:20px;user-select: none;margin-left: 12px;" class="nameShow" (click)="basicInfoClick()">
<span [ngClass]="{'icongray': !basicInfo}" title="基本信息名称显示/隐藏" class="marginLeftRight" (click)="basicInfoClick()">
基本信息名称
<mat-icon>visibility</mat-icon>
</span>
<span class="marginLeftRight">
<mat-checkbox color="primary" [(ngModel)]="isMultiSelect" (change)='changeMultiSelect($event)'></mat-checkbox> 多选
</span>
<span class="marginLeftRight">
<mat-checkbox color="primary" [(ngModel)]="isShowLegend" (change)='changeLegend($event)' [disabled]='this.canvasData.selectPanelPoint.BackgroundImageUrl'></mat-checkbox> 显示图例
</span>
<button (click)="copyAsset()" class="copytobutn marginLeftRight" mat-button title="复制" style="margin:0 5px;" *ngIf="isEditPattern">
复制<mat-icon>library_books</mat-icon>
</button>
<button (click)="pasteAsset()" class="copytobutn marginLeftRight" mat-button title="粘贴" *ngIf="isEditPattern">
粘贴<mat-icon>screen_share</mat-icon>
</button>
<span title="适应缩放" class="zoom" (click)="adaptZoom()">
<img src="/assets/images/适应缩放.png" alt="">
适应缩放

16
src/app/ui/collection-tools/collection-tools.component.scss

@ -34,21 +34,23 @@
margin-right: 3px;
}
}
.marginLeftRight {
margin: 0 8px;
font-size: 16px;
user-select: none;
cursor: pointer;
.mat-icon { vertical-align: middle; font-size: 24px; }
}
.nameShow{
cursor: pointer;
user-select: none;
}
.copytobutn{
width: 33px;
min-width: 33px;
width: 60px;
min-width: 60px;
display: flex;
justify-content: center;
}
font-size: 18px;
mat-icon{
font-size: 26px;
vertical-align: text-top;
}
span{
height: 24px;
line-height: 24px;

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

@ -444,6 +444,9 @@ export class CollectionToolsComponent implements OnInit {
isMultiSelect:boolean = false; // 多选/单选 切换
changeMultiSelect (e) { this.canvas.setMulitSelect(this.isMultiSelect) }
isShowLegend:boolean = true; //图例是否显示
changeLegend (e) { this.canvasData.selectPanelPoint.BackgroundImageUrl? null : this.canvas.setLegendVisible(this.isShowLegend) }
isMultipleAsset:boolean = false//框选多个素材属性显隐
multipleAsset:any = {
Width:null,
@ -1188,6 +1191,7 @@ export class CollectionToolsComponent implements OnInit {
isRefresh? this.isShowProperty = true : null
isRefresh? this.isShowAttribute = true : null
this.canvas.setNameVisible(this.basicInfo,0)
this.canvas.setLegendVisible(this.isShowLegend) //图例显隐
let beforeOneId = this.selectingSitePlan.id || '' //当前 选中 平面图 楼层/区域 id
let companyBuildingData = JSON.parse(JSON.stringify( this.canvasData.originalcompanyBuildingData || {} )) // 当前 单位/建筑 数据
let storeyData = JSON.parse(JSON.stringify( this.canvasData.originaleveryStoreyData || {} )) //当前 楼层 数据
@ -1199,7 +1203,7 @@ export class CollectionToolsComponent implements OnInit {
}
for(let key in storeyData.data){ //筛选数据 没有匹配全部放入到 其他 数组
let noMatch = this.allFireElements.find( every=> every.id===storeyData.data[key].FireElementId )
if (!noMatch) {
if (!noMatch && storeyData.data[key].Id != "图例") {
this.allFireElements[this.allFireElements.length-1].children.push(storeyData.data[key])
}
}
@ -1399,19 +1403,26 @@ export class CollectionToolsComponent implements OnInit {
//新增平面图 楼层/区域
foundPanel (e) {
e.stopPropagation()
let data = {
isBuilding: this.checkedBuildingIndex==-1? false:true,
Panel: this.beforeOneCheckedBuilding,
order: this.sitePlanData.length? this.sitePlanData[this.sitePlanData.length-1].order+1:0,
}
let dialogRef = this.dialog.open(leftFunctionalDomainComponent,{data});
dialogRef.afterClosed().subscribe(data=>{
if (data =='总平面图') {
this.renovateSitePlan()
} else if (data =='建筑') {
this.renovateBuilding()
if (this.beforeOneCheckedBuilding.id) {
let data = {
isBuilding: this.checkedBuildingIndex==-1? false:true,
Panel: this.beforeOneCheckedBuilding,
order: this.sitePlanData.length? this.sitePlanData[this.sitePlanData.length-1].order+1:0,
}
})
let dialogRef = this.dialog.open(leftFunctionalDomainComponent,{data});
dialogRef.afterClosed().subscribe(data=>{
if (data =='总平面图') {
this.renovateSitePlan()
} else if (data =='建筑') {
this.renovateBuilding()
}
})
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请选择建筑','确定',config);
}
}
//编辑平面图 楼层/区域

Loading…
Cancel
Save