diff --git a/src/views/perfManage/kpiOverView/index.vue b/src/views/perfManage/kpiOverView/index.vue index c1243128..d67c657b 100644 --- a/src/views/perfManage/kpiOverView/index.vue +++ b/src/views/perfManage/kpiOverView/index.vue @@ -811,6 +811,22 @@ const statsColumns: TableColumnType[] = [ key: 'title', width: '50%', }, + { + title: t('views.perfManage.kpiOverView.totalValue'), + dataIndex: 'total', + key: 'total', + width: '12%', + sorter: (a: KPIStats, b: KPIStats) => a.total - b.total, + sortDirections: ['ascend', 'descend'], + }, + { + title: t('views.perfManage.kpiOverView.avgValue'), + dataIndex: 'avg', + key: 'avg', + width: '12%', + sorter: (a: KPIStats, b: KPIStats) => a.avg - b.avg, + sortDirections: ['ascend', 'descend'], + }, { title: t('views.perfManage.kpiOverView.maxValue'), dataIndex: 'max', @@ -824,25 +840,9 @@ const statsColumns: TableColumnType[] = [ dataIndex: 'min', key: 'min', width: '12%', - sorter: (a: KPIStats, b: KPIStats) => a.min - b.min, // 添加排序函数 + sorter: (a: KPIStats, b: KPIStats) => a.min - b.min, sortDirections: ['ascend', 'descend'], }, - { - title: t('views.perfManage.kpiOverView.avgValue'), // 需要在语言包中添加对应的翻译 - dataIndex: 'avg', - key: 'avg', - width: '12%', - sorter: (a: KPIStats, b: KPIStats) => a.avg - b.avg, - sortDirections: ['ascend', 'descend'], - }, - { - title: t('views.perfManage.kpiOverView.totalValue'), - dataIndex: 'total', - key: 'total', - width: '12%', - sorter: (a: KPIStats, b: KPIStats) => a.total - b.total, - sortDirections: ['ascend', 'descend'], - } ]; // 将 selectedRow 改为 selectedRows 数组