1
0

feat(web): 增加审批快照的生成

This commit is contained in:
2025-01-08 15:41:48 +08:00
parent 509410de9a
commit b16dba4ef1
10 changed files with 229 additions and 86 deletions

View File

@@ -1,16 +1,49 @@
import {
apiGet,
checkActionMapping,
checkOverMapping,
checkTypeMapping,
crudCommonOptions,
mappingField,
operationField,
readOnlyDialogOptions,
stringField,
timeField,
} from "../../components/constants.js";
import {authenticationDetailDialog, confirmationDetailDialog} from "../../components/permission/dialog-permission.js";
import {wareDetailDialog} from "../../components/ware/dialog-ware.js";
function detailDialog() {
return {
actionType: 'dialog',
dialog: {
title: '详情',
size: 'md',
...readOnlyDialogOptions(),
body: [
{
type: 'amis',
name: 'parameters.snapshot',
},
{type: 'divider'},
{
type: 'crud',
api: apiGet('${base}/check_order/history/${instanceId}'),
...crudCommonOptions(),
headerToolbar: [
'reload',
],
columns: [
mappingField('action', '类型', checkActionMapping),
stringField('comment', '描述'),
timeField('createdTime', '操作时间'),
]
}
]
}
}
}
export function tabCheck() {
return [
{
@@ -30,6 +63,13 @@ export function tabCheck() {
timeField('modifiedTime', '最后修改时间'),
stringField('modifiedUsername', '最后操作人', 100),
operationField('操作', undefined, [
{
visibleOn: "${state === 'COMPLETED'}",
type: 'action',
label: '查看',
level: 'link',
...detailDialog(),
},
{
visibleOn: "${type === 'CONFIRMATION' && state === 'RUNNING'}",
type: 'action',
@@ -57,13 +97,6 @@ export function tabCheck() {
],
),
},
{
visibleOn: "${type === 'CONFIRMATION' && state !== NORMAL}",
type: 'action',
label: '查看',
level: 'link',
...confirmationDetailDialog('parameters.confirmationId'),
},
{
visibleOn: "${type === 'AUTHENTICATION' && state === 'RUNNING'}",
type: 'action',
@@ -91,13 +124,6 @@ export function tabCheck() {
],
),
},
{
visibleOn: "${type === 'AUTHENTICATION' && state !== NORMAL}",
type: 'action',
label: '查看',
level: 'link',
...authenticationDetailDialog('parameters.authenticationId'),
},
{
visibleOn: "${type === 'WARE' && state === 'RUNNING'}",
type: 'action',
@@ -125,13 +151,6 @@ export function tabCheck() {
],
),
},
{
visibleOn: "${type === 'WARE' && state !== NORMAL}",
type: 'action',
label: '查看',
level: 'link',
...wareDetailDialog('parameters.wareId'),
},
]),
],
},