Browse Source

新增阀门

dev
刘向辉 3 years ago
parent
commit
e0211317a9
  1. 1
      src/app/babylon/controller/config-manager.ts
  2. 4
      src/app/babylon/controller/data-manager.ts
  3. 18
      src/app/babylon/model/data/institution/building/export-data.ts
  4. 25
      src/app/babylon/model/data/institution/facility/property-data/in/property-data-fm.ts
  5. 5
      src/app/babylon/model/data/institution/jyz-show-data.ts
  6. 5
      src/app/babylon/model/data/model-data/model-data-facility.ts
  7. 4
      src/app/babylon/view/facility-window/facility-window.ts
  8. 7
      src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts

1
src/app/babylon/controller/config-manager.ts

@ -99,6 +99,7 @@ export class ConfigManager {
case FacilityType.JY_YG: result = "油罐"; break;
case FacilityType.JY_SYGX: result = "输油管线"; break;
case FacilityType.JY_YQHSGX: result = "油气回收管线"; break;
case FacilityType.JY_FM: result = "阀门"; break;
}
return result;
}

4
src/app/babylon/controller/data-manager.ts

@ -12,6 +12,7 @@ import {
import { ExportData } from '../model/data/institution/building/export-data';
import { AllFacilityData } from '../model/data/institution/facility/all-facility-data';
import { PropertyData_Base_IMG } from '../model/data/institution/facility/property-data/base/property-data-base-img';
import { PropertyData_FM } from '../model/data/institution/facility/property-data/in/property-data-fm';
import { PropertyData_JYJ } from '../model/data/institution/facility/property-data/in/property-data-jyj';
import { PropertyData_MHQ } from '../model/data/institution/facility/property-data/in/property-data-mhq';
import { PropertyData_SYGX } from '../model/data/institution/facility/property-data/in/property-data-sygx';
@ -482,9 +483,10 @@ export class DataManager {
case FacilityType.XF_MHQ_GF_25:
case FacilityType.XF_MHQ_GF_35: result = new PropertyData_MHQ(key, facilityType); break;
case FacilityType.JY_JYJ: result = new PropertyData_JYJ(key, "", "", "", "", "", "",); break;
case FacilityType.JY_YG: result = new PropertyData_YG(key, "", "", "", "", "","", ""); break;
case FacilityType.JY_YG: result = new PropertyData_YG(key, "", "", "", "", "", "", ""); break;
case FacilityType.JY_SYGX: result = new PropertyData_SYGX(key); break;
case FacilityType.JY_YQHSGX: result = new PropertyData_YQHSGX(key); break;
case FacilityType.JY_FM: result = new PropertyData_FM(key, ""); break;
}

18
src/app/babylon/model/data/institution/building/export-data.ts

@ -3,6 +3,7 @@ import { ConfigManager } from "src/app/babylon/controller/config-manager";
import { TsTool } from "src/app/babylon/tool/ts-tool";
import { FacilityType } from "../../model-data/model-data-facility";
import { FacilityDatasByType } from "../../model-data/model-edit-data";
import { PropertyData_FM } from "../facility/property-data/in/property-data-fm";
import { PropertyData_JYJ } from "../facility/property-data/in/property-data-jyj";
import { PropertyData_SYGX } from "../facility/property-data/in/property-data-sygx";
import { PropertyData_YG } from "../facility/property-data/in/property-data-yg";
@ -28,6 +29,8 @@ export class ExportData {
// @Type(() => ExportData_XFSB)
消防设备: ExportData_XFSB[] = [];
阀门: ExportData_FM[] = []
constructor(facilityByTypes: FacilityDatasByType[]) {
for (let i = 0; i < facilityByTypes.length; i++) {
let facilities = facilityByTypes[i].facilities;
@ -53,6 +56,8 @@ export class ExportData {
break;
case FacilityType.JY_YQHSGX: this.油气回收.push(new ExportData_YQHS(facilities[j].propertyData as PropertyData_YQHSGX));
break;
case FacilityType.JY_FM: this.阀门.push(new ExportData_FM(facilities[j].propertyData as PropertyData_FM));
break;
}
}
}
@ -161,3 +166,16 @@ export class ExportData_XFSB {
}
}
/**
*
*/
export class ExportData_FM {
名称: string;
描述: string;
constructor(yqhs_property: PropertyData_FM) {
this. = yqhs_property.name;
this. = yqhs_property.describe;
}
}

25
src/app/babylon/model/data/institution/facility/property-data/in/property-data-fm.ts

@ -0,0 +1,25 @@
import { FacilityType } from "../../../../model-data/model-data-facility";
import { PropertyData_Base } from "../property-data-base";
/**
*
*/
export class PropertyData_FM extends PropertyData_Base {
describe: string = "";//描述
constructor(key: string, describe: string) {
super(key, FacilityType.JY_FM);
this.name = "未命名";
this.describe = describe;
}
clone(key: string) {
let result = new PropertyData_FM(key, this.describe);
result.name = this.name;
return result;
}
}

5
src/app/babylon/model/data/institution/jyz-show-data.ts

@ -74,6 +74,11 @@ export enum JYZInfoMoudleType {
*/
AQSS = "AQSS",
/**
*
*/
FM = "FM",
/**
*
*/

5
src/app/babylon/model/data/model-data/model-data-facility.ts

@ -243,6 +243,11 @@ export enum FacilityType {
*/
JY_YQHSGX = "JY_YQHSGX",
/**
*
*/
JY_FM = "JY_FM",
/**
* 线
*/

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

@ -662,6 +662,10 @@ export class FacilityWindow extends UIBase {
// console.log("找到油气回收", mesh)
this.createNewFacilityByMesh(mesh, FacilityType.JY_YQHSGX);
}
else if (TsTool.stringContain(mesh.name, FacilityType.JY_FM)) {
console.log("找到阀门", mesh)
this.createNewFacilityByMesh(mesh, FacilityType.JY_FM);
}
}
/**

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

@ -507,6 +507,7 @@ export class FacilityInfoInSceneWindow extends UIBase {
|| (currentMoudle == null || currentMoudle == JYZInfoMoudleType.YG) && facilityInfosByType[i].type == FacilityType.JY_YG
|| (currentMoudle == null || currentMoudle == JYZInfoMoudleType.SYG) && facilityInfosByType[i].type == FacilityType.JY_SYGX
|| (currentMoudle == null || currentMoudle == JYZInfoMoudleType.YQHSGX) && facilityInfosByType[i].type == FacilityType.JY_YQHSGX
|| (currentMoudle == null || currentMoudle == JYZInfoMoudleType.FM) && facilityInfosByType[i].type == FacilityType.JY_FM
) {
allJYJInfo = allJYJInfo.concat(facilityInfosByType[i].facilityInfo);
}
@ -552,9 +553,10 @@ export class FacilityInfoInSceneWindow extends UIBase {
if (facilityData.facilityType != FacilityType.JY_JYJ &&
facilityData.facilityType != FacilityType.JY_YG &&
facilityData.facilityType != FacilityType.JY_SYGX &&
facilityData.facilityType != FacilityType.JY_YQHSGX
facilityData.facilityType != FacilityType.JY_YQHSGX &&
facilityData.facilityType != FacilityType.JY_FM
) {
//只有加油机和油罐和输油管、油气回收有高亮显示和取消
//只有加油机和油罐和输油管、油气回收、阀门有高亮显示和取消
return;
}
//}
@ -567,6 +569,7 @@ export class FacilityInfoInSceneWindow extends UIBase {
|| BuildingWindow.instance.currentJYZInfoMoudleType == JYZInfoMoudleType.YG
|| BuildingWindow.instance.currentJYZInfoMoudleType == JYZInfoMoudleType.SYG
|| BuildingWindow.instance.currentJYZInfoMoudleType == JYZInfoMoudleType.YQHSGX
|| BuildingWindow.instance.currentJYZInfoMoudleType == JYZInfoMoudleType.FM
) {
SceneManager.Instance.removeFromHighLight(facilityInfo.modelBox as Mesh);
}

Loading…
Cancel
Save