1
0

feat(web): 增加确权状态审查

This commit is contained in:
2024-11-28 17:39:43 +08:00
parent 00e88078a2
commit 58f2173fb0
10 changed files with 217 additions and 41 deletions

View File

@@ -1,5 +1,5 @@
const information = {
debug: false,
debug: true,
// baseUrl: '',
baseUrl: 'http://127.0.0.1:20080',
title: '可信供给中心',

View File

@@ -10,6 +10,7 @@ import {
size100MB
} from "../constants.js";
import {resourceList} from "../../pages/index/tab-data.js";
import {resourceDetailDialog} from "../resource/dialog-resource.js";
function detailForm(showCreatedUserAndModifiedUser = false) {
return {
@@ -36,6 +37,20 @@ function detailForm(showCreatedUserAndModifiedUser = false) {
source: apiGet('${base}/data_resource/list'),
pickerSchema: {
...resourceList(),
},
staticSchema: {
type: 'tpl',
tpl: "<span class='text-primary' style='cursor: pointer'>${targetName}</span>",
onEvent: {
click: {
actions: [
{
actionType: 'dialog',
...resourceDetailDialog('targetId'),
}
]
}
}
}
},
{
@@ -88,13 +103,13 @@ export function permissionAddDialog() {
}
}
export function permissionDetailDialog(field = 'id') {
export function permissionDetailDialog(field = 'id', actions = []) {
return {
actionType: 'dialog',
dialog: {
title: '确权申请详情',
size: 'md',
actions: [],
actions: actions,
body: {
...detailForm(true),
initApi: apiGet(`\${base}/confirmation/detail/\${${field}}`),

View File

@@ -327,7 +327,7 @@ export function resourceAddDialog() {
}
}
export function resourceDetailDialog() {
export function resourceDetailDialog(field = 'id') {
return {
actionType: 'dialog',
dialog: {
@@ -337,7 +337,7 @@ export function resourceDetailDialog() {
body: {
...detailForm(true),
static: true,
initApi: apiGet('${base}/data_resource/detail/${id}'),
initApi: apiGet(`\${base}/data_resource/detail/\${${field}}`),
data: {
detail: true,
}

View File

@@ -59,9 +59,9 @@ useAmis(information => {
tabs: [
// tabOverview(),
// tabMarket(),
tabCheck(),
tabData(),
tabPermissions(),
tabCheck(),
tabUser(),
tabSettings(),
]

View File

@@ -1,4 +1,5 @@
import {checkerOnly} from "../../components/constants.js";
import {apiGet, apiPost, checkerOnly, crudCommonOptions} from "../../components/constants.js";
import {permissionDetailDialog} from "../../components/permission/dialog-permission.js";
export function tabCheck() {
return {
@@ -6,7 +7,53 @@ export function tabCheck() {
title: '审核审查',
icon: 'fa fa-shield-halved',
body: [
'hello world'
{
type: 'crud',
api: apiGet('${base}/check/list'),
...crudCommonOptions(),
headerToolbar: [
'reload',
],
columns: [
{
name: 'name',
label: '描述',
},
{
label: '操作',
width: 100,
type: 'operation',
fixed: 'right',
className: 'nowrap',
buttons: [
{
type: 'action',
label: '查看',
level: 'link',
...permissionDetailDialog(
'parameters.confirmationId',
[
{
type: 'each',
name: 'operations',
items: {
type: 'action',
label: '${item.name}',
level: '${item.level}',
actionType: 'ajax',
api: {
...apiPost('${base}/check/operation/${item.operation}'),
data: '${parameters}'
}
}
},
]
),
},
]
}
]
}
]
}
}