Browse Source

[完善]更新完整度 规则

非煤矿山灾害智能感知和预警系统
邵佳豪 3 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) { this.imageUrl ? num3 += 1 : null
if (Object.prototype.hasOwnProperty.call(this.datas, key)) { // for (const key in this.datas) {
const element = this.datas[key]; // if (Object.prototype.hasOwnProperty.call(this.datas, key)) {
for (const key in element) { // const element = this.datas[key];
if (Object.prototype.hasOwnProperty.call(element, key)) { // for (const key in element) {
const element2 = element[key]; // if (Object.prototype.hasOwnProperty.call(element, key)) {
if (element2) { // const element2 = element[key];
// console.log(element2); // if (element2) {
num += 1 // // console.log(element2);
} // num += 1
} // }
} // }
} // }
} // }
for (const key in this.datas.KeyParts) { // }
if (Object.prototype.hasOwnProperty.call(this.datas.KeyParts, key)) { // for (const key in this.datas.KeyParts) {
const element = this.datas.KeyParts[key] // if (Object.prototype.hasOwnProperty.call(this.datas.KeyParts, key)) {
for (const key in element) { // const element = this.datas.KeyParts[key]
if (Object.prototype.hasOwnProperty.call(element, key)) { // for (const key in element) {
const element2 = element[key] // if (Object.prototype.hasOwnProperty.call(element, key)) {
// console.log(element2); // const element2 = element[key]
if (element2) { // // console.log(element2);
num2 += 1 // if (element2) {
} // num2 += 1
} // }
} // }
} // }
} // }
let num4 = (num + num2 + num3 - 1) / 64 // }
this.integrity = Math.floor(num4 * 100) / 100 // let num4 = (num + num2 + num3 - 1) / 64
console.log(num, num2, num3, num4);
let xxx = num3 / 11
this.integrity = Math.floor(xxx * 100) / 100
console.log('完整度',this.integrity)
let body = { let body = {
id: this.id, id: this.id,
usci: this.validateForm.value.code, usci: this.validateForm.value.code,
@ -1617,11 +1621,4 @@ export class UnitDetailsComponent implements OnInit {
$("#tablebox2").wordExport('数字化预案'); $("#tablebox2").wordExport('数字化预案');
} }
} }
xxx(text) {
if (!text) {
return ''
}
}
} }

Loading…
Cancel
Save