1
0

feat(web): 增加确权信息新增、查看接口和适配

This commit is contained in:
2024-11-27 00:11:16 +08:00
parent 7584ca3736
commit d781e137d8
6 changed files with 165 additions and 72 deletions

View File

@@ -1,9 +1,30 @@
import './dialog-permission.css'
import {apiPost, horizontalFormOptions} from "../constants.js";
import {apiGet, apiPost, horizontalFormOptions, inputFileFormItemCommonOptions, size100MB} from "../constants.js";
import {resourceList} from "../../pages/index/tab-data.js";
function inputFileFormItemUpdateFieldOptions(target) {
let value = {}
value[target] = '${event.data.value}'
return {
onEvent: {
success: {
actions: [
// {
// actionType: 'setValue',
// componentId: 'permission_form',
// args: {
// value: value
// }
// }
]
}
}
}
}
function detailForm() {
return {
id: 'resource_data_form',
id: 'permission_form',
type: 'form',
...horizontalFormOptions(),
horizontal: {
@@ -14,10 +35,33 @@ function detailForm() {
type: 'hidden',
name: 'id',
},
{
type: 'picker',
name: 'targetId',
label: '数据资源',
required: true,
multiple: false,
size: 'lg',
valueField: 'id',
labelField: 'name',
source: apiGet('${base}/data_resource/list'),
pickerSchema: {
...resourceList(),
}
},
{
type: 'textarea',
label: '确权说明',
name: 'description',
},
{
type: 'input-file',
label: '相关材料',
name: 'evidenceIds',
multiple: true,
required: true,
extractValue: true,
...inputFileFormItemCommonOptions(undefined, size100MB),
}
]
}
@@ -51,3 +95,23 @@ export function permissionAddDialog() {
}
}
}
export function permissionDetailDialog() {
return {
actionType: 'dialog',
dialog: {
title: '新增确权申请',
size: 'md',
actions: [],
body: {
debug: true,
...detailForm(),
initApi: apiGet('${base}/confirmation/detail/${id}'),
static: true,
data: {
detail: true,
},
}
}
}
}