perf: 创建更新用户和用户列表添加 is_active 字段

This commit is contained in:
Jiangjie.Bai
2022-06-30 18:19:39 +08:00
committed by Jiangjie.Bai
parent 7c6530d9e8
commit 47a3005b6a
3 changed files with 7 additions and 4 deletions

View File

@@ -202,11 +202,14 @@ export default {
}]
for (const item of tableTitles) {
const dataItemLens = tableData.map(d => {
const prop = item[1]
const itemColData = d[prop]
if (!d) {
return 0
}
const prop = item[1]
const itemColData = d[prop]
if (typeof itemColData === 'boolean') {
return 5 // boolean is 5 characters long 并且 boolean.length 是 undefined
}
if (typeof itemColData !== 'number' && (!itemColData || !itemColData.length)) {
return 0
}

View File

@@ -24,7 +24,7 @@ export default {
'password_strategy', 'update_password', 'password', 'need_update_password',
'set_public_key', 'public_key', 'mfa_level', 'source'
]],
[this.$t('users.Secure'), ['system_roles', 'org_roles', 'date_expired']],
[this.$t('users.Secure'), ['system_roles', 'org_roles', 'is_active', 'date_expired']],
[this.$t('common.Other'), ['phone', 'wechat', 'comment']]
],
url: '/api/v1/users/users/',

View File

@@ -49,7 +49,7 @@ export default {
columns: [
'name', 'username', 'email', 'phone', 'wechat',
'groups_display', 'system_roles', 'org_roles',
'source', 'is_valid', 'login_blocked', 'mfa_enabled',
'source', 'is_active', 'is_valid', 'login_blocked', 'mfa_enabled',
'mfa_force_enabled', 'is_expired',
'last_login', 'date_joined', 'date_password_last_updated',
'comment', 'created_by', 'actions'