@ximatai/muyun-web-app 0.26.19 → 0.26.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BusinessActivityLogView-DudCmeKP.js → BusinessActivityLogView-6L75GZVc.js} +2 -2
- package/dist/{BusinessLogListDrawer-CVUvUG48.js → BusinessLogListDrawer-C4iFnkE7.js} +95 -95
- package/dist/{CodeConfigurationView-ZjVgaZkD.js → CodeConfigurationView-D7sqbNCg.js} +515 -515
- package/dist/{ConfigurationTranslationView-Dl757QMl.js → ConfigurationTranslationView-ta82REbn.js} +21 -21
- package/dist/{LoginAuditLogView-Cj3PMvN5.js → LoginAuditLogView-B_RQ9JIX.js} +2 -2
- package/dist/ModuleActionManagementView-DtGF3NC_.js +755 -0
- package/dist/{ModuleGovernanceView-C3RxdgQN.js → ModuleGovernanceView-Cl6tkZ6M.js} +2659 -2651
- package/dist/{RequestErrorLogView-tmjMOeLE.js → RequestErrorLogView-BJDO3Scn.js} +2 -2
- package/dist/RoleDetailWorkspaceView-C0Ab3PEp.js +1435 -0
- package/dist/{RuntimeLogView-BkkgHcF0.js → RuntimeLogView-jP9ceuJD.js} +61 -61
- package/dist/WorkflowAdministrationView-BmNJQYtq.js +650 -0
- package/dist/{WorkflowConfigurationView-Bnjdrkdx.js → WorkflowConfigurationView-Dh6BKQm5.js} +309 -309
- package/dist/WorkflowWorkbenchView-BvPNKbuV.js +759 -0
- package/dist/{codeConfiguration-DERwCY-U.js → codeConfiguration-DhCBKbkc.js} +38 -38
- package/dist/index.css +1 -1
- package/dist/index.js +999 -618
- package/dist/moduleMenuWorkspace-BbVmNKZn.js +626 -0
- package/dist/{platform-components-wRXbnwMr.js → platform-components-i2ONyZ8r.js} +2989 -2746
- package/dist/{platform-workbench-Cm_0kmTT.js → platform-workbench-DhaREttd.js} +5400 -5384
- package/dist/types/consumer/index.d.ts +8 -0
- package/dist/types/dynamic-page-runtime/ModulePageBusinessSession.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +19 -29
- package/dist/types/dynamic-page-runtime/ModulePageRecordContent.vue.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/ModulePageTenantNavigator.vue.d.ts +8 -0
- package/dist/types/dynamic-page-runtime/RecordFormSurface.vue.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/recordSaveFeedback.d.ts +5 -0
- package/dist/types/dynamic-page-runtime/useModulePageSession.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/useTenantScopeController.d.ts +1 -0
- package/dist/types/platform-components/EmployeePicker.vue.d.ts +1 -1
- package/dist/types/platform-components/QueryCriteriaComposer.vue.d.ts +3 -1
- package/dist/types/platform-components/ReadonlyRecordWorkspace.vue.d.ts +56 -0
- package/dist/types/platform-components/RecordAdaptiveDetailPanel.vue.d.ts +3 -1
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +3 -0
- package/dist/types/platform-components/RecordQueryControls.vue.d.ts +21 -0
- package/dist/types/platform-components/RecordQueryFieldControls.vue.d.ts +32 -0
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordQueryListSurface.vue.d.ts +2 -2
- package/dist/types/platform-components/ReferencePicker.vue.d.ts +1 -1
- package/dist/types/platform-components/UserPicker.vue.d.ts +1 -1
- package/dist/types/platform-components/queryCriteria.d.ts +7 -0
- package/dist/types/platform-components/referencePickerModel.d.ts +5 -1
- package/dist/types/views/metadataChangeSetSubmission.d.ts +3 -0
- package/dist/types/views/metadataModelChangeSetClient.d.ts +7 -1
- package/dist/types/web-contracts/index.d.ts +3 -0
- package/dist/types/web-core/index.d.ts +3 -0
- package/dist/types/web-core/recordReadEntry.d.ts +23 -0
- package/dist/types/web-core/recordReadView.d.ts +28 -0
- package/dist/types/web-core/useRecordReadSession.d.ts +27 -0
- package/dist/{useWorkflowConfigurationContext-BE_UjKgk.js → useWorkflowConfigurationContext-B_NxZFyz.js} +8 -8
- package/dist/{workspaceViews-D37OpJ7g.js → workspaceViews-MTwNg_aQ.js} +565 -565
- package/package.json +1 -1
- package/dist/ModuleActionManagementView-BuhQrVA3.js +0 -755
- package/dist/RoleDetailWorkspaceView-OhpBChaT.js +0 -1435
- package/dist/WorkflowAdministrationView-DOhA_5-M.js +0 -650
- package/dist/WorkflowWorkbenchView-Cf6yiofx.js +0 -759
- package/dist/moduleMenuWorkspace-DPmYGkS_.js +0 -626
package/dist/{WorkflowConfigurationView-Bnjdrkdx.js → WorkflowConfigurationView-Dh6BKQm5.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { E as e } from "./platform-workbench-
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { Fragment as
|
|
1
|
+
import { E as e } from "./platform-workbench-DhaREttd.js";
|
|
2
|
+
import { An as t, Da as n, G as r, Hn as i, Ht as a, Ln as o, Mn as s, Nn as c, On as l, Xa as ee, Xt as te, Zn as ne, _n as u, a as re, c as ie, d as ae, fr as d, jr as oe, kn as se, l as ce, m as le, n as ue, nn as de, o as fe, or as pe, s as me, t as he, ur as f, wa as ge } from "./platform-components-i2ONyZ8r.js";
|
|
3
|
+
import { t as _e } from "./useWorkflowConfigurationContext-B_NxZFyz.js";
|
|
4
|
+
import { Fragment as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createSlots as ve, createTextVNode as y, createVNode as b, defineComponent as x, normalizeStyle as ye, onActivated as be, onBeforeUnmount as xe, onMounted as Se, onScopeDispose as Ce, openBlock as S, ref as C, renderList as w, toDisplayString as T, unref as E, watch as we, withCtx as D } from "vue";
|
|
5
5
|
//#region src/platform-components/useWorkflowDesignHistory.ts
|
|
6
|
-
function
|
|
7
|
-
let n =
|
|
8
|
-
|
|
6
|
+
function Te(e, t = 100) {
|
|
7
|
+
let n = C([JSON.stringify(e.value)]), r = C(0), i = C(n.value[0]), a = !1, o = 0;
|
|
8
|
+
Ce(() => {
|
|
9
9
|
o++;
|
|
10
|
-
}),
|
|
10
|
+
}), we(() => JSON.stringify(e.value), (e) => {
|
|
11
11
|
a || e === n.value[r.value] || (o++, n.value = [...n.value.slice(0, r.value + 1), e].slice(-t), r.value = n.value.length - 1);
|
|
12
12
|
}, { flush: "sync" });
|
|
13
13
|
function s(t) {
|
|
@@ -21,9 +21,9 @@ function De(e, t = 100) {
|
|
|
21
21
|
let e = o;
|
|
22
22
|
return () => o === e;
|
|
23
23
|
},
|
|
24
|
-
canUndo:
|
|
25
|
-
canRedo:
|
|
26
|
-
dirty:
|
|
24
|
+
canUndo: m(() => r.value > 0),
|
|
25
|
+
canRedo: m(() => r.value < n.value.length - 1),
|
|
26
|
+
dirty: m(() => JSON.stringify(e.value) !== i.value),
|
|
27
27
|
undo: () => s(r.value - 1),
|
|
28
28
|
redo: () => s(r.value + 1),
|
|
29
29
|
markSaved: () => {
|
|
@@ -34,7 +34,7 @@ function De(e, t = 100) {
|
|
|
34
34
|
}
|
|
35
35
|
//#endregion
|
|
36
36
|
//#region src/platform-components/workflowDesignEditing.ts
|
|
37
|
-
function
|
|
37
|
+
function O(e, t) {
|
|
38
38
|
return {
|
|
39
39
|
nodeKey: e,
|
|
40
40
|
nodeType: "approval",
|
|
@@ -44,7 +44,7 @@ function E(e, t) {
|
|
|
44
44
|
allowReject: !0
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function Ee(e, t, n) {
|
|
48
48
|
let r = e.links.find((e) => e.routeKey === t);
|
|
49
49
|
if (!r) throw Error("请选择需要插入分支的路径");
|
|
50
50
|
let i = `${n}_join`, a = [
|
|
@@ -55,8 +55,8 @@ function Oe(e, t, n) {
|
|
|
55
55
|
routeMode: "auto",
|
|
56
56
|
convergeNodeKey: i
|
|
57
57
|
},
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
O(`${n}_path1`, "分支审批1"),
|
|
59
|
+
O(`${n}_path2`, "分支审批2"),
|
|
60
60
|
{
|
|
61
61
|
nodeKey: i,
|
|
62
62
|
nodeType: "converge",
|
|
@@ -90,14 +90,14 @@ function Oe(e, t, n) {
|
|
|
90
90
|
} : e), ...o]
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function De(e, t, n) {
|
|
94
94
|
let r = e.nodes.find((e) => e.nodeKey === t && e.nodeType === "branch"), i = e.nodes.find((e) => e.nodeKey === r?.convergeNodeKey && e.nodeType === "converge");
|
|
95
95
|
if (!r || !i) throw Error("分支必须绑定有效汇聚节点");
|
|
96
96
|
if (e.nodes.some((e) => e.nodeKey === n)) throw Error("节点标识已存在");
|
|
97
97
|
let a = e.links.filter((e) => e.sourceNodeKey === t).length + 1;
|
|
98
98
|
return {
|
|
99
99
|
...e,
|
|
100
|
-
nodes: [...e.nodes,
|
|
100
|
+
nodes: [...e.nodes, O(n, `分支审批${a}`)],
|
|
101
101
|
links: [
|
|
102
102
|
...e.links,
|
|
103
103
|
{
|
|
@@ -115,7 +115,7 @@ function ke(e, t, n) {
|
|
|
115
115
|
]
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function Oe(e, t) {
|
|
119
119
|
let n = e.nodes.find((e) => e.nodeKey === t && e.nodeType === "branch"), r = e.nodes.find((e) => e.nodeKey === n?.convergeNodeKey && e.nodeType === "converge");
|
|
120
120
|
if (!n || !r) throw Error("分支必须绑定有效汇聚节点");
|
|
121
121
|
let i = /* @__PURE__ */ new Set([t]);
|
|
@@ -138,7 +138,7 @@ function Ae(e, t) {
|
|
|
138
138
|
} : e)
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function ke(e, t, n) {
|
|
142
142
|
let r = e.links.find((e) => e.routeKey === t);
|
|
143
143
|
if (!r) throw Error("路径不存在");
|
|
144
144
|
return {
|
|
@@ -153,7 +153,7 @@ function je(e, t, n) {
|
|
|
153
153
|
} : e)
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function Ae(e, t, n) {
|
|
157
157
|
let r = e.links.find((e) => e.routeKey === t);
|
|
158
158
|
if (!r) throw Error("请选择需要插入节点的路径");
|
|
159
159
|
if (e.nodes.some((e) => e.nodeKey === n.nodeKey)) throw Error("节点标识已存在");
|
|
@@ -171,7 +171,7 @@ function Me(e, t, n) {
|
|
|
171
171
|
}]
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function je(e, t) {
|
|
175
175
|
let n = e.nodes.find((e) => e.nodeKey === t);
|
|
176
176
|
if (!n || ["start", "end"].includes(n.nodeType)) throw Error("开始和结束节点必须保留");
|
|
177
177
|
let r = e.links.filter((e) => e.targetNodeKey === t), i = e.links.filter((e) => e.sourceNodeKey === t);
|
|
@@ -185,7 +185,7 @@ function Ne(e, t) {
|
|
|
185
185
|
} : e)
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function Me(e) {
|
|
189
189
|
let t = [
|
|
190
190
|
{
|
|
191
191
|
nodeKey: "start",
|
|
@@ -193,7 +193,7 @@ function Pe(e) {
|
|
|
193
193
|
title: "提交"
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
|
-
...
|
|
196
|
+
...O("approval", "审批"),
|
|
197
197
|
requireRejectReason: !0,
|
|
198
198
|
allowRejectReturnToMe: !0,
|
|
199
199
|
allowRollback: !0,
|
|
@@ -224,17 +224,17 @@ function Pe(e) {
|
|
|
224
224
|
}
|
|
225
225
|
//#endregion
|
|
226
226
|
//#region src/platform-components/workflowDesignClipboard.ts
|
|
227
|
-
var
|
|
227
|
+
var k = /* @__PURE__ */ new Set([
|
|
228
228
|
"approval",
|
|
229
229
|
"task",
|
|
230
230
|
"milestone",
|
|
231
231
|
"branch",
|
|
232
232
|
"converge"
|
|
233
233
|
]);
|
|
234
|
-
function
|
|
234
|
+
function A(e) {
|
|
235
235
|
if (e?.kind !== "muyun.workflow.fragment" || e.version !== 1 || !Array.isArray(e.nodes) || !Array.isArray(e.links) || !e.nodes.length || e.nodes.length > 500 || e.links.length > 2e3) throw Error("剪贴板中不是有效的流程片段");
|
|
236
236
|
let t = new Set(e.nodes.map((e) => e?.nodeKey)), n = new Set(e.links.map((e) => e?.routeKey));
|
|
237
|
-
if (t.size !== e.nodes.length || [...t].some((e) => typeof e != "string" || !e) || n.size !== e.links.length || [...n].some((e) => typeof e != "string" || !e) || e.nodes.some((e) => !
|
|
237
|
+
if (t.size !== e.nodes.length || [...t].some((e) => typeof e != "string" || !e) || n.size !== e.links.length || [...n].some((e) => typeof e != "string" || !e) || e.nodes.some((e) => !k.has(e.nodeType)) || !t.has(e.entry) || !t.has(e.exit) || e.links.some((e) => !t.has(e.sourceNodeKey) || !t.has(e.targetNodeKey))) throw Error("流程片段包含无效节点或路径");
|
|
238
238
|
for (let t of e.nodes) if (t.nodeType === "branch" && !e.nodes.some((e) => e.nodeKey === t.convergeNodeKey && e.nodeType === "converge") || t.nodeType === "converge" && !e.nodes.some((e) => e.nodeType === "branch" && e.convergeNodeKey === t.nodeKey)) throw Error("请完整复制分支及其汇聚");
|
|
239
239
|
let r = /* @__PURE__ */ new Set();
|
|
240
240
|
function i(t, n = /* @__PURE__ */ new Set()) {
|
|
@@ -258,11 +258,11 @@ function O(e) {
|
|
|
258
258
|
if (r(t.nodeKey), e.links.some((e) => !n.has(e.sourceNodeKey) && n.has(e.targetNodeKey) && e.targetNodeKey !== t.nodeKey || n.has(e.sourceNodeKey) && !n.has(e.targetNodeKey) && e.sourceNodeKey !== t.convergeNodeKey)) throw Error("分支不能包含外部交叉路径");
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
-
function
|
|
262
|
-
let n = new Set(t.filter((t) =>
|
|
261
|
+
function Ne(e, t) {
|
|
262
|
+
let n = new Set(t.filter((t) => k.has(e.nodes.find((e) => e.nodeKey === t)?.nodeType ?? "")));
|
|
263
263
|
for (let t of [...n]) {
|
|
264
264
|
if (e.nodes.find((e) => e.nodeKey === t)?.nodeType !== "branch") continue;
|
|
265
|
-
let r = new Set(
|
|
265
|
+
let r = new Set(Oe(e, t).nodes.map((e) => e.nodeKey));
|
|
266
266
|
e.nodes.filter((e) => !r.has(e.nodeKey)).forEach((e) => n.add(e.nodeKey));
|
|
267
267
|
}
|
|
268
268
|
let r = e.links.filter((e) => !n.has(e.sourceNodeKey) && n.has(e.targetNodeKey)), i = e.links.filter((e) => n.has(e.sourceNodeKey) && !n.has(e.targetNodeKey));
|
|
@@ -275,9 +275,9 @@ function Fe(e, t) {
|
|
|
275
275
|
entry: r[0].targetNodeKey,
|
|
276
276
|
exit: i[0].sourceNodeKey
|
|
277
277
|
};
|
|
278
|
-
return
|
|
278
|
+
return A(a), JSON.stringify(a);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function Pe(e, t, n, r) {
|
|
281
281
|
if (n.length > 1e6) throw Error("流程片段过大");
|
|
282
282
|
let i;
|
|
283
283
|
try {
|
|
@@ -285,7 +285,7 @@ function Ie(e, t, n, r) {
|
|
|
285
285
|
} catch {
|
|
286
286
|
throw Error("剪贴板中不是有效的流程片段");
|
|
287
287
|
}
|
|
288
|
-
|
|
288
|
+
A(i);
|
|
289
289
|
let a = e.links.find((e) => e.routeKey === t);
|
|
290
290
|
if (!a) throw Error("请选择粘贴位置的路径或节点");
|
|
291
291
|
let o = new Map(i.nodes.map((e, t) => [e.nodeKey, `${r}_n${t}`])), s = (e) => `${r}_r${e}`;
|
|
@@ -298,7 +298,7 @@ function Ie(e, t, n, r) {
|
|
|
298
298
|
convergeNodeKey: e.convergeNodeKey ? o.get(e.convergeNodeKey) : void 0,
|
|
299
299
|
selectorNodeKey: e.selectorNodeKey ? o.get(e.selectorNodeKey) : void 0
|
|
300
300
|
};
|
|
301
|
-
}),
|
|
301
|
+
}), l = i.links.map((e, t) => {
|
|
302
302
|
let n = { ...e };
|
|
303
303
|
return delete n.id, delete n.routeStatus, delete n.routeReason, delete n.selectedReason, {
|
|
304
304
|
...n,
|
|
@@ -316,9 +316,9 @@ function Ie(e, t, n, r) {
|
|
|
316
316
|
...e,
|
|
317
317
|
targetNodeKey: o.get(i.entry)
|
|
318
318
|
} : e),
|
|
319
|
-
...
|
|
319
|
+
...l,
|
|
320
320
|
{
|
|
321
|
-
routeKey: s(
|
|
321
|
+
routeKey: s(l.length),
|
|
322
322
|
sourceNodeKey: o.get(i.exit),
|
|
323
323
|
targetNodeKey: a.targetNodeKey,
|
|
324
324
|
title: "继续"
|
|
@@ -331,10 +331,10 @@ function Ie(e, t, n, r) {
|
|
|
331
331
|
}
|
|
332
332
|
//#endregion
|
|
333
333
|
//#region src/views/WorkflowConfigurationView.vue?vue&type=script&setup=true&lang.ts
|
|
334
|
-
var
|
|
334
|
+
var Fe = { class: "workflow-configuration" }, Ie = { class: "configuration-status" }, Le = {
|
|
335
335
|
class: "configuration-state configuration-state--dirty",
|
|
336
336
|
role: "status"
|
|
337
|
-
},
|
|
337
|
+
}, Re = { class: "configuration-state" }, ze = { class: "configuration-property-operations" }, Be = { class: "publish-nodes" }, Ve = { key: 0 }, He = { key: 0 }, Ue = { key: 1 }, We = { key: 0 }, Ge = 720, j = /*#__PURE__*/ d(/* @__PURE__ */ x({
|
|
338
338
|
name: "WorkflowConfigurationView",
|
|
339
339
|
__name: "WorkflowConfigurationView",
|
|
340
340
|
props: {
|
|
@@ -342,339 +342,339 @@ var Le = { class: "workflow-configuration" }, Re = { class: "configuration-statu
|
|
|
342
342
|
moduleTitle: {},
|
|
343
343
|
definitionId: {}
|
|
344
344
|
},
|
|
345
|
-
setup(
|
|
346
|
-
let
|
|
347
|
-
function
|
|
348
|
-
return
|
|
345
|
+
setup(d) {
|
|
346
|
+
let x = ee();
|
|
347
|
+
function Ce(e) {
|
|
348
|
+
return le(e, x);
|
|
349
349
|
}
|
|
350
|
-
let
|
|
350
|
+
let k = d, { context: A, client: j, businessRuntime: Ke, fields: M, conditionTools: qe } = _e(k.moduleAlias), N = C({
|
|
351
351
|
tasks: [],
|
|
352
352
|
queries: [],
|
|
353
353
|
generations: [],
|
|
354
354
|
associations: []
|
|
355
|
-
}),
|
|
355
|
+
}), Je = m(() => (Ke.value?.actions ?? []).map((e) => ({
|
|
356
356
|
value: e.actionCode,
|
|
357
|
-
label: e.title ??
|
|
358
|
-
}))),
|
|
357
|
+
label: e.title ?? Ce(e.actionCode)
|
|
358
|
+
}))), Ye = C(), Xe = ue(Ye, () => Ge + o.compact + de.columnGap), P = C(!1), F = C(!1), Ze = m(() => [
|
|
359
359
|
{
|
|
360
360
|
key: "save",
|
|
361
|
-
title:
|
|
361
|
+
title: x.t("platform.screen.WorkflowConfigurationView.save-draft", "保存草稿"),
|
|
362
362
|
level: "primary",
|
|
363
|
-
disabled: !
|
|
363
|
+
disabled: !J.value || !K.value
|
|
364
364
|
},
|
|
365
365
|
{
|
|
366
366
|
key: "validate",
|
|
367
|
-
title:
|
|
367
|
+
title: x.t("platform.screen.WorkflowConfigurationView.validate-workflow", "校验流程"),
|
|
368
368
|
level: "secondary",
|
|
369
|
-
disabled: !
|
|
369
|
+
disabled: !J.value
|
|
370
370
|
},
|
|
371
371
|
{
|
|
372
372
|
key: "publish",
|
|
373
|
-
title:
|
|
374
|
-
disabled: !
|
|
373
|
+
title: B.value?.publishStatus === "published" ? x.t("platform.screen.WorkflowConfigurationView.enable-published", "启用已发布版本") : x.t("platform.screen.WorkflowConfigurationView.publish-workflow", "发布流程"),
|
|
374
|
+
disabled: !B.value || W.value
|
|
375
375
|
},
|
|
376
376
|
{
|
|
377
377
|
key: "upgrade",
|
|
378
|
-
title:
|
|
378
|
+
title: x.t("platform.screen.WorkflowConfigurationView.create-version", "创建新版本"),
|
|
379
379
|
level: "secondary",
|
|
380
|
-
disabled: !
|
|
380
|
+
disabled: !z.value || W.value || K.value
|
|
381
381
|
}
|
|
382
|
-
]),
|
|
382
|
+
]), Qe = m(() => Y.value?.nodeType === "branch" ? [{
|
|
383
383
|
key: "path",
|
|
384
|
-
title:
|
|
385
|
-
disabled: !
|
|
384
|
+
title: x.t("platform.screen.WorkflowDesignProperties.add-branch-route", "增加分支路径"),
|
|
385
|
+
disabled: !J.value
|
|
386
386
|
}] : [{
|
|
387
387
|
key: "node",
|
|
388
|
-
title:
|
|
389
|
-
disabled: !
|
|
388
|
+
title: x.t("platform.screen.WorkflowConfigurationView.insert-approval-node", "插入节点"),
|
|
389
|
+
disabled: !J.value || !$()
|
|
390
390
|
}, {
|
|
391
391
|
key: "branch",
|
|
392
|
-
title:
|
|
393
|
-
disabled: !
|
|
392
|
+
title: x.t("platform.screen.WorkflowConfigurationView.insert-branch-and-convergence", "添加分支"),
|
|
393
|
+
disabled: !J.value || !$()
|
|
394
394
|
}]);
|
|
395
|
-
function
|
|
395
|
+
function $e(e) {
|
|
396
396
|
e === "node" ? Tt() : e === "branch" ? St() : e === "path" && Ct();
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
e === "save" ? mt() : e === "validate" ? ht() : e === "publish" ?
|
|
398
|
+
function et(e) {
|
|
399
|
+
e === "save" ? mt() : e === "validate" ? ht() : e === "publish" ? F.value = !0 : e === "upgrade" && _t();
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function tt(e) {
|
|
402
402
|
try {
|
|
403
|
-
return
|
|
404
|
-
INITIATOR_SELF:
|
|
405
|
-
USER:
|
|
406
|
-
ROLE:
|
|
407
|
-
DEPT:
|
|
408
|
-
ORG:
|
|
409
|
-
FIELD:
|
|
410
|
-
RELATIVE:
|
|
411
|
-
}[e.type] ?? e.type) + (e.ids?.length ?
|
|
403
|
+
return ce(e).map((e) => ({
|
|
404
|
+
INITIATOR_SELF: x.t("platform.workflow-participant.initiator", "提交人本人"),
|
|
405
|
+
USER: x.t("platform.workflow-participant.named-accounts", "指定账号"),
|
|
406
|
+
ROLE: x.t("platform.workflow-participant.role-members", "角色成员"),
|
|
407
|
+
DEPT: x.t("platform.workflow-participant.department-members", "部门成员"),
|
|
408
|
+
ORG: x.t("platform.workflow-participant.organization-members", "组织成员"),
|
|
409
|
+
FIELD: x.t("platform.workflow-participant.participant-field", "业务人员字段"),
|
|
410
|
+
RELATIVE: x.t("platform.workflow-participant.relative-participants", "相对人员")
|
|
411
|
+
}[e.type] ?? e.type) + (e.ids?.length ? x.t("platform.workflow-config.target-count", "({count} 个目标)", { count: e.ids.length }) : e.fieldName ? `(${M.value.find((t) => t.name === e.fieldName)?.label ?? e.fieldName})` : "")).join("、") || x.t("platform.workflow-config.empty-participants", "尚未配置参与人");
|
|
412
412
|
} catch {
|
|
413
|
-
return
|
|
413
|
+
return x.t("platform.workflow-config.invalid-participants", "人员配置格式无效");
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
|
-
let
|
|
416
|
+
let I = C(!1), L = C(), R = C([]), z = C(), B = C(), V = C({
|
|
417
417
|
nodes: [],
|
|
418
418
|
links: []
|
|
419
|
-
}),
|
|
419
|
+
}), H = C(""), U = C(""), W = C(!1), G = Te(V), K = G.dirty, q = C([]), nt = m(() => ["published", "archived"].includes(B.value?.publishStatus ?? "")), J = m(() => B.value?.publishStatus === "draft" && !W.value), Y = m(() => V.value.nodes.find((e) => e.nodeKey === H.value)), rt = m(() => V.value.links.find((e) => e.routeKey === U.value)), it = C(!1), at = m(() => J.value && !it.value && q.value.length === 1 && Y.value != null && ![
|
|
420
420
|
"start",
|
|
421
421
|
"end",
|
|
422
422
|
"converge"
|
|
423
|
-
].includes(
|
|
424
|
-
async function
|
|
425
|
-
if (
|
|
426
|
-
|
|
423
|
+
].includes(Y.value.nodeType));
|
|
424
|
+
async function ot() {
|
|
425
|
+
if (at.value) {
|
|
426
|
+
it.value = !0;
|
|
427
427
|
try {
|
|
428
|
-
|
|
428
|
+
Y.value?.nodeType === "branch" ? await wt() : Et();
|
|
429
429
|
} finally {
|
|
430
|
-
|
|
430
|
+
it.value = !1;
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
function
|
|
435
|
-
let t =
|
|
436
|
-
all:
|
|
437
|
-
any:
|
|
438
|
-
ratio:
|
|
434
|
+
function st(e) {
|
|
435
|
+
let t = V.value.nodes.find((t) => t.nodeKey === e.convergeNodeKey), n = {
|
|
436
|
+
all: x.t("platform.workflow-config.all-arrive", "全部到达"),
|
|
437
|
+
any: x.t("platform.workflow-config.any-arrive", "任一到达"),
|
|
438
|
+
ratio: x.t("platform.workflow-config.ratio-arrive", "比例到达")
|
|
439
439
|
}, r = t?.convergeMode ?? "all";
|
|
440
440
|
return `${n[r]}${r === "ratio" ? ` ${t?.convergeRatio ?? 100}%` : ""}`;
|
|
441
441
|
}
|
|
442
|
-
|
|
442
|
+
oe(() => x.t("platform.workflow-config.configuration", "流程配置"), () => K.value, () => W.value), Se(() => {
|
|
443
443
|
dt();
|
|
444
444
|
});
|
|
445
|
-
let
|
|
446
|
-
|
|
447
|
-
|
|
445
|
+
let X = 0, ct = !1, lt = !1;
|
|
446
|
+
xe(() => {
|
|
447
|
+
lt = !0, X++;
|
|
448
448
|
});
|
|
449
|
-
async function
|
|
450
|
-
if (
|
|
451
|
-
if (
|
|
452
|
-
|
|
449
|
+
async function ut() {
|
|
450
|
+
if (lt || !z.value) return;
|
|
451
|
+
if (W.value) {
|
|
452
|
+
ct = !0;
|
|
453
453
|
return;
|
|
454
454
|
}
|
|
455
|
-
let e = ++
|
|
455
|
+
let e = ++X;
|
|
456
456
|
try {
|
|
457
|
-
let t = await
|
|
458
|
-
e ===
|
|
457
|
+
let t = await j.view(k.definitionId);
|
|
458
|
+
e === X && (z.value = t);
|
|
459
459
|
} catch (t) {
|
|
460
|
-
e ===
|
|
460
|
+
e === X && u(t, {
|
|
461
461
|
source: "workflow-design",
|
|
462
462
|
phase: "load"
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
|
|
467
|
-
|
|
466
|
+
be(() => {
|
|
467
|
+
ut();
|
|
468
468
|
}), e({
|
|
469
469
|
moduleAlias: "platform.workflow.definition",
|
|
470
|
-
recordId: () =>
|
|
471
|
-
handler:
|
|
470
|
+
recordId: () => k.definitionId,
|
|
471
|
+
handler: ut
|
|
472
472
|
});
|
|
473
473
|
async function Z(e) {
|
|
474
|
-
if (!
|
|
475
|
-
|
|
474
|
+
if (!W.value) {
|
|
475
|
+
X++, W.value = !0;
|
|
476
476
|
try {
|
|
477
477
|
await e();
|
|
478
478
|
} catch (e) {
|
|
479
|
-
|
|
479
|
+
u(e, {
|
|
480
480
|
source: "workflow-design",
|
|
481
481
|
phase: "action"
|
|
482
482
|
});
|
|
483
483
|
} finally {
|
|
484
|
-
|
|
484
|
+
W.value = !1, ct && (ct = !1, await ut());
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
async function dt() {
|
|
489
|
-
|
|
489
|
+
W.value || K.value || (I.value = !0, L.value = void 0, await Z(async () => {
|
|
490
490
|
try {
|
|
491
|
-
let e = await
|
|
491
|
+
let e = await j.view(k.definitionId), t = await j.catalog(e.id), n = (await j.versions(e.id)).sort((e, t) => t.versionNo - e.versionNo), r = n[0] ?? await j.upgrade(e.id);
|
|
492
492
|
n.length || n.push(r);
|
|
493
|
-
let i = await
|
|
494
|
-
a && (i =
|
|
493
|
+
let i = await j.design(e.id, r.id), a = r.publishStatus === "draft" && !i.nodes.length;
|
|
494
|
+
a && (i = Me(e.approvalEnabled)), z.value = e, N.value = t, R.value = n, B.value = r, G.reset(i, a ? {
|
|
495
495
|
nodes: [],
|
|
496
496
|
links: []
|
|
497
|
-
} : i),
|
|
497
|
+
} : i), q.value = [], H.value = "", U.value = "", P.value = !1;
|
|
498
498
|
} catch (e) {
|
|
499
|
-
|
|
499
|
+
L.value = () => n(ge(e), x);
|
|
500
500
|
}
|
|
501
|
-
}),
|
|
501
|
+
}), I.value = !1);
|
|
502
502
|
}
|
|
503
503
|
async function ft(e) {
|
|
504
|
-
let t = await
|
|
505
|
-
|
|
504
|
+
let t = await j.design(z.value.id, e.id);
|
|
505
|
+
B.value = e, G.reset(t), q.value = [], H.value = V.value.nodes[0]?.nodeKey ?? "", U.value = "", P.value = !1;
|
|
506
506
|
}
|
|
507
507
|
async function pt(e) {
|
|
508
|
-
if (
|
|
509
|
-
let t =
|
|
508
|
+
if (K.value) return;
|
|
509
|
+
let t = R.value.find((t) => t.id === e);
|
|
510
510
|
t && await Z(() => ft(t));
|
|
511
511
|
}
|
|
512
512
|
async function mt() {
|
|
513
|
-
|
|
514
|
-
|
|
513
|
+
B.value && z.value && await Z(async () => {
|
|
514
|
+
B.value = await j.saveDesign(z.value.id, B.value.id, B.value.version, V.value), R.value = R.value.map((e) => e.id === B.value.id ? B.value : e), G.markSaved(), se(x.t("platform.workflow-config.draft-saved", "流程草稿已保存"));
|
|
515
515
|
});
|
|
516
516
|
}
|
|
517
517
|
async function ht() {
|
|
518
|
-
|
|
519
|
-
await
|
|
518
|
+
K.value && await mt(), !K.value && B.value && await Z(async () => {
|
|
519
|
+
await j.validate(z.value.id, B.value.id), se(x.t("platform.workflow-config.validated", "流程发布校验通过"));
|
|
520
520
|
});
|
|
521
521
|
}
|
|
522
522
|
async function gt() {
|
|
523
|
-
if (
|
|
524
|
-
|
|
523
|
+
if (V.value.nodes.some((e) => ["approval", "task"].includes(e.nodeType) && !ie(e.participantPolicyText))) {
|
|
524
|
+
u(Error(x.t("platform.workflow-config.participants-required", "请为每个审批或业务任务节点明确配置参与人")), {
|
|
525
525
|
source: "workflow-design",
|
|
526
526
|
phase: "validation"
|
|
527
527
|
});
|
|
528
528
|
return;
|
|
529
529
|
}
|
|
530
|
-
|
|
531
|
-
|
|
530
|
+
K.value && await mt(), !K.value && z.value && B.value && (await Z(async () => {
|
|
531
|
+
B.value = await j.publish(z.value.id, B.value.id, z.value.version, B.value.version), R.value = R.value.map((e) => e.id === B.value.id ? B.value : e), z.value = await j.view(z.value.id), G.markSaved(), F.value = !1, se(x.t("platform.workflow-config.published", "流程已发布,后续新申请使用该版本"));
|
|
532
532
|
}), await dt());
|
|
533
533
|
}
|
|
534
534
|
async function _t() {
|
|
535
|
-
|
|
536
|
-
let e = await
|
|
537
|
-
|
|
535
|
+
z.value && await Z(async () => {
|
|
536
|
+
let e = await j.upgrade(z.value.id);
|
|
537
|
+
R.value = [e, ...R.value.filter((t) => t.id !== e.id)], await ft(e), V.value.nodes.length || (V.value = Me(z.value.approvalEnabled), Q("approval"));
|
|
538
538
|
});
|
|
539
539
|
}
|
|
540
540
|
function Q(e) {
|
|
541
|
-
|
|
541
|
+
V.value.nodes.some((t) => t.nodeKey === e) || (e = ""), q.value = e ? [e] : [], H.value = e, U.value = "", P.value = !!e;
|
|
542
542
|
}
|
|
543
543
|
function vt(e) {
|
|
544
|
-
|
|
544
|
+
V.value.links.some((t) => t.routeKey === e) || (e = ""), q.value = [], U.value = e, H.value = "", P.value = !!e;
|
|
545
545
|
}
|
|
546
546
|
function yt(e) {
|
|
547
|
-
|
|
548
|
-
...
|
|
547
|
+
J.value && V.value.layoutJson !== e && (V.value = {
|
|
548
|
+
...V.value,
|
|
549
549
|
layoutJson: e
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
552
|
function bt(e) {
|
|
553
|
-
|
|
554
|
-
...
|
|
555
|
-
nodes:
|
|
553
|
+
Y.value && J.value && (V.value = {
|
|
554
|
+
...V.value,
|
|
555
|
+
nodes: V.value.nodes.map((t) => t.nodeKey === H.value ? {
|
|
556
556
|
...t,
|
|
557
557
|
...e
|
|
558
558
|
} : t)
|
|
559
559
|
});
|
|
560
560
|
}
|
|
561
561
|
function xt(e) {
|
|
562
|
-
|
|
562
|
+
rt.value && J.value && (V.value = ke(V.value, rt.value.routeKey, e));
|
|
563
563
|
}
|
|
564
564
|
function $() {
|
|
565
|
-
let e =
|
|
566
|
-
return
|
|
565
|
+
let e = V.value.links.filter((e) => e.sourceNodeKey === H.value);
|
|
566
|
+
return U.value || (e.length === 1 ? e[0]?.routeKey : void 0) || "";
|
|
567
567
|
}
|
|
568
568
|
function St() {
|
|
569
|
-
if (!
|
|
569
|
+
if (!J.value) return;
|
|
570
570
|
let e = `branch_${Date.now().toString(36)}`;
|
|
571
571
|
try {
|
|
572
|
-
|
|
572
|
+
V.value = Ee(V.value, $(), e), Q(e);
|
|
573
573
|
} catch (e) {
|
|
574
|
-
|
|
574
|
+
u(e, {
|
|
575
575
|
source: "workflow-design",
|
|
576
576
|
phase: "validation"
|
|
577
577
|
});
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
580
|
function Ct() {
|
|
581
|
-
if (
|
|
582
|
-
|
|
581
|
+
if (J.value) try {
|
|
582
|
+
V.value = De(V.value, H.value, `path_${Date.now().toString(36)}`);
|
|
583
583
|
} catch (e) {
|
|
584
|
-
|
|
584
|
+
u(e, {
|
|
585
585
|
source: "workflow-design",
|
|
586
586
|
phase: "validation"
|
|
587
587
|
});
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
590
|
async function wt() {
|
|
591
|
-
if (
|
|
592
|
-
let e =
|
|
593
|
-
if (!await
|
|
594
|
-
title:
|
|
595
|
-
content:
|
|
591
|
+
if (J.value) try {
|
|
592
|
+
let e = G.checkpoint(), n = Oe(V.value, H.value);
|
|
593
|
+
if (!await t({
|
|
594
|
+
title: x.t("platform.workflow-config.delete-branch-confirm", "删除整个分支?"),
|
|
595
|
+
content: x.t("platform.workflow-config.delete-branch-detail", "将删除分支、配对汇聚及其中 {count} 个节点,并连接前后路径。", { count: V.value.nodes.length - n.nodes.length - 2 }),
|
|
596
596
|
danger: !0,
|
|
597
|
-
okText:
|
|
598
|
-
},
|
|
599
|
-
|
|
597
|
+
okText: x.t("platform.workflow-config.delete-branch", "删除分支")
|
|
598
|
+
}, x) || !Ot(e)) return;
|
|
599
|
+
V.value = n, H.value = "", P.value = !1;
|
|
600
600
|
} catch (e) {
|
|
601
|
-
|
|
601
|
+
u(e, {
|
|
602
602
|
source: "workflow-design",
|
|
603
603
|
phase: "validation"
|
|
604
604
|
});
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
function Tt() {
|
|
608
|
-
if (!
|
|
609
|
-
let e =
|
|
608
|
+
if (!J.value) return;
|
|
609
|
+
let e = V.value.links.filter((e) => e.sourceNodeKey === H.value), t = U.value || (e.length === 1 ? e[0]?.routeKey : void 0), n = `node_${Date.now().toString(36)}`;
|
|
610
610
|
try {
|
|
611
|
-
|
|
611
|
+
V.value = Ae(V.value, t ?? "", O(n, "新审批节点")), Q(n);
|
|
612
612
|
} catch (e) {
|
|
613
|
-
|
|
613
|
+
u(e, {
|
|
614
614
|
source: "workflow-design",
|
|
615
615
|
phase: "validation"
|
|
616
616
|
});
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
619
|
function Et() {
|
|
620
|
-
if (
|
|
621
|
-
|
|
620
|
+
if (J.value) try {
|
|
621
|
+
V.value = je(V.value, H.value), H.value = "", P.value = !1;
|
|
622
622
|
} catch (e) {
|
|
623
|
-
|
|
623
|
+
u(e, {
|
|
624
624
|
source: "workflow-design",
|
|
625
625
|
phase: "validation"
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
629
|
function Dt(e) {
|
|
630
|
-
let t = new Set(
|
|
631
|
-
e = [...new Set(e)].filter((e) => t.has(e)),
|
|
630
|
+
let t = new Set(V.value.nodes.map((e) => e.nodeKey));
|
|
631
|
+
e = [...new Set(e)].filter((e) => t.has(e)), q.value = e, H.value = e.length === 1 ? e[0] : "", U.value = "", P.value = !1;
|
|
632
632
|
}
|
|
633
|
-
|
|
633
|
+
we(() => [V.value.nodes.map((e) => e.nodeKey), V.value.links.map((e) => e.routeKey)], ([e, t]) => {
|
|
634
634
|
let n = new Set(e);
|
|
635
|
-
|
|
635
|
+
q.value = q.value.filter((e) => n.has(e)), H.value && !n.has(H.value) && (H.value = "", P.value = !1), U.value && !t.includes(U.value) && (U.value = "", P.value = !1);
|
|
636
636
|
}, { flush: "sync" });
|
|
637
637
|
function Ot(e) {
|
|
638
|
-
return
|
|
638
|
+
return lt ? !1 : J.value && e() ? !0 : (l(x.t("platform.workflow-config.stale-edit", "流程已变更,本次操作未应用,请重新操作。")), !1);
|
|
639
639
|
}
|
|
640
640
|
function kt() {
|
|
641
|
-
|
|
641
|
+
J.value && G.undo();
|
|
642
642
|
}
|
|
643
643
|
function At() {
|
|
644
|
-
|
|
644
|
+
J.value && G.redo();
|
|
645
645
|
}
|
|
646
646
|
function jt(e) {
|
|
647
647
|
if (e.clipboardData) try {
|
|
648
|
-
let t =
|
|
648
|
+
let t = Ne(V.value, q.value);
|
|
649
649
|
e.clipboardData.setData("text/plain", t), e.preventDefault();
|
|
650
650
|
} catch (e) {
|
|
651
|
-
|
|
651
|
+
u(e, {
|
|
652
652
|
source: "workflow-design",
|
|
653
653
|
phase: "action"
|
|
654
654
|
});
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
657
|
function Mt() {
|
|
658
|
-
let e =
|
|
659
|
-
return $() || (e ?
|
|
658
|
+
let e = Y.value?.nodeType === "branch" ? Y.value.convergeNodeKey : void 0;
|
|
659
|
+
return $() || (e ? V.value.links.find((t) => t.sourceNodeKey === e)?.routeKey : void 0) || V.value.links.find((e) => V.value.nodes.some((t) => t.nodeKey === e.targetNodeKey && t.nodeType === "end"))?.routeKey || "";
|
|
660
660
|
}
|
|
661
661
|
function Nt(e, t) {
|
|
662
|
-
if (!
|
|
663
|
-
let n =
|
|
664
|
-
if (
|
|
662
|
+
if (!J.value || !e.includes("muyun.workflow.fragment")) return;
|
|
663
|
+
let n = Pe(V.value, t, e, `copy_${crypto.randomUUID().replaceAll("-", "")}`);
|
|
664
|
+
if (V.value = n.design, n.reconfigureSelectorKeys.length) {
|
|
665
665
|
let e = n.reconfigureSelectorKeys.map((e) => n.design.nodes.find((t) => t.nodeKey === e)?.title ?? e).join("、");
|
|
666
|
-
|
|
666
|
+
l(x.t("platform.workflow-config.paste-reconfigure-selectors", "已粘贴,以下人工分支需要重新配置选择来源:{names}。", { names: e })), Q(n.reconfigureSelectorKeys[0]);
|
|
667
667
|
} else Dt(n.keys);
|
|
668
668
|
}
|
|
669
669
|
function Pt(e) {
|
|
670
|
-
if (!
|
|
670
|
+
if (!J.value || !e.clipboardData) return;
|
|
671
671
|
let t = e.clipboardData.getData("text/plain");
|
|
672
672
|
if (t.includes("muyun.workflow.fragment")) {
|
|
673
673
|
e.preventDefault();
|
|
674
674
|
try {
|
|
675
675
|
Nt(t, Mt());
|
|
676
676
|
} catch (e) {
|
|
677
|
-
|
|
677
|
+
u(e, {
|
|
678
678
|
source: "workflow-design",
|
|
679
679
|
phase: "action"
|
|
680
680
|
});
|
|
@@ -684,101 +684,101 @@ var Le = { class: "workflow-configuration" }, Re = { class: "configuration-statu
|
|
|
684
684
|
async function Ft() {
|
|
685
685
|
try {
|
|
686
686
|
if (!navigator.clipboard) throw Error("当前浏览器不支持访问剪贴板");
|
|
687
|
-
await navigator.clipboard.writeText(
|
|
687
|
+
await navigator.clipboard.writeText(Ne(V.value, q.value));
|
|
688
688
|
} catch (e) {
|
|
689
|
-
|
|
689
|
+
u(e, {
|
|
690
690
|
source: "workflow-design",
|
|
691
691
|
phase: "action"
|
|
692
692
|
});
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
695
|
async function It() {
|
|
696
|
-
if (!
|
|
697
|
-
let e =
|
|
696
|
+
if (!J.value) return;
|
|
697
|
+
let e = G.checkpoint(), t = Mt();
|
|
698
698
|
try {
|
|
699
699
|
if (!navigator.clipboard) throw Error("当前浏览器不支持访问剪贴板");
|
|
700
700
|
let n = await navigator.clipboard.readText();
|
|
701
701
|
n.includes("muyun.workflow.fragment") && Ot(e) && Nt(n, t);
|
|
702
702
|
} catch (e) {
|
|
703
|
-
|
|
703
|
+
u(e, {
|
|
704
704
|
source: "workflow-design",
|
|
705
705
|
phase: "action"
|
|
706
706
|
});
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
|
-
return (e,
|
|
710
|
-
actions:
|
|
709
|
+
return (e, t) => (S(), _("section", Fe, [b(E(r), { title: z.value?.title ?? E(x).t("platform.workflow-config.configuration", "流程配置") }, ve({
|
|
710
|
+
actions: D(() => [b(E(te), {
|
|
711
711
|
class: "configuration-action-bar",
|
|
712
|
-
actions:
|
|
713
|
-
onAction:
|
|
712
|
+
actions: Ze.value,
|
|
713
|
+
onAction: t[0] ||= (e) => et(e.key)
|
|
714
714
|
}, null, 8, ["actions"])]),
|
|
715
|
-
default:
|
|
716
|
-
|
|
717
|
-
|
|
715
|
+
default: D(() => [
|
|
716
|
+
I.value ? (S(), h(E(c), { key: 0 })) : g("v-if", !0),
|
|
717
|
+
L.value ? (S(), h(E(s), {
|
|
718
718
|
key: 1,
|
|
719
|
-
message:
|
|
720
|
-
}, null, 8, ["message"])) :
|
|
721
|
-
|
|
719
|
+
message: L.value()
|
|
720
|
+
}, null, 8, ["message"])) : g("v-if", !0),
|
|
721
|
+
L.value ? (S(), h(E(f), {
|
|
722
722
|
key: 2,
|
|
723
723
|
onClick: dt
|
|
724
724
|
}, {
|
|
725
|
-
default:
|
|
725
|
+
default: D(() => [y(T(E(x).t("platform.screen.CrudRecordListExplorer.reload", "重新加载")), 1)]),
|
|
726
726
|
_: 1
|
|
727
|
-
})) :
|
|
728
|
-
|
|
727
|
+
})) : g("v-if", !0),
|
|
728
|
+
z.value ? (S(), _("div", {
|
|
729
729
|
key: 3,
|
|
730
730
|
ref_key: "designHost",
|
|
731
|
-
ref:
|
|
731
|
+
ref: Ye,
|
|
732
732
|
class: "configuration-design",
|
|
733
|
-
style:
|
|
734
|
-
}, [(
|
|
735
|
-
key:
|
|
736
|
-
nodes:
|
|
737
|
-
routes:
|
|
738
|
-
"selected-node-key":
|
|
739
|
-
"selected-node-keys":
|
|
740
|
-
"can-undo":
|
|
741
|
-
"can-redo":
|
|
733
|
+
style: ye({ gap: `${E(de).columnGap}px` })
|
|
734
|
+
}, [(S(), h(E(ae), {
|
|
735
|
+
key: B.value?.id,
|
|
736
|
+
nodes: V.value.nodes,
|
|
737
|
+
routes: V.value.links,
|
|
738
|
+
"selected-node-key": H.value,
|
|
739
|
+
"selected-node-keys": q.value,
|
|
740
|
+
"can-undo": E(G).canUndo.value,
|
|
741
|
+
"can-redo": E(G).canRedo.value,
|
|
742
742
|
onUndo: kt,
|
|
743
743
|
onRedo: At,
|
|
744
744
|
onSelectionChange: Dt,
|
|
745
745
|
onCopy: jt,
|
|
746
746
|
onCopyShortcut: Ft,
|
|
747
747
|
onPasteShortcut: It,
|
|
748
|
-
onDeleteSelection:
|
|
748
|
+
onDeleteSelection: ot,
|
|
749
749
|
onPaste: Pt,
|
|
750
|
-
"selected-route-key":
|
|
751
|
-
"layout-json":
|
|
752
|
-
editable:
|
|
750
|
+
"selected-route-key": U.value,
|
|
751
|
+
"layout-json": V.value.layoutJson,
|
|
752
|
+
editable: J.value,
|
|
753
753
|
interactive: "",
|
|
754
754
|
presentation: "designer",
|
|
755
755
|
onSelect: Q,
|
|
756
756
|
onSelectRoute: vt,
|
|
757
757
|
onLayoutChange: yt
|
|
758
758
|
}, {
|
|
759
|
-
actions:
|
|
760
|
-
items:
|
|
759
|
+
actions: D(() => [b(E(i), {
|
|
760
|
+
items: Qe.value,
|
|
761
761
|
align: "start",
|
|
762
|
-
onSelect:
|
|
762
|
+
onSelect: $e
|
|
763
763
|
}, {
|
|
764
|
-
default:
|
|
764
|
+
default: D(() => [b(E(f), {
|
|
765
765
|
"icon-name": "plus",
|
|
766
|
-
disabled: !
|
|
766
|
+
disabled: !J.value
|
|
767
767
|
}, {
|
|
768
|
-
default:
|
|
768
|
+
default: D(() => [y(T(E(x).t("platform.workflow-config.add-element", "添加节点 / 分支")), 1)]),
|
|
769
769
|
_: 1
|
|
770
770
|
}, 8, ["disabled"])]),
|
|
771
771
|
_: 1
|
|
772
772
|
}, 8, ["items"])]),
|
|
773
|
-
navigation:
|
|
773
|
+
navigation: D(() => [b(E(pe), {
|
|
774
774
|
class: "configuration-route-locator",
|
|
775
|
-
value:
|
|
776
|
-
placeholder:
|
|
777
|
-
options:
|
|
775
|
+
value: U.value || void 0,
|
|
776
|
+
placeholder: E(x).t("platform.screen.WorkflowConfigurationView.select-link", "选择连线"),
|
|
777
|
+
options: V.value.links.map((e) => ({
|
|
778
778
|
value: e.routeKey,
|
|
779
|
-
label: `${e.title ??
|
|
779
|
+
label: `${e.title ?? E(x).t("platform.workflow-config.route", "路径")}:${V.value.nodes.find((t) => t.nodeKey === e.sourceNodeKey)?.title} → ${V.value.nodes.find((t) => t.nodeKey === e.targetNodeKey)?.title}`
|
|
780
780
|
})),
|
|
781
|
-
"onUpdate:value":
|
|
781
|
+
"onUpdate:value": t[2] ||= (e) => vt(String(e))
|
|
782
782
|
}, null, 8, [
|
|
783
783
|
"value",
|
|
784
784
|
"placeholder",
|
|
@@ -795,47 +795,47 @@ var Le = { class: "workflow-configuration" }, Re = { class: "configuration-statu
|
|
|
795
795
|
"selected-route-key",
|
|
796
796
|
"layout-json",
|
|
797
797
|
"editable"
|
|
798
|
-
])),
|
|
799
|
-
docked: !
|
|
798
|
+
])), b(E(he), {
|
|
799
|
+
docked: !E(Xe),
|
|
800
800
|
width: "compact",
|
|
801
|
-
open:
|
|
802
|
-
title:
|
|
803
|
-
onClose:
|
|
801
|
+
open: P.value,
|
|
802
|
+
title: Y.value?.title ? E(x).t("platform.workflow-config.node-properties", "节点属性 · {title}", { title: Y.value.title }) : E(x).t("platform.workflow-config.route-properties", "路径属性"),
|
|
803
|
+
onClose: t[4] ||= (e) => P.value = !1
|
|
804
804
|
}, {
|
|
805
|
-
operation:
|
|
805
|
+
operation: D(() => [v("div", ze, [Y.value?.nodeType === "branch" ? (S(), h(E(f), {
|
|
806
806
|
key: 0,
|
|
807
807
|
danger: "",
|
|
808
|
-
disabled: !
|
|
809
|
-
onClick:
|
|
808
|
+
disabled: !at.value,
|
|
809
|
+
onClick: ot
|
|
810
810
|
}, {
|
|
811
|
-
default:
|
|
811
|
+
default: D(() => [y(T(E(x).t("platform.screen.WorkflowDesignProperties.delete-entire-branch", "删除整个分支")), 1)]),
|
|
812
812
|
_: 1
|
|
813
|
-
}, 8, ["disabled"])) :
|
|
813
|
+
}, 8, ["disabled"])) : Y.value ? (S(), h(E(f), {
|
|
814
814
|
key: 1,
|
|
815
815
|
danger: "",
|
|
816
|
-
disabled: !
|
|
817
|
-
onClick:
|
|
816
|
+
disabled: !at.value,
|
|
817
|
+
onClick: ot
|
|
818
818
|
}, {
|
|
819
|
-
default:
|
|
819
|
+
default: D(() => [y(T(E(x).t("platform.screen.WorkflowDesignProperties.delete-and-reconnect-adjacent-nodes", "删除节点")), 1)]),
|
|
820
820
|
_: 1
|
|
821
|
-
}, 8, ["disabled"])) :
|
|
822
|
-
disabled:
|
|
823
|
-
onClick:
|
|
821
|
+
}, 8, ["disabled"])) : g("v-if", !0), b(E(f), {
|
|
822
|
+
disabled: W.value,
|
|
823
|
+
onClick: t[3] ||= (e) => P.value = !1
|
|
824
824
|
}, {
|
|
825
|
-
default:
|
|
825
|
+
default: D(() => [y(T(E(x).t("platform.screen.WorkflowConfigurationView.finish-configuration", "完成配置")), 1)]),
|
|
826
826
|
_: 1
|
|
827
827
|
}, 8, ["disabled"])])]),
|
|
828
|
-
default:
|
|
829
|
-
"condition-tools":
|
|
830
|
-
design:
|
|
831
|
-
"node-key":
|
|
832
|
-
"route-key":
|
|
833
|
-
editable:
|
|
834
|
-
http:
|
|
835
|
-
"module-alias":
|
|
836
|
-
fields:
|
|
837
|
-
catalog:
|
|
838
|
-
actions:
|
|
828
|
+
default: D(() => [b(E(re), {
|
|
829
|
+
"condition-tools": E(qe),
|
|
830
|
+
design: V.value,
|
|
831
|
+
"node-key": H.value,
|
|
832
|
+
"route-key": U.value,
|
|
833
|
+
editable: J.value,
|
|
834
|
+
http: E(A).http,
|
|
835
|
+
"module-alias": d.moduleAlias,
|
|
836
|
+
fields: E(M),
|
|
837
|
+
catalog: N.value,
|
|
838
|
+
actions: Je.value,
|
|
839
839
|
onUpdateNode: bt,
|
|
840
840
|
onUpdateRoute: xt,
|
|
841
841
|
onSelectRoute: vt,
|
|
@@ -857,85 +857,85 @@ var Le = { class: "workflow-configuration" }, Re = { class: "configuration-statu
|
|
|
857
857
|
"docked",
|
|
858
858
|
"open",
|
|
859
859
|
"title"
|
|
860
|
-
])], 4)) :
|
|
860
|
+
])], 4)) : g("v-if", !0)
|
|
861
861
|
]),
|
|
862
862
|
_: 2
|
|
863
|
-
}, [
|
|
863
|
+
}, [z.value ? {
|
|
864
864
|
name: "status",
|
|
865
|
-
fn:
|
|
865
|
+
fn: D(() => [v("div", Ie, [b(E(pe), {
|
|
866
866
|
class: "configuration-version-selector",
|
|
867
|
-
value:
|
|
868
|
-
options:
|
|
867
|
+
value: B.value?.id,
|
|
868
|
+
options: R.value.map((e) => ({
|
|
869
869
|
value: e.id,
|
|
870
|
-
label:
|
|
870
|
+
label: E(x).t("platform.screen.WorkflowConfigurationView.version-value-value", "版本 {value1} · {value2}", {
|
|
871
871
|
value1: e.versionNo,
|
|
872
|
-
value2:
|
|
872
|
+
value2: Ce(e.publishStatus)
|
|
873
873
|
})
|
|
874
874
|
})),
|
|
875
|
-
disabled:
|
|
876
|
-
"onUpdate:value":
|
|
875
|
+
disabled: W.value || E(K),
|
|
876
|
+
"onUpdate:value": t[1] ||= (e) => pt(String(e))
|
|
877
877
|
}, null, 8, [
|
|
878
878
|
"value",
|
|
879
879
|
"options",
|
|
880
880
|
"disabled"
|
|
881
|
-
]),
|
|
881
|
+
]), E(K) ? (S(), h(E(ne), {
|
|
882
882
|
key: 0,
|
|
883
|
-
title:
|
|
883
|
+
title: E(x).t("platform.screen.WorkflowConfigurationView.the-draft-has-unsaved-changes", "草稿有未保存的修改")
|
|
884
884
|
}, {
|
|
885
|
-
default:
|
|
885
|
+
default: D(() => [v("span", Le, T(E(x).t("platform.workflow-config.unsaved", "未保存")), 1)]),
|
|
886
886
|
_: 1
|
|
887
|
-
}, 8, ["title"])) :
|
|
887
|
+
}, 8, ["title"])) : nt.value ? (S(), h(E(ne), {
|
|
888
888
|
key: 1,
|
|
889
|
-
title:
|
|
889
|
+
title: E(x).t("platform.screen.WorkflowConfigurationView.this-version-is-frozen-create-a-new", "此版本已冻结。修改流程请创建新版本;已有实例继续使用原版本。")
|
|
890
890
|
}, {
|
|
891
|
-
default:
|
|
891
|
+
default: D(() => [v("span", Re, T(E(x).t("platform.workflow-config.readonly", "只读")), 1)]),
|
|
892
892
|
_: 1
|
|
893
|
-
}, 8, ["title"])) :
|
|
893
|
+
}, 8, ["title"])) : g("v-if", !0)])]),
|
|
894
894
|
key: "0"
|
|
895
|
-
} : void 0]), 1032, ["title"]),
|
|
895
|
+
} : void 0]), 1032, ["title"]), b(E(a), {
|
|
896
896
|
width: "extraWide",
|
|
897
|
-
open:
|
|
898
|
-
title:
|
|
899
|
-
onClose:
|
|
897
|
+
open: F.value,
|
|
898
|
+
title: E(x).t("platform.screen.WorkflowConfigurationView.confirm-workflow-publication", "确认发布流程"),
|
|
899
|
+
onClose: t[5] ||= (e) => F.value = !1
|
|
900
900
|
}, {
|
|
901
|
-
operation:
|
|
901
|
+
operation: D(() => [b(E(f), {
|
|
902
902
|
type: "primary",
|
|
903
|
-
loading:
|
|
903
|
+
loading: W.value,
|
|
904
904
|
onClick: gt
|
|
905
905
|
}, {
|
|
906
|
-
default:
|
|
906
|
+
default: D(() => [y(T(E(x).t("platform.screen.WorkflowConfigurationView.confirm-publication", "确认发布")), 1)]),
|
|
907
907
|
_: 1
|
|
908
908
|
}, 8, ["loading"])]),
|
|
909
|
-
default:
|
|
910
|
-
|
|
911
|
-
title:
|
|
912
|
-
version:
|
|
909
|
+
default: D(() => [
|
|
910
|
+
v("p", null, T(E(x).t("platform.workflow-config.publication-frozen", "流程:{title} · 版本 {version}。发布后配置冻结;已有实例继续使用原版本。", {
|
|
911
|
+
title: z.value?.title,
|
|
912
|
+
version: B.value?.versionNo
|
|
913
913
|
})), 1),
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
914
|
+
v("p", null, T(E(x).t("platform.workflow-config.matching-scope", "匹配范围")) + ":" + T(z.value?.organizationId ? E(x).t("platform.workflow-config.scoped-organizations", "指定组织及下级组织") : E(x).t("platform.workflow-config.all-organizations", "模块内全部组织")) + ";" + T(z.value?.defaultDefinition ? E(x).t("platform.workflow-config.default-workflow", "作为默认兜底流程") : E(x).t("platform.workflow-config.conditional-workflow", "按匹配条件选择")) + "。 " + T(z.value?.matchExpression ? E(x).t("platform.workflow-config.matching-expression", "匹配条件:{expression}", { expression: z.value.matchExpression }) : E(x).t("platform.workflow-config.no-matching-condition", "未设置额外条件")), 1),
|
|
915
|
+
v("ul", Be, [(S(!0), _(p, null, w(V.value.nodes.filter((e) => ["approval", "task"].includes(e.nodeType)), (e) => (S(), _("li", { key: e.nodeKey }, [
|
|
916
|
+
v("strong", null, T(e.title), 1),
|
|
917
|
+
y(" · " + T(tt(e.participantPolicyText)) + " ", 1),
|
|
918
|
+
v("details", null, [v("summary", null, T(E(x).t("platform.screen.WorkflowConfigurationView.view-complete-participant-rules", "查看完整人员规则")), 1), b(E(me), {
|
|
919
919
|
value: e.participantPolicyText,
|
|
920
|
-
http:
|
|
921
|
-
fields:
|
|
920
|
+
http: E(A).http,
|
|
921
|
+
fields: E(M),
|
|
922
922
|
disabled: ""
|
|
923
923
|
}, null, 8, [
|
|
924
924
|
"value",
|
|
925
925
|
"http",
|
|
926
926
|
"fields"
|
|
927
927
|
])]),
|
|
928
|
-
e.nodeType === "task" ? (
|
|
929
|
-
|
|
930
|
-
e.taskDefinitionId ? (
|
|
931
|
-
|
|
932
|
-
"condition-tools":
|
|
928
|
+
e.nodeType === "task" ? (S(), _("details", Ve, [
|
|
929
|
+
v("summary", null, T(E(x).t("platform.screen.WorkflowConfigurationView.view-business-task-checks-and-instructions", "查看业务任务检查与办理指引")), 1),
|
|
930
|
+
e.taskDefinitionId ? (S(), _("p", He, T(E(x).t("platform.workflow-config.referenced-task", "引用任务")) + ":" + T(N.value.tasks.find((t) => t.id === e.taskDefinitionId)?.title ?? e.taskDefinitionId), 1)) : g("v-if", !0),
|
|
931
|
+
b(E(fe), {
|
|
932
|
+
"condition-tools": E(qe),
|
|
933
933
|
value: e.nodeConfigText,
|
|
934
|
-
"module-alias":
|
|
935
|
-
fields:
|
|
936
|
-
catalog:
|
|
937
|
-
actions:
|
|
938
|
-
associations:
|
|
934
|
+
"module-alias": d.moduleAlias,
|
|
935
|
+
fields: E(M),
|
|
936
|
+
catalog: N.value,
|
|
937
|
+
actions: Je.value,
|
|
938
|
+
associations: N.value.associations.map((e) => ({
|
|
939
939
|
value: e.id,
|
|
940
940
|
label: e.title
|
|
941
941
|
})),
|
|
@@ -949,23 +949,23 @@ var Le = { class: "workflow-configuration" }, Re = { class: "configuration-statu
|
|
|
949
949
|
"actions",
|
|
950
950
|
"associations"
|
|
951
951
|
])
|
|
952
|
-
])) :
|
|
953
|
-
e.participantPolicyText?.includes("INITIATOR_SELF") ? (
|
|
952
|
+
])) : g("v-if", !0),
|
|
953
|
+
e.participantPolicyText?.includes("INITIATOR_SELF") ? (S(), _("p", Ue, T(E(x).t("platform.screen.WorkflowConfigurationView.the-submitter-processes-this-node-confirm-that", "此节点由提交人本人办理,请确认符合业务要求。")), 1)) : g("v-if", !0)
|
|
954
954
|
]))), 128))]),
|
|
955
|
-
(
|
|
956
|
-
|
|
957
|
-
e.routeMode === "manual" ? (
|
|
958
|
-
title:
|
|
959
|
-
reason: e.requireManualSelectionReason ?
|
|
960
|
-
})), 1)) :
|
|
961
|
-
|
|
962
|
-
|
|
955
|
+
(S(!0), _(p, null, w(V.value.nodes.filter((e) => e.nodeType === "branch"), (e) => (S(), _("div", { key: e.nodeKey }, [
|
|
956
|
+
v("strong", null, T(e.title) + " · " + T(e.routeMode === "manual" ? E(x).t("platform.workflow-config.manual-route", "人工单选") : E(x).t("platform.workflow-config.auto-route", "自动判定(全部命中出口)")), 1),
|
|
957
|
+
e.routeMode === "manual" ? (S(), _("p", We, T(E(x).t("platform.workflow-config.selector-summary", "由{title}的实际办理人选路;{reason}。", {
|
|
958
|
+
title: V.value.nodes.find((t) => t.nodeKey === e.selectorNodeKey)?.title ?? E(x).t("platform.workflow-config.missing-selector", "未配置选择节点"),
|
|
959
|
+
reason: e.requireManualSelectionReason ? E(x).t("platform.workflow-config.reason-required", "必须填写原因") : E(x).t("platform.workflow-config.reason-optional", "原因选填")
|
|
960
|
+
})), 1)) : g("v-if", !0),
|
|
961
|
+
v("ul", null, [(S(!0), _(p, null, w(V.value.links.filter((t) => t.sourceNodeKey === e.nodeKey), (e) => (S(), _("li", { key: e.routeKey }, T(e.title ?? E(x).t("platform.workflow-config.exit", "出口")) + ":" + T(e.defaultRoute ? E(x).t("platform.workflow-config.fallback-exit", "默认兜底") : e.conditionExpression || E(x).t("platform.workflow-config.unconditional", "无条件(始终命中)")), 1))), 128))]),
|
|
962
|
+
v("p", null, T(E(x).t("platform.workflow-config.convergence-counting", "汇聚:{summary},只计算有效出口。", { summary: st(e) })), 1)
|
|
963
963
|
]))), 128)),
|
|
964
|
-
|
|
964
|
+
v("details", null, [v("summary", null, T(E(x).t("platform.screen.WorkflowConfigurationView.view-published-workflow", "查看发布流程图")), 1), b(E(ae), {
|
|
965
965
|
presentation: "detail",
|
|
966
|
-
nodes:
|
|
967
|
-
routes:
|
|
968
|
-
"layout-json":
|
|
966
|
+
nodes: V.value.nodes,
|
|
967
|
+
routes: V.value.links,
|
|
968
|
+
"layout-json": V.value.layoutJson
|
|
969
969
|
}, null, 8, [
|
|
970
970
|
"nodes",
|
|
971
971
|
"routes",
|
|
@@ -977,4 +977,4 @@ var Le = { class: "workflow-configuration" }, Re = { class: "configuration-statu
|
|
|
977
977
|
}
|
|
978
978
|
}), [["__scopeId", "data-v-778f30d4"]]);
|
|
979
979
|
//#endregion
|
|
980
|
-
export {
|
|
980
|
+
export { j as default };
|