mirror of
https://github.com/jumpserver/lina.git
synced 2025-07-19 17:49:04 +00:00
fix: 勾选指定账号时,数量显示有问题
This commit is contained in:
parent
4963446b74
commit
205f8bc280
@ -60,6 +60,9 @@ export default {
|
|||||||
title() {
|
title() {
|
||||||
return this.formatterArgs.title || this.col.label.replace('amount', '').replace('数量', '')
|
return this.formatterArgs.title || this.col.label.replace('amount', '').replace('数量', '')
|
||||||
},
|
},
|
||||||
|
cellValueToRemove() {
|
||||||
|
return this.formatterArgs.cellValueToRemove || []
|
||||||
|
},
|
||||||
items() {
|
items() {
|
||||||
if (this.formatterArgs.async && !this.asyncGetDone) {
|
if (this.formatterArgs.async && !this.asyncGetDone) {
|
||||||
return [this.$t('common.tree.Loading') + '...']
|
return [this.$t('common.tree.Loading') + '...']
|
||||||
@ -74,7 +77,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
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: {
|
methods: {
|
||||||
getKey(item) {
|
getKey(item) {
|
||||||
@ -109,13 +116,14 @@ export default {
|
|||||||
max-height: 60vh;
|
max-height: 60vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-item {
|
.detail-item {
|
||||||
border-bottom: 1px solid #EBEEF5;
|
border-bottom: 1px solid #EBEEF5;
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #F5F7FA;
|
background-color: #F5F7FA;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,6 +149,7 @@ export default {
|
|||||||
return AccountLabelMapper[item] || item
|
return AccountLabelMapper[item] || item
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
cellValueToRemove: ['@SPEC'],
|
||||||
routeQuery: {
|
routeQuery: {
|
||||||
activeTab: 'AssetPermissionAccount'
|
activeTab: 'AssetPermissionAccount'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user