feat(web): 增加账号最后登陆时间
This commit is contained in:
@@ -1,10 +1,63 @@
|
||||
import {apiGet, horizontalFormOptions, mappingField, userRoleMapping, userStateMapping} from "../constants.js";
|
||||
|
||||
const dialogBody = [
|
||||
{
|
||||
type: 'input-email',
|
||||
name: 'username',
|
||||
label: '邮箱',
|
||||
},
|
||||
{
|
||||
type: 'control',
|
||||
name: 'role',
|
||||
label: '角色',
|
||||
body: [
|
||||
mappingField('role', userRoleMapping),
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'control',
|
||||
name: 'state',
|
||||
label: '账号状态',
|
||||
body: [
|
||||
mappingField('state', userStateMapping)
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'input-datetime',
|
||||
name: 'createTime',
|
||||
label: '创建时间',
|
||||
},
|
||||
]
|
||||
|
||||
export function userDetailDialog() {
|
||||
return {
|
||||
actionType: 'dialog',
|
||||
dialog: {
|
||||
title: '账号详情',
|
||||
actions: [],
|
||||
body: {
|
||||
type: 'form',
|
||||
initApi: apiGet('${base}/user_management/detail/${username}'),
|
||||
...horizontalFormOptions(),
|
||||
static: true,
|
||||
body: [
|
||||
...dialogBody,
|
||||
{
|
||||
type: 'input-datetime',
|
||||
name: 'lastLoginTime',
|
||||
label: '上次登陆时间',
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function userCheckDialog() {
|
||||
return {
|
||||
actionType: 'dialog',
|
||||
dialog: {
|
||||
title: '用户注册',
|
||||
title: '账号审核',
|
||||
actions: [
|
||||
{
|
||||
type: 'action',
|
||||
@@ -22,39 +75,7 @@ export function userCheckDialog() {
|
||||
initApi: apiGet('${base}/user_management/detail/${username}'),
|
||||
...horizontalFormOptions(),
|
||||
static: true,
|
||||
body: [
|
||||
{
|
||||
type: 'input-email',
|
||||
name: 'username',
|
||||
label: '邮箱',
|
||||
},
|
||||
{
|
||||
type: 'control',
|
||||
name: 'role',
|
||||
label: '角色',
|
||||
body: [
|
||||
mappingField('role', userRoleMapping),
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'control',
|
||||
name: 'state',
|
||||
label: '账号状态',
|
||||
body: [
|
||||
mappingField('state', userStateMapping)
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'input-datetime',
|
||||
name: 'createTime',
|
||||
label: '创建时间',
|
||||
},
|
||||
{
|
||||
type: 'input-datetime',
|
||||
name: 'updateTime',
|
||||
label: '更新时间',
|
||||
},
|
||||
]
|
||||
body: dialogBody,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user