From c3e4ce9db42e58486c90e4c5304576ccde903cb1 Mon Sep 17 00:00:00 2001 From: liuxianghui <519646741@qq.com> Date: Wed, 30 Mar 2022 10:52:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E9=9A=90=E8=BE=93=E6=B2=B9=E7=AE=A1?= =?UTF-8?q?=E5=92=8C=E6=B2=B9=E6=B0=94=E5=9B=9E=E6=94=B6=E7=AE=A1=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/building-window/building-window.ts | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/app/babylon/view/building-window/building-window.ts b/src/app/babylon/view/building-window/building-window.ts index 7f8d495..ba28401 100644 --- a/src/app/babylon/view/building-window/building-window.ts +++ b/src/app/babylon/view/building-window/building-window.ts @@ -904,6 +904,16 @@ export class BuildingWindow extends UIBase { } //SceneManager.Instance.openInnerGlow(!isShowNameUI_JYJ_YG); //输油管和油气回收管太细,关闭内发光 + switch (type) { + case JYZInfoMoudleType.SYG: + this.showFacilityByType(this.facilitysByMoudle, JYZInfoMoudleType.YQHSGX, false); + this.showFacilityByType(this.facilitysByMoudle, JYZInfoMoudleType.SYG, true); + break; + case JYZInfoMoudleType.YQHSGX: + this.showFacilityByType(this.facilitysByMoudle, JYZInfoMoudleType.SYG, false); + this.showFacilityByType(this.facilitysByMoudle, JYZInfoMoudleType.YQHSGX, true); + break; + } if (show) { @@ -1144,6 +1154,28 @@ export class BuildingWindow extends UIBase { } + /** + * 显示或隐藏某个模块下的所有设备 + * @param facilitysByMoudle + * @param type + * @param show + */ + showFacilityByType(facilitysByMoudle: Map, type: JYZInfoMoudleType, show: boolean) { + let facilityByType = this.facilitysByMoudle.get(type); + if (facilityByType != null) { + facilityByType.forEach(element => { + let facilitys = element.facilityInfo; + if (facilitys != null) { + facilitys.forEach(facility => { + facility.setEnable(show); + }) + } + + }); + } + + } + //#endregion