feat(web): 完成用户管理模块
This commit is contained in:
@@ -56,84 +56,8 @@
|
||||
actions: [
|
||||
{
|
||||
type: 'action',
|
||||
actionType: 'dialog',
|
||||
label: '注册',
|
||||
dialog: {
|
||||
title: '新用户注册',
|
||||
actions: [
|
||||
{
|
||||
type: 'reset',
|
||||
label: '清空',
|
||||
},
|
||||
{
|
||||
type: 'submit',
|
||||
label: '注册',
|
||||
level: 'primary',
|
||||
}
|
||||
],
|
||||
body: {
|
||||
type: 'form',
|
||||
api: '${base}/user/register',
|
||||
mode: 'horizontal',
|
||||
canAccessSuperData: false,
|
||||
horizontal: {
|
||||
left: 2,
|
||||
},
|
||||
body: [
|
||||
{
|
||||
type: 'input-email',
|
||||
name: 'username',
|
||||
label: '邮箱',
|
||||
placeholder: '请输入邮箱',
|
||||
required: true,
|
||||
clearable: true,
|
||||
clearValueOnEmpty: true,
|
||||
validateApi: '${base}/user/exists_username/${username}'
|
||||
},
|
||||
{
|
||||
type: 'input-password',
|
||||
name: 'password',
|
||||
label: '密码',
|
||||
placeholder: '请输入密码',
|
||||
required: true,
|
||||
clearable: true,
|
||||
clearValueOnEmpty: true,
|
||||
validations: {
|
||||
matchRegexp: /^(?=.*\d)(?!.*(\d)\1{2})(?!.*(012|123|234|345|456|567|678|789|987|876|765|654|543|432|321|210))(?=.*[a-zA-Z])(?=.*[^\da-zA-Z\s]).{8,16}$/
|
||||
},
|
||||
validationErrors: {
|
||||
matchRegexp: '密码至少包含字母、数字、特殊字符,8-16位,并且不能连续出现3个大小连续或相同的数字',
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'input-password',
|
||||
name: 'confirm-password',
|
||||
label: '确认密码',
|
||||
placeholder: '请再次输入密码',
|
||||
required: true,
|
||||
clearable: true,
|
||||
validations: {
|
||||
equalsField: 'password'
|
||||
},
|
||||
validationErrors: {
|
||||
equalsField: '两次输入密码不一致',
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'radios',
|
||||
name: 'role',
|
||||
label: '角色',
|
||||
required: true,
|
||||
selectFirst: true,
|
||||
options: [
|
||||
{label: '数据提供方', value: 'PROVIDER'},
|
||||
{label: '数据使用方', value: 'CUSTOMER'},
|
||||
{label: '审查监管方', value: 'CHECKER'},
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
...userAddDialog(),
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
|
||||
Reference in New Issue
Block a user