From e6efd9141422c7a41134f602bbc241350b4e33f7 Mon Sep 17 00:00:00 2001
From: zhaojisen <1301338853@qq.com>
Date: Tue, 18 Feb 2025 15:57:09 +0800
Subject: [PATCH] Fixed: Dashboard PRBP
---
src/views/dashboard/Console/RankSummary.vue | 10 ++--------
src/views/dashboard/components/RankTable.vue | 20 ++++++++++++++++++--
2 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/src/views/dashboard/Console/RankSummary.vue b/src/views/dashboard/Console/RankSummary.vue
index f1f42242e..a007c562d 100644
--- a/src/views/dashboard/Console/RankSummary.vue
+++ b/src/views/dashboard/Console/RankSummary.vue
@@ -32,8 +32,7 @@ export default {
},
{
prop: 'total',
- label: this.$t('LoginCount'),
- width: this.$i18n.locale === 'zh-CN' ? '120px' : '220px'
+ label: this.$t('LoginCount')
}
]
},
@@ -49,8 +48,7 @@ export default {
},
{
prop: 'total',
- label: this.$t('NumberOfVisits'),
- width: this.$i18n.locale === 'zh-CN' ? '140px' : '140px'
+ label: this.$t('NumberOfVisits')
}
]
}
@@ -58,7 +56,3 @@ export default {
}
}
-
-
diff --git a/src/views/dashboard/components/RankTable.vue b/src/views/dashboard/components/RankTable.vue
index a25e4fa18..2f97e5e58 100644
--- a/src/views/dashboard/components/RankTable.vue
+++ b/src/views/dashboard/components/RankTable.vue
@@ -9,19 +9,22 @@
class="table"
style="width: 100%"
>
-
+
{{ $t('Ranking') }}
+
+ {{ scope.$index + 1 }}
+
@@ -64,6 +67,19 @@ export default {
this.getList()
},
methods: {
+ getColumnWidth(column) {
+ if (column.prop === 'total') {
+ const locale = this.$i18n.locale
+ switch (locale) {
+ case 'en':
+ return '120px'
+ case 'pt-br':
+ return '220px'
+ default:
+ return '100px'
+ }
+ }
+ },
getList() {
this.$axios.get(this.tableUrl).then(res => {
this.tableData = this.config.data ? res?.[this.config.data] : res