|
|
|
@ -1,8 +1,10 @@
|
|
|
|
|
|
|
|
|
|
import { AbstractMesh, Material, Mesh, PBRMaterial, Texture } from "@babylonjs/core"; |
|
|
|
|
import { PlanComponent } from "src/app/pages/plan/plan.component"; |
|
|
|
|
import { ConfigManager } from "../../controller/config-manager"; |
|
|
|
|
import { DataManager } from "../../controller/data-manager"; |
|
|
|
|
import { InfoManager } from "../../controller/info-manager"; |
|
|
|
|
import { ModeManager, ModeType } from "../../controller/mode-manager"; |
|
|
|
|
import { SceneManager } from "../../controller/scene-manager"; |
|
|
|
|
import { ServeManager } from "../../controller/serve-manager"; |
|
|
|
|
import { BuildingStatus } from "../../controller/status/building-status"; |
|
|
|
@ -10,7 +12,7 @@ import { StatusManager } from "../../controller/status/status-manager";
|
|
|
|
|
import { BuildingData, BuildingData_ChemicalPlant, BuildingData_Environment, BuildingData_Normal, BuildingType } from "../../model/data/institution/building/building-data"; |
|
|
|
|
import { JYZInfoMoudleType, JYZShowData } from "../../model/data/institution/jyz-show-data"; |
|
|
|
|
import { ModelType } from "../../model/data/model-data/model-data"; |
|
|
|
|
import { FacilityType } from "../../model/data/model-data/model-data-facility"; |
|
|
|
|
import { FacilityPosType, FacilityType } from "../../model/data/model-data/model-data-facility"; |
|
|
|
|
import { ModelEditData } from "../../model/data/model-data/model-edit-data"; |
|
|
|
|
import { BuildingInfo } from "../../model/info/building/building-info"; |
|
|
|
|
import { BuildingInfo_ChemicalPlant } from "../../model/info/building/building-info-chemicalplant"; |
|
|
|
@ -774,7 +776,31 @@ export class BuildingWindow extends UIBase {
|
|
|
|
|
let moudleTypeKey = moudleType; //当前模块物体的特殊字段
|
|
|
|
|
let zdKey = "ZD_" + moudleType; //阻挡类物体特殊字段
|
|
|
|
|
|
|
|
|
|
if (this.facilitysByMoudle.has(moudleType)) { |
|
|
|
|
//编辑模式下,基本信息下的设备会随时变化
|
|
|
|
|
if (moudleType == JYZInfoMoudleType.JBXX && ModeManager.currentMode == ModeType.Edit) { |
|
|
|
|
if (this.facilitysByMoudle.has(moudleType)) { |
|
|
|
|
this.facilitysByMoudle.get(moudleType).length = 0; |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
this.facilitysByMoudle.set(moudleType, []); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let allFacilityByType = buildingInfo.ModelInfo.facilityInfos; |
|
|
|
|
if (allFacilityByType == null) { |
|
|
|
|
return; //没有设备
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (let i = 0; i < allFacilityByType.length; i++) { |
|
|
|
|
let l_facilityByType = allFacilityByType[i]; |
|
|
|
|
if (ConfigManager.getPosType(l_facilityByType.type) == FacilityPosType.Out) { |
|
|
|
|
this.facilitysByMoudle.get(moudleType).push(l_facilityByType); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
else if (this.facilitysByMoudle.has(moudleType)) { |
|
|
|
|
//已经初始化过了
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
@ -790,17 +816,7 @@ export class BuildingWindow extends UIBase {
|
|
|
|
|
for (let i = 0; i < allFacilityByType.length; i++) { |
|
|
|
|
let l_facilityByType = allFacilityByType[i]; |
|
|
|
|
|
|
|
|
|
// if (moudleType == JYZInfoMoudleType.XF) //消防-逃生
|
|
|
|
|
// {
|
|
|
|
|
// if (TsTool.stringContain(l_facilityByType.type, FacilityType.XF_TSLX)) {
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// if (TsTool.stringContain(l_facilityByType.type, FacilityType.XF_SSD)) {
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
if (TsTool.stringContain(l_facilityByType.type, zdKey)) { |
|
|
|
|
if (TsTool.stringContain(l_facilityByType.type, zdKey)) { //遮挡物
|
|
|
|
|
if (!this.zdByMoudle.has(moudleType)) { |
|
|
|
|
this.zdByMoudle.set(moudleType, []); |
|
|
|
|
} |
|
|
|
@ -809,6 +825,7 @@ export class BuildingWindow extends UIBase {
|
|
|
|
|
else if (TsTool.stringContain(l_facilityByType.type, "_" + moudleTypeKey) || TsTool.stringContain(l_facilityByType.type, moudleTypeKey + "_")) { |
|
|
|
|
this.facilitysByMoudle.get(moudleType).push(l_facilityByType); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|