From 98a166f5c1501bd2b0054e100affbe60c82ebfa0 Mon Sep 17 00:00:00 2001 From: usaveh <72734623+usaveh@users.noreply.github.com> Date: Mon, 20 May 2024 22:22:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(mis):=20=E4=BF=AE=E5=A4=8D=E4=BA=86Mis?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E4=B8=AD=E5=B9=B3=E5=8F=B0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8A=98=E7=BA=BF=E5=9B=BE=E6=BA=A2=E5=87=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20(#1259)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.做了什么: 修复了Mis系统中平台数据统计折线图溢出的问题 修复后: ![image](https://github.com/PKUHPC/SCOW/assets/72734623/743e00df-e9ad-4a77-be39-5e85e6d215e1) 修复前: ![image](https://github.com/PKUHPC/SCOW/assets/72734623/4ef40be7-9506-4ef5-b254-d4cb0af05144) --- .changeset/hot-meals-confess.md | 5 +++++ apps/mis-web/src/pageComponents/admin/DataLineChart.tsx | 6 ++++-- apps/mis-web/src/pages/admin/statistic.tsx | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 .changeset/hot-meals-confess.md diff --git a/.changeset/hot-meals-confess.md b/.changeset/hot-meals-confess.md new file mode 100644 index 0000000000..ce7a8da7a9 --- /dev/null +++ b/.changeset/hot-meals-confess.md @@ -0,0 +1,5 @@ +--- +"@scow/mis-web": patch +--- + +修复了平台数据统计图(折线图)溢出的问题. diff --git a/apps/mis-web/src/pageComponents/admin/DataLineChart.tsx b/apps/mis-web/src/pageComponents/admin/DataLineChart.tsx index d1f2f969ed..6099d55a80 100644 --- a/apps/mis-web/src/pageComponents/admin/DataLineChart.tsx +++ b/apps/mis-web/src/pageComponents/admin/DataLineChart.tsx @@ -45,7 +45,6 @@ export const DataLineChart: React.FC = ({ lineType = "linear", toolTipFormatter = (value) => value, }) => { - return ( {isLoading ? : ( @@ -56,7 +55,10 @@ export const DataLineChart: React.FC = ({ data={data} > - + diff --git a/apps/mis-web/src/pages/admin/statistic.tsx b/apps/mis-web/src/pages/admin/statistic.tsx index 86f43cff96..4825e4c248 100644 --- a/apps/mis-web/src/pages/admin/statistic.tsx +++ b/apps/mis-web/src/pages/admin/statistic.tsx @@ -447,7 +447,7 @@ requireAuth((u) => u.platformRoles.includes(PlatformRole.PLATFORM_ADMIN)) ({ x: d.date.format("YYYY-MM-DD"), - y: d.count.toFixed(2), + y: Number(d.count.toFixed(2)), }))} title={t(p("chargeAmount"))} isLoading={dailyChargeLoading} @@ -469,7 +469,7 @@ requireAuth((u) => u.platformRoles.includes(PlatformRole.PLATFORM_ADMIN)) ({ x: d.date.format("YYYY-MM-DD"), - y: d.count.toFixed(2), + y: Number(d.count.toFixed(2)), }))} title={t(p("payAmount"))} toolTipFormatter={amountToolTipFormatter} @@ -541,7 +541,7 @@ requireAuth((u) => u.platformRoles.includes(PlatformRole.PLATFORM_ADMIN)) ({ x: OperationTypeTexts[d.operationType], - y: d.count, + y:d.count, }))} title={t(p("misFeatureUsageCount"))} toolTipFormatter={(value) => [value, t(p("usageCount"))]}