From 473179f34a9060eed960faae2ceaee7a4c2ee33d Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Fri, 5 Nov 2021 15:55:01 +0800 Subject: [PATCH] =?UTF-8?q?header=E5=8A=9F=E8=83=BD=E6=A0=8F=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pages/plan/plan.component.ts | 37 +++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts index e36af80..ee714f7 100644 --- a/src/app/pages/plan/plan.component.ts +++ b/src/app/pages/plan/plan.component.ts @@ -11,7 +11,7 @@ import { ToolbarWindow } from 'src/app/babylon/view/toolbar-window/toobar-window import { BuildingStatus } from 'src/app/babylon/controller/status/building-status'; import { BuildingUIItem } from 'src/app/babylon/view/building-window/building-ui-item'; import { BuildingType } from 'src/app/babylon/model/data/institution/building/building-data'; -import { BuildingWindow } from 'src/app/babylon/view/building-window/building-window'; +import { BuildingWindow, JYZInfoMoudleType } from 'src/app/babylon/view/building-window/building-window'; import { FacilityUIItem } from 'src/app/babylon/view/facility-window/facility-ui-item'; import { FacilityWindow } from 'src/app/babylon/view/facility-window/facility-window'; import { FacilityInfoUIItem } from 'src/app/babylon/view/facilityinfoinscene-window/facilityinfo-ui-item'; @@ -93,13 +93,44 @@ export class PlanComponent implements OnInit { modelInit(InsList) { } allFence: string[] = ["基本信息", "加油机", "油罐设备", "消防设施", "安全疏散", "输油管线", "油气回收", "应急处置"]; //头部 功能栏 - selectFence: number = 0; //选中 头部功能栏 + selectFence: number = -1; //选中 头部功能栏 + isShowChildComponent: boolean = false; //是否 显示左侧子组件 isOpenAwning: boolean = true; //是否 打开罩棚 selectMeasure: number = 0; //当前选择 测量工具 //切换 头部功能栏 toggleHeaderFence(type: number) { - this.selectFence = type + this.beforeOneSatus = StatusManager.getStatus(BuildingStatus); + let buildingWindow: BuildingWindow = this.beforeOneSatus.buildingWindow; + let fenceType: JYZInfoMoudleType = this.getFenceType(type) + if (this.selectFence != type) { + this.selectFence = type + this.isShowChildComponent = true + type>0 && type<7? buildingWindow.showJYZInfoModel(fenceType, true) : null + } else { //取消选中 + this.selectFence = -1 + this.isShowChildComponent = false + type>0 && type<7? buildingWindow.showJYZInfoModel(fenceType, false) : null + } + } + + //获取 头部功能栏Type + getFenceType(type: number): JYZInfoMoudleType { + let fenceType + if (type === 1) { + fenceType = JYZInfoMoudleType.JYJ + } else if (type === 2) { + fenceType = JYZInfoMoudleType.YG + } else if (type === 3) { + fenceType = JYZInfoMoudleType.XF + } else if (type === 4) { + fenceType = JYZInfoMoudleType.TSLX + } else if (type === 5) { + fenceType = JYZInfoMoudleType.SYG + } else if (type === 6) { + fenceType = JYZInfoMoudleType.YQHSGX + } + return fenceType } //切换 头部罩棚