From f1fe585fc4b2a78a0e8cd03a9a49c7faa59d4d71 Mon Sep 17 00:00:00 2001 From: lbw_9527443 <780139497@qq.com> Date: Mon, 25 Aug 2025 11:05:24 +0800 Subject: [PATCH] =?UTF-8?q?refactor(person/sale):=20=E7=AE=80=E5=8C=96?= =?UTF-8?q?=E7=B4=A7=E6=80=A5=E9=97=AE=E9=A2=98=E6=95=B0=E6=8D=AE=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除百分比转换步骤,直接使用API返回的数值格式 --- my-vue-app/src/views/person/sale.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/my-vue-app/src/views/person/sale.vue b/my-vue-app/src/views/person/sale.vue index 19282b9..aa69f62 100644 --- a/my-vue-app/src/views/person/sale.vue +++ b/my-vue-app/src/views/person/sale.vue @@ -327,11 +327,8 @@ async function getUrgentProblem() { const res = await getProblemDistribution(hasParams ? params : undefined) if(res.code === 200) { // 将API返回的对象格式转换为数组格式 - const problemDistribution = res.data.problem_distribution - urgentProblemData.value = Object.entries(problemDistribution).map(([name, percentage]) => ({ - name: name, - value: parseInt(percentage.replace('%', '')) || 0 - })) + const problemDistributionCount = res.data.problem_distribution_count + urgentProblemData.value = Object.entries(problemDistributionCount).map(([name, value]) => ({ name, value })) } } catch (error) { console.error('获取紧急问题数据失败:', error)