Browse Source

Merge branches 'master' and 'master' of http://39.106.78.171:3000/shaojiahao/Sinopec-Anxin

dev
陈鹏飞 3 years ago
parent
commit
9a5003edf5
  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 { BabylonTool } from "../../tool/babylon-tool";
import { TsTool } from "../../tool/ts-tool";
import { FacilityInfoInSceneWindow } from "../facilityinfoinscene-window/facilityinfoinscene-window";
import { UIBase } from "../window-base/ui-base";
import { BuildingUIItem } from "./building-ui-item";
@ -257,7 +258,6 @@ export class BuildingWindow extends UIBase {
*/
recoverMoudleShow(type: JYZInfoMoudleType) {
let showData = DataManager.institutionData.getMoudleShowData(type);
console.log("恢复模块状态", showData);
if (showData != null) {
let camera = SceneManager.Instance.defaultCamera;
//showData.cameraData.setDataToCamera(camera);
@ -719,6 +719,8 @@ export class BuildingWindow extends UIBase {
}
this.initFacilityTypeByMoudleType(type, this.currentBuidngItem.buildingInfo);
FacilityInfoInSceneWindow.instance.selectJYJFrom3D(null);
//设备: 显示UI
let facilityByType: FacilityInfoByType[] = [];
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);
if (!this.facilityInfoInSceneWindow.getFacilityUIShowType(this.getType())) {
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
*/
getFacilityUIShowType(facilityType: FacilityType): boolean {
// for (let i = 0; i < this.three.allFacilityInfoUIItemes.length; i++) {
// let item = this.three.allFacilityInfoUIItemes[i];
// if (item.type == facilityType) {
// return item.isShow;
// }
// }
return true;
//没开弹框
if (!this.three.isShowChildComponent || this.three.leftDomain == null) {
return false;
}
//没有要显示的设备
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();
FacilityInfoInSceneWindow.instance = this;
// this.three = ThreeDimensionalHomeComponent.instance;
this.three = PlanComponent.instance;
// EventManager.addListener(Event_ModelInfoChange, this.onModelInfoChange);
GizmoTool.onPickMeshInfoObservable.add(this.onClickModel);

Loading…
Cancel
Save