perf: 资产授权列表-指定账号字段不计算到账号个数里

This commit is contained in:
“huailei000”
2023-09-19 14:22:51 +08:00
committed by huailei
parent 0bc681ea08
commit 9aaee957af
2 changed files with 7 additions and 3 deletions

View File

@@ -13,7 +13,7 @@
<span class="detail-item-name">{{ item }}</span>
</div>
</div>
<span slot="reference">{{ cellValue && cellValue.length }}</span>
<span slot="reference">{{ items && items.length }}</span>
</el-popover>
</template>
</DetailFormatter>
@@ -53,7 +53,9 @@ export default {
},
items() {
const getItem = this.formatterArgs.getItem || (item => item.name)
return this.cellValue?.map(item => getItem(item))
let data = this.cellValue?.map(item => getItem(item)) || []
data = data.filter(Boolean)
return data
},
showItems() {
return this.formatterArgs.showItems !== false && this.cellValue?.length > 0

View File

@@ -128,7 +128,9 @@ export default {
formatter: AmountFormatter,
formatterArgs: {
getItem(item) {
return AccountLabelMapper[item] || item
if (item !== '@SPEC') {
return AccountLabelMapper[item] || item
}
},
routeQuery: {
activeTab: 'AssetPermissionAccount'