@ximatai/muyun-web-app 0.26.16 → 0.26.18

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 (126) hide show
  1. package/dist/{BusinessActivityLogView-DVM_GB5y.js → BusinessActivityLogView-CNW817Sf.js} +2 -2
  2. package/dist/BusinessLogListDrawer-YiJxOlnD.js +864 -0
  3. package/dist/CodeConfigurationView-DU8tjPMt.js +1667 -0
  4. package/dist/{ConfigurationTranslationView-B0FosDyz.js → ConfigurationTranslationView-CbBt5s1q.js} +51 -51
  5. package/dist/{LoginAuditLogView-3tAozKlC.js → LoginAuditLogView-CZF1Jfq_.js} +2 -2
  6. package/dist/{ModuleActionManagementView-CJRNShGg.js → ModuleActionManagementView-CaiXH1l_.js} +208 -208
  7. package/dist/{ModuleGovernanceView-DsqR_Sj7.js → ModuleGovernanceView-CcwGyO3x.js} +4331 -4475
  8. package/dist/{RequestErrorLogView-C4yH-TSX.js → RequestErrorLogView-DpudZrC2.js} +2 -2
  9. package/dist/RoleDetailWorkspaceView-DNMGsAJC.js +1435 -0
  10. package/dist/{RuntimeLogView-CoKKpJ39.js → RuntimeLogView-444BL_xs.js} +61 -61
  11. package/dist/WorkflowAdministrationView-C-VIjvwB.js +650 -0
  12. package/dist/WorkflowConfigurationView-DLFY2x7V.js +1110 -0
  13. package/dist/WorkflowWorkbenchView-Gr02dbBc.js +759 -0
  14. package/dist/codeConfiguration-ChJ6ktRR.js +208 -0
  15. package/dist/index.css +1 -1
  16. package/dist/index.js +624 -598
  17. package/dist/moduleMenuWorkspace-B8DKwC3L.js +626 -0
  18. package/dist/{platform-components-Cl5ZZiuU.js → platform-components-5AE0j2_3.js} +9579 -6839
  19. package/dist/{platform-workbench-CAHoriIf.js → platform-workbench-BhZPARiH.js} +6345 -6478
  20. package/dist/types/app/CurrentUserProfileDialog.vue.d.ts +1 -1
  21. package/dist/types/app/DevelopmentTopbarActions.vue.d.ts +9 -0
  22. package/dist/types/app/useAssistantAvailability.d.ts +8 -0
  23. package/dist/types/app/useCurrentUserProfile.d.ts +12 -0
  24. package/dist/types/app/workbenchRouteSync.d.ts +2 -0
  25. package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +9 -3
  26. package/dist/types/consumer/index.d.ts +2 -1
  27. package/dist/types/dynamic-page-runtime/ModulePageBusinessSession.d.ts +8 -8
  28. package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +214 -92
  29. package/dist/types/dynamic-page-runtime/assistantQueryCapabilities.d.ts +1 -0
  30. package/dist/types/dynamic-page-runtime/composables/useManagedDetailRelationRuntime.d.ts +2 -2
  31. package/dist/types/dynamic-page-runtime/composables/useNavigatorRuntime.d.ts +2 -2
  32. package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +2 -2
  33. package/dist/types/dynamic-page-runtime/useModulePageSession.d.ts +4 -4
  34. package/dist/types/dynamic-page-runtime/useModuleRecordDataChanges.d.ts +4 -0
  35. package/dist/types/main.d.ts +0 -1
  36. package/dist/types/platform-admin-runtime/ModuleCodeConfigurationStatus.vue.d.ts +7 -0
  37. package/dist/types/platform-admin-runtime/moduleCodeConfiguration.d.ts +15 -0
  38. package/dist/types/platform-components/BusinessContentGenerationPanel.vue.d.ts +22 -0
  39. package/dist/types/platform-components/BusinessContentQueryNotice.vue.d.ts +17 -0
  40. package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +2 -2
  41. package/dist/types/platform-components/DictionaryOptionDialog.vue.d.ts +4 -4
  42. package/dist/types/platform-components/DictionaryOptionDialogChoiceList.vue.d.ts +1 -1
  43. package/dist/types/platform-components/DictionaryPicker.vue.d.ts +4 -4
  44. package/dist/types/platform-components/ObjectPickerInput.vue.d.ts +2 -2
  45. package/dist/types/platform-components/QueryCriteriaGroupEditor.vue.d.ts +2 -2
  46. package/dist/types/platform-components/RecordContentSourceField.vue.d.ts +22 -0
  47. package/dist/types/platform-components/RecordContentTranslationField.vue.d.ts +26 -0
  48. package/dist/types/platform-components/RecordDataExchangeSurface.vue.d.ts +26 -0
  49. package/dist/types/platform-components/RecordDetailFields.vue.d.ts +3 -2
  50. package/dist/types/platform-components/RecordFormFields.vue.d.ts +5 -2
  51. package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +1 -1
  52. package/dist/types/platform-components/RecordQueryListCell.vue.d.ts +1 -0
  53. package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +1 -1
  54. package/dist/types/platform-components/RecordQueryListSurface.vue.d.ts +1 -1
  55. package/dist/types/{dynamic-page-runtime/ModuleDataExchangeSurface.vue.d.ts → platform-components/RecordQuerySortSelector.vue.d.ts} +5 -9
  56. package/dist/types/platform-components/RecordRelationActionButton.vue.d.ts +16 -0
  57. package/dist/types/platform-components/RecordRelationValue.vue.d.ts +2 -0
  58. package/dist/types/platform-components/StaticManagementLayout.vue.d.ts +7 -2
  59. package/dist/types/{dynamic-page-runtime → platform-components}/TenantScopeExplorer.vue.d.ts +1 -1
  60. package/dist/types/platform-components/WorkflowRecordPanel.vue.d.ts +2 -0
  61. package/dist/types/platform-components/WorkflowTimeline.vue.d.ts +4 -0
  62. package/dist/types/platform-components/crudRecordListModel.d.ts +1 -0
  63. package/dist/types/platform-components/index.d.ts +3 -0
  64. package/dist/types/platform-components/loadExplorerRecords.d.ts +3 -0
  65. package/dist/types/platform-components/managementWorkspaceLayout.d.ts +10 -0
  66. package/dist/types/platform-components/recordDetailFieldModel.d.ts +2 -0
  67. package/dist/types/platform-components/recordFormFieldModel.d.ts +6 -0
  68. package/dist/types/platform-components/recordQueryListQueryController.d.ts +2 -0
  69. package/dist/types/platform-components/recordSurfaceActivity.d.ts +3 -0
  70. package/dist/types/platform-components/recycleBinState.d.ts +1 -0
  71. package/dist/types/platform-components/referencePickerModel.d.ts +6 -2
  72. package/dist/types/platform-components/scopedTreePickerModel.d.ts +4 -0
  73. package/dist/types/platform-components/useBusinessCodeForm.d.ts +36 -0
  74. package/dist/types/platform-workbench/Workbench.vue.d.ts +13 -4
  75. package/dist/types/platform-workbench/WorkbenchGlobalTools.vue.d.ts +28 -0
  76. package/dist/types/platform-workbench/WorkbenchLanguageSettings.vue.d.ts +11 -0
  77. package/dist/types/platform-workbench/WorkbenchPageTitle.vue.d.ts +10 -0
  78. package/dist/types/platform-workbench/menuGroupLayout.d.ts +5 -0
  79. package/dist/types/platform-workbench/menuTreeModel.d.ts +1 -2
  80. package/dist/types/platform-workbench/useAssistantConversation.d.ts +1 -1
  81. package/dist/types/platform-workbench/useAssistantConversationArchive.d.ts +1 -1
  82. package/dist/types/platform-workbench/useLanguagePreferenceSelection.d.ts +7 -0
  83. package/dist/types/views/CodeConfigurationView.vue.d.ts +8 -0
  84. package/dist/types/views/CodeRuleFormatEditor.vue.d.ts +17 -0
  85. package/dist/types/views/PageQuerySummaryEditor.vue.d.ts +4 -4
  86. package/dist/types/views/WorkflowSelectionFields.vue.d.ts +28 -0
  87. package/dist/types/views/codeConfiguration.d.ts +127 -0
  88. package/dist/types/views/codeConfigurationWorkspaceView.d.ts +5 -0
  89. package/dist/types/views/metadataEditorSession.d.ts +4 -0
  90. package/dist/types/views/metadataOrchestrationState.d.ts +3 -0
  91. package/dist/types/views/metadataWorkspace.d.ts +8 -0
  92. package/dist/types/views/moduleGovernanceWorkspaceView.d.ts +1 -1
  93. package/dist/types/vue-ui-antdv/components/UiDatePicker.vue.d.ts +33 -0
  94. package/dist/types/vue-ui-antdv/components/UiDropdown.vue.d.ts +1 -0
  95. package/dist/types/vue-ui-antdv/components/UiHelp.vue.d.ts +16 -0
  96. package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +1 -1
  97. package/dist/types/vue-ui-antdv/components/UiModal.vue.d.ts +9 -6
  98. package/dist/types/vue-ui-antdv/components/UiPopover.vue.d.ts +12 -4
  99. package/dist/types/vue-ui-antdv/datePickerCalendar.d.ts +472 -0
  100. package/dist/types/vue-ui-antdv/datePickerValue.d.ts +6 -0
  101. package/dist/types/vue-ui-antdv/index.d.ts +3 -0
  102. package/dist/types/vue-ui-antdv/languageLocales.d.ts +2 -0
  103. package/dist/types/vue-ui-antdv/types.d.ts +2 -0
  104. package/dist/types/vue-ui-antdv/typography.d.ts +25 -0
  105. package/dist/types/web-contracts/index.d.ts +146 -1
  106. package/dist/types/web-contracts/workflow.d.ts +10 -0
  107. package/dist/types/web-core/assistantTurnClient.d.ts +2 -0
  108. package/dist/types/web-core/businessContent.d.ts +38 -0
  109. package/dist/types/web-core/businessContentLanguage.d.ts +18 -0
  110. package/dist/types/web-core/index.d.ts +5 -0
  111. package/dist/types/web-core/languagePreference.d.ts +2 -2
  112. package/dist/types/web-core/module/dataExchangeClient.d.ts +83 -1
  113. package/dist/types/web-core/module/staticModuleClient.d.ts +9 -3
  114. package/dist/types/web-core/presentationTexts.d.ts +5 -0
  115. package/dist/types/web-core/recordReadRefreshGuard.d.ts +7 -0
  116. package/dist/types/web-core/useBusinessContentGenerationBatch.d.ts +36 -0
  117. package/dist/types/web-core/useBusinessContentReading.d.ts +30 -0
  118. package/dist/types/web-core/workflow.d.ts +2 -1
  119. package/dist/{workspaceViews-BIYGPUAO.js → workspaceViews-DeBqozVb.js} +1062 -918
  120. package/package.json +4 -1
  121. package/dist/BusinessLogListDrawer-BciMLY9z.js +0 -864
  122. package/dist/RoleDetailWorkspaceView-BpOoGUwS.js +0 -1435
  123. package/dist/WorkflowAdministrationView-DmUV6vWS.js +0 -650
  124. package/dist/WorkflowConfigurationView-pghDbWEh.js +0 -975
  125. package/dist/WorkflowWorkbenchView-BwWxyDen.js +0 -747
  126. package/dist/moduleGovernanceWorkspaceView-DGEV3ZyT.js +0 -667
