From b3d4b4a89f58902af42fbbdf2c089969a13cdcdb Mon Sep 17 00:00:00 2001 From: jym503558564 <503558564@qq.com> Date: Thu, 21 May 2020 20:14:37 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DetailCard/ItemValue.vue | 2 +- .../AssetPermissionDetail.vue | 23 ++++++------------- .../RemoteAppPermissionDetail.vue | 16 ++++--------- .../RemoteAppPermissionList.vue | 2 -- 4 files changed, 12 insertions(+), 31 deletions(-) diff --git a/src/components/DetailCard/ItemValue.vue b/src/components/DetailCard/ItemValue.vue index f57b73b4d..de48f443b 100644 --- a/src/components/DetailCard/ItemValue.vue +++ b/src/components/DetailCard/ItemValue.vue @@ -3,7 +3,7 @@ export default { name: 'ItemValue', props: { value: { - type: [String, Function, Array, Object], + type: [String, Number, Function, Array, Object], default: '' }, item: { diff --git a/src/views/perms/AssetPermission/AssetPermissionDetail/AssetPermissionDetail.vue b/src/views/perms/AssetPermission/AssetPermissionDetail/AssetPermissionDetail.vue index 43dae2e9f..679625a7b 100644 --- a/src/views/perms/AssetPermission/AssetPermissionDetail/AssetPermissionDetail.vue +++ b/src/views/perms/AssetPermission/AssetPermissionDetail/AssetPermissionDetail.vue @@ -11,7 +11,7 @@ diff --git a/src/views/perms/RemoteAppPermission/RemoteAppPermissionDetail/RemoteAppPermissionDetail.vue b/src/views/perms/RemoteAppPermission/RemoteAppPermissionDetail/RemoteAppPermissionDetail.vue index 7a27fe63f..40cff5617 100644 --- a/src/views/perms/RemoteAppPermission/RemoteAppPermissionDetail/RemoteAppPermissionDetail.vue +++ b/src/views/perms/RemoteAppPermission/RemoteAppPermissionDetail/RemoteAppPermissionDetail.vue @@ -60,19 +60,19 @@ export default { }, { key: this.$t('perms.userCount'), - value: this.getDataLength(this.object.users) + value: this.object.users_amount }, { key: this.$t('perms.userGroupCount'), - value: this.getDataLength(this.object.user_groups) + value: this.object.user_groups_amount }, { key: this.$t('perms.remoteAppCount'), - value: this.getDataLength(this.object.remote_apps) + value: this.object.remote_apps_amount }, { key: this.$t('perms.systemUserCount'), - value: this.getDataLength(this.object.system_users) + value: this.object.system_users_amount }, { key: this.$t('perms.dateStart'), @@ -96,14 +96,6 @@ export default { } ] } - }, - methods: { - getDataLength(data) { - if (data instanceof Array) { - return JSON.stringify(data.length) - } - return data - } } } diff --git a/src/views/perms/RemoteAppPermission/RemoteAppPermissionList.vue b/src/views/perms/RemoteAppPermission/RemoteAppPermissionList.vue index 723d8f41a..b415914aa 100644 --- a/src/views/perms/RemoteAppPermission/RemoteAppPermissionList.vue +++ b/src/views/perms/RemoteAppPermission/RemoteAppPermissionList.vue @@ -4,7 +4,6 @@