Browse Source

[完善]更新完整度 规则

非煤矿山灾害智能感知和预警系统
邵佳豪 2 years ago
parent
commit
1c8e6d36d3
  1. 73
      src/app/home/basic-info/unit-details/unit-details.component.ts

73
src/app/home/basic-info/unit-details/unit-details.component.ts

@ -1440,37 +1440,41 @@ export class UnitDetailsComponent implements OnInit {
}
}
}
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
this.integrity = Math.floor(num4 * 100) / 100
console.log(num, num2, num3, num4);
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,
@ -1617,11 +1621,4 @@ export class UnitDetailsComponent implements OnInit {
$("#tablebox2").wordExport('数字化预案');
}
}
xxx(text) {
if (!text) {
return ''
}
}
}

Loading…
Cancel
Save