Browse Source

基本信息筛选完善

dev
陈鹏飞 3 years ago
parent
commit
26d942c20a
  1. 5
      src/app/pages/plan/plan.component.html
  2. 27
      src/app/pages/plan/plan.component.ts

5
src/app/pages/plan/plan.component.html

@ -7,10 +7,7 @@
</button> </button>
<nz-dropdown-menu #menu="nzDropdownMenu"> <nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu class="dropDown"> <ul nz-menu class="dropDown">
<li nz-menu-item><label nz-checkbox>毗邻</label></li> <li nz-menu-item *ngFor="let item of baseInfoMarks"><label nz-checkbox [(ngModel)]="item.isShow" [nzDisabled]="selectFence != 0" (ngModelChange)="toggleBaseInfoMark($event, item)">{{item.markerName}}</label></li>
<li nz-menu-item><label nz-checkbox>区域</label></li>
<li nz-menu-item><label nz-checkbox>图片</label></li>
<li nz-menu-item><label nz-checkbox>点位</label></li>
</ul> </ul>
</nz-dropdown-menu> </nz-dropdown-menu>
<div class="rightFence"> <div class="rightFence">

27
src/app/pages/plan/plan.component.ts

@ -27,6 +27,8 @@ import { AllMarkPlanData, MarkNodeData, MarkPlanData } from 'src/app/babylon/mod
import { DataManager, ResType } from 'src/app/babylon/controller/data-manager'; import { DataManager, ResType } from 'src/app/babylon/controller/data-manager';
import { EventManager as babylonEventManager } from 'src/app/babylon/controller/event-manager/event-manager'; import { EventManager as babylonEventManager } from 'src/app/babylon/controller/event-manager/event-manager';
import { Event_GetAllMarkPlanData } from 'src/app/babylon/controller/event-manager/events/event-get-markplandata-success'; import { Event_GetAllMarkPlanData } from 'src/app/babylon/controller/event-manager/events/event-get-markplandata-success';
import { FacilityInfoInSceneWindow } from 'src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window';
import { FacilityType } from 'src/app/babylon/model/data/model-data/model-data-facility';
@ -122,6 +124,7 @@ export class PlanComponent implements OnInit {
modelInit(InsList) { } modelInit(InsList) { }
allFence: string[] = ["基本信息", "加油机", "油罐设备", "消防设施", "安全疏散", "输油管线", "油气回收", "应急预案"]; //头部 功能栏 allFence: string[] = ["基本信息", "加油机", "油罐设备", "消防设施", "安全疏散", "输油管线", "油气回收", "应急预案"]; //头部 功能栏
baseInfoMarks: baseInfoMark[] = [new baseInfoMark("毗邻"), new baseInfoMark("区域"), new baseInfoMark("图片"), new baseInfoMark("点位")] //基本信息 设备筛选list
selectFence: number = -1; //选中 头部功能栏 selectFence: number = -1; //选中 头部功能栏
isShowChildComponent: boolean = false; //是否 显示左侧子组件 isShowChildComponent: boolean = false; //是否 显示左侧子组件
@ViewChild('leftDomain') leftDomain: LeftDomainComponent; //子组件引用 @ViewChild('leftDomain') leftDomain: LeftDomainComponent; //子组件引用
@ -154,6 +157,7 @@ export class PlanComponent implements OnInit {
this.selectFence = type this.selectFence = type
this.isShowChildComponent = true this.isShowChildComponent = true
buildingWindow.changeJYZInfoModel(fenceType, true) buildingWindow.changeJYZInfoModel(fenceType, true)
if (type === 0) { this.baseInfoMarks.forEach(item=>{ item.isShow = true }) } //初始化基本信息 设备显隐
} }
} else { //取消选中 } else { //取消选中
this.selectFence = -1 this.selectFence = -1
@ -188,6 +192,21 @@ export class PlanComponent implements OnInit {
return fenceType return fenceType
} }
//基本信息 设备筛选显隐
toggleBaseInfoMark(event, item: baseInfoMark) {
let type
if (item.markerName === "毗邻") {
type = FacilityType.PL
} else if (item.markerName === "区域") {
type = FacilityType.QY
} else if (item.markerName === "图片") {
type = FacilityType.TPBZ
} else if (item.markerName === "点位") {
type = FacilityType.DWBZ
}
FacilityInfoInSceneWindow.instance.showFacilityByType(type, event)
}
//子组件 创建预案/保存 //子组件 创建预案/保存
noticeChildComponent(type: boolean) { noticeChildComponent(type: boolean) {
if (this.isShowChildComponent && this.leftDomain) { if (this.isShowChildComponent && this.leftDomain) {
@ -787,3 +806,11 @@ export class modelBuilding {
name: string = ""; name: string = "";
modelType: BuildingType = BuildingType.Normal; modelType: BuildingType = BuildingType.Normal;
} }
//基本信息 设备筛选
export class baseInfoMark{
markerName: string;
isShow: boolean = true;
constructor(markerName: string) {
this.markerName = markerName
}
}

Loading…
Cancel
Save