Browse Source

[完善] 新增显隐图例功能

zhuzhou
陈鹏飞 4 years ago
parent
commit
764c32e0c7
  1. 11
      src/app/ui/collection-tools-building/collection-tools.component.html
  2. 6
      src/app/ui/collection-tools-building/collection-tools.component.ts
  3. 15
      src/app/ui/collection-tools-plan/collection-tools.component.html
  4. 6
      src/app/ui/collection-tools-plan/collection-tools.component.ts
  5. 3
      src/app/ui/collection-tools/collection-tools.component.html

11
src/app/ui/collection-tools-building/collection-tools.component.html

@ -13,15 +13,20 @@
<mat-icon>visibility</mat-icon> <mat-icon>visibility</mat-icon>
</span> </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"> <button (click)="copyAsset()" class="copytobutn marginLeftRight" mat-button title="复制" style="margin:0 5px;" *ngIf="isEditPattern">
复制<mat-icon>library_books</mat-icon> 复制<mat-icon>library_books</mat-icon>
</button> </button>
<button (click)="pasteAsset()" class="copytobutn marginLeftRight" mat-button title="粘贴" *ngIf="isEditPattern"> <button (click)="pasteAsset()" class="copytobutn marginLeftRight" mat-button title="粘贴" *ngIf="isEditPattern">
粘贴<mat-icon>screen_share</mat-icon> 粘贴<mat-icon>screen_share</mat-icon>
</button> </button>
<span class="marginLeftRight">
<mat-checkbox color="primary" [(ngModel)]="isMultiSelect" (change)='changeMultiSelect($event)'></mat-checkbox> 多选
</span>
<span title="适应缩放" class="zoom" (click)="adaptZoom()"> <span title="适应缩放" class="zoom" (click)="adaptZoom()">
<img src="/assets/images/适应缩放.png" alt=""> <img src="/assets/images/适应缩放.png" alt="">
适应缩放 适应缩放

6
src/app/ui/collection-tools-building/collection-tools.component.ts

