From 24823060ce33d8ff94f65939145a1d12f8881472 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Sun, 28 Apr 2024 11:33:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=8D=E6=9D=82=E6=A1=88=E4=BB=B6=E8=80=83?= =?UTF-8?q?=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/table/Wgy.vue | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/components/table/Wgy.vue b/src/components/table/Wgy.vue index af4612f..bbbcde0 100644 --- a/src/components/table/Wgy.vue +++ b/src/components/table/Wgy.vue @@ -954,7 +954,19 @@ export default { computeAE(row) { let s = this.computeS(row); // let result = row.C + row.H + row.L - row.M - row.N - row.O - row.P + row.Q - s - row.T - row.U - row.V + row.W + row.X + row.Y - row.Z + row.AA + row.AB + row.AC - row.AD; - let result = row.C + row.H + row.L - row.M - row.N - row.O - row.P + row.W + row.X - row.Z; + let C = Number(row.C); + let H = Number(row.H); + let L = Number(row.L); + let M = Number(row.M); + let N = Number(row.N); + let O = Number(row.O); + let P = Number(row.P); + let W = Number(row.W); + let X = Number(row.X); + let Z = Number(row.Z); + let result = C + H + L - M - N - O - P + W + X - Z; + console.log(row.C + "--" + row.H + "--"+ row.L + "--"+ row.M + "--"+ row.N + "--"+ row.O + "--"+ row.P + "--"+ row.W + "--"+ row.X + "--"+ row.Z) + console.log(result) result = Math.min(result, 100); return result < 0 ? 0 : result.toFixed(2); }, @@ -1092,8 +1104,8 @@ export default { data.forEach((item, index) => { item.A = index + 1; item.F = item.E === 0 ? 0 : parseFloat((item.D / item.E).toFixed(2)); - item.H = Math.min(item.F * item.G, item.D); - item.J = Math.min(item.F * item.I, item.D); + item.H = (Math.min(item.F * item.G, item.D)).toFixed(2); + item.J = (Math.min(item.F * item.I, item.D)).toFixed(2); item.L = (item.K > 10 ? 10 : item.K) * 0.5; /*item.Q = item.communityPopulationRate >= 0.75 ? 10 : (item.communityPopulationRate >= 0.6 ? 5 : 0);*/ // 人口信息管理 @@ -1106,7 +1118,7 @@ export default { no100Score = 0; } item.W = item.communityPopulationRate === 1 ? 15 : no100Score;*/ - item.W = item.communityPopulationRate * 15; + item.W = (item.communityPopulationRate * 15).toFixed(2); item.X = 15; // item.Y = parseFloat((4 * item.communityPopulationRate).toFixed(2)); // 党组织建设(去掉)