|
|
|
@ -317,10 +317,11 @@ export class FacilityWindow extends UIBase {
|
|
|
|
|
createNewFacilityByMesh(mesh: AbstractMesh, type: FacilityType) { |
|
|
|
|
let facilityData = this.createFacilityDataFromMesh(mesh, type); |
|
|
|
|
//let facilityInfo = this.createFacilityInfoFromMesh(facilityData, mesh, buildingInfo);
|
|
|
|
|
console.log("获取到设备" + type, mesh); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.isRepeatFacilityFromMesh(type, mesh.id)) //不重复
|
|
|
|
|
{ |
|
|
|
|
console.log("获取到设备" + type, mesh); |
|
|
|
|
this.createNewFacility(facilityData, mesh); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -641,21 +642,25 @@ export class FacilityWindow extends UIBase {
|
|
|
|
|
if (TsTool.stringContain(mesh.name, FacilityType.ZD_YG)) { |
|
|
|
|
this.createNewFacilityByMesh(mesh, FacilityType.ZD_YG); |
|
|
|
|
} |
|
|
|
|
else if (TsTool.stringContain(mesh.name, FacilityType.ZD_SYGX)) { |
|
|
|
|
if (TsTool.stringContain(mesh.name, FacilityType.ZD_SYGX)) { |
|
|
|
|
this.createNewFacilityByMesh(mesh, FacilityType.ZD_SYGX); |
|
|
|
|
} |
|
|
|
|
else if (TsTool.stringContain(mesh.name, FacilityType.ZD_YQHSGX)) { |
|
|
|
|
this.createNewFacilityByMesh(mesh, FacilityType.ZD_SYGX); |
|
|
|
|
if (TsTool.stringContain(mesh.name, FacilityType.ZD_YQHSGX)) { |
|
|
|
|
this.createNewFacilityByMesh(mesh, FacilityType.ZD_YQHSGX); |
|
|
|
|
} |
|
|
|
|
else if (TsTool.stringContain(mesh.name, FacilityType.ZD_XF)) { |
|
|
|
|
if (TsTool.stringContain(mesh.name, FacilityType.ZD_XF)) { |
|
|
|
|
this.createNewFacilityByMesh(mesh, FacilityType.ZD_XF); |
|
|
|
|
} |
|
|
|
|
else if (TsTool.stringContain(mesh.name, FacilityType.ZD_ZP)) { |
|
|
|
|
if (TsTool.stringContain(mesh.name, FacilityType.ZD_ZP)) { |
|
|
|
|
this.createNewFacilityByMesh(mesh, FacilityType.ZD_ZP); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 用已有mesh创建设备 |
|
|
|
|
* @param mesh
|
|
|
|
|
* @param type
|
|
|
|
|
*/ |
|
|
|
|
createFacilityDataFromMesh(mesh: AbstractMesh, type: FacilityType) { |
|
|
|
|
let name = ConfigManager.getFacilityTypeName(type); |
|
|
|
|
let result = new ModelData_facility(mesh.name, type, name, mesh.id, new TransformData(), FacilityPosType.In); |
|
|
|
|