@ximatai/muyun-web-app 0.26.17 → 0.26.19

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.
Files changed (87) hide show
  1. package/dist/{BusinessActivityLogView-9RrW-RKb.js → BusinessActivityLogView-DudCmeKP.js} +2 -2
  2. package/dist/{BusinessLogListDrawer-DYVx9tiQ.js → BusinessLogListDrawer-CVUvUG48.js} +193 -193
  3. package/dist/CodeConfigurationView-ZjVgaZkD.js +1667 -0
  4. package/dist/{ConfigurationTranslationView-Bh_ekuMP.js → ConfigurationTranslationView-Dl757QMl.js} +38 -38
  5. package/dist/{LoginAuditLogView-DG6iBXEn.js → LoginAuditLogView-Cj3PMvN5.js} +2 -2
  6. package/dist/ModuleActionManagementView-BuhQrVA3.js +755 -0
  7. package/dist/{ModuleGovernanceView-C53RnUzc.js → ModuleGovernanceView-C3RxdgQN.js} +3736 -3880
  8. package/dist/{RequestErrorLogView-Ba5p0hLE.js → RequestErrorLogView-tmjMOeLE.js} +2 -2
  9. package/dist/RoleDetailWorkspaceView-OhpBChaT.js +1435 -0
  10. package/dist/{RuntimeLogView-BFEABm8G.js → RuntimeLogView-BkkgHcF0.js} +69 -69
  11. package/dist/WorkflowAdministrationView-DOhA_5-M.js +650 -0
  12. package/dist/WorkflowConfigurationView-Bnjdrkdx.js +980 -0
  13. package/dist/{WorkflowWorkbenchView-DGpNDt5V.js → WorkflowWorkbenchView-Cf6yiofx.js} +263 -263
  14. package/dist/codeConfiguration-DERwCY-U.js +208 -0
  15. package/dist/index.css +1 -1
  16. package/dist/index.js +472 -471
  17. package/dist/moduleMenuWorkspace-DPmYGkS_.js +626 -0
  18. package/dist/platform-components-wRXbnwMr.js +30434 -0
  19. package/dist/{platform-workbench-C1hmkOUD.js → platform-workbench-Cm_0kmTT.js} +5570 -5592
  20. package/dist/types/app/DevelopmentTopbarActions.vue.d.ts +9 -0
  21. package/dist/types/app/executeBusinessNotificationRecordAction.d.ts +7 -0
  22. package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +5 -1
  23. package/dist/types/consumer/index.d.ts +2 -1
  24. package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +6 -0
  25. package/dist/types/dynamic-page-runtime/composables/useModulePageDetailExtensionRuntime.d.ts +1 -0
  26. package/dist/types/dynamic-page-runtime/modulePageEnhancementState.d.ts +5 -0
  27. package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +6 -2
  28. package/dist/types/platform-admin-runtime/ModuleCodeConfigurationStatus.vue.d.ts +7 -0
  29. package/dist/types/platform-admin-runtime/moduleCodeConfiguration.d.ts +15 -0
  30. package/dist/types/platform-admin-runtime/workflow/ModuleWorkflowDrawer.vue.d.ts +7 -0
  31. package/dist/types/platform-components/BusinessNotificationPanel.vue.d.ts +5 -3
  32. package/dist/types/platform-components/FormulaExpressionEditor.vue.d.ts +5 -0
  33. package/dist/types/platform-components/RecordAdaptiveDetailPanel.vue.d.ts +28 -0
  34. package/dist/types/platform-components/RecordFormFields.vue.d.ts +4 -2
  35. package/dist/types/platform-components/RecordQueryListSurface.vue.d.ts +4 -0
  36. package/dist/types/platform-components/RecordRelationActionButton.vue.d.ts +16 -0
  37. package/dist/types/{dynamic-page-runtime → platform-components}/TenantScopeExplorer.vue.d.ts +1 -1
  38. package/dist/types/platform-components/WorkflowBusinessTaskEditor.vue.d.ts +2 -0
  39. package/dist/types/platform-components/WorkflowDesignProperties.vue.d.ts +2 -6
  40. package/dist/types/platform-components/WorkflowDiagram.vue.d.ts +32 -1
  41. package/dist/types/platform-components/formulaExpressionTokens.d.ts +2 -0
  42. package/dist/types/platform-components/formulaExpressionTools.d.ts +6 -0
  43. package/dist/types/platform-components/index.d.ts +5 -0
  44. package/dist/types/platform-components/managementWorkspaceLayout.d.ts +10 -0
  45. package/dist/types/platform-components/recordFormFieldModel.d.ts +4 -0
  46. package/dist/types/platform-components/useBusinessCodeForm.d.ts +36 -0
  47. package/dist/types/platform-components/useWorkflowDesignHistory.d.ts +14 -0
  48. package/dist/types/platform-components/useWorkspaceDetailSurface.d.ts +3 -0
  49. package/dist/types/platform-components/workflowDesignClipboard.d.ts +7 -0
  50. package/dist/types/platform-components/workflowPresentation.d.ts +4 -0
  51. package/dist/types/platform-workbench/Workbench.vue.d.ts +6 -2
  52. package/dist/types/platform-workbench/WorkbenchGlobalTools.vue.d.ts +13 -1
  53. package/dist/types/views/CodeConfigurationView.vue.d.ts +8 -0
  54. package/dist/types/views/CodeRuleFormatEditor.vue.d.ts +17 -0
  55. package/dist/types/views/WorkflowConfigurationView.vue.d.ts +1 -0
  56. package/dist/types/views/WorkflowDefinitionSettings.vue.d.ts +35 -0
  57. package/dist/types/views/WorkflowSelectionFields.vue.d.ts +2 -4
  58. package/dist/types/views/codeConfiguration.d.ts +127 -0
  59. package/dist/types/views/codeConfigurationWorkspaceView.d.ts +5 -0
  60. package/dist/types/views/moduleGovernanceWorkspaceView.d.ts +1 -1
  61. package/dist/types/views/useWorkflowConfigurationContext.d.ts +49 -0
  62. package/dist/types/views/workflowConfigurationWorkspaceView.d.ts +2 -0
  63. package/dist/types/vue-ui-antdv/components/UiDatePicker.vue.d.ts +33 -0
  64. package/dist/types/vue-ui-antdv/components/UiHelp.vue.d.ts +16 -0
  65. package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +1 -1
  66. package/dist/types/vue-ui-antdv/components/UiPopover.vue.d.ts +12 -4
  67. package/dist/types/vue-ui-antdv/components/UiRadioGroup.vue.d.ts +4 -0
  68. package/dist/types/vue-ui-antdv/components/UiSidePanel.vue.d.ts +5 -0
  69. package/dist/types/vue-ui-antdv/datePickerCalendar.d.ts +472 -0
  70. package/dist/types/vue-ui-antdv/datePickerValue.d.ts +6 -0
  71. package/dist/types/vue-ui-antdv/index.d.ts +4 -0
  72. package/dist/types/vue-ui-antdv/languageLocales.d.ts +2 -0
  73. package/dist/types/vue-ui-antdv/overlayLayers.d.ts +5 -0
  74. package/dist/types/vue-ui-antdv/types.d.ts +2 -0
  75. package/dist/types/web-contracts/index.d.ts +18 -0
  76. package/dist/types/web-contracts/workflow.d.ts +16 -8
  77. package/dist/types/web-core/businessNotifications.d.ts +3 -1
  78. package/dist/types/web-core/workflow.d.ts +13 -1
  79. package/dist/useWorkflowConfigurationContext-BE_UjKgk.js +66 -0
  80. package/dist/{workspaceViews-BpH71LKQ.js → workspaceViews-D37OpJ7g.js} +1608 -884
  81. package/package.json +4 -1
  82. package/dist/ModuleActionManagementView-DgHqhoMN.js +0 -755
  83. package/dist/RoleDetailWorkspaceView-C3TBqksY.js +0 -1435
  84. package/dist/WorkflowAdministrationView-BOHG2e-I.js +0 -650
  85. package/dist/WorkflowConfigurationView-A0m5tBX9.js +0 -1097
  86. package/dist/moduleGovernanceWorkspaceView-DNKzYX0x.js +0 -667
  87. package/dist/platform-components-BBfyINHa.js +0 -29912
