@vef-framework-react/approval 2.29.0 → 2.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/admin-api.cjs +1 -1
- package/dist/cjs/api/flow-api.cjs +1 -1
- package/dist/cjs/api/instance-api.cjs +1 -1
- package/dist/cjs/api/my-api.cjs +1 -1
- package/dist/cjs/components/action-dialog/index.cjs +1 -1
- package/dist/cjs/components/action-dialog/user-selection.cjs +1 -0
- package/dist/cjs/components/annotations/composers.cjs +1 -0
- package/dist/cjs/components/annotations/field-anchor.cjs +1 -0
- package/dist/cjs/components/annotations/index.cjs +1 -0
- package/dist/cjs/components/annotations/use-annotations.cjs +1 -0
- package/dist/cjs/components/business-form.cjs +1 -0
- package/dist/cjs/components/capped-modal.cjs +1 -0
- package/dist/cjs/components/detail/action-modals.cjs +1 -1
- package/dist/cjs/components/detail/admin.cjs +1 -1
- package/dist/cjs/components/detail/index.cjs +1 -1
- package/dist/cjs/components/flow-graph/node.cjs +1 -1
- package/dist/cjs/components/flow-graph/people-overlay.cjs +1 -1
- package/dist/cjs/components/form-panel/index.cjs +1 -1
- package/dist/cjs/components/format.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/instance-list-title.cjs +1 -0
- package/dist/cjs/components/principal/index.cjs +1 -1
- package/dist/cjs/components/status/colors.cjs +1 -1
- package/dist/cjs/components/status/index.cjs +1 -1
- package/dist/cjs/components/status/labels.cjs +1 -1
- package/dist/cjs/components/timeline/index.cjs +1 -1
- package/dist/cjs/components/user/index.cjs +1 -1
- package/dist/cjs/components/void/direct-dialog.cjs +1 -0
- package/dist/cjs/components/void/form.cjs +1 -0
- package/dist/cjs/components/void/request-renderer.cjs +1 -0
- package/dist/cjs/components/void/summary.cjs +1 -0
- package/dist/cjs/components/void/use-refresh.cjs +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/pages/admin-page/apply-handovers.cjs +1 -0
- package/dist/cjs/pages/admin-page/index.cjs +1 -1
- package/dist/cjs/pages/admin-page/instances.cjs +1 -1
- package/dist/cjs/pages/admin-page/metrics.cjs +1 -1
- package/dist/cjs/pages/admin-page/tasks.cjs +1 -1
- package/dist/cjs/pages/category-page/index.cjs +1 -1
- package/dist/cjs/pages/delegation-page/index.cjs +1 -1
- package/dist/cjs/pages/flow-page/columns.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/basic-step.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/field-catalog.cjs +1 -0
- package/dist/cjs/pages/flow-page/designer/form-step.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/index.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/review-step.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/types.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/void-policy.cjs +1 -0
- package/dist/cjs/pages/flow-page/index.cjs +1 -1
- package/dist/cjs/pages/index.cjs +1 -1
- package/dist/cjs/pages/initiate-page/index.cjs +1 -1
- package/dist/cjs/pages/initiate-page/start-drawer.cjs +1 -1
- package/dist/cjs/pages/my-instances-page/index.cjs +1 -1
- package/dist/cjs/pages/task-center-page/index.cjs +1 -1
- package/dist/cjs/permissions.cjs +1 -1
- package/dist/cjs/plugins/index.cjs +1 -1
- package/dist/cjs/types/annotation.cjs +1 -0
- package/dist/cjs/types/detail.cjs +1 -0
- package/dist/cjs/types/enums.cjs +1 -1
- package/dist/cjs/types/index.cjs +1 -1
- package/dist/cjs/types/void.cjs +1 -0
- package/dist/es/api/admin-api.js +5 -2
- package/dist/es/api/category-api.js +1 -1
- package/dist/es/api/delegation-api.js +1 -1
- package/dist/es/api/flow-api.js +19 -15
- package/dist/es/api/index.js +1 -1
- package/dist/es/api/instance-api.js +3 -1
- package/dist/es/api/my-api.js +2 -1
- package/dist/es/api/query.js +1 -1
- package/dist/es/components/action-dialog/index.js +64 -41
- package/dist/es/components/action-dialog/user-selection.js +48 -0
- package/dist/es/components/annotations/composers.js +231 -0
- package/dist/es/components/annotations/field-anchor.js +18 -0
- package/dist/es/components/annotations/index.js +271 -0
- package/dist/es/components/annotations/use-annotations.js +77 -0
- package/dist/es/components/business-form.js +36 -0
- package/dist/es/components/capped-modal.js +27 -0
- package/dist/es/components/detail/action-modals.js +120 -132
- package/dist/es/components/detail/admin.js +109 -74
- package/dist/es/components/detail/drawer.js +1 -1
- package/dist/es/components/detail/index.js +298 -233
- package/dist/es/components/flow-graph/index.js +1 -1
- package/dist/es/components/flow-graph/node.js +26 -26
- package/dist/es/components/flow-graph/people-overlay.js +104 -100
- package/dist/es/components/flow-graph/people.js +1 -1
- package/dist/es/components/form-panel/index.js +10 -9
- package/dist/es/components/format.js +7 -4
- package/dist/es/components/icon.js +1 -1
- package/dist/es/components/index.js +11 -8
- package/dist/es/components/instance-list-title.js +31 -0
- package/dist/es/components/principal/index.js +4 -2
- package/dist/es/components/status/colors.js +3 -2
- package/dist/es/components/status/index.js +14 -14
- package/dist/es/components/status/labels.js +7 -3
- package/dist/es/components/timeline/index.js +79 -69
- package/dist/es/components/user/index.js +32 -25
- package/dist/es/components/void/direct-dialog.js +62 -0
- package/dist/es/components/void/form.js +100 -0
- package/dist/es/components/void/request-renderer.js +91 -0
- package/dist/es/components/void/summary.js +142 -0
- package/dist/es/components/void/use-refresh.js +22 -0
- package/dist/es/index.js +33 -27
- package/dist/es/pages/admin-page/apply-handovers.js +185 -0
- package/dist/es/pages/admin-page/index.js +50 -43
- package/dist/es/pages/admin-page/instances.js +50 -52
- package/dist/es/pages/admin-page/metrics.js +34 -33
- package/dist/es/pages/admin-page/projections.js +1 -1
- package/dist/es/pages/admin-page/tasks.js +59 -57
- package/dist/es/pages/category-page/columns.js +1 -1
- package/dist/es/pages/category-page/form.js +1 -1
- package/dist/es/pages/category-page/index.js +21 -21
- package/dist/es/pages/delegation-page/columns.js +1 -1
- package/dist/es/pages/delegation-page/form.js +1 -1
- package/dist/es/pages/delegation-page/index.js +19 -19
- package/dist/es/pages/flow-page/columns.js +6 -6
- package/dist/es/pages/flow-page/designer/basic-step.js +202 -146
- package/dist/es/pages/flow-page/designer/field-catalog.js +47 -0
- package/dist/es/pages/flow-page/designer/flow-step.js +1 -1
- package/dist/es/pages/flow-page/designer/form-step.js +14 -14
- package/dist/es/pages/flow-page/designer/index.js +248 -204
- package/dist/es/pages/flow-page/designer/review-step.js +38 -60
- package/dist/es/pages/flow-page/designer/types.js +13 -5
- package/dist/es/pages/flow-page/designer/void-policy.js +135 -0
- package/dist/es/pages/flow-page/index.js +18 -18
- package/dist/es/pages/flow-page/search.js +1 -1
- package/dist/es/pages/flow-page/versions.js +1 -1
- package/dist/es/pages/index.js +9 -9
- package/dist/es/pages/initiate-page/index.js +133 -86
- package/dist/es/pages/initiate-page/start-drawer.js +153 -64
- package/dist/es/pages/my-instances-page/index.js +57 -77
- package/dist/es/pages/task-center-page/index.js +73 -68
- package/dist/es/pages/task-center-page/search.js +1 -1
- package/dist/es/permissions.js +6 -3
- package/dist/es/plugins/form-context.js +1 -1
- package/dist/es/plugins/index.js +33 -21
- package/dist/es/types/annotation.js +18 -0
- package/dist/es/types/detail.js +7 -0
- package/dist/es/types/enums.js +3 -2
- package/dist/es/types/index.js +6 -3
- package/dist/es/types/void.js +5 -0
- package/dist/types/api/admin-api.d.ts +4 -1
- package/dist/types/api/flow-api.d.ts +4 -2
- package/dist/types/api/instance-api.d.ts +5 -1
- package/dist/types/api/my-api.d.ts +2 -1
- package/dist/types/components/action-dialog/index.d.ts +8 -2
- package/dist/types/components/action-dialog/user-selection.d.ts +18 -0
- package/dist/types/components/annotations/composers.d.ts +14 -0
- package/dist/types/components/annotations/field-anchor.d.ts +3 -0
- package/dist/types/components/annotations/index.d.ts +22 -0
- package/dist/types/components/annotations/use-annotations.d.ts +24 -0
- package/dist/types/components/business-form.d.ts +14 -0
- package/dist/types/components/capped-modal.d.ts +2 -0
- package/dist/types/components/detail/admin.d.ts +2 -1
- package/dist/types/components/form-panel/index.d.ts +3 -2
- package/dist/types/components/format.d.ts +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/instance-list-title.d.ts +5 -0
- package/dist/types/components/timeline/index.d.ts +3 -1
- package/dist/types/components/user/index.d.ts +4 -0
- package/dist/types/components/void/direct-dialog.d.ts +8 -0
- package/dist/types/components/void/form.d.ts +27 -0
- package/dist/types/components/void/request-renderer.d.ts +3 -0
- package/dist/types/components/void/summary.d.ts +16 -0
- package/dist/types/components/void/use-refresh.d.ts +4 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/types/pages/admin-page/apply-handovers.d.ts +3 -0
- package/dist/types/pages/admin-page/index.d.ts +2 -0
- package/dist/types/pages/admin-page/instances.d.ts +2 -1
- package/dist/types/pages/flow-page/designer/basic-step.d.ts +7 -2
- package/dist/types/pages/flow-page/designer/field-catalog.d.ts +5 -0
- package/dist/types/pages/flow-page/designer/review-step.d.ts +2 -1
- package/dist/types/pages/flow-page/designer/types.d.ts +13 -2
- package/dist/types/pages/flow-page/designer/void-policy.d.ts +14 -0
- package/dist/types/pages/initiate-page/start-drawer.d.ts +7 -1
- package/dist/types/permissions.d.ts +8 -0
- package/dist/types/plugins/index.d.ts +39 -4
- package/dist/types/types/admin.d.ts +27 -0
- package/dist/types/types/annotation.d.ts +60 -0
- package/dist/types/types/detail.d.ts +8 -1
- package/dist/types/types/enums.d.ts +5 -10
- package/dist/types/types/flow.d.ts +25 -5
- package/dist/types/types/index.d.ts +3 -1
- package/dist/types/types/instance.d.ts +1 -2
- package/dist/types/types/my.d.ts +16 -0
- package/dist/types/types/void.d.ts +58 -0
- package/package.json +8 -7
|
@@ -1,26 +1,31 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.31.0 made by Venus | 2026-11-19T01:43:39.549Z */
|
|
2
2
|
import { useInstanceApi as e } from "../../api/instance-api.js";
|
|
3
3
|
import { useMyApprovalApi as t } from "../../api/my-api.js";
|
|
4
|
-
import {
|
|
5
|
-
import { formatTimestamp as r } from "../format.js";
|
|
4
|
+
import { displayInstanceTitle as n, formatTimestamp as r } from "../format.js";
|
|
6
5
|
import { InstanceStatusTag as i } from "../status/index.js";
|
|
7
6
|
import { UserLabel as a } from "../user/index.js";
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
7
|
+
import "../../types/void.js";
|
|
8
|
+
import { MissingBusinessKind as o, useBusinessForm as s } from "../business-form.js";
|
|
9
|
+
import { StartInstanceDrawer as c } from "../../pages/initiate-page/start-drawer.js";
|
|
10
|
+
import { InstanceFlowGraphViewer as ee } from "../flow-graph/index.js";
|
|
11
|
+
import { InstanceFormPanel as l } from "../form-panel/index.js";
|
|
12
|
+
import { VoidBanners as u } from "../void/summary.js";
|
|
13
|
+
import { useRefreshVoidTarget as d } from "../void/use-refresh.js";
|
|
14
|
+
import { AddAssigneeModal as f, CCModal as p, ReasonModal as m, RemoveAssigneeModal as h, RollbackModal as te, TransferModal as ne, UrgeModal as re } from "./action-modals.js";
|
|
15
|
+
import { useApprovalPlugins as g } from "../../plugins/index.js";
|
|
16
|
+
import { AnnotationTimeline as ie, DetailAnnotations as ae, useFieldAnnotations as oe } from "../annotations/index.js";
|
|
17
|
+
import { useMutation as _, useQuery as se } from "@vef-framework-react/core";
|
|
18
|
+
import { useId as ce, useMemo as le, useRef as ue, useState as v } from "react";
|
|
19
|
+
import { Button as y, Descriptions as b, Empty as de, Flex as x, Icon as S, Input as fe, Labeled as pe, LabelsDisplay as C, Space as me, Spin as he, Stack as w, Tabs as ge, Text as T, Title as _e, globalCssVars as ve, showSuccessMessage as ye, showWarningMessage as be } from "@vef-framework-react/components";
|
|
20
|
+
import { Fragment as E, jsx as D, jsxs as O } from "@emotion/react/jsx-runtime";
|
|
21
|
+
import { CheckIcon as xe, CornerUpLeftIcon as Se, MailPlusIcon as Ce, MegaphoneIcon as we, RotateCcwIcon as Te, SendIcon as Ee, Undo2Icon as De, UserMinusIcon as Oe, UserPlusIcon as ke, XIcon as Ae } from "lucide-react";
|
|
17
22
|
//#region src/components/detail/index.tsx
|
|
18
|
-
function
|
|
19
|
-
let { renderBusinessRef:
|
|
23
|
+
function k({ title: e, status: t, instanceNo: o, flowName: s, flowCode: c, applicant: ee, createdAt: l, finishedAt: u, currentNodeName: d, businessRef: f, labels: p }) {
|
|
24
|
+
let { renderBusinessRef: m } = g(), h = [
|
|
20
25
|
{
|
|
21
26
|
key: "no",
|
|
22
27
|
label: "审批单号",
|
|
23
|
-
children: /* @__PURE__ */
|
|
28
|
+
children: /* @__PURE__ */ D(T, {
|
|
24
29
|
copyable: !0,
|
|
25
30
|
children: o
|
|
26
31
|
})
|
|
@@ -33,7 +38,7 @@ function j({ title: e, status: t, instanceNo: o, flowName: s, flowCode: c, appli
|
|
|
33
38
|
...c ? [{
|
|
34
39
|
key: "flowCode",
|
|
35
40
|
label: "流程编码",
|
|
36
|
-
children: /* @__PURE__ */
|
|
41
|
+
children: /* @__PURE__ */ D(T, {
|
|
37
42
|
copyable: !0,
|
|
38
43
|
children: c
|
|
39
44
|
})
|
|
@@ -41,47 +46,47 @@ function j({ title: e, status: t, instanceNo: o, flowName: s, flowCode: c, appli
|
|
|
41
46
|
{
|
|
42
47
|
key: "applicant",
|
|
43
48
|
label: "申请人",
|
|
44
|
-
children: /* @__PURE__ */
|
|
49
|
+
children: /* @__PURE__ */ D(a, { user: ee })
|
|
45
50
|
},
|
|
46
51
|
{
|
|
47
52
|
key: "created",
|
|
48
53
|
label: "提交时间",
|
|
49
|
-
children: r(
|
|
54
|
+
children: r(l)
|
|
50
55
|
}
|
|
51
56
|
];
|
|
52
|
-
return
|
|
57
|
+
return d !== void 0 && h.push({
|
|
53
58
|
key: "node",
|
|
54
59
|
label: "当前节点",
|
|
55
|
-
children:
|
|
56
|
-
}),
|
|
60
|
+
children: d
|
|
61
|
+
}), u !== void 0 && h.push({
|
|
57
62
|
key: "finished",
|
|
58
63
|
label: "完成时间",
|
|
59
|
-
children: r(
|
|
60
|
-
}),
|
|
64
|
+
children: r(u)
|
|
65
|
+
}), f !== void 0 && f !== "" && h.push({
|
|
61
66
|
key: "businessRef",
|
|
62
67
|
label: "业务单据",
|
|
63
|
-
children:
|
|
68
|
+
children: m ? m(f) : /* @__PURE__ */ D(T, {
|
|
64
69
|
code: !0,
|
|
65
|
-
children:
|
|
70
|
+
children: f
|
|
66
71
|
})
|
|
67
|
-
}),
|
|
72
|
+
}), p !== void 0 && Object.keys(p).length > 0 && h.push({
|
|
68
73
|
key: "labels",
|
|
69
74
|
label: "流程标签",
|
|
70
|
-
children: /* @__PURE__ */
|
|
71
|
-
}), /* @__PURE__ */
|
|
75
|
+
children: /* @__PURE__ */ D(C, { labels: p })
|
|
76
|
+
}), /* @__PURE__ */ O(w, {
|
|
72
77
|
gap: 12,
|
|
73
|
-
children: [/* @__PURE__ */
|
|
78
|
+
children: [/* @__PURE__ */ O(x, {
|
|
74
79
|
align: "center",
|
|
75
80
|
gap: "middle",
|
|
76
81
|
wrap: "wrap",
|
|
77
|
-
children: [/* @__PURE__ */
|
|
82
|
+
children: [/* @__PURE__ */ D(_e, {
|
|
78
83
|
level: 4,
|
|
79
84
|
style: { margin: 0 },
|
|
80
|
-
children: e
|
|
81
|
-
}), /* @__PURE__ */
|
|
82
|
-
}), /* @__PURE__ */
|
|
85
|
+
children: n(e, o)
|
|
86
|
+
}), /* @__PURE__ */ D(i, { status: t })]
|
|
87
|
+
}), /* @__PURE__ */ D(b, {
|
|
83
88
|
colon: !0,
|
|
84
|
-
items:
|
|
89
|
+
items: h,
|
|
85
90
|
size: "small",
|
|
86
91
|
column: {
|
|
87
92
|
xs: 1,
|
|
@@ -91,33 +96,39 @@ function j({ title: e, status: t, instanceNo: o, flowName: s, flowCode: c, appli
|
|
|
91
96
|
})]
|
|
92
97
|
});
|
|
93
98
|
}
|
|
94
|
-
function
|
|
95
|
-
let i = t(), a = e(), { data:
|
|
99
|
+
function A({ instanceId: n, onActionCompleted: r }) {
|
|
100
|
+
let i = t(), a = d(), g = e(), { data: b, isLoading: C, refetch: _e } = se({
|
|
96
101
|
queryFn: i.getInstanceDetail,
|
|
97
102
|
queryKey: [i.getInstanceDetail.key, { instanceId: n }]
|
|
98
|
-
}),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
mutationFn:
|
|
103
|
-
...
|
|
104
|
-
}),
|
|
105
|
-
mutationFn:
|
|
106
|
-
...
|
|
107
|
-
}),
|
|
108
|
-
mutationFn:
|
|
109
|
-
...
|
|
110
|
-
}),
|
|
111
|
-
mutationFn:
|
|
112
|
-
...
|
|
113
|
-
}),
|
|
114
|
-
mutationFn:
|
|
115
|
-
...
|
|
116
|
-
}),
|
|
117
|
-
mutationFn:
|
|
118
|
-
...
|
|
119
|
-
}),
|
|
120
|
-
|
|
103
|
+
}), j = { meta: { shouldShowSuccessFeedback: !1 } }, M = { meta: {
|
|
104
|
+
shouldShowSuccessFeedback: !1,
|
|
105
|
+
shouldShowErrorFeedback: !1
|
|
106
|
+
} }, je = _({
|
|
107
|
+
mutationFn: g.processTask,
|
|
108
|
+
...M
|
|
109
|
+
}), N = _({
|
|
110
|
+
mutationFn: g.processTask,
|
|
111
|
+
...j
|
|
112
|
+
}), Me = _({
|
|
113
|
+
mutationFn: g.resubmit,
|
|
114
|
+
...j
|
|
115
|
+
}), Ne = _({
|
|
116
|
+
mutationFn: g.withdraw,
|
|
117
|
+
...j
|
|
118
|
+
}), Pe = _({
|
|
119
|
+
mutationFn: g.addAssignee,
|
|
120
|
+
...M
|
|
121
|
+
}), Fe = _({
|
|
122
|
+
mutationFn: g.removeAssignee,
|
|
123
|
+
...j
|
|
124
|
+
}), Ie = _({
|
|
125
|
+
mutationFn: g.addCC,
|
|
126
|
+
...M
|
|
127
|
+
}), Le = _({
|
|
128
|
+
mutationFn: g.urgeTask,
|
|
129
|
+
...j
|
|
130
|
+
}), [P, F] = v(null), [I, L] = v(""), [R, z] = v(!1), B = ce(), V = ue(null), H = ue(null), Re = oe(b), U = s(b?.instance.businessKind), W = !!(b?.instance.businessKind && !U.renderer), G = le(() => new Set(b?.availableActions), [b]), K = b?.myTask, ze = le(() => {
|
|
131
|
+
let e = [], t = b?.timeline ?? [];
|
|
121
132
|
for (let n of t) {
|
|
122
133
|
if (n.kind !== "approval" && n.kind !== "handle") continue;
|
|
123
134
|
let t = n.participants ?? [];
|
|
@@ -128,276 +139,330 @@ function M({ instanceId: n, onActionCompleted: r }) {
|
|
|
128
139
|
});
|
|
129
140
|
}
|
|
130
141
|
return e;
|
|
131
|
-
}, [
|
|
132
|
-
if (
|
|
142
|
+
}, [b]);
|
|
143
|
+
if (C) return /* @__PURE__ */ D(x, {
|
|
133
144
|
align: "center",
|
|
134
145
|
justify: "center",
|
|
135
146
|
style: { minHeight: 240 },
|
|
136
|
-
children: /* @__PURE__ */
|
|
147
|
+
children: /* @__PURE__ */ D(he, {})
|
|
137
148
|
});
|
|
138
|
-
if (!
|
|
139
|
-
let { instance:
|
|
140
|
-
async function
|
|
141
|
-
|
|
149
|
+
if (!b) return /* @__PURE__ */ D(de, { description: "未找到审批单" });
|
|
150
|
+
let { instance: q } = b, J = G.has("handle") ? "handle" : G.has("approve") ? "approve" : null, Y = J !== null && K !== void 0, X = G.has("resubmit"), Be = Y || X;
|
|
151
|
+
async function Z(e) {
|
|
152
|
+
if (ye(e), L(""), q.businessKind === "approval.void_request") {
|
|
153
|
+
let e = (b?.businessView)?.target?.instanceId;
|
|
154
|
+
e && await a(e);
|
|
155
|
+
}
|
|
156
|
+
await _e(), r?.();
|
|
142
157
|
}
|
|
143
|
-
async function
|
|
144
|
-
|
|
158
|
+
async function Q(e, t) {
|
|
159
|
+
z(!0);
|
|
145
160
|
try {
|
|
146
|
-
await e(), await
|
|
161
|
+
await e(), await Z(t);
|
|
147
162
|
} catch {} finally {
|
|
148
|
-
|
|
163
|
+
z(!1);
|
|
149
164
|
}
|
|
150
165
|
}
|
|
151
|
-
function
|
|
152
|
-
|
|
166
|
+
function Ve() {
|
|
167
|
+
a(n), r?.();
|
|
153
168
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
169
|
+
function He() {
|
|
170
|
+
return K?.isOpinionRequired && I.trim() === "" ? (be("该节点要求填写审批意见"), !1) : !0;
|
|
171
|
+
}
|
|
172
|
+
async function Ue(e) {
|
|
173
|
+
if (!(e !== "resubmit" && !He())) {
|
|
174
|
+
if (b?.instance.businessKind || !b?.formSchema) {
|
|
175
|
+
await Ge(e, void 0);
|
|
158
176
|
return;
|
|
159
177
|
}
|
|
160
|
-
|
|
178
|
+
H.current = e;
|
|
161
179
|
try {
|
|
162
|
-
await
|
|
180
|
+
await V.current?.submit();
|
|
163
181
|
} finally {
|
|
164
|
-
|
|
182
|
+
H.current = null;
|
|
165
183
|
}
|
|
166
184
|
}
|
|
167
185
|
}
|
|
168
|
-
function
|
|
169
|
-
let t =
|
|
170
|
-
t !== null &&
|
|
186
|
+
function We(e) {
|
|
187
|
+
let t = H.current;
|
|
188
|
+
t !== null && Ge(t, e);
|
|
171
189
|
}
|
|
172
|
-
async function
|
|
190
|
+
async function Ge(e, t) {
|
|
173
191
|
if (e === "resubmit") {
|
|
174
|
-
await
|
|
192
|
+
await Q(async () => Me.mutateAsync({
|
|
175
193
|
instanceId: n,
|
|
176
|
-
formData: t
|
|
194
|
+
formData: q.businessKind ? await U.collect() : t
|
|
177
195
|
}), "已重新提交");
|
|
178
196
|
return;
|
|
179
197
|
}
|
|
180
|
-
|
|
181
|
-
taskId:
|
|
198
|
+
K !== void 0 && await Q(async () => N.mutateAsync({
|
|
199
|
+
taskId: K.taskId,
|
|
182
200
|
action: e,
|
|
183
|
-
opinion:
|
|
184
|
-
formData: t
|
|
201
|
+
opinion: I.trim() || void 0,
|
|
202
|
+
formData: q.businessKind ? await U.collect() : t
|
|
185
203
|
}), e === "handle" ? "已办理" : "已通过");
|
|
186
204
|
}
|
|
187
|
-
async function
|
|
188
|
-
if (
|
|
189
|
-
let e =
|
|
190
|
-
await
|
|
191
|
-
taskId:
|
|
205
|
+
async function Ke() {
|
|
206
|
+
if (K === void 0 || !He()) return;
|
|
207
|
+
let e = V.current?.getSubmitValues();
|
|
208
|
+
await Q(async () => N.mutateAsync({
|
|
209
|
+
taskId: K.taskId,
|
|
192
210
|
action: "reject",
|
|
193
|
-
opinion:
|
|
194
|
-
formData: e
|
|
211
|
+
opinion: I.trim() || void 0,
|
|
212
|
+
formData: q.businessKind ? await U.collect() : e
|
|
195
213
|
}), "已拒绝");
|
|
196
214
|
}
|
|
197
215
|
let $ = [];
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
onClick: () =>
|
|
216
|
+
G.has("request_void") && q.voidFlowCode && $.push(/* @__PURE__ */ D(y, {
|
|
217
|
+
disabled: W || R,
|
|
218
|
+
onClick: () => F("requestVoid"),
|
|
219
|
+
children: "申请作废"
|
|
220
|
+
}, "requestVoid")), G.has("transfer") && K !== void 0 && $.push(/* @__PURE__ */ D(y, {
|
|
221
|
+
disabled: W || R,
|
|
222
|
+
icon: /* @__PURE__ */ D(S, { component: Se }),
|
|
223
|
+
onClick: () => F("transfer"),
|
|
201
224
|
children: "转办"
|
|
202
|
-
}, "transfer")),
|
|
203
|
-
|
|
204
|
-
|
|
225
|
+
}, "transfer")), G.has("rollback") && (K?.rollbackTargets?.length ?? 0) > 0 && $.push(/* @__PURE__ */ D(y, {
|
|
226
|
+
disabled: W || R,
|
|
227
|
+
icon: /* @__PURE__ */ D(S, { component: De }),
|
|
228
|
+
onClick: () => F("rollback"),
|
|
205
229
|
children: "回退"
|
|
206
|
-
}, "rollback")),
|
|
207
|
-
|
|
208
|
-
|
|
230
|
+
}, "rollback")), G.has("add_assignee") && (K?.addAssigneeTypes?.length ?? 0) > 0 && $.push(/* @__PURE__ */ D(y, {
|
|
231
|
+
disabled: W || R,
|
|
232
|
+
icon: /* @__PURE__ */ D(S, { component: ke }),
|
|
233
|
+
onClick: () => F("addAssignee"),
|
|
209
234
|
children: "加签"
|
|
210
|
-
}, "addAssignee")),
|
|
211
|
-
|
|
212
|
-
|
|
235
|
+
}, "addAssignee")), G.has("remove_assignee") && (K?.removableAssignees?.length ?? 0) > 0 && $.push(/* @__PURE__ */ D(y, {
|
|
236
|
+
disabled: W || R,
|
|
237
|
+
icon: /* @__PURE__ */ D(S, { component: Oe }),
|
|
238
|
+
onClick: () => F("removeAssignee"),
|
|
213
239
|
children: "减签"
|
|
214
|
-
}, "removeAssignee")),
|
|
215
|
-
|
|
216
|
-
|
|
240
|
+
}, "removeAssignee")), G.has("add_cc") && $.push(/* @__PURE__ */ D(y, {
|
|
241
|
+
disabled: W || R,
|
|
242
|
+
icon: /* @__PURE__ */ D(S, { component: Ce }),
|
|
243
|
+
onClick: () => F("cc"),
|
|
217
244
|
children: "抄送"
|
|
218
|
-
}, "cc")),
|
|
219
|
-
|
|
220
|
-
|
|
245
|
+
}, "cc")), G.has("urge") && ze.length > 0 && $.push(/* @__PURE__ */ D(y, {
|
|
246
|
+
disabled: W || R,
|
|
247
|
+
icon: /* @__PURE__ */ D(S, { component: we }),
|
|
248
|
+
onClick: () => F("urge"),
|
|
221
249
|
children: "催办"
|
|
222
|
-
}, "urge")),
|
|
223
|
-
|
|
224
|
-
|
|
250
|
+
}, "urge")), G.has("withdraw") && $.push(/* @__PURE__ */ D(y, {
|
|
251
|
+
disabled: W || R,
|
|
252
|
+
icon: /* @__PURE__ */ D(S, { component: Te }),
|
|
253
|
+
onClick: () => F("withdraw"),
|
|
225
254
|
children: "撤回"
|
|
226
255
|
}, "withdraw"));
|
|
227
|
-
let
|
|
256
|
+
let qe = Y || X || $.length > 0, Je = /* @__PURE__ */ O(w, {
|
|
228
257
|
gap: 16,
|
|
229
|
-
children: [
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
onClick: () => void Z(G),
|
|
264
|
-
children: G === "handle" ? "办理" : "通过"
|
|
265
|
-
}), /* @__PURE__ */ k(x, {
|
|
266
|
-
danger: !0,
|
|
267
|
-
icon: /* @__PURE__ */ k(w, { component: ve }),
|
|
268
|
-
loading: L,
|
|
269
|
-
onClick: () => void Oe(),
|
|
270
|
-
children: "拒绝"
|
|
271
|
-
})] }),
|
|
272
|
-
q && /* @__PURE__ */ k(x, {
|
|
273
|
-
icon: /* @__PURE__ */ k(w, { component: me }),
|
|
274
|
-
loading: L,
|
|
275
|
-
type: "primary",
|
|
276
|
-
onClick: () => void Z("resubmit"),
|
|
277
|
-
children: "重新提交"
|
|
278
|
-
}),
|
|
279
|
-
/* @__PURE__ */ k(re, {
|
|
280
|
-
wrap: !0,
|
|
281
|
-
size: 8,
|
|
282
|
-
children: $
|
|
258
|
+
children: [
|
|
259
|
+
q.businessKind ? U.renderer ? /* @__PURE__ */ D(U.renderer.DetailView, {
|
|
260
|
+
detail: b,
|
|
261
|
+
handle: U.handle,
|
|
262
|
+
myTask: K,
|
|
263
|
+
view: b.businessView,
|
|
264
|
+
onAvailabilityChange: U.onAvailabilityChange
|
|
265
|
+
}) : /* @__PURE__ */ D(o, {}) : /* @__PURE__ */ D(l, {
|
|
266
|
+
apiRef: V,
|
|
267
|
+
applicant: q.applicant,
|
|
268
|
+
disabled: !Be,
|
|
269
|
+
fieldPermissions: b.fieldPermissions,
|
|
270
|
+
formData: q.formData,
|
|
271
|
+
globals: q.globals,
|
|
272
|
+
renderFieldExtra: Re.renderFieldExtra,
|
|
273
|
+
schema: b.formSchema,
|
|
274
|
+
onSubmit: We
|
|
275
|
+
}),
|
|
276
|
+
/* @__PURE__ */ D(ae, { detail: b }),
|
|
277
|
+
qe && /* @__PURE__ */ O(w, {
|
|
278
|
+
gap: 12,
|
|
279
|
+
style: {
|
|
280
|
+
borderTop: `1px solid ${ve.colorBorderSecondary}`,
|
|
281
|
+
paddingTop: 16
|
|
282
|
+
},
|
|
283
|
+
children: [Y && /* @__PURE__ */ D(pe, {
|
|
284
|
+
label: "审批意见",
|
|
285
|
+
required: K?.isOpinionRequired === !0,
|
|
286
|
+
children: /* @__PURE__ */ D(fe.TextArea, {
|
|
287
|
+
maxLength: 2e3,
|
|
288
|
+
placeholder: "请输入审批意见",
|
|
289
|
+
rows: 3,
|
|
290
|
+
value: I,
|
|
291
|
+
onChange: (e) => L(e.target.value)
|
|
283
292
|
})
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
293
|
+
}), /* @__PURE__ */ O(x, {
|
|
294
|
+
align: "center",
|
|
295
|
+
gap: "small",
|
|
296
|
+
wrap: "wrap",
|
|
297
|
+
children: [
|
|
298
|
+
Y && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(y, {
|
|
299
|
+
disabled: W,
|
|
300
|
+
icon: /* @__PURE__ */ D(S, { component: xe }),
|
|
301
|
+
loading: R,
|
|
302
|
+
type: "primary",
|
|
303
|
+
onClick: () => void Ue(J),
|
|
304
|
+
children: J === "handle" ? "办理" : "通过"
|
|
305
|
+
}), /* @__PURE__ */ D(y, {
|
|
306
|
+
danger: !0,
|
|
307
|
+
disabled: W,
|
|
308
|
+
icon: /* @__PURE__ */ D(S, { component: Ae }),
|
|
309
|
+
loading: R,
|
|
310
|
+
onClick: () => void Ke(),
|
|
311
|
+
children: "拒绝"
|
|
312
|
+
})] }),
|
|
313
|
+
X && /* @__PURE__ */ O(E, { children: [U.blockedReason && /* @__PURE__ */ D(T, {
|
|
314
|
+
id: B,
|
|
315
|
+
type: "secondary",
|
|
316
|
+
children: U.blockedReason
|
|
317
|
+
}), /* @__PURE__ */ D(y, {
|
|
318
|
+
"aria-describedby": U.blockedReason ? B : void 0,
|
|
319
|
+
disabled: W || !U.ready,
|
|
320
|
+
icon: /* @__PURE__ */ D(S, { component: Ee }),
|
|
321
|
+
loading: R,
|
|
322
|
+
type: "primary",
|
|
323
|
+
onClick: () => void Ue("resubmit"),
|
|
324
|
+
children: "重新提交"
|
|
325
|
+
})] }),
|
|
326
|
+
/* @__PURE__ */ D(me, {
|
|
327
|
+
wrap: !0,
|
|
328
|
+
size: 8,
|
|
329
|
+
children: $
|
|
330
|
+
})
|
|
331
|
+
]
|
|
332
|
+
})]
|
|
333
|
+
})
|
|
334
|
+
]
|
|
287
335
|
});
|
|
288
|
-
return /* @__PURE__ */
|
|
336
|
+
return /* @__PURE__ */ O(w, {
|
|
289
337
|
gap: 20,
|
|
290
338
|
children: [
|
|
291
|
-
/* @__PURE__ */ k
|
|
292
|
-
applicant:
|
|
293
|
-
businessRef:
|
|
294
|
-
createdAt:
|
|
295
|
-
currentNodeName:
|
|
296
|
-
finishedAt:
|
|
297
|
-
flowCode:
|
|
298
|
-
flowName:
|
|
299
|
-
instanceNo:
|
|
300
|
-
status:
|
|
301
|
-
title:
|
|
339
|
+
/* @__PURE__ */ D(k, {
|
|
340
|
+
applicant: q.applicant,
|
|
341
|
+
businessRef: q.businessRef,
|
|
342
|
+
createdAt: q.createdAt,
|
|
343
|
+
currentNodeName: q.currentNodeName,
|
|
344
|
+
finishedAt: q.finishedAt,
|
|
345
|
+
flowCode: q.flowCode,
|
|
346
|
+
flowName: q.flowName,
|
|
347
|
+
instanceNo: q.instanceNo,
|
|
348
|
+
status: q.status,
|
|
349
|
+
title: q.title
|
|
350
|
+
}),
|
|
351
|
+
/* @__PURE__ */ D(u, {
|
|
352
|
+
record: b.voidRecord,
|
|
353
|
+
renderRequest: (e) => /* @__PURE__ */ D(A, {
|
|
354
|
+
instanceId: e,
|
|
355
|
+
onActionCompleted: Ve
|
|
356
|
+
}),
|
|
357
|
+
request: b.voidRequest
|
|
358
|
+
}),
|
|
359
|
+
P === "requestVoid" && /* @__PURE__ */ D(c, {
|
|
360
|
+
flowCode: q.voidFlowCode ?? null,
|
|
361
|
+
voidTarget: q,
|
|
362
|
+
onClose: () => F(null),
|
|
363
|
+
onStarted: Ve
|
|
302
364
|
}),
|
|
303
|
-
|
|
365
|
+
Re.dialog,
|
|
366
|
+
/* @__PURE__ */ D(ge, { items: [
|
|
304
367
|
{
|
|
305
368
|
key: "form",
|
|
306
369
|
label: "审批表单",
|
|
307
|
-
children:
|
|
370
|
+
children: Je
|
|
308
371
|
},
|
|
309
372
|
{
|
|
310
373
|
key: "timeline",
|
|
311
374
|
label: "流转记录",
|
|
312
|
-
children: /* @__PURE__ */
|
|
375
|
+
children: /* @__PURE__ */ D(ie, { detail: b })
|
|
313
376
|
},
|
|
314
377
|
{
|
|
315
378
|
key: "graph",
|
|
316
379
|
label: "流程图",
|
|
317
|
-
children: /* @__PURE__ */
|
|
380
|
+
children: /* @__PURE__ */ D(ee, { flowGraph: b.flowGraph })
|
|
318
381
|
}
|
|
319
382
|
] }),
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
-
open:
|
|
322
|
-
onClose: () =>
|
|
383
|
+
/* @__PURE__ */ D(ne, {
|
|
384
|
+
open: P === "transfer",
|
|
385
|
+
onClose: () => F(null),
|
|
323
386
|
onConfirm: async (e, t) => {
|
|
324
|
-
|
|
325
|
-
taskId:
|
|
387
|
+
K !== void 0 && (await je.mutateAsync({
|
|
388
|
+
taskId: K.taskId,
|
|
326
389
|
action: "transfer",
|
|
390
|
+
formData: q.businessKind ? await U.collect({ inlineError: !0 }) : void 0,
|
|
327
391
|
transferToId: e,
|
|
328
392
|
opinion: t.trim() || void 0
|
|
329
|
-
}), await
|
|
393
|
+
}), await Z("已转办"));
|
|
330
394
|
}
|
|
331
395
|
}),
|
|
332
|
-
/* @__PURE__ */
|
|
333
|
-
open:
|
|
334
|
-
targets:
|
|
335
|
-
onClose: () =>
|
|
396
|
+
/* @__PURE__ */ D(te, {
|
|
397
|
+
open: P === "rollback",
|
|
398
|
+
targets: K?.rollbackTargets ?? [],
|
|
399
|
+
onClose: () => F(null),
|
|
336
400
|
onConfirm: async (e, t) => {
|
|
337
|
-
|
|
338
|
-
taskId:
|
|
401
|
+
K !== void 0 && (await N.mutateAsync({
|
|
402
|
+
taskId: K.taskId,
|
|
339
403
|
action: "rollback",
|
|
404
|
+
formData: q.businessKind ? await U.collect() : void 0,
|
|
340
405
|
targetNodeId: e,
|
|
341
406
|
opinion: t.trim() || void 0
|
|
342
|
-
}), await
|
|
407
|
+
}), await Z("已回退"));
|
|
343
408
|
}
|
|
344
409
|
}),
|
|
345
|
-
/* @__PURE__ */
|
|
346
|
-
allowedTypes:
|
|
347
|
-
open:
|
|
348
|
-
onClose: () =>
|
|
410
|
+
/* @__PURE__ */ D(f, {
|
|
411
|
+
allowedTypes: K?.addAssigneeTypes ?? [],
|
|
412
|
+
open: P === "addAssignee",
|
|
413
|
+
onClose: () => F(null),
|
|
349
414
|
onConfirm: async (e, t) => {
|
|
350
|
-
|
|
351
|
-
taskId:
|
|
415
|
+
K !== void 0 && (await Pe.mutateAsync({
|
|
416
|
+
taskId: K.taskId,
|
|
352
417
|
userIds: e,
|
|
353
418
|
addType: t
|
|
354
|
-
}), await
|
|
419
|
+
}), await Z("已加签"));
|
|
355
420
|
}
|
|
356
421
|
}),
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
-
open:
|
|
359
|
-
targets:
|
|
360
|
-
onClose: () =>
|
|
422
|
+
/* @__PURE__ */ D(h, {
|
|
423
|
+
open: P === "removeAssignee",
|
|
424
|
+
targets: K?.removableAssignees ?? [],
|
|
425
|
+
onClose: () => F(null),
|
|
361
426
|
onConfirm: async (e) => {
|
|
362
|
-
await
|
|
427
|
+
await Fe.mutateAsync({ taskId: e }), await Z("已减签");
|
|
363
428
|
}
|
|
364
429
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
-
open:
|
|
367
|
-
onClose: () =>
|
|
430
|
+
/* @__PURE__ */ D(p, {
|
|
431
|
+
open: P === "cc",
|
|
432
|
+
onClose: () => F(null),
|
|
368
433
|
onConfirm: async (e) => {
|
|
369
|
-
await
|
|
434
|
+
await Ie.mutateAsync({
|
|
370
435
|
instanceId: n,
|
|
371
436
|
ccUserIds: e
|
|
372
|
-
}), await
|
|
437
|
+
}), await Z("已抄送");
|
|
373
438
|
}
|
|
374
439
|
}),
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
open:
|
|
377
|
-
targets:
|
|
378
|
-
onClose: () =>
|
|
440
|
+
/* @__PURE__ */ D(re, {
|
|
441
|
+
open: P === "urge",
|
|
442
|
+
targets: ze,
|
|
443
|
+
onClose: () => F(null),
|
|
379
444
|
onConfirm: async (e, t) => {
|
|
380
|
-
await
|
|
445
|
+
await Le.mutateAsync({
|
|
381
446
|
taskId: e,
|
|
382
447
|
message: t.trim() || void 0
|
|
383
|
-
}), await
|
|
448
|
+
}), await Z("已催办");
|
|
384
449
|
}
|
|
385
450
|
}),
|
|
386
|
-
/* @__PURE__ */
|
|
451
|
+
/* @__PURE__ */ D(m, {
|
|
387
452
|
okText: "撤回",
|
|
388
|
-
open:
|
|
453
|
+
open: P === "withdraw",
|
|
389
454
|
placeholder: "请输入撤回原因(可选)",
|
|
390
455
|
title: "撤回审批单",
|
|
391
|
-
onClose: () =>
|
|
456
|
+
onClose: () => F(null),
|
|
392
457
|
onConfirm: async (e) => {
|
|
393
|
-
await
|
|
458
|
+
await Ne.mutateAsync({
|
|
394
459
|
instanceId: n,
|
|
395
460
|
reason: e.trim() || void 0
|
|
396
|
-
}), await
|
|
461
|
+
}), await Z("已撤回");
|
|
397
462
|
}
|
|
398
463
|
})
|
|
399
464
|
]
|
|
400
465
|
});
|
|
401
466
|
}
|
|
402
467
|
//#endregion
|
|
403
|
-
export {
|
|
468
|
+
export { A as InstanceDetailPanel, k as InstanceHeader };
|