From f91ba3476010b2a593fbd98c52338e143a6a437a Mon Sep 17 00:00:00 2001 From: usaveh <72734623+usaveh@users.noreply.github.com> Date: Fri, 21 Jun 2024 20:32:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(mis):=20=E4=BF=AE=E5=A4=8D=E4=BA=86mis?= =?UTF-8?q?=E4=B8=AD=E6=A8=AA=E5=9D=90=E6=A0=87=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98=20(#1310)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: valign --- .changeset/thirty-mayflies-look.md | 5 ++++ apps/mis-web/src/i18n/en.ts | 4 +-- apps/mis-web/src/i18n/zh_cn.ts | 4 +-- .../src/pageComponents/admin/DataBarChart.tsx | 7 ++--- apps/mis-web/src/pages/admin/statistic.tsx | 26 +++++++++---------- 5 files changed, 24 insertions(+), 22 deletions(-) create mode 100644 .changeset/thirty-mayflies-look.md diff --git a/.changeset/thirty-mayflies-look.md b/.changeset/thirty-mayflies-look.md new file mode 100644 index 0000000000..e56a44d5de --- /dev/null +++ b/.changeset/thirty-mayflies-look.md @@ -0,0 +1,5 @@ +--- +"@scow/mis-web": patch +--- + +修正了 mis 系统下平台数据统计横坐标的表现形式 diff --git a/apps/mis-web/src/i18n/en.ts b/apps/mis-web/src/i18n/en.ts index 7db5f2d295..f13fed1b43 100644 --- a/apps/mis-web/src/i18n/en.ts +++ b/apps/mis-web/src/i18n/en.ts @@ -1107,8 +1107,8 @@ export default { topTenSubmitJobUser: "Top 10 Submit Job User", newJobCount: "New Job Count", systemFeatureUsageCount: "System Feature Usage Count", - portalFeatureUsageCount: "Portal Feature Usage Count", - misFeatureUsageCount: "MIS Feature Usage Count", + topTenPortalFeatureUsageCount: "Portal Feature Usage Count Top Ten", + topTenMisFeatureUsageCount: "MIS Feature Usage Count Top Ten", jobCount: "Job Count", usageCount:"count", userName: "User Name", diff --git a/apps/mis-web/src/i18n/zh_cn.ts b/apps/mis-web/src/i18n/zh_cn.ts index ad907817cc..096da17914 100644 --- a/apps/mis-web/src/i18n/zh_cn.ts +++ b/apps/mis-web/src/i18n/zh_cn.ts @@ -1105,8 +1105,8 @@ export default { topTenSubmitJobUser: "作业提交用户Top10", newJobCount: "新增作业数", systemFeatureUsageCount: "系统使用量", - portalFeatureUsageCount: "门户系统使用功能次数", - misFeatureUsageCount: "管理系统使用功能次数", + topTenPortalFeatureUsageCount: "门户系统使用功能次数Top10", + topTenMisFeatureUsageCount: "管理系统使用功能次数Top10", jobCount: "作业数", usageCount:"次数", userName: "用户名", diff --git a/apps/mis-web/src/pageComponents/admin/DataBarChart.tsx b/apps/mis-web/src/pageComponents/admin/DataBarChart.tsx index 22a01c597e..e2fc99a131 100644 --- a/apps/mis-web/src/pageComponents/admin/DataBarChart.tsx +++ b/apps/mis-web/src/pageComponents/admin/DataBarChart.tsx @@ -62,8 +62,6 @@ export const DataBarChart: React.FC = ({ return roundedValue.toString(); }; - console.log(title); - return ( {isLoading ? : ( @@ -81,9 +79,8 @@ export const DataBarChart: React.FC = ({ padding={{ left: 20, right: 20 }} label={{ value: xLabel, position: "insideBottom", offset: 0 }} interval={0} - height={(title.includes("系统使用功能次数") || title.includes("Feature Usage Count")) ? 80 : 40} - tick={(title.includes("系统使用功能次数") || title.includes("Feature Usage Count")) ? - : true} + height={ 80 } + tick={ } /> u.platformRoles.includes(PlatformRole.PLATFORM_ADMIN)) bordered={false} > - + u.platformRoles.includes(PlatformRole.PLATFORM_ADMIN)) toolTipFormatter={amountToolTipFormatter} /> - + ({ x: d.date.format("YYYY-MM-DD"), @@ -456,7 +456,7 @@ requireAuth((u) => u.platformRoles.includes(PlatformRole.PLATFORM_ADMIN)) - + u.platformRoles.includes(PlatformRole.PLATFORM_ADMIN)) toolTipFormatter={amountToolTipFormatter} /> - + ({ x: d.date.format("YYYY-MM-DD"), @@ -492,7 +492,7 @@ requireAuth((u) => u.platformRoles.includes(PlatformRole.PLATFORM_ADMIN)) bordered={false} > - + u.platformRoles.includes(PlatformRole.PLATFORM_ADMIN)) toolTipFormatter={(value) => [value, t(p("jobCount"))]} /> - + ({ x: d.date.format("YYYY-MM-DD"), @@ -526,24 +526,24 @@ requireAuth((u) => u.platformRoles.includes(PlatformRole.PLATFORM_ADMIN)) bordered={false} > - + ({ + data={portalUsageCountData.slice(0, 10).map((d) => ({ x: OperationTypeTexts[d.operationType], y: d.count, }))} - title={t(p("portalFeatureUsageCount"))} + title={t(p("topTenPortalFeatureUsageCount"))} toolTipFormatter={(value) => [value, t(p("usageCount"))]} isLoading={portalUsageCountLoading} /> - + ({ + data={misUsageCountData.slice(0, 10).map((d) => ({ x: OperationTypeTexts[d.operationType], - y:d.count, + y: d.count, }))} - title={t(p("misFeatureUsageCount"))} + title={t(p("topTenMisFeatureUsageCount"))} toolTipFormatter={(value) => [value, t(p("usageCount"))]} isLoading={misUsageCountLoading} />