feat(web): 修复逻辑删除,增加可选查询
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const information = {
|
||||
debug: true,
|
||||
export const information = {
|
||||
debug: false,
|
||||
// baseUrl: '',
|
||||
baseUrl: 'http://127.0.0.1:20080',
|
||||
title: '可信供给中心',
|
||||
@@ -17,6 +17,7 @@ export function useAmis(amisObject) {
|
||||
struct,
|
||||
{
|
||||
data: {
|
||||
debug: information.debug,
|
||||
base: information.baseUrl,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
formInputClearable,
|
||||
formInputMultiFileStatic,
|
||||
horizontalFormOptions,
|
||||
information,
|
||||
inputFileFormItemCommonOptions,
|
||||
size100MB
|
||||
} from "../constants.js";
|
||||
@@ -15,9 +16,9 @@ import {resourceDetailDialog} from "../resource/dialog-resource.js";
|
||||
const CONFIRMATION_TYPE = 'confirmation'
|
||||
const AUTHENTICATION_TYPE = 'authentication'
|
||||
|
||||
function detailForm(showCreatedUserAndModifiedUser = false) {
|
||||
function detailForm(pickerApi = apiGet('${base}/data_resource/list'), showCreatedUserAndModifiedUser = false) {
|
||||
return {
|
||||
debug: true,
|
||||
debug: information.debug,
|
||||
id: 'permission_form',
|
||||
type: 'form',
|
||||
...horizontalFormOptions(),
|
||||
@@ -38,7 +39,7 @@ function detailForm(showCreatedUserAndModifiedUser = false) {
|
||||
size: 'md',
|
||||
valueField: 'id',
|
||||
labelField: 'name',
|
||||
source: apiGet('${base}/data_resource/list'),
|
||||
source: pickerApi,
|
||||
pickerSchema: {
|
||||
...resourceList(),
|
||||
},
|
||||
@@ -59,6 +60,7 @@ function detailForm(showCreatedUserAndModifiedUser = false) {
|
||||
},
|
||||
{
|
||||
type: 'textarea',
|
||||
placeholder: '请输入确权说明',
|
||||
label: '确权说明',
|
||||
name: 'description',
|
||||
...formInputClearable,
|
||||
@@ -123,7 +125,7 @@ function permissionAddDialog(type) {
|
||||
}
|
||||
],
|
||||
body: {
|
||||
...detailForm(),
|
||||
...detailForm(generateApi(type)),
|
||||
api: apiPost(`\${base}/${type}/save`),
|
||||
data: data,
|
||||
}
|
||||
@@ -149,7 +151,7 @@ function permissionDetailDialog(type, field = 'id', actions = []) {
|
||||
size: 'md',
|
||||
actions: actions,
|
||||
body: {
|
||||
...detailForm(true),
|
||||
...detailForm(generateApi(type), true),
|
||||
initApi: apiGet(`\${base}/${type}/detail/\${${field}}`),
|
||||
static: true,
|
||||
data: data,
|
||||
@@ -186,7 +188,7 @@ function permissionEditeDialog(type, field = 'id') {
|
||||
}
|
||||
],
|
||||
body: {
|
||||
...detailForm(),
|
||||
...detailForm(generateApi(type)),
|
||||
api: apiPost(`\${base}/${type}/save`),
|
||||
initApi: apiGet(`\${base}/${type}/detail/\${${field}}`),
|
||||
data: data,
|
||||
@@ -194,3 +196,12 @@ function permissionEditeDialog(type, field = 'id') {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function generateApi(type) {
|
||||
switch (type) {
|
||||
case AUTHENTICATION_TYPE:
|
||||
return apiGet('${base}/data_resource/list_no_authentication')
|
||||
case CONFIRMATION_TYPE:
|
||||
return apiGet('${base}/data_resource/list_no_confirmation')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user