feat(web): 增加权属管理界面
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
const information = {
|
||||
debug: false,
|
||||
// baseUrl: '',
|
||||
baseUrl: 'http://127.0.0.1:20080',
|
||||
title: '可信供给中心',
|
||||
debug: false,
|
||||
// baseUrl: '',
|
||||
baseUrl: 'http://127.0.0.1:20080',
|
||||
title: '可信供给中心',
|
||||
}
|
||||
|
||||
export function useAmis(amisObject) {
|
||||
document.title = information.title
|
||||
let amis = amisRequire('amis/embed')
|
||||
amis.embed(
|
||||
'#app',
|
||||
amisObject(information),
|
||||
{
|
||||
data: {
|
||||
base: information.baseUrl,
|
||||
},
|
||||
},
|
||||
{
|
||||
theme: 'antd',
|
||||
enableAMISDebug: information.debug,
|
||||
}
|
||||
)
|
||||
document.title = information.title
|
||||
let amis = amisRequire('amis/embed')
|
||||
amis.embed(
|
||||
'#app',
|
||||
amisObject(information),
|
||||
{
|
||||
data: {
|
||||
base: information.baseUrl,
|
||||
},
|
||||
},
|
||||
{
|
||||
theme: 'antd',
|
||||
enableAMISDebug: information.debug,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
export function crudCommonOptions() {
|
||||
@@ -202,4 +202,11 @@ export const role = {
|
||||
export const administratorOnly = roleCheck([role.administrator])
|
||||
export const checkerOnly = roleCheck([role.administrator, role.checker])
|
||||
export const userOnly = roleCheck([role.administrator, role.provider, role.customer])
|
||||
export const providerOnly = roleCheck([role.administrator, role.provider])
|
||||
export const customerOnly = roleCheck([role.administrator, role.customer])
|
||||
|
||||
|
||||
export const formInputClearable = {
|
||||
clearable: true,
|
||||
clearValueOnEmpty: true,
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
textarea {
|
||||
resize: none !important;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import './dialog-permission.css'
|
||||
import {horizontalFormOptions} from "../constants.js";
|
||||
|
||||
function detailForm() {
|
||||
return {
|
||||
id: 'resource_data_form',
|
||||
type: 'form',
|
||||
...horizontalFormOptions(),
|
||||
horizontal: {
|
||||
left: 2,
|
||||
},
|
||||
body: [
|
||||
{
|
||||
type: 'hidden',
|
||||
name: 'id',
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
export function permissionAddDialog() {
|
||||
return {
|
||||
actionType: 'dialog',
|
||||
dialog: {
|
||||
title: '新增确权申请',
|
||||
size: 'md',
|
||||
actions: [
|
||||
{
|
||||
type: 'reset',
|
||||
label: '重置',
|
||||
},
|
||||
{
|
||||
type: 'submit',
|
||||
label: '确定',
|
||||
level: 'primary',
|
||||
}
|
||||
],
|
||||
body: {
|
||||
debug: true,
|
||||
...detailForm(),
|
||||
// api: apiPost('${base}/data_resource/save'),
|
||||
data: {
|
||||
add: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,17 +2,13 @@ import './dialog-resource.css'
|
||||
import {
|
||||
apiGet,
|
||||
apiPost,
|
||||
formInputClearable,
|
||||
horizontalFormOptions,
|
||||
inputFileFormItemCommonOptions,
|
||||
size1GB,
|
||||
size500MB
|
||||
} from "../constants.js";
|
||||
|
||||
const clearable = {
|
||||
clearable: true,
|
||||
clearValueOnEmpty: true,
|
||||
}
|
||||
|
||||
function inputFileFormItemUpdateFieldOptions(target) {
|
||||
let value = {}
|
||||
value[target] = '${event.data.value}'
|
||||
@@ -51,13 +47,13 @@ function detailForm() {
|
||||
name: 'name',
|
||||
label: '资源名称',
|
||||
required: true,
|
||||
...clearable,
|
||||
...formInputClearable,
|
||||
},
|
||||
{
|
||||
type: 'textarea',
|
||||
name: 'description',
|
||||
label: '资源描述',
|
||||
...clearable,
|
||||
...formInputClearable,
|
||||
showCounter: true,
|
||||
trimContents: true,
|
||||
minRows: 2,
|
||||
@@ -90,19 +86,19 @@ function detailForm() {
|
||||
label: 'API地址',
|
||||
name: 'apiUrl',
|
||||
required: true,
|
||||
...clearable,
|
||||
...formInputClearable,
|
||||
},
|
||||
{
|
||||
type: 'input-text',
|
||||
label: '用户名',
|
||||
name: 'apiUsername',
|
||||
...clearable,
|
||||
...formInputClearable,
|
||||
},
|
||||
{
|
||||
type: 'input-password',
|
||||
label: '密码',
|
||||
name: 'apiPassword',
|
||||
...clearable,
|
||||
...formInputClearable,
|
||||
},
|
||||
]
|
||||
},
|
||||
@@ -149,19 +145,19 @@ function detailForm() {
|
||||
label: 'JDBC',
|
||||
name: 'databaseJdbc',
|
||||
required: true,
|
||||
...clearable,
|
||||
...formInputClearable,
|
||||
},
|
||||
{
|
||||
type: 'input-text',
|
||||
label: '用户名',
|
||||
name: 'databaseUsername',
|
||||
...clearable,
|
||||
...formInputClearable,
|
||||
},
|
||||
{
|
||||
type: 'input-password',
|
||||
label: '密码',
|
||||
name: 'databasePassword',
|
||||
...clearable,
|
||||
...formInputClearable,
|
||||
},
|
||||
]
|
||||
},
|
||||
@@ -210,33 +206,33 @@ function detailForm() {
|
||||
label: 'FTP地址',
|
||||
name: 'ftpUrl',
|
||||
required: true,
|
||||
...clearable,
|
||||
...formInputClearable,
|
||||
},
|
||||
{
|
||||
type: 'input-text',
|
||||
label: 'FTP账号',
|
||||
name: 'ftpUsername',
|
||||
...clearable,
|
||||
...formInputClearable,
|
||||
},
|
||||
{
|
||||
type: 'input-password',
|
||||
label: 'FTP密码',
|
||||
name: 'ftpPassword',
|
||||
...clearable,
|
||||
...formInputClearable,
|
||||
},
|
||||
{
|
||||
type: 'input-text',
|
||||
label: '相对路径',
|
||||
name: 'ftpPath',
|
||||
description: '若为空,则使用用户根目录',
|
||||
...clearable,
|
||||
...formInputClearable,
|
||||
},
|
||||
{
|
||||
type: 'input-text',
|
||||
label: '文件筛选',
|
||||
name: 'ftpRegexFilter',
|
||||
description: '正则表达式,用于匹配文件的路径,只有符合筛选条件的文件才会被采集;若为空则默认采集全部文件',
|
||||
...clearable,
|
||||
...formInputClearable,
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user