1
0

feat(web): 使用vite重新组织前端代码

This commit is contained in:
2024-11-19 17:52:34 +08:00
parent 7ccc602406
commit 9a01d74d78
138 changed files with 1141 additions and 443 deletions

View 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' },
],
},
],
},
},
}
}