From 205f8bc28057a7e7775937f1009c2072d25d621f Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Tue, 2 Apr 2024 18:31:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8B=BE=E9=80=89=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E6=97=B6=EF=BC=8C=E6=95=B0=E9=87=8F=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Table/TableFormatters/AmountFormatter.vue | 12 ++++++++++-- .../perms/AssetPermission/AssetPermissionList.vue | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/Table/TableFormatters/AmountFormatter.vue b/src/components/Table/TableFormatters/AmountFormatter.vue index b3766f196..73186398f 100644 --- a/src/components/Table/TableFormatters/AmountFormatter.vue +++ b/src/components/Table/TableFormatters/AmountFormatter.vue @@ -60,6 +60,9 @@ export default { title() { return this.formatterArgs.title || this.col.label.replace('amount', '').replace('数量', '') }, + cellValueToRemove() { + return this.formatterArgs.cellValueToRemove || [] + }, items() { if (this.formatterArgs.async && !this.asyncGetDone) { return [this.$t('common.tree.Loading') + '...'] @@ -74,7 +77,11 @@ export default { } }, async mounted() { - this.amount = this.formatterArgs.async ? this.cellValue : (this.cellValue || []).length + if (this.formatterArgs.async) { + this.amount = this.cellValue + } else { + this.amount = (this.cellValue?.filter(value => !this.cellValueToRemove.includes(value)) || []).length + } }, methods: { getKey(item) { @@ -109,13 +116,14 @@ export default { max-height: 60vh; overflow-y: auto; } + .detail-item { border-bottom: 1px solid #EBEEF5; padding: 5px 0; margin-bottom: 0; &:hover { - background-color: #F5F7FA; + background-color: #F5F7FA; } } diff --git a/src/views/perms/AssetPermission/AssetPermissionList.vue b/src/views/perms/AssetPermission/AssetPermissionList.vue index 036b8c90a..bc67ef0fa 100644 --- a/src/views/perms/AssetPermission/AssetPermissionList.vue +++ b/src/views/perms/AssetPermission/AssetPermissionList.vue @@ -149,6 +149,7 @@ export default { return AccountLabelMapper[item] || item } }, + cellValueToRemove: ['@SPEC'], routeQuery: { activeTab: 'AssetPermissionAccount' }