Browse Source

完善消防设备

dev
刘向辉 3 years ago
parent
commit
7ae1fc34dc
  1. 4
      src/app/babylon/view/building-window/building-window.ts
  2. 4
      src/app/babylon/view/facilityinfoinscene-window/facilityinfo-ui-item.ts
  3. 31
      src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts

4
src/app/babylon/view/building-window/building-window.ts

@ -20,6 +20,7 @@ import { ModelInfo_building } from "../../model/info/model/model-info-building";
import { FacilityInfoByType } from "../../model/info/model/model-info-facility"; import { FacilityInfoByType } from "../../model/info/model/model-info-facility";
import { BabylonTool } from "../../tool/babylon-tool"; import { BabylonTool } from "../../tool/babylon-tool";
import { TsTool } from "../../tool/ts-tool"; import { TsTool } from "../../tool/ts-tool";
import { FacilityInfoInSceneWindow } from "../facilityinfoinscene-window/facilityinfoinscene-window";
import { UIBase } from "../window-base/ui-base"; import { UIBase } from "../window-base/ui-base";
import { BuildingUIItem } from "./building-ui-item"; import { BuildingUIItem } from "./building-ui-item";
@ -257,7 +258,6 @@ export class BuildingWindow extends UIBase {
*/ */
recoverMoudleShow(type: JYZInfoMoudleType) { recoverMoudleShow(type: JYZInfoMoudleType) {
let showData = DataManager.institutionData.getMoudleShowData(type); let showData = DataManager.institutionData.getMoudleShowData(type);
console.log("恢复模块状态", showData);
if (showData != null) { if (showData != null) {
let camera = SceneManager.Instance.defaultCamera; let camera = SceneManager.Instance.defaultCamera;
//showData.cameraData.setDataToCamera(camera); //showData.cameraData.setDataToCamera(camera);
@ -719,6 +719,8 @@ export class BuildingWindow extends UIBase {
} }
this.initFacilityTypeByMoudleType(type, this.currentBuidngItem.buildingInfo); this.initFacilityTypeByMoudleType(type, this.currentBuidngItem.buildingInfo);
FacilityInfoInSceneWindow.instance.selectJYJFrom3D(null);
//设备: 显示UI //设备: 显示UI
let facilityByType: FacilityInfoByType[] = []; let facilityByType: FacilityInfoByType[] = [];
if (this.facilitysByMoudle.has(type)) { if (this.facilitysByMoudle.has(type)) {

4
src/app/babylon/view/facilityinfoinscene-window/facilityinfo-ui-item.ts

@ -100,9 +100,9 @@ export class FacilityInfoUIItem {
this.facilityInfoInSceneWindow.selectFacilityItemToThree([this], false); this.facilityInfoInSceneWindow.selectFacilityItemToThree([this], false);
if (!this.facilityInfoInSceneWindow.getFacilityUIShowType(this.getType())) { if (!this.facilityInfoInSceneWindow.getFacilityUIShowType(this.getType())) {
this.modelInfo.setIconEnable(select); this.modelInfo.setIconEnable(select);
this.facilityInfoInSceneWindow.playJYJSelectEffect(select, this.modelInfo)
} }
this.facilityInfoInSceneWindow.playJYJSelectEffect(select, this.modelInfo)
} }
} }

31
src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts

@ -211,13 +211,27 @@ export class FacilityInfoInSceneWindow extends UIBase {
* @param facilityType * @param facilityType
*/ */
getFacilityUIShowType(facilityType: FacilityType): boolean { getFacilityUIShowType(facilityType: FacilityType): boolean {
// for (let i = 0; i < this.three.allFacilityInfoUIItemes.length; i++) {
// let item = this.three.allFacilityInfoUIItemes[i]; //没开弹框
// if (item.type == facilityType) { if (!this.three.isShowChildComponent || this.three.leftDomain == null) {
// return item.isShow;
// } return false;
// } }
return true;
//没有要显示的设备
if (this.three.leftDomain.FacilityList == null) {
return false;
}
for (let i = 0; i < this.three.leftDomain.FacilityList.length; i++) {
let item: FacilityInfoUIItem = this.three.leftDomain.FacilityList[i];
if (item.getType() == facilityType) {
console.log("显示", facilityType);
return true;
}
}
console.log("不显示", facilityType);
return false;
} }
@ -246,7 +260,8 @@ export class FacilityInfoInSceneWindow extends UIBase {
super.onInit(); super.onInit();
FacilityInfoInSceneWindow.instance = this; FacilityInfoInSceneWindow.instance = this;
// this.three = ThreeDimensionalHomeComponent.instance; this.three = PlanComponent.instance;
// EventManager.addListener(Event_ModelInfoChange, this.onModelInfoChange); // EventManager.addListener(Event_ModelInfoChange, this.onModelInfoChange);
GizmoTool.onPickMeshInfoObservable.add(this.onClickModel); GizmoTool.onPickMeshInfoObservable.add(this.onClickModel);

Loading…
Cancel
Save