From d743cf247cbb8bb0b318189104223d4037a39e5e Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Fri, 9 May 2025 17:42:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/index.vue | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 6505ed0..d886235 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -333,6 +333,8 @@ if (para.value > 0) { if (para.seriesName.includes('费用') || para.seriesName.includes('补贴')) { return para.value + '万元' + }else if (para.seriesName=='服务人数') { + return para.value + '百人' } else { return para.value } @@ -347,8 +349,12 @@ // 将 total 添加到对应位置 let last_total = total if (name.includes('费用') || name.includes('补贴')) { - last_total = total / 10000 - } + last_total = parseFloat(total / 10000).toFixed(2) + } + if (name=='服务人数') { + last_total = total / 100 + } + categorizedData[business_data_id].data[parseInt(month) - 1] = last_total; }); } @@ -422,8 +428,11 @@ let result = `${item.seriesName}
`; const name = item.name; // 系列名称 const value = item.value; // 数据值 - const marker = item.marker; // 标志图形 - const unit = item.name.includes('费用') || item.name.includes('补贴') ? '万元' : '' + const marker = item.marker; // 标志图形 + let unit = item.name.includes('费用') || item.name.includes('补贴') ? '万元' : '' + if(item.name=='服务人数'){ + unit='百人' + } result += `${marker}${name}: ${value}${unit}
`; return result; }, @@ -490,8 +499,11 @@ // item 是每一个系列的数据 const seriesName = item.seriesName; // 系列名称 const value = item.value; // 数据值 - const marker = item.marker; // 标志图形 - const unit = item.seriesName.includes('费用') || item.seriesName.includes('补贴') ? '万元' : '' + const marker = item.marker; // 标志图形 + let unit = item.seriesName.includes('费用') || item.seriesName.includes('补贴') ? '万元' : '' + if(item.seriesName=='服务人数'){ + unit = '百人' + } result += `${marker}${seriesName}: ${value}${unit}
`; });