|
|
@ -356,13 +356,10 @@ export default { |
|
|
|
this.requestFunc({ group: "C_15" }).then((res) => { |
|
|
|
if (res.data) { |
|
|
|
if (res.data?.yaxis?.length) { |
|
|
|
let newArr = res.data.yaxis.flatMap((v) => v.series); |
|
|
|
this.flawSum = Number( |
|
|
|
newArr.find((v) => v.code === "DF_QX_SUM")?.sum ?? null |
|
|
|
); |
|
|
|
this.yhSum = Number( |
|
|
|
newArr.find((v) => v.code === "DF_YH_SUM")?.sum ?? null |
|
|
|
); |
|
|
|
this.flawSum = res.data.yaxis |
|
|
|
.flatMap((v) => v.series) |
|
|
|
.map((v) => Number(v.sum ?? null)) |
|
|
|
.reduce((acc, cur) => acc + cur, 0); |
|
|
|
} |
|
|
|
this.$nextTick(() => { |
|
|
|
// 柱形图 |
|
|
@ -550,6 +547,13 @@ export default { |
|
|
|
// 缺陷养护对比分析 |
|
|
|
this.requestFunc({ group: "C_17" }).then((res) => { |
|
|
|
if (res.data) { |
|
|
|
if (res.data.yaxis?.length) { |
|
|
|
this.yhSum = Number( |
|
|
|
res.data.yaxis |
|
|
|
.flatMap((v) => v.series) |
|
|
|
?.find((v) => v.code === "DF_BD_YH_SUM")?.sum ?? null |
|
|
|
); |
|
|
|
} |
|
|
|
this.$nextTick(() => { |
|
|
|
// 柱形图 |
|
|
|
if (this.yhCompareRefBarInstance) { |
|
|
|