feat(web): 使用vite重新组织前端代码
This commit is contained in:
89
gringotts-frontend/components/user/dialog-user-register.js
Normal file
89
gringotts-frontend/components/user/dialog-user-register.js
Normal file
@@ -0,0 +1,89 @@
|
||||
import {apiPost, horizontalFormOptions} from '../constants.js'
|
||||
import {confirmPasswordFormItem, emailFormItem, passwordFormItem} from "./dialog-user-item.js";
|
||||
|
||||
export function userRegisterDialog() {
|
||||
return {
|
||||
actionType: 'dialog',
|
||||
dialog: {
|
||||
title: '用户注册',
|
||||
actions: [
|
||||
{
|
||||
type: 'reset',
|
||||
label: '清空',
|
||||
},
|
||||
{
|
||||
type: 'submit',
|
||||
label: '注册',
|
||||
level: 'primary',
|
||||
},
|
||||
],
|
||||
body: {
|
||||
type: 'form',
|
||||
api: apiPost('${base}/user/register'),
|
||||
...horizontalFormOptions(),
|
||||
body: [
|
||||
emailFormItem('username'),
|
||||
passwordFormItem('password'),
|
||||
confirmPasswordFormItem('confirm-password', 'password'),
|
||||
{
|
||||
type: 'radios',
|
||||
name: 'role',
|
||||
label: '角色',
|
||||
required: true,
|
||||
selectFirst: true,
|
||||
options: [
|
||||
{ label: '数据提供方', value: 'PROVIDER' },
|
||||
{ label: '数据使用方', value: 'CUSTOMER' },
|
||||
{ label: '审查监管方', value: 'CHECKER' },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export function userAdministratorRegisterDialog() {
|
||||
return {
|
||||
actionType: 'dialog',
|
||||
dialog: {
|
||||
title: '用户注册',
|
||||
actions: [
|
||||
{
|
||||
type: 'reset',
|
||||
label: '清空',
|
||||
},
|
||||
{
|
||||
type: 'submit',
|
||||
label: '注册',
|
||||
level: 'primary',
|
||||
},
|
||||
],
|
||||
body: {
|
||||
type: 'form',
|
||||
api: apiPost('${base}/user_management/register'),
|
||||
...horizontalFormOptions(),
|
||||
body: [
|
||||
emailFormItem('username'),
|
||||
passwordFormItem('password'),
|
||||
confirmPasswordFormItem('confirm-password', 'password'),
|
||||
{
|
||||
type: 'radios',
|
||||
name: 'role',
|
||||
label: '角色',
|
||||
required: true,
|
||||
selectFirst: true,
|
||||
inline: false,
|
||||
columnsCount: 2,
|
||||
options: [
|
||||
{ label: '数据提供方', value: 'PROVIDER' },
|
||||
{ label: '数据使用方', value: 'CUSTOMER' },
|
||||
{ label: '审查监管方', value: 'CHECKER' },
|
||||
{ label: '系统管理员', value: 'ADMINISTRATOR' },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user