Browse Source

属性完善

dev
陈鹏飞 3 years ago
parent
commit
401d38c326
  1. 2
      src/app/babylon/controller/data-manager.ts
  2. 20
      src/app/babylon/model/data/institution/facility/property-data/in/property-data-jyj.ts
  3. 20
      src/app/babylon/model/data/institution/facility/property-data/in/property-data-yg.ts
  4. 26
      src/app/pages/left-domain/left-domain.component.ts

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

@ -443,7 +443,7 @@ export class DataManager {
case FacilityType.XF_MHQ_GF_4:
case FacilityType.XF_MHQ_GF_8:
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_JYJ: result = new PropertyData_JYJ(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;

20
src/app/babylon/model/data/institution/facility/property-data/in/property-data-jyj.ts

@ -7,15 +7,23 @@ import { PropertyData_Base } from "../property-data-base";
*/
export class PropertyData_JYJ extends PropertyData_Base {
constructor(key: string) {
super(key, FacilityType.JY_JYJ);
brand: string = ""; //品牌
superBrand: string = ""; //超大牌
oilGunNum: string = ""; //油枪数量
oilProductNo: string = ""; //油品品号
oilPumpType: string = ""; //油泵类型
constructor(key: string,brand: string,superBrand: string,oilGunNum: string,oilProductNo: string,oilPumpType: string) {
super(key, FacilityType.JY_JYJ);
this.brand = brand
this.superBrand = superBrand
this.oilGunNum = oilGunNum
this.oilProductNo = oilProductNo
this.oilPumpType = oilPumpType
}
clone(key: string) {
let result = new PropertyData_JYJ(key);
let result = new PropertyData_JYJ(key,this.brand,this.superBrand,this.oilGunNum,this.oilProductNo,this.oilPumpType);
return result;
}

20
src/app/babylon/model/data/institution/facility/property-data/in/property-data-yg.ts

@ -7,14 +7,20 @@ import { PropertyData_Base } from "../property-data-base";
*/
export class PropertyData_YG extends PropertyData_Base {
constructor(key: string) {
super(key, FacilityType.JY_YG);
oilProductNo: string = ""; //油品品号
oilTankVolume: string = ""; //油罐容积
safeVolume: string = ""; //安全容积
quantity: string = ""; //数量
tankFarm: string = ""; //罐区
oilTankType: string = ""; //油罐类型
}
constructor(key: string) {
super(key, FacilityType.JY_YG);
}
clone(key: string) {
let result = new PropertyData_YG(key);
return result;
}
clone(key: string) {
let result = new PropertyData_YG(key);
return result;
}
}

26
src/app/pages/left-domain/left-domain.component.ts

@ -19,6 +19,7 @@ export class LeftDomainComponent implements OnInit {
this.initComponent()
}
editModel: boolean = true; //编辑/查看模式
beforeFence: number; //当前选中功能栏
FacilityList: FacilityInfoUIItem[] = []; //统计设备 list
@ViewChild('nzTreeComponent', { static: false }) nzTreeComponent!: NzTreeComponent;
@ -48,6 +49,7 @@ export class LeftDomainComponent implements OnInit {
}
})
this.FacilityList = list
console.log(this.FacilityList,this.FacilityList[0].getPropertyData(),'筛选设备')
if (this.beforeFence === 3) { //消防设施
this.handleTreeData(this.FacilityList)
}
@ -76,17 +78,19 @@ export class LeftDomainComponent implements OnInit {
}
})
//编辑模式
let isFind = this.treeData.find(item=>{ return item.key === 'XF_MHQ' })
if (!isFind) {
let primaryNode = { title: '灭火器', key: 'XF_MHQ', selectable: false, }
this.treeData.push(primaryNode)
}
for (let facility in FacilityType) {
if (facility.slice(0,3) === "XF_" && !facility.includes('XF_MHQ')) {
let isFind = this.treeData.find(item=>{ return item.key === facility })
if (!isFind) {
let primaryNode = { title: ConfigManager.getFacilityTypeName(FacilityType[facility]), key: facility, selectable: false, }
this.treeData.push(primaryNode)
if (this.editModel) {
let isFind = this.treeData.find(item=>{ return item.key === 'XF_MHQ' })
if (!isFind) {
let primaryNode = { title: '灭火器', key: 'XF_MHQ', selectable: false, }
this.treeData.push(primaryNode)
}
for (let facility in FacilityType) {
if (facility.slice(0,3) === "XF_" && !facility.includes('XF_MHQ')) {
let isFind = this.treeData.find(item=>{ return item.key === facility })
if (!isFind) {
let primaryNode = { title: ConfigManager.getFacilityTypeName(FacilityType[facility]), key: facility, selectable: false, }
this.treeData.push(primaryNode)
}
}
}
}

Loading…
Cancel
Save