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}
`; });