@@ -1,1097 +0,0 @@
1
- import { E as e, y as t } from "./platform-workbench-C1hmkOUD.js";
2
- import { Ar as n, C as r, Dr as i, En as a, Gn as o, Jn as s, Mt as c, Nr as ee, Ot as te, Q as ne, Un as re, Wn as ie, Xn as l, Yt as ae, _n as u, _r as oe, a as se, aa as ce, an as d, bn as le, c as ue, ca as de, d as fe, fn as pe, i as me, ja as he, jt as ge, ln as _e, mr as ve, n as ye, o as be, qn as xe, r as Se, vn as Ce, xn as we, zt as Te } from "./platform-components-BBfyINHa.js";
3
- import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as Ee, createTextVNode as v, createVNode as y, defineComponent as b, mergeModels as x, normalizeClass as De, onMounted as Oe, openBlock as S, ref as C, renderList as ke, toDisplayString as w, unref as T, useModel as E, watch as Ae, withCtx as D, withModifiers as je } from "vue";
4
- //#region src/views/WorkflowSelectionFields.vue?vue&type=script&setup=true&lang.ts
5
- var Me = { class: "workflow-selection-fields" }, Ne = { class: "workflow-field settings-wide" }, Pe = { class: "settings-help" }, Fe = { class: "workflow-field settings-wide" }, O = { class: "workflow-field" }, k = { class: "settings-help" }, Ie = { class: "settings-wide workflow-field" }, Le = { class: "settings-help" }, Re = /*#__PURE__*/ l(/* @__PURE__ */ b({
6
- name: "WorkflowSelectionFields",
7
- __name: "WorkflowSelectionFields",
8
- props: /*@__PURE__*/ x({
9
- organizationContext: {},
10
- fields: {},
11
- disabled: { type: Boolean },
12
- invalidPriority: { type: Boolean }
13
- }, {
14
- organizationId: { required: !0 },
15
- organizationIdModifiers: {},
16
- matchExpression: { required: !0 },
17
- matchExpressionModifiers: {},
18
- matchPriority: { required: !0 },
19
- matchPriorityModifiers: {},
20
- fallback: {
21
- type: Boolean,
22
- required: !0
23
- },
24
- fallbackModifiers: {}
25
- }),
26
- emits: [
27
- "update:organizationId",
28
- "update:matchExpression",
29
- "update:matchPriority",
30
- "update:fallback"
31
- ],
32
- setup(e) {
33
- let t = he(), n = e, r = E(e, "organizationId"), i = E(e, "matchExpression"), a = E(e, "matchPriority"), s = E(e, "fallback");
34
- return (e, c) => (S(), g("div", Me, [
35
- _("label", Ne, [
36
- v(w(T(t).t("platform.screen.WorkflowConfigurationView.applicable-organization", "适用组织")), 1),
37
- n.organizationContext ? (S(), m(T(ne), {
38
- key: 0,
39
- placeholder: T(t).t("platform.workflow-config.organization-placeholder", "全部组织(可选指定组织)"),
40
- value: r.value || void 0,
41
- context: n.organizationContext,
42
- disabled: n.disabled,
43
- mode: "tree",
44
- "onUpdate:value": c[0] ||= (e) => r.value = e ?? ""
45
- }, null, 8, [
46
- "placeholder",
47
- "value",
48
- "context",
49
- "disabled"
50
- ])) : (S(), m(T(re), {
51
- key: 1,
52
- value: r.value || T(t).t("platform.workflow-config.all-organizations", "模块内全部组织"),
53
- disabled: ""
54
- }, null, 8, ["value"])),
55
- _("small", Pe, w(n.organizationContext ? T(t).t("platform.workflow-config.organization-help", "留空适用于全部组织;指定组织后包含其下级组织。") : T(t).t("platform.workflow-config.global-scope-help", "当前为全局流程模板,适用于全部组织;组织选择需使用租户身份。")), 1)
56
- ]),
57
- _("label", Fe, [v(w(T(t).t("platform.screen.WorkflowConfigurationView.matching-condition", "匹配条件")), 1), y(T(pe), {
58
- disabled: n.disabled || s.value,
59
- value: i.value,
60
- "onUpdate:value": c[1] ||= (e) => i.value = e,
61
- fields: n.fields,
62
- placeholder: T(t).t("platform.screen.WorkflowConfigurationView.leave-empty-to-match-all-records", "留空匹配所有记录")
63
- }, null, 8, [
64
- "disabled",
65
- "value",
66
- "fields",
67
- "placeholder"
68
- ])]),
69
- _("label", O, [
70
- v(w(T(t).t("platform.screen.WorkflowConfigurationView.priority", "优先级")), 1),
71
- y(T(re), {
72
- disabled: n.disabled,
73
- value: a.value,
74
- "onUpdate:value": c[2] ||= (e) => a.value = e,
75
- type: "number",
76
- step: "1",
77
- invalid: n.invalidPriority,
78
- "aria-label": T(t).t("platform.screen.WorkflowConfigurationView.priority", "优先级")
79
- }, null, 8, [
80
- "disabled",
81
- "value",
82
- "invalid",
83
- "aria-label"
84
- ]),
85
- _("small", k, w(n.invalidPriority ? T(t).t("platform.workflow-config.invalid-priority", "请输入 -2147483648 至 2147483647 范围内的整数。") : T(t).t("platform.workflow-config.priority-help", "填写整数,同一组织范围内数值越大越优先。")), 1)
86
- ]),
87
- _("div", Ie, [y(T(o), {
88
- disabled: n.disabled,
89
- checked: s.value,
90
- "onUpdate:checked": c[3] ||= (e) => s.value = e
91
- }, {
92
- default: D(() => [v(w(T(t).t("platform.screen.WorkflowConfigurationView.use-as-the-fallback-workflow-for-this", "作为当前组织范围的兜底流程")), 1)]),
93
- _: 1
94
- }, 8, ["disabled", "checked"]), _("small", Le, w(T(t).t("platform.workflow-config.fallback-help", "同一组织范围内无普通流程命中时使用;兜底流程不判断匹配条件。")), 1)])
95
- ]));
96
- }
97
- }), [["__scopeId", "data-v-911451b9"]]);
98
- //#endregion
99
- //#region src/platform-components/workflowDesignEditing.ts
100
- function A(e, t) {
101
- return {
102
- nodeKey: e,
103
- nodeType: "approval",
104
- title: t,
105
- approvalMode: "all",
106
- participantPolicyText: "{\"rules\":[]}",
107
- allowReject: !0
108
- };
109
- }
110
- function ze(e, t, n) {
111
- let r = e.links.find((e) => e.routeKey === t);
112
- if (!r) throw Error("请选择需要插入分支的路径");
113
- let i = `${n}_join`, a = [
114
- {
115
- nodeKey: n,
116
- nodeType: "branch",
117
- title: "条件分支",
118
- routeMode: "auto",
119
- convergeNodeKey: i
120
- },
121
- A(`${n}_path1`, "分支审批1"),
122
- A(`${n}_path2`, "分支审批2"),
123
- {
124
- nodeKey: i,
125
- nodeType: "converge",
126
- title: "分支汇聚",
127
- convergeMode: "all"
128
- }
129
- ];
130
- if (a.some((t) => e.nodes.some((e) => e.nodeKey === t.nodeKey))) throw Error("节点标识已存在");
131
- let o = [...[1, 2].flatMap((e) => [{
132
- routeKey: `${n}_exit${e}`,
133
- sourceNodeKey: n,
134
- targetNodeKey: `${n}_path${e}`,
135
- title: `路径${e}`
136
- }, {
137
- routeKey: `${n}_return${e}`,
138
- sourceNodeKey: `${n}_path${e}`,
139
- targetNodeKey: i,
140
- title: "汇聚"
141
- }]), {
142
- routeKey: `${n}_next`,
143
- sourceNodeKey: i,
144
- targetNodeKey: r.targetNodeKey,
145
- title: "继续"
146
- }];
147
- return {
148
- ...e,
149
- nodes: [...e.nodes, ...a],
150
- links: [...e.links.map((e) => e === r ? {
151
- ...e,
152
- targetNodeKey: n
153
- } : e), ...o]
154
- };
155
- }
156
- function Be(e, t, n) {
157
- let r = e.nodes.find((e) => e.nodeKey === t && e.nodeType === "branch"), i = e.nodes.find((e) => e.nodeKey === r?.convergeNodeKey && e.nodeType === "converge");
158
- if (!r || !i) throw Error("分支必须绑定有效汇聚节点");
159
- if (e.nodes.some((e) => e.nodeKey === n)) throw Error("节点标识已存在");
160
- let a = e.links.filter((e) => e.sourceNodeKey === t).length + 1;
161
- return {
162
- ...e,
163
- nodes: [...e.nodes, A(n, `分支审批${a}`)],
164
- links: [
165
- ...e.links,
166
- {
167
- routeKey: `${n}_in`,
168
- sourceNodeKey: t,
169
- targetNodeKey: n,
170
- title: `路径${a}`
171
- },
172
- {
173
- routeKey: `${n}_out`,
174
- sourceNodeKey: n,
175
- targetNodeKey: i.nodeKey,
176
- title: "汇聚"
177
- }
178
- ]
179
- };
180
- }
181
- function Ve(e, t) {
182
- let n = e.nodes.find((e) => e.nodeKey === t && e.nodeType === "branch"), r = e.nodes.find((e) => e.nodeKey === n?.convergeNodeKey && e.nodeType === "converge");
183
- if (!n || !r) throw Error("分支必须绑定有效汇聚节点");
184
- let i = /* @__PURE__ */ new Set([t]);
185
- function a(t, n = /* @__PURE__ */ new Set()) {
186
- if (t === r.nodeKey) return;
187
- if (n.has(t)) throw Error("分支内存在循环,请先修正路径");
188
- let o = e.links.filter((e) => e.sourceNodeKey === t);
189
- if (!o.length) throw Error("分支路径未到达配对汇聚节点");
190
- i.add(t), o.forEach((e) => a(e.targetNodeKey, /* @__PURE__ */ new Set([...n, t])));
191
- }
192
- a(t), i.add(r.nodeKey);
193
- let o = e.links.filter((e) => !i.has(e.sourceNodeKey) && i.has(e.targetNodeKey)), s = e.links.filter((e) => i.has(e.sourceNodeKey) && !i.has(e.targetNodeKey));
194
- if (o.length !== 1 || o[0]?.targetNodeKey !== t || s.length !== 1 || s[0]?.sourceNodeKey !== r.nodeKey) throw Error("分支包含外部交叉路径,不能整体删除");
195
- return {
196
- ...e,
197
- nodes: e.nodes.filter((e) => !i.has(e.nodeKey)),
198
- links: e.links.filter((e) => !i.has(e.sourceNodeKey) && (!i.has(e.targetNodeKey) || e === o[0])).map((e) => e === o[0] ? {
199
- ...e,
200
- targetNodeKey: s[0].targetNodeKey
201
- } : e)
202
- };
203
- }
204
- function He(e, t, n) {
205
- let r = e.links.find((e) => e.routeKey === t);
206
- if (!r) throw Error("路径不存在");
207
- return {
208
- ...e,
209
- links: e.links.map((e) => e === r ? {
210
- ...e,
211
- ...n,
212
- ...n.defaultRoute === !0 ? { conditionExpression: void 0 } : {}
213
- } : n.defaultRoute === !0 && e.sourceNodeKey === r.sourceNodeKey ? {
214
- ...e,
215
- defaultRoute: !1
216
- } : e)
217
- };
218
- }
219
- function Ue(e, t, n) {
220
- let r = e.links.find((e) => e.routeKey === t);
221
- if (!r) throw Error("请选择需要插入节点的路径");
222
- if (e.nodes.some((e) => e.nodeKey === n.nodeKey)) throw Error("节点标识已存在");
223
- return {
224
- ...e,
225
- nodes: [...e.nodes, n],
226
- links: [...e.links.map((e) => e === r ? {
227
- ...e,
228
- targetNodeKey: n.nodeKey
229
- } : e), {
230
- routeKey: `${n.nodeKey}_next`,
231
- sourceNodeKey: n.nodeKey,
232
- targetNodeKey: r.targetNodeKey,
233
- title: "继续"
234
- }]
235
- };
236
- }
237
- function We(e, t) {
238
- let n = e.nodes.find((e) => e.nodeKey === t);
239
- if (!n || ["start", "end"].includes(n.nodeType)) throw Error("开始和结束节点必须保留");
240
- let r = e.links.filter((e) => e.targetNodeKey === t), i = e.links.filter((e) => e.sourceNodeKey === t);
241
- if (r.length !== 1 || i.length !== 1 || i[0]?.conditionExpression) throw Error("该节点包含分支或复杂路径,请先调整连线,确保删除后路径含义明确");
242
- return {
243
- ...e,
244
- nodes: e.nodes.filter((e) => e.nodeKey !== t),
245
- links: e.links.filter((e) => e.sourceNodeKey !== t).map((e) => e.targetNodeKey === t ? {
246
- ...e,
247
- targetNodeKey: i[0].targetNodeKey
248
- } : e)
249
- };
250
- }
251
- function Ge(e) {
252
- let t = [
253
- {
254
- nodeKey: "start",
255
- nodeType: "start",
256
- title: "提交"
257
- },
258
- {
259
- ...A("approval", "审批"),
260
- requireRejectReason: !0,
261
- allowRejectReturnToMe: !0,
262
- allowRollback: !0,
263
- requireRollbackReason: !0,
264
- allowAddSign: !0
265
- },
266
- ...e ? [{
267
- nodeKey: "approved",
268
- nodeType: "milestone",
269
- title: "审批完成",
270
- milestoneType: "approval_completed"
271
- }] : [],
272
- {
273
- nodeKey: "end",
274
- nodeType: "end",
275
- title: "完成"
276
- }
277
- ];
278
- return {
279
- nodes: t,
280
- links: t.slice(1).map((e, n) => ({
281
- routeKey: `route_${n + 1}`,
282
- sourceNodeKey: t[n].nodeKey,
283
- targetNodeKey: e.nodeKey,
284
- title: "继续"
285
- }))
286
- };
287
- }
288
- //#endregion
289
- //#region src/views/WorkflowConfigurationView.vue?vue&type=script&setup=true&lang.ts
290
- var Ke = { class: "workflow-configuration" }, qe = { class: "settings-help" }, Je = { class: "workflow-field" }, Ye = { class: "workflow-field" }, Xe = { class: "settings-help" }, Ze = { class: "settings-wide workflow-field" }, Qe = { class: "settings-help" }, $e = { class: "settings-wide" }, et = { class: "workflow-field" }, tt = { class: "settings-help" }, nt = { key: 1 }, rt = { key: 2 }, it = { class: "toolbar" }, at = { class: "publish-nodes" }, ot = { key: 0 }, st = { key: 0 }, ct = { key: 1 }, lt = { key: 0 }, j = /*#__PURE__*/ l(/* @__PURE__ */ b({
291
- name: "WorkflowConfigurationView",
292
- __name: "WorkflowConfigurationView",
293
- props: {
294
- moduleAlias: {},
295
- moduleTitle: {}
296
- },
297
- setup(ne) {
298
- let l = he();
299
- function pe(e) {
300
- return fe(e, l);
301
- }
302
- let b = ne, x = n({ moduleAlias: "platform.workflow.definition" }), E = oe(x.http, b.moduleAlias), Me = i({
303
- http: x.http,
304
- language: l,
305
- moduleAlias: b.moduleAlias,
306
- runtimeAccess: "VIEW"
307
- }), Ne = t(), Pe = p(() => Ne?.value?.tenantId ? i({
308
- http: x.http,
309
- language: l,
310
- moduleAlias: "iam.organization",
311
- runtimeAccess: "REFERENCE"
312
- }) : void 0);
313
- e({
314
- moduleAlias: b.moduleAlias,
315
- predicate: (e) => e.type === "configuration-translations-changed",
316
- handler: async () => {
317
- try {
318
- await Me.runtime.refreshTexts?.();
319
- } catch (e) {
320
- d(e, {
321
- source: "workflow-design",
322
- phase: "load"
323
- });
324
- }
325
- }
326
- });
327
- let Fe = p(() => ee(Me.runtime)), O = p(() => [...te(Fe.value?.uiDescriptor)].map(([e, t]) => ({
328
- name: e,
329
- label: t.label ?? e,
330
- valueType: t.valueType,
331
- referenceModule: t.reference?.targetModuleAlias
332
- }))), k = C({
333
- tasks: [],
334
- queries: [],
335
- generations: [],
336
- associations: []
337
- }), Ie = p(() => (Fe.value?.actions ?? []).map((e) => ({
338
- value: e.actionCode,
339
- label: e.title ?? pe(e.actionCode)
340
- })));
341
- async function Le(e) {
342
- k.value = await E.catalog(e);
343
- }
344
- let j = C(!1), ut = C(!1), M = C(!1);
345
- async function dt() {
346
- try {
347
- await Me.runtime.ready;
348
- } catch (e) {
349
- d(e, {
350
- source: "workflow-design",
351
- phase: "load"
352
- });
353
- }
354
- }
355
- let ft = p(() => [
356
- {
357
- key: "save",
358
- title: l.t("platform.screen.WorkflowConfigurationView.save-draft", "保存草稿"),
359
- level: "primary",
360
- disabled: !Q.value || !H.value
361
- },
362
- {
363
- key: "validate",
364
- title: l.t("platform.screen.WorkflowConfigurationView.validate-workflow", "校验流程"),
365
- disabled: !Q.value
366
- },
367
- {
368
- key: "publish",
369
- title: L.value?.publishStatus === "published" ? l.t("platform.screen.WorkflowConfigurationView.enable-published", "启用已发布版本") : l.t("platform.screen.WorkflowConfigurationView.publish-workflow", "发布流程"),
370
- disabled: !L.value || V.value || M.value
371
- },
372
- {
373
- key: "upgrade",
374
- title: l.t("platform.screen.WorkflowConfigurationView.create-version", "创建新版本"),
375
- level: "secondary",
376
- disabled: V.value || H.value || M.value
377
- },
378
- {
379
- key: "selection",
380
- title: l.t("platform.screen.WorkflowConfigurationView.matching-rules", "匹配规则"),
381
- level: "secondary",
382
- disabled: V.value || H.value
383
- },
384
- {
385
- key: "disable",
386
- title: l.t("platform.screen.WorkflowConfigurationView.disable", "停用"),
387
- level: "secondary",
388
- danger: !0,
389
- disabled: V.value || H.value || M.value
390
- },
391
- {
392
- key: "archive",
393
- title: l.t("platform.screen.WorkflowConfigurationView.archive", "归档"),
394
- level: "secondary",
395
- danger: !0,
396
- disabled: V.value || H.value || M.value
397
- }
398
- ]);
399
- function pt(e) {
400
- e === "save" ? Nt() : e === "validate" ? Pt() : e === "publish" ? ut.value = !0 : e === "upgrade" ? It() : e === "selection" ? jt() : Lt(e);
401
- }
402
- function mt(e) {
403
- try {
404
- return be(e).map((e) => ({
405
- INITIATOR_SELF: l.t("platform.workflow-participant.initiator", "提交人本人"),
406
- USER: l.t("platform.workflow-participant.named-accounts", "指定账号"),
407
- ROLE: l.t("platform.workflow-participant.role-members", "角色成员"),
408
- DEPT: l.t("platform.workflow-participant.department-members", "部门成员"),
409
- ORG: l.t("platform.workflow-participant.organization-members", "组织成员"),
410
- FIELD: l.t("platform.workflow-participant.participant-field", "业务人员字段"),
411
- RELATIVE: l.t("platform.workflow-participant.relative-participants", "相对人员")
412
- }[e.type] ?? e.type) + (e.ids?.length ? l.t("platform.workflow-config.target-count", "({count} 个目标)", { count: e.ids.length }) : e.fieldName ? `(${O.value.find((t) => t.name === e.fieldName)?.label ?? e.fieldName})` : "")).join("、") || l.t("platform.workflow-config.empty-participants", "尚未配置参与人");
413
- } catch {
414
- return l.t("platform.workflow-config.invalid-participants", "人员配置格式无效");
415
- }
416
- }
417
- let ht = C(""), gt = C(!1), N = C(), P = C([]), F = C([]), I = C(), L = C(), R = C({
418
- nodes: [],
419
- links: []
420
- }), z = C(""), B = C(""), V = C(!1), H = C(!1), U = C(!1), W = C(!1), G = C(""), K = C(""), q = C(""), J = C(""), Y = C("0"), X = C(!1), Z = C(!0), _t = p(() => ["published", "archived"].includes(L.value?.publishStatus ?? "")), Q = p(() => L.value?.publishStatus === "draft" && !V.value), vt = p(() => R.value.nodes.find((e) => e.nodeKey === z.value)), yt = p(() => R.value.links.find((e) => e.routeKey === B.value));
421
- function bt(e) {
422
- let t = R.value.nodes.find((t) => t.nodeKey === e.convergeNodeKey), n = {
423
- all: l.t("platform.workflow-config.all-arrive", "全部到达"),
424
- any: l.t("platform.workflow-config.any-arrive", "任一到达"),
425
- ratio: l.t("platform.workflow-config.ratio-arrive", "比例到达")
426
- }, r = t?.convergeMode ?? "all";
427
- return `${n[r]}${r === "ratio" ? ` ${t?.convergeRatio ?? 100}%` : ""}`;
428
- }
429
- ve(() => l.t("platform.workflow-config.configuration", "流程配置"), () => H.value || M.value, () => V.value), Ae([
430
- K,
431
- G,
432
- Z,
433
- q,
434
- J,
435
- Y,
436
- X
437
- ], () => {
438
- (W.value || U.value) && (M.value = !0);
439
- }, { flush: "sync" }), Oe(() => {
440
- xt(), dt();
441
- });
442
- async function $(e) {
443
- if (!V.value) {
444
- V.value = !0;
445
- try {
446
- await e();
447
- } catch (e) {
448
- d(e, {
449
- source: "workflow-design",
450
- phase: "action"
451
- });
452
- } finally {
453
- V.value = !1;
454
- }
455
- }
456
- }
457
- async function xt() {
458
- if (!(V.value || H.value || M.value)) {
459
- V.value = !0, gt.value = !0, N.value = void 0;
460
- try {
461
- P.value = await E.query();
462
- } catch (e) {
463
- N.value = () => de(ce(e), l);
464
- } finally {
465
- gt.value = !1, V.value = !1;
466
- }
467
- }
468
- }
469
- async function St(e) {
470
- if (H.value || M.value) {
471
- d(Error(l.t("platform.workflow-config.save-first", "请先保存流程设计")), {
472
- source: "workflow-design",
473
- phase: "validation"
474
- });
475
- return;
476
- }
477
- M.value = !1, await $(async () => {
478
- let t = await E.catalog(e.id), n = (await E.versions(e.id)).sort((e, t) => t.versionNo - e.versionNo), r = n[0], i = r ? await E.design(e.id, r.id) : {
479
- nodes: [],
480
- links: []
481
- };
482
- W.value = !1, U.value = !1, I.value = e, k.value = t, F.value = n, L.value = r, R.value = i, K.value = e.title ?? e.alias, q.value = e.organizationId ?? "", J.value = e.matchExpression ?? "", Y.value = String(e.matchPriority ?? 0), X.value = e.defaultDefinition === !0, z.value = i.nodes[0]?.nodeKey ?? "", B.value = "", j.value = !1;
483
- });
484
- }
485
- async function Ct(e) {
486
- let t = await E.design(I.value.id, e.id);
487
- L.value = e, R.value = t, H.value = !1, z.value = R.value.nodes[0]?.nodeKey ?? "", B.value = "", j.value = !1;
488
- }
489
- async function wt(e) {
490
- if (H.value || M.value) return;
491
- let t = F.value.find((t) => t.id === e);
492
- t && await $(() => Ct(t));
493
- }
494
- function Tt() {
495
- V.value || H.value || M.value || (K.value = "", G.value = "", q.value = "", J.value = "", Y.value = "0", X.value = !1, Z.value = !0, U.value = !0, M.value = !1);
496
- }
497
- let Et = p(() => /^-?\d+$/.test(Y.value.trim()) && Number(Y.value) >= -2147483648 && Number(Y.value) <= 2147483647), Dt = p(() => /^[a-z][a-z0-9_]{0,62}$/.test(G.value.trim())), Ot = p(() => !!K.value.trim() && Et.value);
498
- async function kt() {
499
- Dt.value && Ot.value && await $(async () => {
500
- let e = await E.create({
501
- alias: G.value.trim(),
502
- title: K.value.trim(),
503
- approvalEnabled: Z.value,
504
- organizationId: q.value || null,
505
- matchExpression: J.value || null,
506
- matchPriority: Number(Y.value),
507
- defaultDefinition: X.value,
508
- enabled: !0
509
- });
510
- U.value = !1, M.value = !1, I.value = e, P.value.push(e), F.value = [], L.value = void 0, R.value = {
511
- nodes: [],
512
- links: []
513
- }, k.value = {
514
- tasks: [],
515
- queries: [],
516
- generations: [],
517
- associations: []
518
- }, z.value = "", B.value = "", j.value = !1, ht.value = "", await Le(e.id);
519
- let t = await E.upgrade(e.id);
520
- F.value = [t], L.value = t, R.value = Ge(Z.value), H.value = !0, Rt("approval");
521
- });
522
- }
523
- async function At() {
524
- (!M.value || await Ce({
525
- title: l.t("platform.workflow-config.discard-confirm", "放弃未保存的流程设置?"),
526
- danger: !0,
527
- okText: l.t("platform.workflow-config.discard", "放弃修改")
528
- }, l)) && (U.value = !1, W.value = !1, M.value = !1, I.value && (K.value = I.value.title ?? I.value.alias, q.value = I.value.organizationId ?? "", J.value = I.value.matchExpression ?? "", Y.value = String(I.value.matchPriority ?? 0), X.value = I.value.defaultDefinition === !0));
529
- }
530
- async function jt() {
531
- if (W.value) {
532
- await At();
533
- return;
534
- }
535
- W.value = !0;
536
- }
537
- async function Mt() {
538
- !V.value && I.value && Ot.value && await $(async () => {
539
- let e = await E.saveSelection(I.value.id, {
540
- version: I.value.version,
541
- title: K.value,
542
- organizationId: q.value || null,
543
- matchExpression: J.value || null,
544
- matchPriority: Number(Y.value),
545
- defaultDefinition: X.value
546
- });
547
- P.value = P.value.map((t) => t.id === e.id ? e : t), I.value = e, W.value = !1, M.value = !1, u(l.t("platform.workflow-config.matching-saved", "流程匹配规则已保存,后续提交生效"));
548
- });
549
- }
550
- async function Nt() {
551
- L.value && I.value && await $(async () => {
552
- L.value = await E.saveDesign(I.value.id, L.value.id, L.value.version, R.value), F.value = F.value.map((e) => e.id === L.value.id ? L.value : e), H.value = !1, u(l.t("platform.workflow-config.draft-saved", "流程草稿已保存"));
553
- });
554
- }
555
- async function Pt() {
556
- H.value && await Nt(), !H.value && L.value && await $(async () => {
557
- await E.validate(I.value.id, L.value.id), u(l.t("platform.workflow-config.validated", "流程发布校验通过"));
558
- });
559
- }
560
- async function Ft() {
561
- if (R.value.nodes.some((e) => ["approval", "task"].includes(e.nodeType) && !se(e.participantPolicyText))) {
562
- d(Error(l.t("platform.workflow-config.participants-required", "请为每个审批或业务任务节点明确配置参与人")), {
563
- source: "workflow-design",
564
- phase: "validation"
565
- });
566
- return;
567
- }
568
- H.value && await Nt(), !H.value && I.value && L.value && (await $(async () => {
569
- L.value = await E.publish(I.value.id, L.value.id, I.value.version, L.value.version), F.value = F.value.map((e) => e.id === L.value.id ? L.value : e), I.value = await E.view(I.value.id), H.value = !1, ut.value = !1, u(l.t("platform.workflow-config.published", "流程已发布,后续新申请使用该版本"));
570
- }), await xt());
571
- }
572
- async function It() {
573
- I.value && await $(async () => {
574
- let e = await E.upgrade(I.value.id);
575
- F.value = [e, ...F.value.filter((t) => t.id !== e.id)], await Ct(e), R.value.nodes.length || (R.value = Ge(I.value.approvalEnabled), H.value = !0, Rt("approval"));
576
- });
577
- }
578
- async function Lt(e) {
579
- I.value && await Ce({
580
- title: e === "archive" ? l.t("platform.workflow-config.archive-confirm", "归档此流程?") : l.t("platform.workflow-config.disable-confirm", "停用此流程?"),
581
- content: l.t("platform.workflow-config.future-only", "此操作影响后续新申请,已有实例继续使用冻结版本。"),
582
- danger: !0
583
- }, l) && (await $(async () => {
584
- I.value = await E.changeStatus(I.value.id, e, I.value.version), u(l.t("platform.workflow-config.status-updated", "流程状态已更新"));
585
- }), await xt());
586
- }
587
- function Rt(e) {
588
- z.value = e, B.value = "", j.value = !!e;
589
- }
590
- function zt(e) {
591
- B.value = e, z.value = "", j.value = !!e;
592
- }
593
- function Bt(e) {
594
- Q.value && R.value.layoutJson !== e && (R.value = {
595
- ...R.value,
596
- layoutJson: e
597
- }, H.value = !0);
598
- }
599
- function Vt(e) {
600
- vt.value && Q.value && (Object.assign(vt.value, e), H.value = !0);
601
- }
602
- function Ht(e) {
603
- yt.value && Q.value && (R.value = He(R.value, yt.value.routeKey, e), H.value = !0);
604
- }
605
- function Ut() {
606
- let e = R.value.links.filter((e) => e.sourceNodeKey === z.value);
607
- return B.value || (e.length === 1 ? e[0]?.routeKey : void 0) || "";
608
- }
609
- function Wt() {
610
- if (!Q.value) return;
611
- let e = `branch_${Date.now().toString(36)}`;
612
- try {
613
- R.value = ze(R.value, Ut(), e), H.value = !0, Rt(e);
614
- } catch (e) {
615
- d(e, {
616
- source: "workflow-design",
617
- phase: "validation"
618
- });
619
- }
620
- }
621
- function Gt() {
622
- if (Q.value) try {
623
- R.value = Be(R.value, z.value, `path_${Date.now().toString(36)}`), H.value = !0;
624
- } catch (e) {
625
- d(e, {
626
- source: "workflow-design",
627
- phase: "validation"
628
- });
629
- }
630
- }
631
- async function Kt() {
632
- if (Q.value) try {
633
- let e = Ve(R.value, z.value);
634
- if (!await Ce({
635
- title: l.t("platform.workflow-config.delete-branch-confirm", "删除整个分支?"),
636
- content: l.t("platform.workflow-config.delete-branch-detail", "将删除分支、配对汇聚及其中 {count} 个节点,并连接前后路径。", { count: R.value.nodes.length - e.nodes.length - 2 }),
637
- danger: !0,
638
- okText: l.t("platform.workflow-config.delete-branch", "删除分支")
639
- }, l)) return;
640
- R.value = e, H.value = !0, z.value = "", j.value = !1;
641
- } catch (e) {
642
- d(e, {
643
- source: "workflow-design",
644
- phase: "validation"
645
- });
646
- }
647
- }
648
- function qt() {
649
- if (!Q.value) return;
650
- let e = R.value.links.filter((e) => e.sourceNodeKey === z.value), t = B.value || (e.length === 1 ? e[0]?.routeKey : void 0), n = `node_${Date.now().toString(36)}`;
651
- try {
652
- R.value = Ue(R.value, t ?? "", A(n, "新审批节点")), H.value = !0, Rt(n);
653
- } catch (e) {
654
- d(e, {
655
- source: "workflow-design",
656
- phase: "validation"
657
- });
658
- }
659
- }
660
- function Jt() {
661
- if (Q.value) try {
662
- R.value = We(R.value, z.value), H.value = !0, z.value = "", j.value = !1;
663
- } catch (e) {
664
- d(e, {
665
- source: "workflow-design",
666
- phase: "validation"
667
- });
668
- }
669
- }
670
- function Yt() {
671
- Q.value && (R.value.links = R.value.links.filter((e) => e.routeKey !== B.value), B.value = "", H.value = !0);
672
- }
673
- function Xt() {
674
- if (!Q.value) return;
675
- let e = R.value.nodes[0], t = R.value.nodes.find((e) => e.nodeType === "end");
676
- if (!e || !t) return;
677
- let n = `route_${Date.now().toString(36)}`;
678
- R.value.links.push({
679
- routeKey: n,
680
- sourceNodeKey: vt.value?.nodeKey ?? e.nodeKey,
681
- targetNodeKey: t.nodeKey,
682
- title: "新路径"
683
- }), B.value = n, z.value = "", j.value = !0, H.value = !0;
684
- }
685
- return (e, t) => (S(), g("section", Ke, [y(T(r), {
686
- "explorer-title": T(l).t("platform.screen.WorkflowConfigurationView.approval-workflow", "审批流程"),
687
- "refresh-title": T(l).t("platform.workflow-config.refresh-definitions", "刷新审批流程"),
688
- mode: U.value ? "create" : W.value || H.value || M.value ? "edit" : "view",
689
- busy: V.value,
690
- "detail-title": U.value ? T(l).t("platform.screen.WorkflowConfigurationView.new-workflow", "新建流程") : I.value?.title ?? T(l).t("platform.workflow-config.configuration", "流程配置"),
691
- "explorer-search-keyword": ht.value,
692
- "onUpdate:explorerSearchKeyword": t[18] ||= (e) => ht.value = e,
693
- onRefresh: xt
694
- }, Ee({
695
- "explorer-actions": D(() => [y(T(xe), {
696
- class: "record-panel-create-button",
697
- "icon-name": "plus",
698
- title: T(l).t("platform.screen.WorkflowConfigurationView.new-workflow", "新建流程"),
699
- disabled: V.value || U.value || H.value || M.value,
700
- onClick: Tt
701
- }, null, 8, ["title", "disabled"])]),
702
- explorer: D(() => [N.value ? (S(), g(f, { key: 0 }, [y(T(le), { message: N.value() }, null, 8, ["message"]), y(T(s), {
703
- type: "text",
704
- onClick: xt
705
- }, {
706
- default: D(() => [v(w(T(l).t("platform.screen.CrudRecordListExplorer.reload", "重新加载")), 1)]),
707
- _: 1
708
- })], 64)) : h("v-if", !0), gt.value && !P.value.length ? (S(), m(T(we), {
709
- key: 1,
710
- tip: T(l).t("platform.workflow-config.loading-definitions", "正在加载审批流程")
711
- }, null, 8, ["tip"])) : !N.value || P.value.length ? (S(), m(T(_e), {
712
- key: 2,
713
- records: P.value,
714
- keyword: ht.value,
715
- "empty-description": T(l).t("platform.workflow-config.no-definitions", "暂无流程,点击“新建流程”开始配置"),
716
- "selected-id": I.value?.id,
717
- "item-of": (e) => ({
718
- title: String(e.title ?? e.alias ?? ""),
719
- secondary: String(e.alias ?? ""),
720
- tag: pe(String(e.definitionStatus ?? ""))
721
- }),
722
- onSelect: t[0] ||= (e) => St(P.value.find((t) => t.id === e.id))
723
- }, null, 8, [
724
- "records",
725
- "keyword",
726
- "empty-description",
727
- "selected-id",
728
- "item-of"
729
- ])) : h("v-if", !0)]),
730
- default: D(() => [U.value ? (S(), g("form", {
731
- key: 0,
732
- class: "property-form",
733
- onSubmit: je(kt, ["prevent"])
734
- }, [
735
- _("p", qe, w(T(l).t("platform.workflow-config.creation-help", "先创建草稿,再配置节点和参与人;发布后才会用于后续申请。")), 1),
736
- _("label", Je, [y(T(ae), { required: "" }, {
737
- default: D(() => [v(w(T(l).t("platform.screen.WorkflowConfigurationView.workflow-name", "流程名称")), 1)]),
738
- _: 1
739
- }), y(T(re), {
740
- disabled: V.value,
741
- value: K.value,
742
- "onUpdate:value": t[2] ||= (e) => K.value = e,
743
- required: "",
744
- "aria-label": T(l).t("platform.screen.WorkflowConfigurationView.workflow-name", "流程名称")
745
- }, null, 8, [
746
- "disabled",
747
- "value",
748
- "aria-label"
749
- ])]),
750
- _("label", Ye, [
751
- y(T(ae), { required: "" }, {
752
- default: D(() => [v(w(T(l).t("platform.screen.WorkflowConfigurationView.workflow-code", "流程编码")), 1)]),
753
- _: 1
754
- }),
755
- y(T(re), {
756
- disabled: V.value,
757
- value: G.value,
758
- "onUpdate:value": t[3] ||= (e) => G.value = e,
759
- required: "",
760
- invalid: !!G.value.trim() && !Dt.value,
761
- "aria-label": T(l).t("platform.screen.WorkflowConfigurationView.workflow-code", "流程编码")
762
- }, null, 8, [
763
- "disabled",
764
- "value",
765
- "invalid",
766
- "aria-label"
767
- ]),
768
- _("small", Xe, w(T(l).t("platform.workflow-config.alias-help", "小写字母开头,仅含小写字母、数字和下划线,最多 63 个字符。")), 1)
769
- ]),
770
- _("div", Ze, [y(T(o), {
771
- disabled: V.value,
772
- checked: Z.value,
773
- "onUpdate:checked": t[4] ||= (e) => Z.value = e
774
- }, {
775
- default: D(() => [v(w(T(l).t("platform.screen.WorkflowConfigurationView.govern-business-approval-status", "驱动业务审批状态")), 1)]),
776
- _: 1
777
- }, 8, ["disabled", "checked"]), _("small", Qe, w(T(l).t("platform.workflow-config.approval-help", "开启后回写业务记录的审批状态;关闭后仅编排任务流程。")), 1)]),
778
- _("details", $e, [_("summary", null, w(T(l).t("platform.workflow-config.optional-matching", "适用范围与匹配规则(可选)")), 1), y(Re, {
779
- class: "optional-settings",
780
- "organization-id": q.value,
781
- "onUpdate:organizationId": t[5] ||= (e) => q.value = e,
782
- "match-expression": J.value,
783
- "onUpdate:matchExpression": t[6] ||= (e) => J.value = e,
784
- "match-priority": Y.value,
785
- "onUpdate:matchPriority": t[7] ||= (e) => Y.value = e,
786
- fallback: X.value,
787
- "onUpdate:fallback": t[8] ||= (e) => X.value = e,
788
- "organization-context": Pe.value,
789
- fields: O.value,
790
- disabled: V.value,
791
- "invalid-priority": !Et.value
792
- }, null, 8, [
793
- "organization-id",
794
- "match-expression",
795
- "match-priority",
796
- "fallback",
797
- "organization-context",
798
- "fields",
799
- "disabled",
800
- "invalid-priority"
801
- ])])
802
- ], 32)) : I.value ? (S(), g(f, { key: 1 }, [
803
- _("div", { class: De(["toolbar", { "configuration-toolbar--properties": j.value }]) }, [y(T(ie), {
804
- value: L.value?.id,
805
- options: F.value.map((e) => ({
806
- value: e.id,
807
- label: T(l).t("platform.screen.WorkflowConfigurationView.version-value-value", "版本 {value1} · {value2}", {
808
- value1: e.versionNo,
809
- value2: pe(e.publishStatus)
810
- })
811
- })),
812
- disabled: V.value || H.value || M.value || W.value,
813
- "onUpdate:value": t[9] ||= (e) => wt(String(e))
814
- }, null, 8, [
815
- "value",
816
- "options",
817
- "disabled"
818
- ])], 2),
819
- W.value ? (S(), g("form", {
820
- key: 0,
821
- class: "property-form",
822
- onSubmit: je(Mt, ["prevent"])
823
- }, [
824
- y(T(c), {
825
- class: "settings-wide",
826
- title: T(l).t("platform.screen.WorkflowConfigurationView.workflow-matching-rules", "流程匹配规则")
827
- }, null, 8, ["title"]),
828
- _("label", et, [y(T(ae), { required: "" }, {
829
- default: D(() => [v(w(T(l).t("platform.screen.WorkflowConfigurationView.workflow-name", "流程名称")), 1)]),
830
- _: 1
831
- }), y(T(re), {
832
- disabled: V.value,
833
- value: K.value,
834
- "onUpdate:value": t[10] ||= (e) => K.value = e,
835
- required: ""
836
- }, null, 8, ["disabled", "value"])]),
837
- y(Re, {
838
- "organization-id": q.value,
839
- "onUpdate:organizationId": t[11] ||= (e) => q.value = e,
840
- "match-expression": J.value,
841
- "onUpdate:matchExpression": t[12] ||= (e) => J.value = e,
842
- "match-priority": Y.value,
843
- "onUpdate:matchPriority": t[13] ||= (e) => Y.value = e,
844
- fallback: X.value,
845
- "onUpdate:fallback": t[14] ||= (e) => X.value = e,
846
- "organization-context": Pe.value,
847
- fields: O.value,
848
- disabled: V.value,
849
- "invalid-priority": !Et.value
850
- }, null, 8, [
851
- "organization-id",
852
- "match-expression",
853
- "match-priority",
854
- "fallback",
855
- "organization-context",
856
- "fields",
857
- "disabled",
858
- "invalid-priority"
859
- ]),
860
- _("p", tt, w(T(l).t("platform.screen.WorkflowConfigurationView.changes-affect-future-submissions-existing-instances-retain", "调整仅影响后续提交,已有实例保留原发布版本和分派快照。")), 1)
861
- ], 32)) : h("v-if", !0),
862
- _t.value ? (S(), g("p", nt, w(T(l).t("platform.screen.WorkflowConfigurationView.this-version-is-frozen-create-a-new", "此版本已冻结。修改流程请创建新版本;已有实例继续使用原版本。")), 1)) : h("v-if", !0),
863
- H.value ? (S(), g("p", rt, w(T(l).t("platform.screen.WorkflowConfigurationView.the-draft-has-unsaved-changes", "草稿有未保存的修改")), 1)) : h("v-if", !0),
864
- _("div", { class: De(["configuration-design", { "configuration-design--properties": j.value }]) }, [(S(), m(T(ue), {
865
- key: L.value?.id,
866
- nodes: R.value.nodes,
867
- routes: R.value.links,
868
- "selected-node-key": z.value,
869
- "selected-route-key": B.value,
870
- "layout-json": R.value.layoutJson,
871
- editable: Q.value,
872
- interactive: "",
873
- onSelect: Rt,
874
- onSelectRoute: zt,
875
- onLayoutChange: Bt
876
- }, null, 8, [
877
- "nodes",
878
- "routes",
879
- "selected-node-key",
880
- "selected-route-key",
881
- "layout-json",
882
- "editable"
883
- ])), _("div", it, [
884
- y(T(s), {
885
- disabled: !Q.value,
886
- onClick: qt
887
- }, {
888
- default: D(() => [v(w(T(l).t("platform.screen.WorkflowConfigurationView.insert-approval-node", "插入审批节点")), 1)]),
889
- _: 1
890
- }, 8, ["disabled"]),
891
- y(T(s), {
892
- disabled: !Q.value,
893
- onClick: Wt
894
- }, {
895
- default: D(() => [v(w(T(l).t("platform.screen.WorkflowConfigurationView.insert-branch-and-convergence", "插入分支与汇聚")), 1)]),
896
- _: 1
897
- }, 8, ["disabled"]),
898
- y(T(s), {
899
- disabled: !Q.value,
900
- onClick: Xt
901
- }, {
902
- default: D(() => [v(w(T(l).t("platform.screen.WorkflowConfigurationView.add-link", "添加连线")), 1)]),
903
- _: 1
904
- }, 8, ["disabled"]),
905
- y(T(ie), {
906
- value: B.value || void 0,
907
- placeholder: T(l).t("platform.screen.WorkflowConfigurationView.select-link", "选择连线"),
908
- options: R.value.links.map((e) => ({
909
- value: e.routeKey,
910
- label: `${e.title ?? T(l).t("platform.workflow-config.route", "路径")}:${R.value.nodes.find((t) => t.nodeKey === e.sourceNodeKey)?.title} → ${R.value.nodes.find((t) => t.nodeKey === e.targetNodeKey)?.title}`
911
- })),
912
- "onUpdate:value": t[15] ||= (e) => zt(String(e))
913
- }, null, 8, [
914
- "value",
915
- "placeholder",
916
- "options"
917
- ])
918
- ])], 2),
919
- y(T(ge), {
920
- width: "wide",
921
- open: j.value,
922
- title: vt.value?.title ? T(l).t("platform.workflow-config.node-properties", "节点属性 · {title}", { title: vt.value.title }) : T(l).t("platform.workflow-config.route-properties", "路径属性"),
923
- onClose: t[17] ||= (e) => j.value = !1
924
- }, {
925
- operation: D(() => [y(T(s), {
926
- disabled: V.value,
927
- onClick: t[16] ||= (e) => j.value = !1
928
- }, {
929
- default: D(() => [v(w(T(l).t("platform.screen.WorkflowConfigurationView.finish-configuration", "完成配置")), 1)]),
930
- _: 1
931
- }, 8, ["disabled"])]),
932
- default: D(() => [y(T(ye), {
933
- design: R.value,
934
- "node-key": z.value,
935
- "route-key": B.value,
936
- editable: Q.value,
937
- http: T(x).http,
938
- "module-alias": ne.moduleAlias,
939
- fields: O.value,
940
- catalog: k.value,
941
- actions: Ie.value,
942
- onUpdateNode: Vt,
943
- onUpdateRoute: Ht,
944
- onSelectRoute: zt,
945
- onRemoveNode: Jt,
946
- onRemoveRoute: Yt,
947
- onAppendBranchPath: Gt,
948
- onDeleteBranch: Kt
949
- }, null, 8, [
950
- "design",
951
- "node-key",
952
- "route-key",
953
- "editable",
954
- "http",
955
- "module-alias",
956
- "fields",
957
- "catalog",
958
- "actions"
959
- ])]),
960
- _: 1
961
- }, 8, ["open", "title"])
962
- ], 64)) : (S(), m(T(a), {
963
- key: 2,
964
- description: T(l).t("platform.screen.WorkflowConfigurationView.select-or-create-a-workflow-to-configure", "选择或新建流程,配置节点、参与人、路径和业务完成条件。")
965
- }, null, 8, ["description"]))]),
966
- _: 2
967
- }, [I.value && !U.value ? {
968
- name: "detail-actions",
969
- fn: D(() => [y(T(Te), {
970
- class: "configuration-action-bar",
971
- actions: ft.value,
972
- onAction: t[1] ||= (e) => pt(e.key)
973
- }, null, 8, ["actions"])]),
974
- key: "0"
975
- } : void 0, U.value || W.value ? {
976
- name: "detail-operation",
977
- fn: D(() => [U.value ? (S(), g(f, { key: 0 }, [y(T(s), {
978
- type: "primary",
979
- loading: V.value,
980
- disabled: V.value || !Ot.value || !Dt.value,
981
- onClick: kt
982
- }, {
983
- default: D(() => [v(w(T(l).t("platform.screen.WorkflowConfigurationView.create-workflow-draft", "创建流程草稿")), 1)]),
984
- _: 1
985
- }, 8, ["loading", "disabled"]), y(T(s), {
986
- disabled: V.value,
987
- onClick: At
988
- }, {
989
- default: D(() => [v(w(T(l).t("platform.screen.WorkflowConfigurationView.cancel-creation", "取消新建")), 1)]),
990
- _: 1
991
- }, 8, ["disabled"])], 64)) : (S(), g(f, { key: 1 }, [y(T(s), {
992
- type: "primary",
993
- loading: V.value,
994
- disabled: V.value || !Ot.value,
995
- onClick: Mt
996
- }, {
997
- default: D(() => [v(w(T(l).t("platform.screen.WorkflowConfigurationView.save-matching-rules", "保存匹配规则")), 1)]),
998
- _: 1
999
- }, 8, ["loading", "disabled"]), y(T(s), {
1000
- disabled: V.value,
1001
- onClick: At
1002
- }, {
1003
- default: D(() => [v(w(T(l).t("platform.screen.WorkflowConfigurationView.cancel-changes", "取消修改")), 1)]),
1004
- _: 1
1005
- }, 8, ["disabled"])], 64))]),
1006
- key: "1"
1007
- } : void 0]), 1032, [
1008
- "explorer-title",
1009
- "refresh-title",
1010
- "mode",
1011
- "busy",
1012
- "detail-title",
1013
- "explorer-search-keyword"
1014
- ]), y(T(ge), {
1015
- width: "extraWide",
1016
- open: ut.value,
1017
- title: T(l).t("platform.screen.WorkflowConfigurationView.confirm-workflow-publication", "确认发布流程"),
1018
- onClose: t[19] ||= (e) => ut.value = !1
1019
- }, {
1020
- operation: D(() => [y(T(s), {
1021
- type: "primary",
1022
- loading: V.value,
1023
- onClick: Ft
1024
- }, {
1025
- default: D(() => [v(w(T(l).t("platform.screen.WorkflowConfigurationView.confirm-publication", "确认发布")), 1)]),
1026
- _: 1
1027
- }, 8, ["loading"])]),
1028
- default: D(() => [
1029
- _("p", null, w(T(l).t("platform.workflow-config.publication-frozen", "流程:{title} · 版本 {version}。发布后配置冻结;已有实例继续使用原版本。", {
1030
- title: I.value?.title,
1031
- version: L.value?.versionNo
1032
- })), 1),
1033
- _("p", null, w(T(l).t("platform.workflow-config.matching-scope", "匹配范围")) + ":" + w(I.value?.organizationId ? T(l).t("platform.workflow-config.scoped-organizations", "指定组织及下级组织") : T(l).t("platform.workflow-config.all-organizations", "模块内全部组织")) + "; " + w(T(l).t("platform.workflow-config.priority", "优先级")) + " " + w(I.value?.matchPriority ?? 0) + ";" + w(I.value?.defaultDefinition ? T(l).t("platform.workflow-config.default-workflow", "作为默认兜底流程") : T(l).t("platform.workflow-config.conditional-workflow", "按匹配条件选择")) + "。 " + w(I.value?.matchExpression ? T(l).t("platform.workflow-config.matching-expression", "匹配条件:{expression}", { expression: I.value.matchExpression }) : T(l).t("platform.workflow-config.no-matching-condition", "未设置额外条件")), 1),
1034
- _("ul", at, [(S(!0), g(f, null, ke(R.value.nodes.filter((e) => ["approval", "task"].includes(e.nodeType)), (e) => (S(), g("li", { key: e.nodeKey }, [
1035
- _("strong", null, w(e.title), 1),
1036
- v(" · " + w(mt(e.participantPolicyText)) + " ", 1),
1037
- _("details", null, [_("summary", null, w(T(l).t("platform.screen.WorkflowConfigurationView.view-complete-participant-rules", "查看完整人员规则")), 1), y(T(me), {
1038
- value: e.participantPolicyText,
1039
- http: T(x).http,
1040
- fields: O.value,
1041
- disabled: ""
1042
- }, null, 8, [
1043
- "value",
1044
- "http",
1045
- "fields"
1046
- ])]),
1047
- e.nodeType === "task" ? (S(), g("details", ot, [
1048
- _("summary", null, w(T(l).t("platform.screen.WorkflowConfigurationView.view-business-task-checks-and-instructions", "查看业务任务检查与办理指引")), 1),
1049
- e.taskDefinitionId ? (S(), g("p", st, w(T(l).t("platform.workflow-config.referenced-task", "引用任务")) + ":" + w(k.value.tasks.find((t) => t.id === e.taskDefinitionId)?.title ?? e.taskDefinitionId), 1)) : h("v-if", !0),
1050
- y(T(Se), {
1051
- value: e.nodeConfigText,
1052
- "module-alias": ne.moduleAlias,
1053
- fields: O.value,
1054
- catalog: k.value,
1055
- actions: Ie.value,
1056
- associations: k.value.associations.map((e) => ({
1057
- value: e.id,
1058
- label: e.title
1059
- })),
1060
- disabled: ""
1061
- }, null, 8, [
1062
- "value",
1063
- "module-alias",
1064
- "fields",
1065
- "catalog",
1066
- "actions",
1067
- "associations"
1068
- ])
1069
- ])) : h("v-if", !0),
1070
- e.participantPolicyText?.includes("INITIATOR_SELF") ? (S(), g("p", ct, w(T(l).t("platform.screen.WorkflowConfigurationView.the-submitter-processes-this-node-confirm-that", "此节点由提交人本人办理,请确认符合业务要求。")), 1)) : h("v-if", !0)
1071
- ]))), 128))]),
1072
- (S(!0), g(f, null, ke(R.value.nodes.filter((e) => e.nodeType === "branch"), (e) => (S(), g("div", { key: e.nodeKey }, [
1073
- _("strong", null, w(e.title) + " · " + w(e.routeMode === "manual" ? T(l).t("platform.workflow-config.manual-route", "人工单选") : T(l).t("platform.workflow-config.auto-route", "自动判定(全部命中出口)")), 1),
1074
- e.routeMode === "manual" ? (S(), g("p", lt, w(T(l).t("platform.workflow-config.selector-summary", "由{title}的实际办理人选路;{reason}。", {
1075
- title: R.value.nodes.find((t) => t.nodeKey === e.selectorNodeKey)?.title ?? T(l).t("platform.workflow-config.missing-selector", "未配置选择节点"),
1076
- reason: e.requireManualSelectionReason ? T(l).t("platform.workflow-config.reason-required", "必须填写原因") : T(l).t("platform.workflow-config.reason-optional", "原因选填")
1077
- })), 1)) : h("v-if", !0),
1078
- _("ul", null, [(S(!0), g(f, null, ke(R.value.links.filter((t) => t.sourceNodeKey === e.nodeKey), (e) => (S(), g("li", { key: e.routeKey }, w(e.title ?? T(l).t("platform.workflow-config.exit", "出口")) + ":" + w(e.defaultRoute ? T(l).t("platform.workflow-config.fallback-exit", "默认兜底") : e.conditionExpression || T(l).t("platform.workflow-config.unconditional", "无条件(始终命中)")), 1))), 128))]),
1079
- _("p", null, w(T(l).t("platform.workflow-config.convergence-counting", "汇聚:{summary},只计算有效出口。", { summary: bt(e) })), 1)
1080
- ]))), 128)),
1081
- _("details", null, [_("summary", null, w(T(l).t("platform.screen.WorkflowConfigurationView.view-published-workflow", "查看发布流程图")), 1), y(T(ue), {
1082
- presentation: "detail",
1083
- nodes: R.value.nodes,
1084
- routes: R.value.links,
1085
- "layout-json": R.value.layoutJson
1086
- }, null, 8, [
1087
- "nodes",
1088
- "routes",
1089
- "layout-json"
1090
- ])])
1091
- ]),
1092
- _: 1
1093
- }, 8, ["open", "title"])]));
1094
- }
1095
- }), [["__scopeId", "data-v-8eec3665"]]);
1096
- //#endregion
1097
- export { j as default };