diff --git a/src/views/dike/runManage/patrolMaintenance/statisticsAnalysis/index.vue b/src/views/dike/runManage/patrolMaintenance/statisticsAnalysis/index.vue index 960529b..6b83960 100644 --- a/src/views/dike/runManage/patrolMaintenance/statisticsAnalysis/index.vue +++ b/src/views/dike/runManage/patrolMaintenance/statisticsAnalysis/index.vue @@ -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) { diff --git a/vue.config.js b/vue.config.js index 6859414..62a3c42 100644 --- a/vue.config.js +++ b/vue.config.js @@ -80,7 +80,8 @@ module.exports = { changeOrigin: true, }, [process.env.VUE_APP_BASE_API]: { - target: "http://shuili.product.dev.com:30115/", + // target: "http://shuili.product.dev.com:30115/", + target: "http://172.16.34.80:18082/", // target: "http://192.168.31.26:18082/", // target: 'http://172.16.32.62:18888/', // target: "http://172.16.34.27:18082",