@@ -0,0 +1,1110 @@
1
+ import { E as e, y as t } from "./platform-workbench-BhZPARiH.js";
2
+ import { $n as n, At as r, Cn as i, Fr as a, Ia as o, Kn as s, Mr as ee, Nt as te, On as ne, Pt as re, Qn as ie, Rn as ae, Rr as oe, Sn as se, Sr as ce, Vt as le, Xn as ue, Yn as de, Zt as fe, a as pe, bn as me, dn as he, et as ge, f as _e, hn as c, i as ve, l as ye, o as be, pa as xe, r as Se, s as Ce, sn as l, tr as u, ua as we, w as Te, yn as d, yr as Ee } from "./platform-components-5AE0j2_3.js";
3
+ import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as De, createTextVNode as v, createVNode as y, defineComponent as b, mergeModels as x, normalizeClass as Oe, onMounted as ke, openBlock as S, ref as C, renderList as Ae, toDisplayString as w, unref as T, useModel as E, watch as je, withCtx as D, withModifiers as Me } from "vue";
4
+ //#region src/views/WorkflowSelectionFields.vue?vue&type=script&setup=true&lang.ts
5
+ var Ne = { class: "workflow-selection-fields" }, Pe = { class: "workflow-field settings-wide" }, Fe = { class: "settings-help" }, Ie = { class: "workflow-field settings-wide" }, O = { class: "workflow-field" }, k = { class: "settings-help" }, Le = { class: "settings-wide workflow-field" }, Re = { class: "settings-help" }, ze = /*#__PURE__*/ u(/* @__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 = o(), n = e, r = E(e, "organizationId"), i = E(e, "matchExpression"), a = E(e, "matchPriority"), ee = E(e, "fallback");
34
+ return (e, o) => (S(), g("div", Ne, [
35
+ _("label", Pe, [
36
+ v(w(T(t).t("platform.screen.WorkflowConfigurationView.applicable-organization", "适用组织")), 1),
37
+ n.organizationContext ? (S(), m(T(ge), {
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": o[0] ||= (e) => r.value = e ?? ""
45
+ }, null, 8, [
46
+ "placeholder",
47
+ "value",
48
+ "context",
49
+ "disabled"
50
+ ])) : (S(), m(T(s), {
51
+ key: 1,
52
+ value: r.value || T(t).t("platform.workflow-config.all-organizations", "模块内全部组织"),
53
+ disabled: ""
54
+ }, null, 8, ["value"])),
55
+ _("small", Fe, w(n.organizationContext ? T(t).t("platform.workflow-config.organization-help", "留空适用于全部组织;指定组织后包含其下级组织。") : T(t).t("platform.workflow-config.global-scope-help", "当前为全局流程模板,适用于全部组织;组织选择需使用租户身份。")), 1)
56
+ ]),
57
+ _("label", Ie, [v(w(T(t).t("platform.screen.WorkflowConfigurationView.matching-condition", "匹配条件")), 1), y(T(c), {
58
+ disabled: n.disabled || ee.value,
59
+ value: i.value,
60
+ "onUpdate:value": o[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(s), {
72
+ disabled: n.disabled,
73
+ value: a.value,
74
+ "onUpdate:value": o[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", Le, [y(T(ue), {
88
+ disabled: n.disabled,
89
+ checked: ee.value,
90
+ "onUpdate:checked": o[3] ||= (e) => ee.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", Re, 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 Be(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 Ve(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 He(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 Ue(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 We(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 Ge(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 Ke(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 qe = { class: "workflow-configuration" }, Je = { class: "settings-help" }, Ye = { class: "workflow-field" }, Xe = { class: "workflow-field-help" }, Ze = { class: "workflow-field" }, Qe = {
291
+ key: 0,
292
+ class: "settings-help",
293
+ role: "alert"
294
+ }, $e = { class: "settings-wide workflow-approval-setting" }, et = { class: "settings-wide" }, tt = { class: "workflow-field" }, nt = { class: "settings-help" }, rt = { key: 1 }, it = { key: 2 }, at = { class: "toolbar" }, ot = { class: "publish-nodes" }, st = { key: 0 }, ct = { key: 0 }, lt = { key: 1 }, ut = { key: 0 }, j = /*#__PURE__*/ u(/* @__PURE__ */ b({
295
+ name: "WorkflowConfigurationView",
296
+ __name: "WorkflowConfigurationView",
297
+ props: {
298
+ moduleAlias: {},
299
+ moduleTitle: {}
300
+ },
301
+ setup(ge) {
302
+ let c = o();
303
+ function u(e) {
304
+ return _e(e, c);
305
+ }
306
+ let b = ge, x = a({ moduleAlias: "platform.workflow.definition" }), E = ce(x.http, b.moduleAlias), Ne = ee({
307
+ http: x.http,
308
+ language: c,
309
+ moduleAlias: b.moduleAlias,
310
+ runtimeAccess: "VIEW"
311
+ }), Pe = t(), Fe = p(() => Pe?.value?.tenantId ? ee({
312
+ http: x.http,
313
+ language: c,
314
+ moduleAlias: "iam.organization",
315
+ runtimeAccess: "REFERENCE"
316
+ }) : void 0);
317
+ e({
318
+ moduleAlias: b.moduleAlias,
319
+ predicate: (e) => e.type === "configuration-translations-changed",
320
+ handler: async () => {
321
+ try {
322
+ await Ne.runtime.refreshTexts?.();
323
+ } catch (e) {
324
+ l(e, {
325
+ source: "workflow-design",
326
+ phase: "load"
327
+ });
328
+ }
329
+ }
330
+ });
331
+ let Ie = p(() => oe(Ne.runtime)), O = p(() => [...r(Ie.value?.uiDescriptor)].map(([e, t]) => ({
332
+ name: e,
333
+ label: t.label ?? e,
334
+ valueType: t.valueType,
335
+ referenceModule: t.reference?.targetModuleAlias
336
+ }))), k = C({
337
+ tasks: [],
338
+ queries: [],
339
+ generations: [],
340
+ associations: []
341
+ }), Le = p(() => (Ie.value?.actions ?? []).map((e) => ({
342
+ value: e.actionCode,
343
+ label: e.title ?? u(e.actionCode)
344
+ })));
345
+ async function Re(e) {
346
+ k.value = await E.catalog(e);
347
+ }
348
+ let j = C(!1), dt = C(!1), M = C(!1);
349
+ async function ft() {
350
+ try {
351
+ await Ne.runtime.ready;
352
+ } catch (e) {
353
+ l(e, {
354
+ source: "workflow-design",
355
+ phase: "load"
356
+ });
357
+ }
358
+ }
359
+ let pt = p(() => [
360
+ {
361
+ key: "save",
362
+ title: c.t("platform.screen.WorkflowConfigurationView.save-draft", "保存草稿"),
363
+ level: "primary",
364
+ disabled: !Q.value || !H.value
365
+ },
366
+ {
367
+ key: "validate",
368
+ title: c.t("platform.screen.WorkflowConfigurationView.validate-workflow", "校验流程"),
369
+ disabled: !Q.value
370
+ },
371
+ {
372
+ key: "publish",
373
+ title: L.value?.publishStatus === "published" ? c.t("platform.screen.WorkflowConfigurationView.enable-published", "启用已发布版本") : c.t("platform.screen.WorkflowConfigurationView.publish-workflow", "发布流程"),
374
+ disabled: !L.value || V.value || M.value
375
+ },
376
+ {
377
+ key: "upgrade",
378
+ title: c.t("platform.screen.WorkflowConfigurationView.create-version", "创建新版本"),
379
+ level: "secondary",
380
+ disabled: V.value || H.value || M.value
381
+ },
382
+ {
383
+ key: "selection",
384
+ title: c.t("platform.screen.WorkflowConfigurationView.matching-rules", "匹配规则"),
385
+ level: "secondary",
386
+ disabled: V.value || H.value
387
+ },
388
+ {
389
+ key: "disable",
390
+ title: c.t("platform.screen.WorkflowConfigurationView.disable", "停用"),
391
+ level: "secondary",
392
+ danger: !0,
393
+ disabled: V.value || H.value || M.value
394
+ },
395
+ {
396
+ key: "archive",
397
+ title: c.t("platform.screen.WorkflowConfigurationView.archive", "归档"),
398
+ level: "secondary",
399
+ danger: !0,
400
+ disabled: V.value || H.value || M.value
401
+ }
402
+ ]);
403
+ function mt(e) {
404
+ e === "save" ? Pt() : e === "validate" ? Ft() : e === "publish" ? dt.value = !0 : e === "upgrade" ? Lt() : e === "selection" ? Mt() : Rt(e);
405
+ }
406
+ function ht(e) {
407
+ try {
408
+ return Ce(e).map((e) => ({
409
+ INITIATOR_SELF: c.t("platform.workflow-participant.initiator", "提交人本人"),
410
+ USER: c.t("platform.workflow-participant.named-accounts", "指定账号"),
411
+ ROLE: c.t("platform.workflow-participant.role-members", "角色成员"),
412
+ DEPT: c.t("platform.workflow-participant.department-members", "部门成员"),
413
+ ORG: c.t("platform.workflow-participant.organization-members", "组织成员"),
414
+ FIELD: c.t("platform.workflow-participant.participant-field", "业务人员字段"),
415
+ RELATIVE: c.t("platform.workflow-participant.relative-participants", "相对人员")
416
+ }[e.type] ?? e.type) + (e.ids?.length ? c.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("、") || c.t("platform.workflow-config.empty-participants", "尚未配置参与人");
417
+ } catch {
418
+ return c.t("platform.workflow-config.invalid-participants", "人员配置格式无效");
419
+ }
420
+ }
421
+ let gt = C(""), _t = C(!1), N = C(), P = C([]), F = C([]), I = C(), L = C(), R = C({
422
+ nodes: [],
423
+ links: []
424
+ }), 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), vt = p(() => ["published", "archived"].includes(L.value?.publishStatus ?? "")), Q = p(() => L.value?.publishStatus === "draft" && !V.value), yt = p(() => R.value.nodes.find((e) => e.nodeKey === z.value)), bt = p(() => R.value.links.find((e) => e.routeKey === B.value));
425
+ function xt(e) {
426
+ let t = R.value.nodes.find((t) => t.nodeKey === e.convergeNodeKey), n = {
427
+ all: c.t("platform.workflow-config.all-arrive", "全部到达"),
428
+ any: c.t("platform.workflow-config.any-arrive", "任一到达"),
429
+ ratio: c.t("platform.workflow-config.ratio-arrive", "比例到达")
430
+ }, r = t?.convergeMode ?? "all";
431
+ return `${n[r]}${r === "ratio" ? ` ${t?.convergeRatio ?? 100}%` : ""}`;
432
+ }
433
+ Ee(() => c.t("platform.workflow-config.configuration", "流程配置"), () => H.value || M.value, () => V.value), je([
434
+ K,
435
+ G,
436
+ Z,
437
+ q,
438
+ J,
439
+ Y,
440
+ X
441
+ ], () => {
442
+ (W.value || U.value) && (M.value = !0);
443
+ }, { flush: "sync" }), ke(() => {
444
+ St(), ft();
445
+ });
446
+ async function $(e) {
447
+ if (!V.value) {
448
+ V.value = !0;
449
+ try {
450
+ await e();
451
+ } catch (e) {
452
+ l(e, {
453
+ source: "workflow-design",
454
+ phase: "action"
455
+ });
456
+ } finally {
457
+ V.value = !1;
458
+ }
459
+ }
460
+ }
461
+ async function St() {
462
+ if (!(V.value || H.value || M.value)) {
463
+ V.value = !0, _t.value = !0, N.value = void 0;
464
+ try {
465
+ P.value = await E.query();
466
+ } catch (e) {
467
+ N.value = () => xe(we(e), c);
468
+ } finally {
469
+ _t.value = !1, V.value = !1;
470
+ }
471
+ }
472
+ }
473
+ async function Ct(e) {
474
+ if (H.value || M.value) {
475
+ l(Error(c.t("platform.workflow-config.save-first", "请先保存流程设计")), {
476
+ source: "workflow-design",
477
+ phase: "validation"
478
+ });
479
+ return;
480
+ }
481
+ M.value = !1, await $(async () => {
482
+ 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) : {
483
+ nodes: [],
484
+ links: []
485
+ };
486
+ 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;
487
+ });
488
+ }
489
+ async function wt(e) {
490
+ let t = await E.design(I.value.id, e.id);
491
+ L.value = e, R.value = t, H.value = !1, z.value = R.value.nodes[0]?.nodeKey ?? "", B.value = "", j.value = !1;
492
+ }
493
+ async function Tt(e) {
494
+ if (H.value || M.value) return;
495
+ let t = F.value.find((t) => t.id === e);
496
+ t && await $(() => wt(t));
497
+ }
498
+ function Et() {
499
+ 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);
500
+ }
501
+ let Dt = p(() => /^-?\d+$/.test(Y.value.trim()) && Number(Y.value) >= -2147483648 && Number(Y.value) <= 2147483647), Ot = p(() => /^[a-z][a-z0-9_]{0,62}$/.test(G.value.trim())), kt = p(() => !!K.value.trim() && Dt.value);
502
+ async function At() {
503
+ Ot.value && kt.value && await $(async () => {
504
+ let e = await E.create({
505
+ alias: G.value.trim(),
506
+ title: K.value.trim(),
507
+ approvalEnabled: Z.value,
508
+ organizationId: q.value || null,
509
+ matchExpression: J.value || null,
510
+ matchPriority: Number(Y.value),
511
+ defaultDefinition: X.value,
512
+ enabled: !0
513
+ });
514
+ U.value = !1, M.value = !1, I.value = e, P.value.push(e), F.value = [], L.value = void 0, R.value = {
515
+ nodes: [],
516
+ links: []
517
+ }, k.value = {
518
+ tasks: [],
519
+ queries: [],
520
+ generations: [],
521
+ associations: []
522
+ }, z.value = "", B.value = "", j.value = !1, gt.value = "", await Re(e.id);
523
+ let t = await E.upgrade(e.id);
524
+ F.value = [t], L.value = t, R.value = Ke(Z.value), H.value = !0, zt("approval");
525
+ });
526
+ }
527
+ async function jt() {
528
+ (!M.value || await me({
529
+ title: c.t("platform.workflow-config.discard-confirm", "放弃未保存的流程设置?"),
530
+ danger: !0,
531
+ okText: c.t("platform.workflow-config.discard", "放弃修改")
532
+ }, c)) && (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));
533
+ }
534
+ async function Mt() {
535
+ if (W.value) {
536
+ await jt();
537
+ return;
538
+ }
539
+ W.value = !0;
540
+ }
541
+ async function Nt() {
542
+ !V.value && I.value && kt.value && await $(async () => {
543
+ let e = await E.saveSelection(I.value.id, {
544
+ version: I.value.version,
545
+ title: K.value,
546
+ organizationId: q.value || null,
547
+ matchExpression: J.value || null,
548
+ matchPriority: Number(Y.value),
549
+ defaultDefinition: X.value
550
+ });
551
+ P.value = P.value.map((t) => t.id === e.id ? e : t), I.value = e, W.value = !1, M.value = !1, d(c.t("platform.workflow-config.matching-saved", "流程匹配规则已保存,后续提交生效"));
552
+ });
553
+ }
554
+ async function Pt() {
555
+ L.value && I.value && await $(async () => {
556
+ 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, d(c.t("platform.workflow-config.draft-saved", "流程草稿已保存"));
557
+ });
558
+ }
559
+ async function Ft() {
560
+ H.value && await Pt(), !H.value && L.value && await $(async () => {
561
+ await E.validate(I.value.id, L.value.id), d(c.t("platform.workflow-config.validated", "流程发布校验通过"));
562
+ });
563
+ }
564
+ async function It() {
565
+ if (R.value.nodes.some((e) => ["approval", "task"].includes(e.nodeType) && !be(e.participantPolicyText))) {
566
+ l(Error(c.t("platform.workflow-config.participants-required", "请为每个审批或业务任务节点明确配置参与人")), {
567
+ source: "workflow-design",
568
+ phase: "validation"
569
+ });
570
+ return;
571
+ }
572
+ H.value && await Pt(), !H.value && I.value && L.value && (await $(async () => {
573
+ 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, dt.value = !1, d(c.t("platform.workflow-config.published", "流程已发布,后续新申请使用该版本"));
574
+ }), await St());
575
+ }
576
+ async function Lt() {
577
+ I.value && await $(async () => {
578
+ let e = await E.upgrade(I.value.id);
579
+ F.value = [e, ...F.value.filter((t) => t.id !== e.id)], await wt(e), R.value.nodes.length || (R.value = Ke(I.value.approvalEnabled), H.value = !0, zt("approval"));
580
+ });
581
+ }
582
+ async function Rt(e) {
583
+ I.value && await me({
584
+ title: e === "archive" ? c.t("platform.workflow-config.archive-confirm", "归档此流程?") : c.t("platform.workflow-config.disable-confirm", "停用此流程?"),
585
+ content: c.t("platform.workflow-config.future-only", "此操作影响后续新申请,已有实例继续使用冻结版本。"),
586
+ danger: !0
587
+ }, c) && (await $(async () => {
588
+ I.value = await E.changeStatus(I.value.id, e, I.value.version), d(c.t("platform.workflow-config.status-updated", "流程状态已更新"));
589
+ }), await St());
590
+ }
591
+ function zt(e) {
592
+ z.value = e, B.value = "", j.value = !!e;
593
+ }
594
+ function Bt(e) {
595
+ B.value = e, z.value = "", j.value = !!e;
596
+ }
597
+ function Vt(e) {
598
+ Q.value && R.value.layoutJson !== e && (R.value = {
599
+ ...R.value,
600
+ layoutJson: e
601
+ }, H.value = !0);
602
+ }
603
+ function Ht(e) {
604
+ yt.value && Q.value && (Object.assign(yt.value, e), H.value = !0);
605
+ }
606
+ function Ut(e) {
607
+ bt.value && Q.value && (R.value = Ue(R.value, bt.value.routeKey, e), H.value = !0);
608
+ }
609
+ function Wt() {
610
+ let e = R.value.links.filter((e) => e.sourceNodeKey === z.value);
611
+ return B.value || (e.length === 1 ? e[0]?.routeKey : void 0) || "";
612
+ }
613
+ function Gt() {
614
+ if (!Q.value) return;
615
+ let e = `branch_${Date.now().toString(36)}`;
616
+ try {
617
+ R.value = Be(R.value, Wt(), e), H.value = !0, zt(e);
618
+ } catch (e) {
619
+ l(e, {
620
+ source: "workflow-design",
621
+ phase: "validation"
622
+ });
623
+ }
624
+ }
625
+ function Kt() {
626
+ if (Q.value) try {
627
+ R.value = Ve(R.value, z.value, `path_${Date.now().toString(36)}`), H.value = !0;
628
+ } catch (e) {
629
+ l(e, {
630
+ source: "workflow-design",
631
+ phase: "validation"
632
+ });
633
+ }
634
+ }
635
+ async function qt() {
636
+ if (Q.value) try {
637
+ let e = He(R.value, z.value);
638
+ if (!await me({
639
+ title: c.t("platform.workflow-config.delete-branch-confirm", "删除整个分支?"),
640
+ content: c.t("platform.workflow-config.delete-branch-detail", "将删除分支、配对汇聚及其中 {count} 个节点,并连接前后路径。", { count: R.value.nodes.length - e.nodes.length - 2 }),
641
+ danger: !0,
642
+ okText: c.t("platform.workflow-config.delete-branch", "删除分支")
643
+ }, c)) return;
644
+ R.value = e, H.value = !0, z.value = "", j.value = !1;
645
+ } catch (e) {
646
+ l(e, {
647
+ source: "workflow-design",
648
+ phase: "validation"
649
+ });
650
+ }
651
+ }
652
+ function Jt() {
653
+ if (!Q.value) return;
654
+ 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)}`;
655
+ try {
656
+ R.value = We(R.value, t ?? "", A(n, "新审批节点")), H.value = !0, zt(n);
657
+ } catch (e) {
658
+ l(e, {
659
+ source: "workflow-design",
660
+ phase: "validation"
661
+ });
662
+ }
663
+ }
664
+ function Yt() {
665
+ if (Q.value) try {
666
+ R.value = Ge(R.value, z.value), H.value = !0, z.value = "", j.value = !1;
667
+ } catch (e) {
668
+ l(e, {
669
+ source: "workflow-design",
670
+ phase: "validation"
671
+ });
672
+ }
673
+ }
674
+ function Xt() {
675
+ Q.value && (R.value.links = R.value.links.filter((e) => e.routeKey !== B.value), B.value = "", H.value = !0);
676
+ }
677
+ function Zt() {
678
+ if (!Q.value) return;
679
+ let e = R.value.nodes[0], t = R.value.nodes.find((e) => e.nodeType === "end");
680
+ if (!e || !t) return;
681
+ let n = `route_${Date.now().toString(36)}`;
682
+ R.value.links.push({
683
+ routeKey: n,
684
+ sourceNodeKey: yt.value?.nodeKey ?? e.nodeKey,
685
+ targetNodeKey: t.nodeKey,
686
+ title: "新路径"
687
+ }), B.value = n, z.value = "", j.value = !0, H.value = !0;
688
+ }
689
+ return (e, t) => (S(), g("section", qe, [y(T(Te), {
690
+ "explorer-title": T(c).t("platform.screen.WorkflowConfigurationView.approval-workflow", "审批流程"),
691
+ "refresh-title": T(c).t("platform.workflow-config.refresh-definitions", "刷新审批流程"),
692
+ mode: U.value ? "create" : W.value || H.value || M.value ? "edit" : "view",
693
+ busy: V.value,
694
+ "detail-title": U.value ? T(c).t("platform.screen.WorkflowConfigurationView.new-workflow", "新建流程") : I.value?.title ?? T(c).t("platform.workflow-config.configuration", "流程配置"),
695
+ "explorer-search-keyword": gt.value,
696
+ "onUpdate:explorerSearchKeyword": t[18] ||= (e) => gt.value = e,
697
+ onRefresh: St
698
+ }, De({
699
+ "explorer-actions": D(() => [y(T(ie), {
700
+ class: "record-panel-create-button",
701
+ "icon-name": "plus",
702
+ title: T(c).t("platform.screen.WorkflowConfigurationView.new-workflow", "新建流程"),
703
+ disabled: V.value || U.value || H.value || M.value,
704
+ onClick: Et
705
+ }, null, 8, ["title", "disabled"])]),
706
+ explorer: D(() => [N.value ? (S(), g(f, { key: 0 }, [y(T(se), { message: N.value() }, null, 8, ["message"]), y(T(n), {
707
+ type: "text",
708
+ onClick: St
709
+ }, {
710
+ default: D(() => [v(w(T(c).t("platform.screen.CrudRecordListExplorer.reload", "重新加载")), 1)]),
711
+ _: 1
712
+ })], 64)) : h("v-if", !0), _t.value && !P.value.length ? (S(), m(T(i), {
713
+ key: 1,
714
+ tip: T(c).t("platform.workflow-config.loading-definitions", "正在加载审批流程")
715
+ }, null, 8, ["tip"])) : !N.value || P.value.length ? (S(), m(T(he), {
716
+ key: 2,
717
+ records: P.value,
718
+ keyword: gt.value,
719
+ "empty-description": T(c).t("platform.workflow-config.no-definitions", "暂无流程,点击“新建流程”开始配置"),
720
+ "selected-id": I.value?.id,
721
+ "item-of": (e) => ({
722
+ title: String(e.title ?? e.alias ?? ""),
723
+ secondary: String(e.alias ?? ""),
724
+ tag: u(String(e.definitionStatus ?? ""))
725
+ }),
726
+ onSelect: t[0] ||= (e) => Ct(P.value.find((t) => t.id === e.id))
727
+ }, null, 8, [
728
+ "records",
729
+ "keyword",
730
+ "empty-description",
731
+ "selected-id",
732
+ "item-of"
733
+ ])) : h("v-if", !0)]),
734
+ default: D(() => [U.value ? (S(), g("form", {
735
+ key: 0,
736
+ class: "property-form",
737
+ onSubmit: Me(At, ["prevent"])
738
+ }, [
739
+ _("p", Je, w(T(c).t("platform.workflow-config.creation-help", "先创建草稿,再配置节点和参与人;发布后才会用于后续申请。")), 1),
740
+ _("label", Ye, [y(T(fe), { required: "" }, {
741
+ default: D(() => [v(w(T(c).t("platform.screen.WorkflowConfigurationView.workflow-name", "流程名称")), 1)]),
742
+ _: 1
743
+ }), y(T(s), {
744
+ disabled: V.value,
745
+ value: K.value,
746
+ "onUpdate:value": t[2] ||= (e) => K.value = e,
747
+ required: "",
748
+ "aria-label": T(c).t("platform.screen.WorkflowConfigurationView.workflow-name", "流程名称")
749
+ }, null, 8, [
750
+ "disabled",
751
+ "value",
752
+ "aria-label"
753
+ ])]),
754
+ _("div", Xe, [_("label", Ze, [
755
+ y(T(fe), { required: "" }, {
756
+ default: D(() => [v(w(T(c).t("platform.screen.WorkflowConfigurationView.workflow-code", "流程编码")), 1)]),
757
+ _: 1
758
+ }),
759
+ y(T(s), {
760
+ disabled: V.value,
761
+ value: G.value,
762
+ "onUpdate:value": t[3] ||= (e) => G.value = e,
763
+ required: "",
764
+ invalid: !!G.value.trim() && !Ot.value,
765
+ "aria-label": T(c).t("platform.screen.WorkflowConfigurationView.workflow-code", "流程编码")
766
+ }, null, 8, [
767
+ "disabled",
768
+ "value",
769
+ "invalid",
770
+ "aria-label"
771
+ ]),
772
+ G.value.trim() && !Ot.value ? (S(), g("small", Qe, w(T(c).t("platform.workflow-config.alias-help", "小写字母开头,仅含小写字母、数字和下划线,最多 63 个字符。")), 1)) : h("v-if", !0)
773
+ ]), y(T(ae), {
774
+ class: "workflow-field-help__trigger",
775
+ label: T(c).t("platform.workflow-config.alias-help-title", "流程编码格式说明")
776
+ }, {
777
+ default: D(() => [v(w(T(c).t("platform.workflow-config.alias-help", "小写字母开头,仅含小写字母、数字和下划线,最多 63 个字符。")), 1)]),
778
+ _: 1
779
+ }, 8, ["label"])]),
780
+ _("div", $e, [y(T(ue), {
781
+ disabled: V.value,
782
+ checked: Z.value,
783
+ "onUpdate:checked": t[4] ||= (e) => Z.value = e
784
+ }, {
785
+ default: D(() => [v(w(T(c).t("platform.screen.WorkflowConfigurationView.govern-business-approval-status", "驱动业务审批状态")), 1)]),
786
+ _: 1
787
+ }, 8, ["disabled", "checked"]), y(T(ae), { label: T(c).t("platform.workflow-config.approval-help-title", "审批状态说明") }, {
788
+ default: D(() => [v(w(T(c).t("platform.workflow-config.approval-help", "开启后回写业务记录的审批状态;关闭后仅编排任务流程。")), 1)]),
789
+ _: 1
790
+ }, 8, ["label"])]),
791
+ _("details", et, [_("summary", null, w(T(c).t("platform.workflow-config.optional-matching", "适用范围与匹配规则(可选)")), 1), y(ze, {
792
+ class: "optional-settings",
793
+ "organization-id": q.value,
794
+ "onUpdate:organizationId": t[5] ||= (e) => q.value = e,
795
+ "match-expression": J.value,
796
+ "onUpdate:matchExpression": t[6] ||= (e) => J.value = e,
797
+ "match-priority": Y.value,
798
+ "onUpdate:matchPriority": t[7] ||= (e) => Y.value = e,
799
+ fallback: X.value,
800
+ "onUpdate:fallback": t[8] ||= (e) => X.value = e,
801
+ "organization-context": Fe.value,
802
+ fields: O.value,
803
+ disabled: V.value,
804
+ "invalid-priority": !Dt.value
805
+ }, null, 8, [
806
+ "organization-id",
807
+ "match-expression",
808
+ "match-priority",
809
+ "fallback",
810
+ "organization-context",
811
+ "fields",
812
+ "disabled",
813
+ "invalid-priority"
814
+ ])])
815
+ ], 32)) : I.value ? (S(), g(f, { key: 1 }, [
816
+ _("div", { class: Oe(["toolbar", { "configuration-toolbar--properties": j.value }]) }, [y(T(de), {
817
+ value: L.value?.id,
818
+ options: F.value.map((e) => ({
819
+ value: e.id,
820
+ label: T(c).t("platform.screen.WorkflowConfigurationView.version-value-value", "版本 {value1} · {value2}", {
821
+ value1: e.versionNo,
822
+ value2: u(e.publishStatus)
823
+ })
824
+ })),
825
+ disabled: V.value || H.value || M.value || W.value,
826
+ "onUpdate:value": t[9] ||= (e) => Tt(String(e))
827
+ }, null, 8, [
828
+ "value",
829
+ "options",
830
+ "disabled"
831
+ ])], 2),
832
+ W.value ? (S(), g("form", {
833
+ key: 0,
834
+ class: "property-form",
835
+ onSubmit: Me(Nt, ["prevent"])
836
+ }, [
837
+ y(T(re), {
838
+ class: "settings-wide",
839
+ title: T(c).t("platform.screen.WorkflowConfigurationView.workflow-matching-rules", "流程匹配规则")
840
+ }, null, 8, ["title"]),
841
+ _("label", tt, [y(T(fe), { required: "" }, {
842
+ default: D(() => [v(w(T(c).t("platform.screen.WorkflowConfigurationView.workflow-name", "流程名称")), 1)]),
843
+ _: 1
844
+ }), y(T(s), {
845
+ disabled: V.value,
846
+ value: K.value,
847
+ "onUpdate:value": t[10] ||= (e) => K.value = e,
848
+ required: ""
849
+ }, null, 8, ["disabled", "value"])]),
850
+ y(ze, {
851
+ "organization-id": q.value,
852
+ "onUpdate:organizationId": t[11] ||= (e) => q.value = e,
853
+ "match-expression": J.value,
854
+ "onUpdate:matchExpression": t[12] ||= (e) => J.value = e,
855
+ "match-priority": Y.value,
856
+ "onUpdate:matchPriority": t[13] ||= (e) => Y.value = e,
857
+ fallback: X.value,
858
+ "onUpdate:fallback": t[14] ||= (e) => X.value = e,
859
+ "organization-context": Fe.value,
860
+ fields: O.value,
861
+ disabled: V.value,
862
+ "invalid-priority": !Dt.value
863
+ }, null, 8, [
864
+ "organization-id",
865
+ "match-expression",
866
+ "match-priority",
867
+ "fallback",
868
+ "organization-context",
869
+ "fields",
870
+ "disabled",
871
+ "invalid-priority"
872
+ ]),
873
+ _("p", nt, w(T(c).t("platform.screen.WorkflowConfigurationView.changes-affect-future-submissions-existing-instances-retain", "调整仅影响后续提交,已有实例保留原发布版本和分派快照。")), 1)
874
+ ], 32)) : h("v-if", !0),
875
+ vt.value ? (S(), g("p", rt, w(T(c).t("platform.screen.WorkflowConfigurationView.this-version-is-frozen-create-a-new", "此版本已冻结。修改流程请创建新版本;已有实例继续使用原版本。")), 1)) : h("v-if", !0),
876
+ H.value ? (S(), g("p", it, w(T(c).t("platform.screen.WorkflowConfigurationView.the-draft-has-unsaved-changes", "草稿有未保存的修改")), 1)) : h("v-if", !0),
877
+ _("div", { class: Oe(["configuration-design", { "configuration-design--properties": j.value }]) }, [(S(), m(T(ye), {
878
+ key: L.value?.id,
879
+ nodes: R.value.nodes,
880
+ routes: R.value.links,
881
+ "selected-node-key": z.value,
882
+ "selected-route-key": B.value,
883
+ "layout-json": R.value.layoutJson,
884
+ editable: Q.value,
885
+ interactive: "",
886
+ onSelect: zt,
887
+ onSelectRoute: Bt,
888
+ onLayoutChange: Vt
889
+ }, null, 8, [
890
+ "nodes",
891
+ "routes",
892
+ "selected-node-key",
893
+ "selected-route-key",
894
+ "layout-json",
895
+ "editable"
896
+ ])), _("div", at, [
897
+ y(T(n), {
898
+ disabled: !Q.value,
899
+ onClick: Jt
900
+ }, {
901
+ default: D(() => [v(w(T(c).t("platform.screen.WorkflowConfigurationView.insert-approval-node", "插入审批节点")), 1)]),
902
+ _: 1
903
+ }, 8, ["disabled"]),
904
+ y(T(n), {
905
+ disabled: !Q.value,
906
+ onClick: Gt
907
+ }, {
908
+ default: D(() => [v(w(T(c).t("platform.screen.WorkflowConfigurationView.insert-branch-and-convergence", "插入分支与汇聚")), 1)]),
909
+ _: 1
910
+ }, 8, ["disabled"]),
911
+ y(T(n), {
912
+ disabled: !Q.value,
913
+ onClick: Zt
914
+ }, {
915
+ default: D(() => [v(w(T(c).t("platform.screen.WorkflowConfigurationView.add-link", "添加连线")), 1)]),
916
+ _: 1
917
+ }, 8, ["disabled"]),
918
+ y(T(de), {
919
+ value: B.value || void 0,
920
+ placeholder: T(c).t("platform.screen.WorkflowConfigurationView.select-link", "选择连线"),
921
+ options: R.value.links.map((e) => ({
922
+ value: e.routeKey,
923
+ label: `${e.title ?? T(c).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}`
924
+ })),
925
+ "onUpdate:value": t[15] ||= (e) => Bt(String(e))
926
+ }, null, 8, [
927
+ "value",
928
+ "placeholder",
929
+ "options"
930
+ ])
931
+ ])], 2),
932
+ y(T(te), {
933
+ width: "wide",
934
+ open: j.value,
935
+ title: yt.value?.title ? T(c).t("platform.workflow-config.node-properties", "节点属性 · {title}", { title: yt.value.title }) : T(c).t("platform.workflow-config.route-properties", "路径属性"),
936
+ onClose: t[17] ||= (e) => j.value = !1
937
+ }, {
938
+ operation: D(() => [y(T(n), {
939
+ disabled: V.value,
940
+ onClick: t[16] ||= (e) => j.value = !1
941
+ }, {
942
+ default: D(() => [v(w(T(c).t("platform.screen.WorkflowConfigurationView.finish-configuration", "完成配置")), 1)]),
943
+ _: 1
944
+ }, 8, ["disabled"])]),
945
+ default: D(() => [y(T(Se), {
946
+ design: R.value,
947
+ "node-key": z.value,
948
+ "route-key": B.value,
949
+ editable: Q.value,
950
+ http: T(x).http,
951
+ "module-alias": ge.moduleAlias,
952
+ fields: O.value,
953
+ catalog: k.value,
954
+ actions: Le.value,
955
+ onUpdateNode: Ht,
956
+ onUpdateRoute: Ut,
957
+ onSelectRoute: Bt,
958
+ onRemoveNode: Yt,
959
+ onRemoveRoute: Xt,
960
+ onAppendBranchPath: Kt,
961
+ onDeleteBranch: qt
962
+ }, null, 8, [
963
+ "design",
964
+ "node-key",
965
+ "route-key",
966
+ "editable",
967
+ "http",
968
+ "module-alias",
969
+ "fields",
970
+ "catalog",
971
+ "actions"
972
+ ])]),
973
+ _: 1
974
+ }, 8, ["open", "title"])
975
+ ], 64)) : (S(), m(T(ne), {
976
+ key: 2,
977
+ description: T(c).t("platform.screen.WorkflowConfigurationView.select-or-create-a-workflow-to-configure", "选择或新建流程,配置节点、参与人、路径和业务完成条件。")
978
+ }, null, 8, ["description"]))]),
979
+ _: 2
980
+ }, [I.value && !U.value ? {
981
+ name: "detail-actions",
982
+ fn: D(() => [y(T(le), {
983
+ class: "configuration-action-bar",
984
+ actions: pt.value,
985
+ onAction: t[1] ||= (e) => mt(e.key)
986
+ }, null, 8, ["actions"])]),
987
+ key: "0"
988
+ } : void 0, U.value || W.value ? {
989
+ name: "detail-operation",
990
+ fn: D(() => [U.value ? (S(), g(f, { key: 0 }, [y(T(n), {
991
+ type: "primary",
992
+ loading: V.value,
993
+ disabled: V.value || !kt.value || !Ot.value,
994
+ onClick: At
995
+ }, {
996
+ default: D(() => [v(w(T(c).t("platform.screen.WorkflowConfigurationView.create-workflow-draft", "创建流程草稿")), 1)]),
997
+ _: 1
998
+ }, 8, ["loading", "disabled"]), y(T(n), {
999
+ disabled: V.value,
1000
+ onClick: jt
1001
+ }, {
1002
+ default: D(() => [v(w(T(c).t("platform.screen.WorkflowConfigurationView.cancel-creation", "取消新建")), 1)]),
1003
+ _: 1
1004
+ }, 8, ["disabled"])], 64)) : (S(), g(f, { key: 1 }, [y(T(n), {
1005
+ type: "primary",
1006
+ loading: V.value,
1007
+ disabled: V.value || !kt.value,
1008
+ onClick: Nt
1009
+ }, {
1010
+ default: D(() => [v(w(T(c).t("platform.screen.WorkflowConfigurationView.save-matching-rules", "保存匹配规则")), 1)]),
1011
+ _: 1
1012
+ }, 8, ["loading", "disabled"]), y(T(n), {
1013
+ disabled: V.value,
1014
+ onClick: jt
1015
+ }, {
1016
+ default: D(() => [v(w(T(c).t("platform.screen.WorkflowConfigurationView.cancel-changes", "取消修改")), 1)]),
1017
+ _: 1
1018
+ }, 8, ["disabled"])], 64))]),
1019
+ key: "1"
1020
+ } : void 0]), 1032, [
1021
+ "explorer-title",
1022
+ "refresh-title",
1023
+ "mode",
1024
+ "busy",
1025
+ "detail-title",
1026
+ "explorer-search-keyword"
1027
+ ]), y(T(te), {
1028
+ width: "extraWide",
1029
+ open: dt.value,
1030
+ title: T(c).t("platform.screen.WorkflowConfigurationView.confirm-workflow-publication", "确认发布流程"),
1031
+ onClose: t[19] ||= (e) => dt.value = !1
1032
+ }, {
1033
+ operation: D(() => [y(T(n), {
1034
+ type: "primary",
1035
+ loading: V.value,
1036
+ onClick: It
1037
+ }, {
1038
+ default: D(() => [v(w(T(c).t("platform.screen.WorkflowConfigurationView.confirm-publication", "确认发布")), 1)]),
1039
+ _: 1
1040
+ }, 8, ["loading"])]),
1041
+ default: D(() => [
1042
+ _("p", null, w(T(c).t("platform.workflow-config.publication-frozen", "流程:{title} · 版本 {version}。发布后配置冻结;已有实例继续使用原版本。", {
1043
+ title: I.value?.title,
1044
+ version: L.value?.versionNo
1045
+ })), 1),
1046
+ _("p", null, w(T(c).t("platform.workflow-config.matching-scope", "匹配范围")) + ":" + w(I.value?.organizationId ? T(c).t("platform.workflow-config.scoped-organizations", "指定组织及下级组织") : T(c).t("platform.workflow-config.all-organizations", "模块内全部组织")) + "; " + w(T(c).t("platform.workflow-config.priority", "优先级")) + " " + w(I.value?.matchPriority ?? 0) + ";" + w(I.value?.defaultDefinition ? T(c).t("platform.workflow-config.default-workflow", "作为默认兜底流程") : T(c).t("platform.workflow-config.conditional-workflow", "按匹配条件选择")) + "。 " + w(I.value?.matchExpression ? T(c).t("platform.workflow-config.matching-expression", "匹配条件:{expression}", { expression: I.value.matchExpression }) : T(c).t("platform.workflow-config.no-matching-condition", "未设置额外条件")), 1),
1047
+ _("ul", ot, [(S(!0), g(f, null, Ae(R.value.nodes.filter((e) => ["approval", "task"].includes(e.nodeType)), (e) => (S(), g("li", { key: e.nodeKey }, [
1048
+ _("strong", null, w(e.title), 1),
1049
+ v(" · " + w(ht(e.participantPolicyText)) + " ", 1),
1050
+ _("details", null, [_("summary", null, w(T(c).t("platform.screen.WorkflowConfigurationView.view-complete-participant-rules", "查看完整人员规则")), 1), y(T(pe), {
1051
+ value: e.participantPolicyText,
1052
+ http: T(x).http,
1053
+ fields: O.value,
1054
+ disabled: ""
1055
+ }, null, 8, [
1056
+ "value",
1057
+ "http",
1058
+ "fields"
1059
+ ])]),
1060
+ e.nodeType === "task" ? (S(), g("details", st, [
1061
+ _("summary", null, w(T(c).t("platform.screen.WorkflowConfigurationView.view-business-task-checks-and-instructions", "查看业务任务检查与办理指引")), 1),
1062
+ e.taskDefinitionId ? (S(), g("p", ct, w(T(c).t("platform.workflow-config.referenced-task", "引用任务")) + ":" + w(k.value.tasks.find((t) => t.id === e.taskDefinitionId)?.title ?? e.taskDefinitionId), 1)) : h("v-if", !0),
1063
+ y(T(ve), {
1064
+ value: e.nodeConfigText,
1065
+ "module-alias": ge.moduleAlias,
1066
+ fields: O.value,
1067
+ catalog: k.value,
1068
+ actions: Le.value,
1069
+ associations: k.value.associations.map((e) => ({
1070
+ value: e.id,
1071
+ label: e.title
1072
+ })),
1073
+ disabled: ""
1074
+ }, null, 8, [
1075
+ "value",
1076
+ "module-alias",
1077
+ "fields",
1078
+ "catalog",
1079
+ "actions",
1080
+ "associations"
1081
+ ])
1082
+ ])) : h("v-if", !0),
1083
+ e.participantPolicyText?.includes("INITIATOR_SELF") ? (S(), g("p", lt, w(T(c).t("platform.screen.WorkflowConfigurationView.the-submitter-processes-this-node-confirm-that", "此节点由提交人本人办理,请确认符合业务要求。")), 1)) : h("v-if", !0)
1084
+ ]))), 128))]),
1085
+ (S(!0), g(f, null, Ae(R.value.nodes.filter((e) => e.nodeType === "branch"), (e) => (S(), g("div", { key: e.nodeKey }, [
1086
+ _("strong", null, w(e.title) + " · " + w(e.routeMode === "manual" ? T(c).t("platform.workflow-config.manual-route", "人工单选") : T(c).t("platform.workflow-config.auto-route", "自动判定(全部命中出口)")), 1),
1087
+ e.routeMode === "manual" ? (S(), g("p", ut, w(T(c).t("platform.workflow-config.selector-summary", "由{title}的实际办理人选路;{reason}。", {
1088
+ title: R.value.nodes.find((t) => t.nodeKey === e.selectorNodeKey)?.title ?? T(c).t("platform.workflow-config.missing-selector", "未配置选择节点"),
1089
+ reason: e.requireManualSelectionReason ? T(c).t("platform.workflow-config.reason-required", "必须填写原因") : T(c).t("platform.workflow-config.reason-optional", "原因选填")
1090
+ })), 1)) : h("v-if", !0),
1091
+ _("ul", null, [(S(!0), g(f, null, Ae(R.value.links.filter((t) => t.sourceNodeKey === e.nodeKey), (e) => (S(), g("li", { key: e.routeKey }, w(e.title ?? T(c).t("platform.workflow-config.exit", "出口")) + ":" + w(e.defaultRoute ? T(c).t("platform.workflow-config.fallback-exit", "默认兜底") : e.conditionExpression || T(c).t("platform.workflow-config.unconditional", "无条件(始终命中)")), 1))), 128))]),
1092
+ _("p", null, w(T(c).t("platform.workflow-config.convergence-counting", "汇聚:{summary},只计算有效出口。", { summary: xt(e) })), 1)
1093
+ ]))), 128)),
1094
+ _("details", null, [_("summary", null, w(T(c).t("platform.screen.WorkflowConfigurationView.view-published-workflow", "查看发布流程图")), 1), y(T(ye), {
1095
+ presentation: "detail",
1096
+ nodes: R.value.nodes,
1097
+ routes: R.value.links,
1098
+ "layout-json": R.value.layoutJson
1099
+ }, null, 8, [
1100
+ "nodes",
1101
+ "routes",
1102
+ "layout-json"
1103
+ ])])
1104
+ ]),
1105
+ _: 1
1106
+ }, 8, ["open", "title"])]));
1107
+ }
1108
+ }), [["__scopeId", "data-v-e106b7a3"]]);
1109
+ //#endregion
1110
+ export { j as default };