diff --git a/src/views/dashboard/ChangeSecret/index.vue b/src/views/dashboard/ChangeSecret/index.vue index c27274c2b..94d9d8170 100644 --- a/src/views/dashboard/ChangeSecret/index.vue +++ b/src/views/dashboard/ChangeSecret/index.vue @@ -1,6 +1,6 @@ diff --git a/src/views/dashboard/Console/index.vue b/src/views/dashboard/Console/index.vue index 046bf6ff9..8a4696540 100644 --- a/src/views/dashboard/Console/index.vue +++ b/src/views/dashboard/Console/index.vue @@ -11,7 +11,7 @@ - + @@ -42,6 +42,7 @@ export default { }, data() { return { + url: '/api/v1/index/?total_count_type_to_assets_amount=1' } } } diff --git a/src/views/dashboard/Pam/AssetProportionSummary.vue b/src/views/dashboard/Pam/AssetProportionSummary.vue index fbee35614..8c1b2d190 100644 --- a/src/views/dashboard/Pam/AssetProportionSummary.vue +++ b/src/views/dashboard/Pam/AssetProportionSummary.vue @@ -17,10 +17,16 @@ export default { Title, ProgressChart }, + props: { + url: { + type: String, + default: '' + } + }, data() { return { titleConfig: { - title: this.$t('ProportionOfAssetTypes'), + title: '', tip: this.$t('ProportionOfAssetTypes') }, config: { @@ -33,9 +39,24 @@ export default { }, methods: { async getChartData() { - const url = '/api/v1/index/?total_count_type_to_assets_amount=1' - const data = await this.$axios.get(url) - this.$set(this.config, 'data', data.total_count_type_to_assets_amount) + if (!this.url) return + + try { + const data = await this.$axios.get(this.url) + const str = data[this.url.split('?')[1].split('=')[0]] + + if (this.url.includes('accounts')) { + this.titleConfig.title = this.$t('ProportionOfAccontTypes') + this.titleConfig.tip = this.$t('ProportionOfAccountTypes') + } else { + this.titleConfig.title = this.$t('ProportionOfAssetTypes') + this.titleConfig.tip = this.$t('ProportionOfAssetTypes') + } + + this.$set(this.config, 'data', str) + } catch (e) { + this.$message.error(e.message) + } } } } diff --git a/src/views/dashboard/Pam/index.vue b/src/views/dashboard/Pam/index.vue index e2b98ef50..98b5bb3c9 100644 --- a/src/views/dashboard/Pam/index.vue +++ b/src/views/dashboard/Pam/index.vue @@ -2,33 +2,48 @@
- - - - - - - - - - - - + +
+ + + +
+ +
+
+ + + +
+ + + + + + + + + + + + +