@ -830,8 +830,12 @@ export class CollectionToolsBuildingComponent implements OnInit {
this.canvas.paste(companyId,buildingId,floorId) this.canvas.paste(companyId,buildingId,floorId)
this.renovateTreeData(false) this.renovateTreeData(false)
} }
isMultiSelect:boolean = false; // 多选/单选 切换 isMultiSelect:boolean = false; // 多选/单选 切换
changeMultiSelect (e) { this.canvas.setMulitSelect(this.isMultiSelect) } changeMultiSelect (e) { this.canvas.setMulitSelect(this.isMultiSelect) }
isShowLegend:boolean = true; //图例是否显示
changeLegend (e) { this.canvasData.selectPanelPoint.BackgroundImageUrl? null : this.canvas.setLegendVisible(this.isShowLegend) }
basicInfo:boolean = true //基本信息名称显隐 basicInfo:boolean = true //基本信息名称显隐
wantToWork:boolean = true //想定作业名称显隐 wantToWork:boolean = true //想定作业名称显隐
//点击基本信息名称 //点击基本信息名称
@ -1479,6 +1483,7 @@ export class CollectionToolsBuildingComponent implements OnInit {
isRefresh? await this.canvas.refresh() : null isRefresh? await this.canvas.refresh() : null
this.canvas.setNameVisible(this.basicInfo,0) this.canvas.setNameVisible(this.basicInfo,0)
this.canvas.setNameVisible(this.wantToWork,1) this.canvas.setNameVisible(this.wantToWork,1)
this.canvas.setLegendVisible(this.isShowLegend) //图例显隐
isRefresh? this.canvasData.isChange = false : null //服务中 数据是否改动 改为false isRefresh? this.canvasData.isChange = false : null //服务中 数据是否改动 改为false
isRefresh? this.isShowProperty = true : null isRefresh? this.isShowProperty = true : null
isRefresh? this.isShowAttribute = true : null isRefresh? this.isShowAttribute = true : null
@ -1508,7 +1513,6 @@ export class CollectionToolsBuildingComponent implements OnInit {
//陈鹏飞↓↓↓ //陈鹏飞↓↓↓
//陈鹏飞↓↓↓ //陈鹏飞↓↓↓
params = {companyId: sessionStorage.getItem('companyId')} params = {companyId: sessionStorage.getItem('companyId')}
// params = {companyId: this.route.snapshot.queryParams.id}
allFireElements:any = []; //当前 单位/建筑 下的消防要素 allFireElements:any = []; //当前 单位/建筑 下的消防要素
isShowAttribute:boolean = true; //属性栏 是否显示 默认数据 isShowAttribute:boolean = true; //属性栏 是否显示 默认数据

15
src/app/ui/collection-tools-plan/collection-tools.component.html

@ -8,21 +8,20 @@
<mat-icon style="vertical-align: middle; color: #279FFF;">list</mat-icon> <mat-icon style="vertical-align: middle; color: #279FFF;">list</mat-icon>
</button> </button>
<!-- <span [ngClass]="{'icongray': !basicInfo}" title="基本信息名称显示/隐藏" class="marginLeftRight" (click)="basicInfoClick()"> <span class="marginLeftRight">
基本信息名称 <mat-checkbox color="primary" [(ngModel)]="isMultiSelect" (change)='changeMultiSelect($event)'></mat-checkbox> 多选
<mat-icon>visibility</mat-icon> </span>
</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"> <button (click)="copyAsset()" class="copytobutn marginLeftRight" mat-button title="复制" style="margin:0 5px;" *ngIf="isEditPattern">
复制<mat-icon>library_books</mat-icon> 复制<mat-icon>library_books</mat-icon>
</button> </button>
<button (click)="pasteAsset()" class="copytobutn marginLeftRight" mat-button title="粘贴" *ngIf="isEditPattern"> <button (click)="pasteAsset()" class="copytobutn marginLeftRight" mat-button title="粘贴" *ngIf="isEditPattern">
粘贴<mat-icon>screen_share</mat-icon> 粘贴<mat-icon>screen_share</mat-icon>
</button> </button>
<span class="marginLeftRight">
<mat-checkbox color="primary" [(ngModel)]="isMultiSelect" (change)='changeMultiSelect($event)'></mat-checkbox> 多选
</span>
<span title="适应缩放" class="zoom" (click)="adaptZoom()"> <span title="适应缩放" class="zoom" (click)="adaptZoom()">
<img src="/assets/images/适应缩放.png" alt=""> <img src="/assets/images/适应缩放.png" alt="">
适应缩放 适应缩放

6
src/app/ui/collection-tools-plan/collection-tools.component.ts

@ -833,8 +833,12 @@ export class CollectionToolsPlanComponent implements OnInit {
this.canvas.paste(companyId,buildingId,floorId) this.canvas.paste(companyId,buildingId,floorId)
// this.renovateTreeData(false) // this.renovateTreeData(false)
} }
isMultiSelect:boolean = false; // 多选/单选 切换 isMultiSelect:boolean = false; // 多选/单选 切换
changeMultiSelect (e) { this.canvas.setMulitSelect(this.isMultiSelect) } changeMultiSelect (e) { this.canvas.setMulitSelect(this.isMultiSelect) }
isShowLegend:boolean = true; //图例是否显示
changeLegend (e) { this.canvasData.selectPanelPoint.BackgroundImageUrl? null : this.canvas.setLegendVisible(this.isShowLegend) }
basicInfo:boolean = true //基本信息名称显隐 basicInfo:boolean = true //基本信息名称显隐
wantToWork:boolean = true //想定作业名称显隐 wantToWork:boolean = true //想定作业名称显隐
//点击基本信息名称 //点击基本信息名称
@ -1490,6 +1494,7 @@ export class CollectionToolsPlanComponent implements OnInit {
isRefresh? await this.canvas.refresh() : null isRefresh? await this.canvas.refresh() : null
this.canvas.setNameVisible(this.basicInfo,0) this.canvas.setNameVisible(this.basicInfo,0)
this.canvas.setNameVisible(this.wantToWork,1) this.canvas.setNameVisible(this.wantToWork,1)
this.canvas.setLegendVisible(this.isShowLegend) //图例显隐
isRefresh? this.canvasData.isChange = false : null //服务中 数据是否改动 改为false isRefresh? this.canvasData.isChange = false : null //服务中 数据是否改动 改为false
isRefresh? this.isShowProperty = true : null isRefresh? this.isShowProperty = true : null
isRefresh? this.isShowAttribute = true : null isRefresh? this.isShowAttribute = true : null
@ -1518,7 +1523,6 @@ export class CollectionToolsPlanComponent implements OnInit {
//陈鹏飞↓↓↓ //陈鹏飞↓↓↓
//陈鹏飞↓↓↓ //陈鹏飞↓↓↓
params = {companyId: sessionStorage.getItem('companyId')} params = {companyId: sessionStorage.getItem('companyId')}
// params = {companyId: this.route.snapshot.queryParams.id}
allFireElements:any = []; //当前 单位/建筑 下的消防要素 allFireElements:any = []; //当前 单位/建筑 下的消防要素
isShowAttribute:boolean = true; //属性栏 是否显示 默认数据 isShowAttribute:boolean = true; //属性栏 是否显示 默认数据

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

@ -7,6 +7,7 @@
<button mat-button (click)="toggle2()"> <button mat-button (click)="toggle2()">
<mat-icon style="vertical-align: middle; color: #279FFF;">list</mat-icon> <mat-icon style="vertical-align: middle; color: #279FFF;">list</mat-icon>
</button> </button>
<span [ngClass]="{'icongray': !basicInfo}" *ngIf="pattern" title="基本信息名称显示/隐藏" class="marginLeftRight" (click)="basicInfoClick()"> <span [ngClass]="{'icongray': !basicInfo}" *ngIf="pattern" title="基本信息名称显示/隐藏" class="marginLeftRight" (click)="basicInfoClick()">
基本信息名称<mat-icon>visibility</mat-icon> 基本信息名称<mat-icon>visibility</mat-icon>
</span> </span>
@ -20,10 +21,10 @@
<span class="marginLeftRight"> <span class="marginLeftRight">
<mat-checkbox color="primary" [(ngModel)]="isShowLegend" (change)='changeLegend($event)' [disabled]='this.canvasData.selectPanelPoint.BackgroundImageUrl'></mat-checkbox> 显示图例 <mat-checkbox color="primary" [(ngModel)]="isShowLegend" (change)='changeLegend($event)' [disabled]='this.canvasData.selectPanelPoint.BackgroundImageUrl'></mat-checkbox> 显示图例
</span> </span>
<button (click)="copyAsset()" class="copytobutn marginLeftRight" mat-button title="复制" *ngIf="isEditPattern"> <button (click)="copyAsset()" class="copytobutn marginLeftRight" mat-button title="复制" *ngIf="isEditPattern">
复制<mat-icon>library_books</mat-icon> 复制<mat-icon>library_books</mat-icon>
</button> </button>
<button (click)="pasteAsset()" class="copytobutn marginLeftRight" mat-button title="粘贴" *ngIf="isEditPattern"> <button (click)="pasteAsset()" class="copytobutn marginLeftRight" mat-button title="粘贴" *ngIf="isEditPattern">
粘贴<mat-icon>screen_share</mat-icon> 粘贴<mat-icon>screen_share</mat-icon>
</button> </button>

Loading…
Cancel
Save