|
|
|
@ -157,32 +157,32 @@ export class UnitDetailsComponent implements OnInit {
|
|
|
|
|
listdata: [{ |
|
|
|
|
name: '消防水源', |
|
|
|
|
data: [ |
|
|
|
|
{ name: '消防水池数量', velue: '' }, |
|
|
|
|
{ name: '消防水池位置', velue: '' }, |
|
|
|
|
{ name: '总容量(平方米)', velue: '' }, |
|
|
|
|
{ name: '补给方式', velue: '' }, |
|
|
|
|
{ name: '室外其他水源', velue: '' }, |
|
|
|
|
{ name: '室外其他水源位置', velue: '' } |
|
|
|
|
{ name: '消防水池数量', value: '' }, |
|
|
|
|
{ name: '消防水池位置', value: '' }, |
|
|
|
|
{ name: '总容量(平方米)', value: '' }, |
|
|
|
|
{ name: '补给方式', value: '' }, |
|
|
|
|
{ name: '室外其他水源', value: '' }, |
|
|
|
|
{ name: '室外其他水源位置', value: '' } |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '消防栓泵', |
|
|
|
|
data: [ |
|
|
|
|
{ name: '数量', velue: '' }, |
|
|
|
|
{ name: '扬程(m)', velue: '' }, |
|
|
|
|
{ name: '流量(L/S)', velue: '' }, |
|
|
|
|
{ name: '水泵接合器数量', velue: '' }, |
|
|
|
|
{ name: '水泵接合器位置', velue: '' } |
|
|
|
|
{ name: '数量', value: '' }, |
|
|
|
|
{ name: '扬程(m)', value: '' }, |
|
|
|
|
{ name: '流量(L/S)', value: '' }, |
|
|
|
|
{ name: '水泵接合器数量', value: '' }, |
|
|
|
|
{ name: '水泵接合器位置', value: '' } |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '喷淋泵', |
|
|
|
|
data: [ |
|
|
|
|
{ name: '数量', velue: '' }, |
|
|
|
|
{ name: '扬程(m)', velue: '' }, |
|
|
|
|
{ name: '流量(L/S)', velue: '' }, |
|
|
|
|
{ name: '水泵接合器数量', velue: '' }, |
|
|
|
|
{ name: '水泵接合器位置', velue: '' }, |
|
|
|
|
{ name: '数量', value: '' }, |
|
|
|
|
{ name: '扬程(m)', value: '' }, |
|
|
|
|
{ name: '流量(L/S)', value: '' }, |
|
|
|
|
{ name: '水泵接合器数量', value: '' }, |
|
|
|
|
{ name: '水泵接合器位置', value: '' }, |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -190,29 +190,29 @@ export class UnitDetailsComponent implements OnInit {
|
|
|
|
|
{ |
|
|
|
|
name: '消防电梯', |
|
|
|
|
data: [ |
|
|
|
|
{ name: '数量', velue: '' }, |
|
|
|
|
{ name: '位置', velue: '' }, |
|
|
|
|
{ name: '数量', value: '' }, |
|
|
|
|
{ name: '位置', value: '' }, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '疏散电梯', |
|
|
|
|
data: [ |
|
|
|
|
{ name: '数量', velue: '' }, |
|
|
|
|
{ name: '位置', velue: '' }, |
|
|
|
|
{ name: '数量', value: '' }, |
|
|
|
|
{ name: '位置', value: '' }, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '安全出口', |
|
|
|
|
data: [ |
|
|
|
|
{ name: '数量', velue: '' }, |
|
|
|
|
{ name: '位置', velue: '' }, |
|
|
|
|
{ name: '数量', value: '' }, |
|
|
|
|
{ name: '位置', value: '' }, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '标准层室内消火栓', |
|
|
|
|
data: [ |
|
|
|
|
{ name: '数量', velue: '' }, |
|
|
|
|
{ name: '位置', velue: '' }, |
|
|
|
|
{ name: '数量', value: '' }, |
|
|
|
|
{ name: '位置', value: '' }, |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -284,32 +284,32 @@ export class UnitDetailsComponent implements OnInit {
|
|
|
|
|
listdata: [{ |
|
|
|
|
name: '消防水源', |
|
|
|
|
data: [ |
|
|
|
|
{ name: '消防水池数量', velue: '' }, |
|
|
|
|
{ name: '消防水池位置', velue: '' }, |
|
|
|
|
{ name: '总容量(平方米)', velue: '' }, |
|
|
|
|
{ name: '补给方式', velue: '' }, |
|
|
|
|
{ name: '室外其他水源', velue: '' }, |
|
|
|
|
{ name: '室外其他水源位置', velue: '' } |
|
|
|
|
{ name: '消防水池数量', value: '' }, |
|
|
|
|
{ name: '消防水池位置', value: '' }, |
|
|
|
|
{ name: '总容量(平方米)', value: '' }, |
|
|
|
|
{ name: '补给方式', value: '' }, |
|
|
|
|
{ name: '室外其他水源', value: '' }, |
|
|
|
|
{ name: '室外其他水源位置', value: '' } |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '消防栓泵', |
|
|
|
|
data: [ |
|
|
|
|
{ name: '数量', velue: '' }, |
|
|
|
|
{ name: '扬程(m)', velue: '' }, |
|
|
|
|
{ name: '流量(L/S)', velue: '' }, |
|
|
|
|
{ name: '水泵接合器数量', velue: '' }, |
|
|
|
|
{ name: '水泵接合器位置', velue: '' } |
|
|
|
|
{ name: '数量', value: '' }, |
|
|
|
|
{ name: '扬程(m)', value: '' }, |
|
|
|
|
{ name: '流量(L/S)', value: '' }, |
|
|
|
|
{ name: '水泵接合器数量', value: '' }, |
|
|
|
|
{ name: '水泵接合器位置', value: '' } |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '喷淋泵', |
|
|
|
|
data: [ |
|
|
|
|
{ name: '数量', velue: '' }, |
|
|
|
|
{ name: '扬程(m)', velue: '' }, |
|
|
|
|
{ name: '流量(L/S)', velue: '' }, |
|
|
|
|
{ name: '水泵接合器数量', velue: '' }, |
|
|
|
|
{ name: '水泵接合器位置', velue: '' }, |
|
|
|
|
{ name: '数量', value: '' }, |
|
|
|
|
{ name: '扬程(m)', value: '' }, |
|
|
|
|
{ name: '流量(L/S)', value: '' }, |
|
|
|
|
{ name: '水泵接合器数量', value: '' }, |
|
|
|
|
{ name: '水泵接合器位置', value: '' }, |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -317,29 +317,29 @@ export class UnitDetailsComponent implements OnInit {
|
|
|
|
|
{ |
|
|
|
|
name: '消防电梯', |
|
|
|
|
data: [ |
|
|
|
|
{ name: '数量', velue: '' }, |
|
|
|
|
{ name: '位置', velue: '' }, |
|
|
|
|
{ name: '数量', value: '' }, |
|
|
|
|
{ name: '位置', value: '' }, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '疏散电梯', |
|
|
|
|
data: [ |
|
|
|
|
{ name: '数量', velue: '' }, |
|
|
|
|
{ name: '位置', velue: '' }, |
|
|
|
|
{ name: '数量', value: '' }, |
|
|
|
|
{ name: '位置', value: '' }, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '安全出口', |
|
|
|
|
data: [ |
|
|
|
|
{ name: '数量', velue: '' }, |
|
|
|
|
{ name: '位置', velue: '' }, |
|
|
|
|
{ name: '数量', value: '' }, |
|
|
|
|
{ name: '位置', value: '' }, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '标准层室内消火栓', |
|
|
|
|
data: [ |
|
|
|
|
{ name: '数量', velue: '' }, |
|
|
|
|
{ name: '位置', velue: '' }, |
|
|
|
|
{ name: '数量', value: '' }, |
|
|
|
|
{ name: '位置', value: '' }, |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -455,11 +455,14 @@ export class UnitDetailsComponent implements OnInit {
|
|
|
|
|
}).catch((err) => { |
|
|
|
|
this.isHaveLastTask = false |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
this.validateForm = this.fb.group({ |
|
|
|
|
code: [null], |
|
|
|
|
organizationId: [null, [Validators.required]], |
|
|
|
|
relatedOrganizationId: [null], |
|
|
|
|
buildingTypeId: [null], |
|
|
|
|
companyLevel: [null, [Validators.required]], |
|
|
|
|
useNature: [null], |
|
|
|
|
legalPersonName: [null], |
|
|
|
|
legalPersonPhone: [null], |
|
|
|
|
principalName: [null], |
|
|
|
@ -1358,59 +1361,14 @@ export class UnitDetailsComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
edit() { |
|
|
|
|
let num = 0 |
|
|
|
|
let num2 = 0 |
|
|
|
|
let num3 = 0 |
|
|
|
|
console.log(this.validateForm.value); |
|
|
|
|
for (const key in this.validateForm.value) { |
|
|
|
|
if (Object.prototype.hasOwnProperty.call(this.validateForm.value, key)) { |
|
|
|
|
const element = this.validateForm.value[key]; |
|
|
|
|
if (element) { |
|
|
|
|
num3 += 1 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.imageUrl ? num3 += 1 : null |
|
|
|
|
// for (const key in this.datas) {
|
|
|
|
|
// if (Object.prototype.hasOwnProperty.call(this.datas, key)) {
|
|
|
|
|
// const element = this.datas[key];
|
|
|
|
|
// for (const key in element) {
|
|
|
|
|
// if (Object.prototype.hasOwnProperty.call(element, key)) {
|
|
|
|
|
// const element2 = element[key];
|
|
|
|
|
// if (element2) {
|
|
|
|
|
// // console.log(element2);
|
|
|
|
|
// num += 1
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// for (const key in this.datas.KeyParts) {
|
|
|
|
|
// if (Object.prototype.hasOwnProperty.call(this.datas.KeyParts, key)) {
|
|
|
|
|
// const element = this.datas.KeyParts[key]
|
|
|
|
|
// for (const key in element) {
|
|
|
|
|
// if (Object.prototype.hasOwnProperty.call(element, key)) {
|
|
|
|
|
// const element2 = element[key]
|
|
|
|
|
// // console.log(element2);
|
|
|
|
|
// if (element2) {
|
|
|
|
|
// num2 += 1
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// let num4 = (num + num2 + num3 - 1) / 64
|
|
|
|
|
|
|
|
|
|
let xxx = num3 / 11 |
|
|
|
|
|
|
|
|
|
this.integrity = Math.floor(xxx * 100) / 100 |
|
|
|
|
console.log('完整度', this.integrity) |
|
|
|
|
let body = { |
|
|
|
|
id: this.id, |
|
|
|
|
usci: this.validateForm.value.code, |
|
|
|
|
organizationId: this.validateForm.value.organizationId, |
|
|
|
|
relatedOrganizationId: this.validateForm.value.relatedOrganizationId, |
|
|
|
|
buildingTypeId: this.validateForm.value.buildingTypeId, |
|
|
|
|
companyLevel: this.validateForm.value.companyLevel, |
|
|
|
|
useNature: this.validateForm.value.useNature, |
|
|
|
|
legalPersonName: this.validateForm.value.legalPersonName, |
|
|
|
|
legalPersonPhone: this.validateForm.value.legalPersonPhone, |
|
|
|
|
directorName: this.validateForm.value.principalName, |
|
|
|
@ -1420,19 +1378,25 @@ export class UnitDetailsComponent implements OnInit {
|
|
|
|
|
imageFile: this.imageUrl, |
|
|
|
|
companyName: this.datas.basicInfo.name, |
|
|
|
|
address: this.datas.basicInfo.address, |
|
|
|
|
useNature: this.datas.basicInfo.xingzhi, |
|
|
|
|
data: JSON.stringify(this.datas), |
|
|
|
|
integrity: this.integrity, |
|
|
|
|
integrity: 0, |
|
|
|
|
location: { |
|
|
|
|
x: this.markerPosition.x, |
|
|
|
|
y: this.markerPosition.y |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//计算完整度
|
|
|
|
|
body.integrity = this.methodService.getIntegrity(body) |
|
|
|
|
|
|
|
|
|
this.http.patch('/api/Companies/' + this.id, body).subscribe(data => { |
|
|
|
|
this.message.create('success', '保存成功!'); |
|
|
|
|
this.getCompanies() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BuildingTypes |
|
|
|
|
getBuildingTypes() { |
|
|
|
|
this.http.get('/api/BuildingTypes').subscribe((data: any) => { |
|
|
|
@ -1455,11 +1419,12 @@ export class UnitDetailsComponent implements OnInit {
|
|
|
|
|
shiwaiweizhi: "" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
this.datas.basicInfo.name = data.companyName || '' |
|
|
|
|
this.datas.basicInfo.address = data.address || '' |
|
|
|
|
this.datas.basicInfo.xingzhi = data.useNature || '' |
|
|
|
|
} |
|
|
|
|
// this.datas.basicInfo.name = data.companyName
|
|
|
|
|
// this.datas.basicInfo.address = data.address
|
|
|
|
|
// this.datas.basicInfo.xingzhi = data.useNature
|
|
|
|
|
this.integrity = data.integrity |
|
|
|
|
|
|
|
|
|
this.imageUrl = data.imageFile |
|
|
|
|
console.log('当前单位信息2', this.datas); |
|
|
|
|
this.validateForm.patchValue({ |
|
|
|
@ -1467,6 +1432,10 @@ export class UnitDetailsComponent implements OnInit {
|
|
|
|
|
organizationId: data.organizationId, |
|
|
|
|
relatedOrganizationId: data.relatedOrganizationId, |
|
|
|
|
buildingTypeId: data.buildingTypeId, |
|
|
|
|
|
|
|
|
|
companyLevel: data.companyLevel, |
|
|
|
|
useNature: data.useNature, |
|
|
|
|
|
|
|
|
|
legalPersonName: data.legalPersonName, |
|
|
|
|
legalPersonPhone: data.legalPersonPhone, |
|
|
|
|
principalName: data.directorName, |
|
|
|
@ -1483,6 +1452,9 @@ export class UnitDetailsComponent implements OnInit {
|
|
|
|
|
this.labelGis() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nodes: any = [] |
|
|
|
|
getAllOrganization() { |
|
|
|
|
let organizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId |
|
|
|
@ -1520,7 +1492,6 @@ export class UnitDetailsComponent implements OnInit {
|
|
|
|
|
this.http.get('/api/Organizations', { |
|
|
|
|
params: params |
|
|
|
|
}).subscribe((data: any) => { |
|
|
|
|
console.log('组织机构2222', data.items) |
|
|
|
|
data.items.forEach(element => { |
|
|
|
|
element.level == 'battalion' ? this.battalionList.push(element) : null |
|
|
|
|
}); |
|
|
|
|