diff --git a/src/components/Table/TableFormatters/AmountFormatter.vue b/src/components/Table/TableFormatters/AmountFormatter.vue
index 73186398f..e93620021 100644
--- a/src/components/Table/TableFormatters/AmountFormatter.vue
+++ b/src/components/Table/TableFormatters/AmountFormatter.vue
@@ -68,7 +68,16 @@ export default {
return [this.$t('common.tree.Loading') + '...']
}
const getItem = this.formatterArgs.getItem || (item => item.name)
- let data = this.data.map(item => getItem(item)) || []
+ let data = []
+ if (Array.isArray(this.data)) {
+ data = this.data.map(item => getItem(item)) || []
+ } else {
+ // object {key: [value]}
+ data = Object.entries(this.data).map(([key, value]) => {
+ const item = { key: key, value: value }
+ return getItem(item)
+ }) || []
+ }
data = data.filter(Boolean)
return data
},
@@ -80,7 +89,14 @@ export default {
if (this.formatterArgs.async) {
this.amount = this.cellValue
} else {
- this.amount = (this.cellValue?.filter(value => !this.cellValueToRemove.includes(value)) || []).length
+ let cellValue = []
+ if (Array.isArray(this.cellValue)) {
+ cellValue = this.cellValue
+ } else {
+ // object {key: [value]}
+ cellValue = Object.keys(this.cellValue)
+ }
+ this.amount = (cellValue?.filter(value => !this.cellValueToRemove.includes(value)) || []).length
}
},
methods: {
diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json
index 3eb187ec8..a5d548ba0 100644
--- a/src/i18n/langs/en.json
+++ b/src/i18n/langs/en.json
@@ -1996,7 +1996,7 @@
"UpdateNodeAssetHardwareInfo": "Update node asset hardware information"
},
"users": {
- "OrgRoleRelations": "Organizations",
+ "OrgsAndRoles": "Organizations and roles",
"LunaSettingUpdate": "Luna setting",
"KokoSettingUpdate": "Koko setting",
"UserSetting": "User setting",
diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json
index d203a0717..ba3b792ab 100644
--- a/src/i18n/langs/ja.json
+++ b/src/i18n/langs/ja.json
@@ -1987,7 +1987,7 @@
"UpdateNodeAssetHardwareInfo": "ノード資産ハードウェア情報の更新"
},
"users": {
- "OrgRoleRelations": "しょぞくそしき",
+ "OrgsAndRoles": "そしきとやくわり",
"LunaSettingUpdate": "Luna 設定更新",
"KokoSettingUpdate": "Koko 設定更新",
"UserSetting": "個人設定",
diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json
index ef33f726b..f8e512a93 100644
--- a/src/i18n/langs/zh.json
+++ b/src/i18n/langs/zh.json
@@ -1981,7 +1981,7 @@
"PasskeyAddDisableInfo": "你的认证来源是 {source}, 不支持添加 Passkey"
},
"users": {
- "OrgRoleRelations": "所属组织",
+ "OrgsAndRoles": "组织与角色",
"LunaSettingUpdate": "Luna 配置设置",
"KokoSettingUpdate": "Koko 配置设置",
"UserSetting": "偏好设置",
diff --git a/src/views/users/User/UserDetail/UserInfo.vue b/src/views/users/User/UserDetail/UserInfo.vue
index 712f3ab81..60b24039d 100644
--- a/src/views/users/User/UserDetail/UserInfo.vue
+++ b/src/views/users/User/UserDetail/UserInfo.vue
@@ -196,7 +196,7 @@ export default {
}
},
{
- key: this.$t('users.OrgRoleRelations'),
+ key: this.$t('users.OrgsAndRoles'),
has: this.$store.getters.currentOrgIsRoot,
formatter: (item, val) => {
const doms = []
@@ -207,8 +207,8 @@ export default {
if (key.length >= allowKeyMaxLength) {
prettyKey = key.substring(0, allowKeyMaxLength - 3) + '...'
}
- const domKey =
])
})
return