From 80b9cd83fbbf6284c7b0b4e27713f96c2b8a3758 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Mon, 20 Jan 2025 20:22:02 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BF=AE=E6=94=B9kpi=E8=A1=A8?= =?UTF-8?q?=E5=A4=B4=E6=8F=90=E7=A4=BA=EF=BC=8C=E5=85=B3=E9=97=AD=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 6 +++++- src/i18n/locales/zh-CN.ts | 4 ++++ src/views/perfManage/goldTarget/index.vue | 20 +++++++++++-------- src/views/perfManage/kpiCReport/index.vue | 22 +++++++++++++-------- src/views/perfManage/kpiKeyTarget/index.vue | 18 +++++++++++------ src/views/perfManage/kpiOverView/index.vue | 20 +++++++++++-------- 6 files changed, 59 insertions(+), 31 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 5bf4aba0..98eda231 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -978,9 +978,13 @@ export default { kpiOverView:{ "kpiName":"NE Metrics Name", "maxValue":"Max", + "maxValueTip":"The max value of metric data within the user's filtered time range.", "minValue":"Min", + "minValueTip":"The min value of metric data within the user's filtered time range.", "avgValue":"Avg", - "totalValue":"Total", + "avgValueTip":"The average value of metric data within the user's filtered time range.", + "totalValue":"Sum", + "totalValueTip":"The sum value of metric data within the user's filtered time range.", "kpiChartTitle":"Overview of NE metrics", "changeLine":"Change to Line Charts", "changeBar":"Change to Bar Charts", diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 1227aa5c..586b3b99 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -978,9 +978,13 @@ export default { kpiOverView:{ "kpiName":"指标名", "maxValue":"最大值", + "maxValueTip":"用户筛选时间范围内度量数据的最大值。", "minValue":"最小值", + "minValueTip":"用户筛选时间范围内度量数据的最小值。", "avgValue":"平均值", + "avgValueTip":"用户筛选时间范围内度量数据的平均值。", "totalValue":"总值", + "totalValueTip":"用户筛选时间范围内度量数据的总值。", "kpiChartTitle":"网元指标概览", "changeLine":"切换为折线图", "changeBar":"切换为柱状图", diff --git a/src/views/perfManage/goldTarget/index.vue b/src/views/perfManage/goldTarget/index.vue index b877e715..f56dfd12 100644 --- a/src/views/perfManage/goldTarget/index.vue +++ b/src/views/perfManage/goldTarget/index.vue @@ -224,7 +224,6 @@ const statsColumns: TableColumnType[] = [ dataIndex: 'total', key: 'total', width: '24%', - sorter: (a: any, b: any) => a.total - b.total, sortDirections: ['ascend', 'descend'], }, { @@ -232,7 +231,6 @@ const statsColumns: TableColumnType[] = [ dataIndex: 'avg', key: 'avg', width: '24%', - sorter: (a: any, b: any) => a.avg - b.avg, sortDirections: ['ascend', 'descend'], }, { @@ -240,7 +238,6 @@ const statsColumns: TableColumnType[] = [ dataIndex: 'max', key: 'max', width: '17%', - sorter: (a: any, b: any) => a.max - b.max, // 添加排序函数 sortDirections: ['ascend', 'descend'], }, { @@ -248,7 +245,6 @@ const statsColumns: TableColumnType[] = [ dataIndex: 'min', key: 'min', width: '17%', - sorter: (a: any, b: any) => a.min - b.min, // 添加排序函数 sortDirections: ['ascend', 'descend'], }, ]; @@ -1100,7 +1096,9 @@ onBeforeUnmount(() => { {{ t('views.perfManage.kpiOverView.totalValue') }} @@ -1111,7 +1109,9 @@ onBeforeUnmount(() => { {{ t('views.perfManage.kpiOverView.avgValue') }} @@ -1122,7 +1122,9 @@ onBeforeUnmount(() => { {{ t('views.perfManage.kpiOverView.maxValue') }} @@ -1133,7 +1135,9 @@ onBeforeUnmount(() => { {{ t('views.perfManage.kpiOverView.minValue') }} diff --git a/src/views/perfManage/kpiCReport/index.vue b/src/views/perfManage/kpiCReport/index.vue index bac19e12..7a321384 100644 --- a/src/views/perfManage/kpiCReport/index.vue +++ b/src/views/perfManage/kpiCReport/index.vue @@ -247,7 +247,6 @@ const statsColumns: TableColumnType[] = [ dataIndex: 'avg', key: 'avg', width: '24%', - sorter: (a: any, b: any) => a.avg - b.avg, sortDirections: ['ascend', 'descend'], }, { @@ -255,7 +254,6 @@ const statsColumns: TableColumnType[] = [ dataIndex: 'max', key: 'max', width: '17%', - sorter: (a: any, b: any) => a.max - b.max, // 添加排序函数 sortDirections: ['ascend', 'descend'], }, { @@ -263,7 +261,6 @@ const statsColumns: TableColumnType[] = [ dataIndex: 'min', key: 'min', width: '17%', - sorter: (a: any, b: any) => a.min - b.min, // 添加排序函数 sortDirections: ['ascend', 'descend'], }, ]; @@ -453,7 +450,8 @@ function fnGetList() { ); // 计算平均值 - const avg = values.length > 0 ? Number((total / values.length).toFixed(2)) : 0; + const avg = + values.length > 0 ? Number((total / values.length).toFixed(2)) : 0; kpiStats.value.push({ kpiId: columns.key, title: columns.title, @@ -1123,7 +1121,9 @@ onBeforeUnmount(() => { {{ t('views.perfManage.kpiOverView.totalValue') }} @@ -1134,7 +1134,9 @@ onBeforeUnmount(() => { {{ t('views.perfManage.kpiOverView.avgValue') }} @@ -1145,7 +1147,9 @@ onBeforeUnmount(() => { {{ t('views.perfManage.kpiOverView.maxValue') }} @@ -1156,7 +1160,9 @@ onBeforeUnmount(() => { {{ t('views.perfManage.kpiOverView.minValue') }} diff --git a/src/views/perfManage/kpiKeyTarget/index.vue b/src/views/perfManage/kpiKeyTarget/index.vue index 012f96fe..2b3931e2 100644 --- a/src/views/perfManage/kpiKeyTarget/index.vue +++ b/src/views/perfManage/kpiKeyTarget/index.vue @@ -1220,7 +1220,6 @@ const statsColumns: TableColumnType[] = [ dataIndex: 'max', key: 'max', width: '30%', - sorter: (a: KPIStats, b: KPIStats) => a.max - b.max, sortDirections: ['ascend', 'descend'] as ('ascend' | 'descend')[], }, { @@ -1228,7 +1227,6 @@ const statsColumns: TableColumnType[] = [ dataIndex: 'min', key: 'min', width: '30%', - sorter: (a: KPIStats, b: KPIStats) => a.min - b.min, sortDirections: ['ascend', 'descend'] as ('ascend' | 'descend')[], }, ]; @@ -1349,7 +1347,9 @@ const handleTabChange = async (activeKey: string, type: AllChartType) => { {{ t('views.perfManage.kpiOverView.totalValue') }} @@ -1360,7 +1360,9 @@ const handleTabChange = async (activeKey: string, type: AllChartType) => { {{ t('views.perfManage.kpiOverView.avgValue') }} @@ -1371,7 +1373,9 @@ const handleTabChange = async (activeKey: string, type: AllChartType) => { {{ t('views.perfManage.kpiOverView.maxValue') }} @@ -1382,7 +1386,9 @@ const handleTabChange = async (activeKey: string, type: AllChartType) => { {{ t('views.perfManage.kpiOverView.minValue') }} diff --git a/src/views/perfManage/kpiOverView/index.vue b/src/views/perfManage/kpiOverView/index.vue index cfc00db6..28f3b692 100644 --- a/src/views/perfManage/kpiOverView/index.vue +++ b/src/views/perfManage/kpiOverView/index.vue @@ -815,7 +815,6 @@ const statsColumns: TableColumnType[] = [ dataIndex: 'total', key: 'total', width: '12%', - sorter: (a: KPIStats, b: KPIStats) => a.total - b.total, sortDirections: ['ascend', 'descend'], }, { @@ -823,7 +822,6 @@ const statsColumns: TableColumnType[] = [ dataIndex: 'avg', key: 'avg', width: '12%', - sorter: (a: KPIStats, b: KPIStats) => a.avg - b.avg, sortDirections: ['ascend', 'descend'], }, { @@ -831,7 +829,6 @@ const statsColumns: TableColumnType[] = [ dataIndex: 'max', key: 'max', width: '12%', - sorter: (a: KPIStats, b: KPIStats) => a.max - b.max, // 添加排序函数 sortDirections: ['ascend', 'descend'], }, { @@ -839,7 +836,6 @@ const statsColumns: TableColumnType[] = [ dataIndex: 'min', key: 'min', width: '12%', - sorter: (a: KPIStats, b: KPIStats) => a.min - b.min, sortDirections: ['ascend', 'descend'], }, ]; @@ -930,7 +926,9 @@ const tableRowConfig = computed(() => { {{ t('views.perfManage.kpiOverView.totalValue') }} @@ -941,7 +939,9 @@ const tableRowConfig = computed(() => { {{ t('views.perfManage.kpiOverView.avgValue') }} @@ -952,7 +952,9 @@ const tableRowConfig = computed(() => { {{ t('views.perfManage.kpiOverView.maxValue') }} @@ -963,7 +965,9 @@ const tableRowConfig = computed(() => { {{ t('views.perfManage.kpiOverView.minValue') }}