|
|
@ -49,7 +49,8 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
element.selectBuiltInGrouping = [] |
|
|
|
element.selectBuiltInGrouping = [] |
|
|
|
element.facilityItems.forEach((elements, index) => { |
|
|
|
element.facilityItems.forEach((elements, index) => { |
|
|
|
elements.total = element.facilityCount[index] |
|
|
|
elements.total = element.facilityCount[index] |
|
|
|
elements.expanded = false}); |
|
|
|
elements.expanded = false |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}) //http
|
|
|
|
}) //http
|
|
|
|
} //if
|
|
|
|
} //if
|
|
|
@ -62,9 +63,210 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
let data = e |
|
|
|
let data = e |
|
|
|
let dialogRef = this.dialog.open(ImgsDataDetail, { data }); |
|
|
|
let dialogRef = this.dialog.open(ImgsDataDetail, { data }); |
|
|
|
dialogRef.afterClosed().subscribe(data => { |
|
|
|
dialogRef.afterClosed().subscribe(data => { |
|
|
|
if (data) { e.facilityItems.push(data) } });
|
|
|
|
if (data) { e.facilityItems.push(data) } |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//消防水系统
|
|
|
|
|
|
|
|
fireProtectionWaterSystem = { |
|
|
|
|
|
|
|
waterSupplyNetwork: { name: '供水管网', total: '', details: '' },//供水管网
|
|
|
|
|
|
|
|
sprinklerSystem: { name: '自动喷水灭火系统', total: '', details: '' }//自动喷水灭火系统
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//消防灭火给水系统
|
|
|
|
|
|
|
|
FireExtinguishingWaterSupplySystem = { |
|
|
|
|
|
|
|
sprinklerSystem: { name: '自动喷水灭火系统', total: '', details: '' },//自动喷水灭火系统
|
|
|
|
|
|
|
|
AutomaticGasFireExtinguishingSystem: { name: '气体自动灭火系统', total: '', details: '' },//气体自动灭火系统
|
|
|
|
|
|
|
|
firePumpRoom: { name: '消防泵房', total: '', details: '' }//消防泵房
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//其他
|
|
|
|
|
|
|
|
other = { |
|
|
|
|
|
|
|
purgingSystem: { name: '排烟系统', total: '', details: '' },//排烟系统
|
|
|
|
|
|
|
|
fireExtinguisher: { name: '灭火器', total: '', details: '' },//灭火器
|
|
|
|
|
|
|
|
extinctionUsingGas: { name: '气体灭火', total: '', details: '' },//气体灭火
|
|
|
|
|
|
|
|
fireControlCommunication: { name: '消防通信', total: '', details: '' }//消防通信
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//消防设施
|
|
|
|
|
|
|
|
fireFightingEquipment = { |
|
|
|
|
|
|
|
automaticAlarmSystem: { name: '自动报警系统', total: '', details: '' },//自动报警系统
|
|
|
|
|
|
|
|
firePump: { name: '消防泵', total: '', details: '' }//消防泵
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//消火栓系统
|
|
|
|
|
|
|
|
hydrantSystem = { |
|
|
|
|
|
|
|
fireExtinguishingAgent: { name: '灭火剂', total: '', details: '' },//灭火剂
|
|
|
|
|
|
|
|
AlarmFacilities: { name: '报警设施', total: '', details: '' },//报警设施
|
|
|
|
|
|
|
|
FireControlPipeNetwork: { name: '消防管网', total: '', details: '' }//消防管网
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//其它设施
|
|
|
|
|
|
|
|
otherFacilities = { |
|
|
|
|
|
|
|
givePriorityToBroadcast: { name: '优先广播', total: '', details: '' },//优先广播
|
|
|
|
|
|
|
|
VIdetector: { name: 'VI检测仪', total: '', details: '' },//VI检测仪
|
|
|
|
|
|
|
|
foamWaterSpraySystem: { name: '泡沫水喷雾系统', total: '', details: '' },//泡沫水喷雾系统
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//自动消防设施
|
|
|
|
|
|
|
|
automaticFireProtectionFacility = { |
|
|
|
|
|
|
|
fireSprinklingSystem: { name: '喷水灭火系统', total: '', details: '' },//喷水灭火系统
|
|
|
|
|
|
|
|
automaticAlarmSystem: { name: '自动报警系统', total: '', details: '' },//自动报警系统
|
|
|
|
|
|
|
|
smokeControlAndExhaustSystem: { name: '防排烟系统', total: '', details: '' },//防排烟系统
|
|
|
|
|
|
|
|
waterCurtainSystem: { name: '水幕系统', total: '', details: '' },//水幕系统
|
|
|
|
|
|
|
|
firePump: { name: '消防泵', total: '', details: '' }//消防泵
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//消防水源
|
|
|
|
|
|
|
|
fireWaterSupply = { |
|
|
|
|
|
|
|
firePool: { name: '消防水池', total: '', details: '' }//消防水池
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//获得当前建筑的手动输入值
|
|
|
|
|
|
|
|
FacilityStat: any//存放当前建筑手动输入的值
|
|
|
|
|
|
|
|
selectedChange($event) { |
|
|
|
|
|
|
|
//获得手动输入的值
|
|
|
|
|
|
|
|
this.http.get('/api/CompanyAccount/FacilityStat', { |
|
|
|
|
|
|
|
params: { |
|
|
|
|
|
|
|
buildingId: this.allBuildingGrouping[$event].id |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).subscribe(data => { |
|
|
|
|
|
|
|
this.FacilityStat = data |
|
|
|
|
|
|
|
this.changeData() |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//清空手动输入的值
|
|
|
|
|
|
|
|
emptyData() { |
|
|
|
|
|
|
|
this.fireProtectionWaterSystem = { |
|
|
|
|
|
|
|
waterSupplyNetwork: { name: '供水管网', total: '', details: '' },//供水管网
|
|
|
|
|
|
|
|
sprinklerSystem: { name: '自动喷水灭火系统', total: '', details: '' }//自动喷水灭火系统
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.FireExtinguishingWaterSupplySystem = { |
|
|
|
|
|
|
|
sprinklerSystem: { name: '自动喷水灭火系统', total: '', details: '' },//自动喷水灭火系统
|
|
|
|
|
|
|
|
AutomaticGasFireExtinguishingSystem: { name: '气体自动灭火系统', total: '', details: '' },//气体自动灭火系统
|
|
|
|
|
|
|
|
firePumpRoom: { name: '消防泵房', total: '', details: '' }//消防泵房
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.other = { |
|
|
|
|
|
|
|
purgingSystem: { name: '排烟系统', total: '', details: '' },//排烟系统
|
|
|
|
|
|
|
|
fireExtinguisher: { name: '灭火器', total: '', details: '' },//灭火器
|
|
|
|
|
|
|
|
extinctionUsingGas: { name: '气体灭火', total: '', details: '' },//气体灭火
|
|
|
|
|
|
|
|
fireControlCommunication: { name: '消防通信', total: '', details: '' }//消防通信
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.fireFightingEquipment = { |
|
|
|
|
|
|
|
automaticAlarmSystem: { name: '自动报警系统', total: '', details: '' },//自动报警系统
|
|
|
|
|
|
|
|
firePump: { name: '消防泵', total: '', details: '' }//消防泵
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.hydrantSystem = { |
|
|
|
|
|
|
|
fireExtinguishingAgent: { name: '灭火剂', total: '', details: '' },//灭火剂
|
|
|
|
|
|
|
|
AlarmFacilities: { name: '报警设施', total: '', details: '' },//报警设施
|
|
|
|
|
|
|
|
FireControlPipeNetwork: { name: '消防管网', total: '', details: '' }//消防管网
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.otherFacilities = { |
|
|
|
|
|
|
|
givePriorityToBroadcast: { name: '优先广播', total: '', details: '' },//优先广播
|
|
|
|
|
|
|
|
VIdetector: { name: 'VI检测仪', total: '', details: '' },//VI检测仪
|
|
|
|
|
|
|
|
foamWaterSpraySystem: { name: '泡沫水喷雾系统', total: '', details: '' },//泡沫水喷雾系统
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.automaticFireProtectionFacility = { |
|
|
|
|
|
|
|
fireSprinklingSystem: { name: '喷水灭火系统', total: '', details: '' },//喷水灭火系统
|
|
|
|
|
|
|
|
automaticAlarmSystem: { name: '自动报警系统', total: '', details: '' },//自动报警系统
|
|
|
|
|
|
|
|
smokeControlAndExhaustSystem: { name: '防排烟系统', total: '', details: '' },//防排烟系统
|
|
|
|
|
|
|
|
waterCurtainSystem: { name: '水幕系统', total: '', details: '' },//水幕系统
|
|
|
|
|
|
|
|
firePump: { name: '消防泵', total: '', details: '' }//消防泵
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.fireWaterSupply = { |
|
|
|
|
|
|
|
firePool: { name: '消防水池', total: '', details: '' }//消防水池
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//将数据库获取的手动输入的值变成指定形式
|
|
|
|
|
|
|
|
changeData() { |
|
|
|
|
|
|
|
this.emptyData(); |
|
|
|
|
|
|
|
this.FacilityStat.length != 0 ? |
|
|
|
|
|
|
|
this.FacilityStat.forEach(element => { |
|
|
|
|
|
|
|
if (element.groupName == '消防水系统') { |
|
|
|
|
|
|
|
if (element.facilityName == '供水管网') { |
|
|
|
|
|
|
|
this.fireProtectionWaterSystem.waterSupplyNetwork.total = element.count |
|
|
|
|
|
|
|
this.fireProtectionWaterSystem.waterSupplyNetwork.details = element.description |
|
|
|
|
|
|
|
} else if (element.facilityName == '自动喷水灭火系统') { |
|
|
|
|
|
|
|
this.fireProtectionWaterSystem.sprinklerSystem.total = element.count |
|
|
|
|
|
|
|
this.fireProtectionWaterSystem.sprinklerSystem.details = element.description |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (element.groupName == '消防灭火给水系统') { |
|
|
|
|
|
|
|
if (element.facilityName == '自动喷水灭火系统') { |
|
|
|
|
|
|
|
this.FireExtinguishingWaterSupplySystem.sprinklerSystem.total = element.count |
|
|
|
|
|
|
|
this.FireExtinguishingWaterSupplySystem.sprinklerSystem.details = element.description |
|
|
|
|
|
|
|
} else if (element.facilityName == '气体自动灭火系统') { |
|
|
|
|
|
|
|
this.FireExtinguishingWaterSupplySystem.AutomaticGasFireExtinguishingSystem.total = element.count |
|
|
|
|
|
|
|
this.FireExtinguishingWaterSupplySystem.AutomaticGasFireExtinguishingSystem.details = element.description |
|
|
|
|
|
|
|
} else if (element.facilityName == '消防泵房') { |
|
|
|
|
|
|
|
this.FireExtinguishingWaterSupplySystem.firePumpRoom.total = element.count |
|
|
|
|
|
|
|
this.FireExtinguishingWaterSupplySystem.firePumpRoom.details = element.description |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (element.groupName == '其它') { |
|
|
|
|
|
|
|
if (element.facilityName == '排烟系统') { |
|
|
|
|
|
|
|
this.other.purgingSystem.total = element.count |
|
|
|
|
|
|
|
this.other.purgingSystem.details = element.description |
|
|
|
|
|
|
|
} else if (element.facilityName == '灭火器') { |
|
|
|
|
|
|
|
this.other.fireExtinguisher.total = element.count |
|
|
|
|
|
|
|
this.other.fireExtinguisher.details = element.description |
|
|
|
|
|
|
|
} else if (element.facilityName == '气体灭火') { |
|
|
|
|
|
|
|
this.other.extinctionUsingGas.total = element.count |
|
|
|
|
|
|
|
this.other.extinctionUsingGas.details = element.description |
|
|
|
|
|
|
|
} else if (element.facilityName == '消防通信') { |
|
|
|
|
|
|
|
this.other.fireControlCommunication.total = element.count |
|
|
|
|
|
|
|
this.other.fireControlCommunication.details = element.description |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (element.groupName == '消防设施') { |
|
|
|
|
|
|
|
if (element.facilityName == '自动报警系统') { |
|
|
|
|
|
|
|
this.fireFightingEquipment.automaticAlarmSystem.total = element.count |
|
|
|
|
|
|
|
this.fireFightingEquipment.automaticAlarmSystem.details = element.description |
|
|
|
|
|
|
|
} else if (element.facilityName == '消防泵') { |
|
|
|
|
|
|
|
this.fireFightingEquipment.firePump.total = element.count |
|
|
|
|
|
|
|
this.fireFightingEquipment.firePump.details = element.description |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (element.groupName == '消火栓系统') { |
|
|
|
|
|
|
|
if (element.facilityName == '灭火剂') { |
|
|
|
|
|
|
|
this.hydrantSystem.fireExtinguishingAgent.total = element.count |
|
|
|
|
|
|
|
this.hydrantSystem.fireExtinguishingAgent.details = element.description |
|
|
|
|
|
|
|
} else if (element.facilityName == '报警设施') { |
|
|
|
|
|
|
|
this.hydrantSystem.AlarmFacilities.total = element.count |
|
|
|
|
|
|
|
this.hydrantSystem.AlarmFacilities.details = element.description |
|
|
|
|
|
|
|
} else if (element.facilityName == '消防管网') { |
|
|
|
|
|
|
|
this.hydrantSystem.FireControlPipeNetwork.total = element.count |
|
|
|
|
|
|
|
this.hydrantSystem.FireControlPipeNetwork.details = element.description |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (element.groupName == '其它设施') { |
|
|
|
|
|
|
|
if (element.facilityName == '优先广播') { |
|
|
|
|
|
|
|
this.otherFacilities.givePriorityToBroadcast.total = element.count |
|
|
|
|
|
|
|
this.otherFacilities.givePriorityToBroadcast.details = element.description |
|
|
|
|
|
|
|
} else if (element.facilityName == 'VI检测仪') { |
|
|
|
|
|
|
|
this.otherFacilities.VIdetector.total = element.count |
|
|
|
|
|
|
|
this.otherFacilities.VIdetector.details = element.description |
|
|
|
|
|
|
|
} else if (element.facilityName == '泡沫水喷雾系统') { |
|
|
|
|
|
|
|
this.otherFacilities.foamWaterSpraySystem.total = element.count |
|
|
|
|
|
|
|
this.otherFacilities.foamWaterSpraySystem.details = element.description |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (element.groupName == '自动消防设施') { |
|
|
|
|
|
|
|
if (element.facilityName == '喷水灭火系统') { |
|
|
|
|
|
|
|
this.automaticFireProtectionFacility.fireSprinklingSystem.total = element.count |
|
|
|
|
|
|
|
this.automaticFireProtectionFacility.fireSprinklingSystem.details = element.description |
|
|
|
|
|
|
|
} else if (element.facilityName == '自动报警系统') { |
|
|
|
|
|
|
|
this.automaticFireProtectionFacility.automaticAlarmSystem.total = element.count |
|
|
|
|
|
|
|
this.automaticFireProtectionFacility.automaticAlarmSystem.details = element.description |
|
|
|
|
|
|
|
} else if (element.facilityName == '防排烟系统') { |
|
|
|
|
|
|
|
this.automaticFireProtectionFacility.smokeControlAndExhaustSystem.total = element.count |
|
|
|
|
|
|
|
this.automaticFireProtectionFacility.smokeControlAndExhaustSystem.details = element.description |
|
|
|
|
|
|
|
} else if (element.facilityName == '水幕系统') { |
|
|
|
|
|
|
|
this.automaticFireProtectionFacility.waterCurtainSystem.total = element.count |
|
|
|
|
|
|
|
this.automaticFireProtectionFacility.waterCurtainSystem.details = element.description |
|
|
|
|
|
|
|
} else if (element.facilityName == '消防泵') { |
|
|
|
|
|
|
|
this.automaticFireProtectionFacility.firePump.total = element.count |
|
|
|
|
|
|
|
this.automaticFireProtectionFacility.firePump.details = element.description |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (element.groupName == '消防水源') { |
|
|
|
|
|
|
|
if (element.facilityName == '消防水池') { |
|
|
|
|
|
|
|
this.fireWaterSupply.firePool.total = element.count |
|
|
|
|
|
|
|
this.fireWaterSupply.firePool.details = element.description |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) : null |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//保存单位消防设施内置分组项
|
|
|
|
//保存单位消防设施内置分组项
|
|
|
|
editCompanyGrouping(e) { |
|
|
|
editCompanyGrouping(e) { |
|
|
|
let header = { groupId: e.id } |
|
|
|
let header = { groupId: e.id } |
|
|
@ -75,7 +277,8 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
details: element.details, |
|
|
|
details: element.details, |
|
|
|
name: element.name, |
|
|
|
name: element.name, |
|
|
|
isEachFloor: element.isEachFloor, |
|
|
|
isEachFloor: element.isEachFloor, |
|
|
|
order: element.order} |
|
|
|
order: element.order |
|
|
|
|
|
|
|
} |
|
|
|
data.push(msg) |
|
|
|
data.push(msg) |
|
|
|
if (index == e.facilityItems.length - 1) { |
|
|
|
if (index == e.facilityItems.length - 1) { |
|
|
|
this.http.post('/api/CompanyAccount/CompanyFacilityItems/Batch', data, { params: header }).subscribe(data => { |
|
|
|
this.http.post('/api/CompanyAccount/CompanyFacilityItems/Batch', data, { params: header }).subscribe(data => { |
|
|
@ -83,7 +286,8 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.duration = 3000 |
|
|
|
config.duration = 3000 |
|
|
|
this.snackBar.open('数据更新成功', '确定', config); |
|
|
|
this.snackBar.open('数据更新成功', '确定', config); |
|
|
|
}) } |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}); //forEach
|
|
|
|
}); //forEach
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -155,22 +359,26 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
item.assets[0].propertyInfos.forEach(element => { //表头
|
|
|
|
item.assets[0].propertyInfos.forEach(element => { //表头
|
|
|
|
if (element.propertyType != 3) { |
|
|
|
if (element.propertyType != 3) { |
|
|
|
let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位
|
|
|
|
let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位
|
|
|
|
tableMsg.header.push(element.propertyName+unit)} |
|
|
|
tableMsg.header.push(element.propertyName + unit) |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
item.assets.forEach(element => { //表格内容
|
|
|
|
item.assets.forEach(element => { //表格内容
|
|
|
|
let everyBody = {} |
|
|
|
let everyBody = {} |
|
|
|
element.propertyInfos.forEach((elements, index) => { |
|
|
|
element.propertyInfos.forEach((elements, index) => { |
|
|
|
if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) { |
|
|
|
if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) { |
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
everyBody[elements.propertyName+unit] = elements.propertyValue } |
|
|
|
everyBody[elements.propertyName + unit] = elements.propertyValue |
|
|
|
|
|
|
|
} |
|
|
|
if (elements.propertyType == 6) { |
|
|
|
if (elements.propertyType == 6) { |
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
everyBody[elements.propertyName+unit] = elements.propertyValue=='1'?'是':'否' } |
|
|
|
everyBody[elements.propertyName + unit] = elements.propertyValue == '1' ? '是' : '否' |
|
|
|
|
|
|
|
} |
|
|
|
if (elements.propertyType != 3 && elements.propertyName == '图片') { |
|
|
|
if (elements.propertyType != 3 && elements.propertyName == '图片') { |
|
|
|
let imgLength = [] |
|
|
|
let imgLength = [] |
|
|
|
element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } }) |
|
|
|
element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } }) |
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
everyBody[elements.propertyName+unit] = String(imgLength.length) }
|
|
|
|
everyBody[elements.propertyName + unit] = String(imgLength.length) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); //propertyInfos
|
|
|
|
}); //propertyInfos
|
|
|
|
tableMsg.body.push(everyBody) |
|
|
|
tableMsg.body.push(everyBody) |
|
|
@ -187,22 +395,26 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
data[0].propertyInfos.forEach(element => { //表头
|
|
|
|
data[0].propertyInfos.forEach(element => { //表头
|
|
|
|
if (element.propertyType != 3) { |
|
|
|
if (element.propertyType != 3) { |
|
|
|
let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位
|
|
|
|
let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位
|
|
|
|
e.header.push(element.propertyName+unit)} |
|
|
|
e.header.push(element.propertyName + unit) |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
data.forEach(element => { //表格内容
|
|
|
|
data.forEach(element => { //表格内容
|
|
|
|
let everyBody = {} |
|
|
|
let everyBody = {} |
|
|
|
element.propertyInfos.forEach((elements, index) => { |
|
|
|
element.propertyInfos.forEach((elements, index) => { |
|
|
|
if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) { |
|
|
|
if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) { |
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
everyBody[elements.propertyName+unit] = elements.propertyValue } |
|
|
|
everyBody[elements.propertyName + unit] = elements.propertyValue |
|
|
|
|
|
|
|
} |
|
|
|
if (elements.propertyType == 6) { |
|
|
|
if (elements.propertyType == 6) { |
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
everyBody[elements.propertyName+unit] = elements.propertyValue=='1'?'是':'否' } |
|
|
|
everyBody[elements.propertyName + unit] = elements.propertyValue == '1' ? '是' : '否' |
|
|
|
|
|
|
|
} |
|
|
|
if (elements.propertyType != 3 && elements.propertyName == '图片') { |
|
|
|
if (elements.propertyType != 3 && elements.propertyName == '图片') { |
|
|
|
let imgLength = [] |
|
|
|
let imgLength = [] |
|
|
|
element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } }) |
|
|
|
element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } }) |
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
everyBody[elements.propertyName+unit] = String(imgLength.length) } |
|
|
|
everyBody[elements.propertyName + unit] = String(imgLength.length) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
e.body.push(everyBody) |
|
|
|
e.body.push(everyBody) |
|
|
@ -247,7 +459,8 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
elements.selectBuiltInGrouping = [] |
|
|
|
elements.selectBuiltInGrouping = [] |
|
|
|
elements.facilityItems.forEach((newElement, index) => { |
|
|
|
elements.facilityItems.forEach((newElement, index) => { |
|
|
|
newElement.total = elements.facilityCount[index] |
|
|
|
newElement.total = elements.facilityCount[index] |
|
|
|
newElement.expanded = false }); |
|
|
|
newElement.expanded = false |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
@ -266,6 +479,25 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
//保存建筑消防设施内置分组项
|
|
|
|
//保存建筑消防设施内置分组项
|
|
|
|
editBuildingGrouping(e, item) { |
|
|
|
editBuildingGrouping(e, item) { |
|
|
|
|
|
|
|
function returnBody(object, groupName) { |
|
|
|
|
|
|
|
let body = [] |
|
|
|
|
|
|
|
for (const key in object) { |
|
|
|
|
|
|
|
if (Object.prototype.hasOwnProperty.call(object, key)) { |
|
|
|
|
|
|
|
const element = object[key]; |
|
|
|
|
|
|
|
if (element.total || element.details) { |
|
|
|
|
|
|
|
body.push({ |
|
|
|
|
|
|
|
buildingId: item.buildingId, |
|
|
|
|
|
|
|
groupName: groupName, |
|
|
|
|
|
|
|
facilityName: element.name, |
|
|
|
|
|
|
|
count: element.total, |
|
|
|
|
|
|
|
description: element.details |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return body |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let header = {buildingId:e.id, groupId:item.id} |
|
|
|
let header = {buildingId:e.id, groupId:item.id} |
|
|
|
let data = [] |
|
|
|
let data = [] |
|
|
|
item.facilityItems.forEach((element, index) => { |
|
|
|
item.facilityItems.forEach((element, index) => { |
|
|
@ -274,15 +506,59 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
details: element.details, |
|
|
|
details: element.details, |
|
|
|
name: element.name, |
|
|
|
name: element.name, |
|
|
|
isEachFloor: element.isEachFloor, |
|
|
|
isEachFloor: element.isEachFloor, |
|
|
|
order: element.order} |
|
|
|
order: element.order |
|
|
|
|
|
|
|
} |
|
|
|
data.push(msg) |
|
|
|
data.push(msg) |
|
|
|
if (index == item.facilityItems.length - 1) { |
|
|
|
if (index == item.facilityItems.length - 1) { |
|
|
|
this.http.post('/api/CompanyAccount/BuildingFacilityItems/Batch', data, { params: header }).subscribe(data => { |
|
|
|
this.http.post('/api/CompanyAccount/BuildingFacilityItems/Batch', data, { params: header }).subscribe(data => { |
|
|
|
|
|
|
|
let putBody |
|
|
|
|
|
|
|
if (item.name == '消防水源') { |
|
|
|
|
|
|
|
putBody = returnBody(this.fireWaterSupply, '消防水源') |
|
|
|
|
|
|
|
} else if (item.name == '消防水系统') { |
|
|
|
|
|
|
|
putBody = returnBody(this.fireProtectionWaterSystem, '消防水系统') |
|
|
|
|
|
|
|
} else if (item.name == '消防灭火给水系统') { |
|
|
|
|
|
|
|
putBody = returnBody(this.FireExtinguishingWaterSupplySystem, '消防灭火给水系统') |
|
|
|
|
|
|
|
} else if (item.name == '其它') { |
|
|
|
|
|
|
|
putBody = returnBody(this.other, '其它') |
|
|
|
|
|
|
|
} else if (item.name == '消防设施') { |
|
|
|
|
|
|
|
putBody = returnBody(this.fireFightingEquipment, '消防设施') |
|
|
|
|
|
|
|
} else if (item.name == '消火栓系统') { |
|
|
|
|
|
|
|
putBody = returnBody(this.hydrantSystem, '消火栓系统') |
|
|
|
|
|
|
|
} else if (item.name == '其它设施') { |
|
|
|
|
|
|
|
putBody = returnBody(this.otherFacilities, '其它设施') |
|
|
|
|
|
|
|
} else if (item.name == '自动消防设施') { |
|
|
|
|
|
|
|
putBody = returnBody(this.automaticFireProtectionFacility, '自动消防设施') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (putBody.length != 0) { |
|
|
|
|
|
|
|
this.http.put('/api/CompanyAccount/FacilityStatUpdate', putBody, { |
|
|
|
|
|
|
|
params: { |
|
|
|
|
|
|
|
buildingId: item.buildingId |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).subscribe(data => { |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.duration = 3000 |
|
|
|
config.duration = 3000 |
|
|
|
this.snackBar.open('数据更新成功', '确定', config); |
|
|
|
this.snackBar.open('数据更新成功', '确定', config); |
|
|
|
}) } |
|
|
|
|
|
|
|
|
|
|
|
}, err => { |
|
|
|
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
|
|
|
config.duration = 3000 |
|
|
|
|
|
|
|
this.snackBar.open('更新失败', '确定', config); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
|
|
|
config.duration = 3000 |
|
|
|
|
|
|
|
this.snackBar.open('数据更新成功', '确定', config); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, err => { |
|
|
|
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
|
|
|
config.duration = 3000 |
|
|
|
|
|
|
|
this.snackBar.open('更新失败', '确定', config); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}); //forEach
|
|
|
|
}); //forEach
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -345,22 +621,26 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
item.assets[0].propertyInfos.forEach(element => { //表头
|
|
|
|
item.assets[0].propertyInfos.forEach(element => { //表头
|
|
|
|
if (element.propertyType != 3) { |
|
|
|
if (element.propertyType != 3) { |
|
|
|
let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位
|
|
|
|
let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位
|
|
|
|
tableMsg.header.push(element.propertyName+unit)} |
|
|
|
tableMsg.header.push(element.propertyName + unit) |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
item.assets.forEach(element => { //表格内容
|
|
|
|
item.assets.forEach(element => { //表格内容
|
|
|
|
let everyBody = {} |
|
|
|
let everyBody = {} |
|
|
|
element.propertyInfos.forEach((elements, index) => { |
|
|
|
element.propertyInfos.forEach((elements, index) => { |
|
|
|
if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) { |
|
|
|
if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) { |
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
everyBody[elements.propertyName+unit] = elements.propertyValue } |
|
|
|
everyBody[elements.propertyName + unit] = elements.propertyValue |
|
|
|
|
|
|
|
} |
|
|
|
if (elements.propertyType == 6) { |
|
|
|
if (elements.propertyType == 6) { |
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
everyBody[elements.propertyName+unit] = elements.propertyValue=='1'?'是':'否' } |
|
|
|
everyBody[elements.propertyName + unit] = elements.propertyValue == '1' ? '是' : '否' |
|
|
|
|
|
|
|
} |
|
|
|
if (elements.propertyType != 3 && elements.propertyName == '图片') { |
|
|
|
if (elements.propertyType != 3 && elements.propertyName == '图片') { |
|
|
|
let imgLength = [] |
|
|
|
let imgLength = [] |
|
|
|
element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } }) |
|
|
|
element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } }) |
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
everyBody[elements.propertyName+unit] = String(imgLength.length) } |
|
|
|
everyBody[elements.propertyName + unit] = String(imgLength.length) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); //propertyInfos
|
|
|
|
}); //propertyInfos
|
|
|
|
tableMsg.body.push(everyBody) |
|
|
|
tableMsg.body.push(everyBody) |
|
|
@ -377,22 +657,26 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
data[0].propertyInfos.forEach(element => { //表头
|
|
|
|
data[0].propertyInfos.forEach(element => { //表头
|
|
|
|
if (element.propertyType != 3) { |
|
|
|
if (element.propertyType != 3) { |
|
|
|
let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位
|
|
|
|
let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位
|
|
|
|
e.header.push(element.propertyName+unit)} |
|
|
|
e.header.push(element.propertyName + unit) |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
data.forEach(element => { //表格内容
|
|
|
|
data.forEach(element => { //表格内容
|
|
|
|
let everyBody = {} |
|
|
|
let everyBody = {} |
|
|
|
element.propertyInfos.forEach((elements, index) => { |
|
|
|
element.propertyInfos.forEach((elements, index) => { |
|
|
|
if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) { |
|
|
|
if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) { |
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
everyBody[elements.propertyName+unit] = elements.propertyValue } |
|
|
|
everyBody[elements.propertyName + unit] = elements.propertyValue |
|
|
|
|
|
|
|
} |
|
|
|
if (elements.propertyType == 6) { |
|
|
|
if (elements.propertyType == 6) { |
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
everyBody[elements.propertyName+unit] = elements.propertyValue=='1'?'是':'否' } |
|
|
|
everyBody[elements.propertyName + unit] = elements.propertyValue == '1' ? '是' : '否' |
|
|
|
|
|
|
|
} |
|
|
|
if (elements.propertyType != 3 && elements.propertyName == '图片') { |
|
|
|
if (elements.propertyType != 3 && elements.propertyName == '图片') { |
|
|
|
let imgLength = [] |
|
|
|
let imgLength = [] |
|
|
|
element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } }) |
|
|
|
element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } }) |
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
|
|
|
|
everyBody[elements.propertyName+unit] = String(imgLength.length) } |
|
|
|
everyBody[elements.propertyName + unit] = String(imgLength.length) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
e.body.push(everyBody) |
|
|
|
e.body.push(everyBody) |
|
|
@ -419,7 +703,9 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue } |
|
|
|
if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue } |
|
|
|
if (elements.propertyType === 3) { |
|
|
|
if (elements.propertyType === 3) { |
|
|
|
elements.propertyName = imgName |
|
|
|
elements.propertyName = imgName |
|
|
|
data.images.push(elements)} }); |
|
|
|
data.images.push(elements) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); //newDate
|
|
|
|
}); //newDate
|
|
|
|
|
|
|
|
|
|
|
@ -436,7 +722,8 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.duration = 3000 |
|
|
|
config.duration = 3000 |
|
|
|
this.snackBar.open('暂无图片数据','确定',config); } |
|
|
|
this.snackBar.open('暂无图片数据', '确定', config); |
|
|
|
|
|
|
|
} |
|
|
|
} else { //非逐层统计时
|
|
|
|
} else { //非逐层统计时
|
|
|
|
let newData = this.companyDetails[e.name] |
|
|
|
let newData = this.companyDetails[e.name] |
|
|
|
let imgName |
|
|
|
let imgName |
|
|
@ -447,7 +734,9 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue } |
|
|
|
if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue } |
|
|
|
if (elements.propertyType === 3) { |
|
|
|
if (elements.propertyType === 3) { |
|
|
|
elements.propertyName = imgName |
|
|
|
elements.propertyName = imgName |
|
|
|
data.images.push(elements)} }); |
|
|
|
data.images.push(elements) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (data.images.length) { |
|
|
|
if (data.images.length) { |
|
|
|
let dialogRef = this.dialog.open(ImagesData, { width: '1350px', height: '700px', data }); //打开图片弹窗
|
|
|
|
let dialogRef = this.dialog.open(ImagesData, { width: '1350px', height: '700px', data }); //打开图片弹窗
|
|
|
@ -462,7 +751,8 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.duration = 3000 |
|
|
|
config.duration = 3000 |
|
|
|
this.snackBar.open('暂无图片数据','确定',config); } |
|
|
|
this.snackBar.open('暂无图片数据', '确定', config); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -480,7 +770,9 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue } |
|
|
|
if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue } |
|
|
|
if (elements.propertyType === 3) { |
|
|
|
if (elements.propertyType === 3) { |
|
|
|
elements.propertyName = imgName |
|
|
|
elements.propertyName = imgName |
|
|
|
data.images.push(elements)} }); |
|
|
|
data.images.push(elements) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); //newDate
|
|
|
|
}); //newDate
|
|
|
|
|
|
|
|
|
|
|
@ -497,7 +789,8 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.duration = 3000 |
|
|
|
config.duration = 3000 |
|
|
|
this.snackBar.open('暂无图片数据','确定',config); } |
|
|
|
this.snackBar.open('暂无图片数据', '确定', config); |
|
|
|
|
|
|
|
} |
|
|
|
} else { //非逐层统计时
|
|
|
|
} else { //非逐层统计时
|
|
|
|
let newData = item.buildingDetails[e.name] |
|
|
|
let newData = item.buildingDetails[e.name] |
|
|
|
let imgName |
|
|
|
let imgName |
|
|
@ -508,7 +801,8 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue } |
|
|
|
if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue } |
|
|
|
if (elements.propertyType === 3) { |
|
|
|
if (elements.propertyType === 3) { |
|
|
|
elements.propertyName = imgName |
|
|
|
elements.propertyName = imgName |
|
|
|
data.images.push(elements)}
|
|
|
|
data.images.push(elements) |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (data.images.length) { |
|
|
|
if (data.images.length) { |
|
|
@ -524,7 +818,8 @@ export class FireFightingDeviceComponent implements OnInit { |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.duration = 3000 |
|
|
|
config.duration = 3000 |
|
|
|
this.snackBar.open('暂无图片数据','确定',config); } |
|
|
|
this.snackBar.open('暂无图片数据', '确定', config); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|