@ximatai/muyun-web-app 0.26.29 → 0.26.32
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-fzxP3P68.js → BusinessActivityLogView-Dw_SjtBi.js} +2 -2
- package/dist/BusinessLogListDrawer-Bkws0k6G.js +868 -0
- package/dist/{CodeConfigurationView-DXrXp7kg.js → CodeConfigurationView-D-S2nX4C.js} +703 -703
- package/dist/{ConfigurationTranslationView-CNWJhB8C.js → ConfigurationTranslationView-CzLoZCo5.js} +21 -21
- package/dist/{LoginAuditLogView-D2q4WT8W.js → LoginAuditLogView-DxAlmQ9Q.js} +2 -2
- package/dist/ModuleActionManagementView-CfsGwDOn.js +780 -0
- package/dist/{ModuleGovernanceView-BFCfy5wB.js → ModuleGovernanceView-Bt2UhO-A.js} +2352 -2352
- package/dist/{RequestErrorLogView-C-dZhHvD.js → RequestErrorLogView--g3Uwvzx.js} +2 -2
- package/dist/RoleDetailWorkspaceView-Bv21G3CF.js +1435 -0
- package/dist/{RuntimeLogView-BuFuboQh.js → RuntimeLogView-CM47CKiD.js} +38 -38
- package/dist/WorkflowAdministrationView-CYq7bXS5.js +650 -0
- package/dist/{WorkflowConfigurationView-VLObweIg.js → WorkflowConfigurationView-D1ve8wHF.js} +189 -189
- package/dist/WorkflowWorkbenchView-CJXy2iRP.js +759 -0
- package/dist/{codeConfiguration-DbUEhnW7.js → codeConfiguration-Bls4mHm3.js} +28 -28
- package/dist/{configurationEditorNavigation-DZeBbg3z.js → configurationEditorNavigation-DteTknF3.js} +2 -2
- package/dist/index.css +1 -1
- package/dist/index.js +704 -646
- package/dist/{moduleMenuWorkspace-COanAuqc.js → moduleMenuWorkspace-CsYcDzfq.js} +197 -197
- package/dist/{platform-components-5joS6YaR.js → platform-components-CT5wnPa0.js} +2267 -2034
- package/dist/{platform-workbench-le7pFe4d.js → platform-workbench-CBLyxlvV.js} +5026 -5014
- package/dist/types/app/useLoginFailureFeedback.d.ts +8 -0
- package/dist/types/platform-components/ObjectPickerInput.vue.d.ts +13 -0
- package/dist/types/platform-components/RecordMultiPicker.vue.d.ts +7 -29
- package/dist/types/platform-components/RecordPicker.vue.d.ts +7 -31
- package/dist/types/platform-components/RecordReferencePicker.vue.d.ts +24 -0
- package/dist/types/platform-components/ReferencePicker.vue.d.ts +1 -1
- package/dist/types/platform-components/ReferenceSelectionPanel.vue.d.ts +20 -0
- package/dist/types/platform-components/UserPicker.vue.d.ts +1 -1
- package/dist/types/platform-components/recordFormFieldModel.d.ts +2 -0
- package/dist/types/platform-components/recordReferencePickerProvider.d.ts +26 -0
- package/dist/types/platform-components/workflowAccountOptions.d.ts +3 -3
- package/dist/types/vue-ui-antdv/components/UiInput.vue.d.ts +2 -0
- package/dist/types/vue-ui-antdv/components/UiSelect.vue.d.ts +13 -2
- package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +8 -2
- package/dist/{useWorkflowConfigurationContext-B9GigSF8.js → useWorkflowConfigurationContext-DsuGHZ0U.js} +9 -9
- package/dist/{workspaceViews-8-LaaGxD.js → workspaceViews-BxEz6u5n.js} +523 -523
- package/package.json +5 -1
- package/dist/BusinessLogListDrawer-C7wb2R6q.js +0 -868
- package/dist/ModuleActionManagementView-Xd8uB3iR.js +0 -780
- package/dist/RoleDetailWorkspaceView-BmtEBE0r.js +0 -1435
- package/dist/WorkflowAdministrationView-Cb6RnlGU.js +0 -650
- package/dist/WorkflowWorkbenchView-CbZervUv.js +0 -759
package/dist/{WorkflowConfigurationView-VLObweIg.js → WorkflowConfigurationView-D1ve8wHF.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as e, b as t, y as n } from "./platform-workbench-
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { Fragment as
|
|
1
|
+
import { D as e, b as t, y as n } from "./platform-workbench-CBLyxlvV.js";
|
|
2
|
+
import { $t as r, Br as i, Fa as a, Fn as o, Gt as s, Hn as c, Hr as l, Ln as u, Lr as d, Ma as f, Nn as p, Pn as ee, Rn as te, Xi as ne, Zr as m, _r as h, a as re, an as ie, c as ae, ca as oe, d as se, fa as ce, io as le, ka as ue, l as de, la as fe, m as pe, n as me, nr as he, o as ge, pr as _e, q as ve, qn as ye, ra as g, s as be, t as xe, to as _, va as v, xn as y, ya as Se, yr as Ce } from "./platform-components-CT5wnPa0.js";
|
|
3
|
+
import { t as we } from "./configurationEditorNavigation-DteTknF3.js";
|
|
4
|
+
import { t as Te } from "./useWorkflowConfigurationContext-DsuGHZ0U.js";
|
|
5
|
+
import { t as Ee } from "./formulaReferences-CKkkdA_R.js";
|
|
6
|
+
import { Fragment as De, computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createSlots as Oe, createTextVNode as T, createVNode as E, defineComponent as D, inject as ke, normalizeStyle as Ae, onActivated as je, onBeforeUnmount as Me, onDeactivated as Ne, onMounted as Pe, onScopeDispose as Fe, openBlock as O, ref as k, renderList as Ie, toDisplayString as A, unref as j, watch as Le, withCtx as M } from "vue";
|
|
7
7
|
//#region src/views/workflowSaveRecovery.ts
|
|
8
8
|
function Re(e, t) {
|
|
9
9
|
let n = `muyun.workflow-design-save.${e}`;
|
|
@@ -45,9 +45,9 @@ function ze(e, t = 100) {
|
|
|
45
45
|
let e = o;
|
|
46
46
|
return () => o === e;
|
|
47
47
|
},
|
|
48
|
-
canUndo:
|
|
49
|
-
canRedo:
|
|
50
|
-
dirty:
|
|
48
|
+
canUndo: b(() => r.value > 0),
|
|
49
|
+
canRedo: b(() => r.value < n.value.length - 1),
|
|
50
|
+
dirty: b(() => JSON.stringify(e.value) !== i.value),
|
|
51
51
|
undo: () => s(r.value - 1),
|
|
52
52
|
redo: () => s(r.value + 1),
|
|
53
53
|
markSaved: () => {
|
|
@@ -68,7 +68,7 @@ function Be(e, t) {
|
|
|
68
68
|
allowReject: !0
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
function Ve(e, t, n, r =
|
|
71
|
+
function Ve(e, t, n, r = _) {
|
|
72
72
|
let i = e.links.find((e) => e.routeKey === t);
|
|
73
73
|
if (!i) throw Error(r.t("platform.workflow-assistant.insert-branch-route", "请选择需要插入分支的路径"));
|
|
74
74
|
let a = `${n}_join`, o = [
|
|
@@ -114,7 +114,7 @@ function Ve(e, t, n, r = v) {
|
|
|
114
114
|
} : e), ...s]
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
function He(e, t, n, r =
|
|
117
|
+
function He(e, t, n, r = _) {
|
|
118
118
|
let i = e.nodes.find((e) => e.nodeKey === t && e.nodeType === "branch"), a = e.nodes.find((e) => e.nodeKey === i?.convergeNodeKey && e.nodeType === "converge");
|
|
119
119
|
if (!i || !a) throw Error(r.t("platform.workflow-assistant.branch-join-required", "分支必须绑定有效汇聚节点"));
|
|
120
120
|
if (e.nodes.some((e) => e.nodeKey === n)) throw Error(r.t("platform.workflow-assistant.key-exists", "节点标识已存在"));
|
|
@@ -139,7 +139,7 @@ function He(e, t, n, r = v) {
|
|
|
139
139
|
]
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
|
-
function Ue(e, t, n =
|
|
142
|
+
function Ue(e, t, n = _) {
|
|
143
143
|
let r = e.nodes.find((e) => e.nodeKey === t && e.nodeType === "branch"), i = e.nodes.find((e) => e.nodeKey === r?.convergeNodeKey && e.nodeType === "converge");
|
|
144
144
|
if (!r || !i) throw Error(n.t("platform.workflow-assistant.branch-join-required", "分支必须绑定有效汇聚节点"));
|
|
145
145
|
let a = /* @__PURE__ */ new Set([t]), o = /* @__PURE__ */ new Map();
|
|
@@ -168,7 +168,7 @@ function Ue(e, t, n = v) {
|
|
|
168
168
|
} : e)
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
function We(e, t, n, r =
|
|
171
|
+
function We(e, t, n, r = _) {
|
|
172
172
|
let i = e.links.find((e) => e.routeKey === t);
|
|
173
173
|
if (!i) throw Error(r.t("platform.workflow-assistant.route-missing", "路径不存在"));
|
|
174
174
|
return {
|
|
@@ -183,7 +183,7 @@ function We(e, t, n, r = v) {
|
|
|
183
183
|
} : e)
|
|
184
184
|
};
|
|
185
185
|
}
|
|
186
|
-
function Ge(e, t, n, r =
|
|
186
|
+
function Ge(e, t, n, r = _) {
|
|
187
187
|
let i = e.links.find((e) => e.routeKey === t);
|
|
188
188
|
if (!i) throw Error(r.t("platform.workflow-assistant.insert-node-route", "请选择需要插入节点的路径"));
|
|
189
189
|
if (e.nodes.some((e) => e.nodeKey === n.nodeKey)) throw Error(r.t("platform.workflow-assistant.key-exists", "节点标识已存在"));
|
|
@@ -201,7 +201,7 @@ function Ge(e, t, n, r = v) {
|
|
|
201
201
|
}]
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
|
-
function Ke(e, t, n =
|
|
204
|
+
function Ke(e, t, n = _) {
|
|
205
205
|
let r = e.nodes.find((e) => e.nodeKey === t);
|
|
206
206
|
if (!r || ["start", "end"].includes(r.nodeType)) throw Error(n.t("platform.workflow-assistant.retain-endpoints", "开始和结束节点必须保留"));
|
|
207
207
|
let i = e.links.filter((e) => e.targetNodeKey === t), a = e.links.filter((e) => e.sourceNodeKey === t);
|
|
@@ -215,7 +215,7 @@ function Ke(e, t, n = v) {
|
|
|
215
215
|
} : e)
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
|
-
function qe(e, t =
|
|
218
|
+
function qe(e, t = _) {
|
|
219
219
|
let n = [
|
|
220
220
|
{
|
|
221
221
|
nodeKey: "start",
|
|
@@ -258,7 +258,7 @@ function Je(e) {
|
|
|
258
258
|
return e.assistantPolicy !== "HIDDEN" && e.fieldControl?.alias !== "password";
|
|
259
259
|
}
|
|
260
260
|
function Ye(e, t) {
|
|
261
|
-
return !e ||
|
|
261
|
+
return !e || Ee(e).every((e) => t.some((t) => t.name === e && Je(t)));
|
|
262
262
|
}
|
|
263
263
|
var N = (e, t = 1) => ({
|
|
264
264
|
type: "string",
|
|
@@ -416,7 +416,7 @@ function H(e, t) {
|
|
|
416
416
|
}
|
|
417
417
|
return !1;
|
|
418
418
|
}
|
|
419
|
-
function Ze(e, t =
|
|
419
|
+
function Ze(e, t = _) {
|
|
420
420
|
if (!H(e, V)) throw Error(t.t("platform.workflow-assistant.invalid-input", "流程操作参数无效:请使用已声明的操作、字段和容量限制"));
|
|
421
421
|
let n = JSON.parse(JSON.stringify(e)), r = /* @__PURE__ */ new Set();
|
|
422
422
|
for (let e of n.operations) if ("as" in e) {
|
|
@@ -447,7 +447,7 @@ function $e(e, t, n, r) {
|
|
|
447
447
|
if (a.approvalRatio !== void 0 && o.approvalMode !== "ratio") throw Error(r.t("platform.workflow-assistant.approval-ratio-only", "审批比例仅可用于比例审批模式"));
|
|
448
448
|
return o;
|
|
449
449
|
}
|
|
450
|
-
function U(e, t = [], n =
|
|
450
|
+
function U(e, t = [], n = _) {
|
|
451
451
|
let r = [], i = [];
|
|
452
452
|
if (e.nodes.length > 300 || e.links.length > 600) return {
|
|
453
453
|
valid: !1,
|
|
@@ -471,7 +471,7 @@ function U(e, t = [], n = v) {
|
|
|
471
471
|
"milestone",
|
|
472
472
|
"converge"
|
|
473
473
|
].includes(s.nodeType) && u.length > 1 && r.push(n.t("platform.workflow-assistant.multiple-exits", "{name}:普通节点不能有多个出口,请使用分支", { name: c })), ["approval", "task"].includes(s.nodeType)) {
|
|
474
|
-
if (!
|
|
474
|
+
if (!ae(s.participantPolicyText)) r.push(n.t("platform.workflow-assistant.participants-required", "{name}:参与人未配置或无效", { name: c }));
|
|
475
475
|
else try {
|
|
476
476
|
let e = s.participantPolicyText?.trim();
|
|
477
477
|
if (e?.startsWith("{") || e?.startsWith("[")) {
|
|
@@ -491,7 +491,7 @@ function U(e, t = [], n = v) {
|
|
|
491
491
|
], l = !Array.isArray(t) && Array.isArray(r.rules) && Object.keys(r).some((e) => e !== "rules"), u = o.some((e) => e && typeof e == "object" && !Array.isArray(e) && Object.entries(e).some(([e, t]) => !s.includes(e) || e === "headOnly" && typeof t != "boolean"));
|
|
492
492
|
(l || u) && (a = !1, i.push(n.t("platform.workflow-assistant.participants-preserved", "{name}:参与人保留了本地无法检查的配置,请人工核对", { name: c })));
|
|
493
493
|
}
|
|
494
|
-
for (let e of
|
|
494
|
+
for (let e of de(s.participantPolicyText)) {
|
|
495
495
|
if (e.fieldName && !t.some((t) => t.name === e.fieldName && Je(t))) {
|
|
496
496
|
a = !1, i.push(n.t("platform.workflow-assistant.participants-preserved", "{name}:参与人保留了本地无法检查的配置,请人工核对", { name: c }));
|
|
497
497
|
continue;
|
|
@@ -553,17 +553,17 @@ function U(e, t = [], n = v) {
|
|
|
553
553
|
f && d(f.nodeKey), s.size < o.size && r.push(n.t("platform.workflow-assistant.unreachable-nodes", "存在从开始节点不可达的节点"));
|
|
554
554
|
for (let t of e.nodes) d(t.nodeKey);
|
|
555
555
|
u && r.push(n.t("platform.workflow-assistant.cycle", "流程存在循环路径"));
|
|
556
|
-
let p = [...new Set(r)],
|
|
556
|
+
let p = [...new Set(r)], ee = [...new Set(i)];
|
|
557
557
|
return {
|
|
558
558
|
valid: !r.length && a,
|
|
559
559
|
errors: p.slice(0, 40).map((e) => e.length > 500 ? n.t("platform.workflow-assistant.truncated-message", "{message}…(已截断)", { message: e.slice(0, 480) }) : e),
|
|
560
|
-
warnings:
|
|
561
|
-
truncated: p.length > 40 ||
|
|
560
|
+
warnings: ee.slice(0, 40).map((e) => e.length > 500 ? n.t("platform.workflow-assistant.truncated-message", "{message}…(已截断)", { message: e.slice(0, 480) }) : e),
|
|
561
|
+
truncated: p.length > 40 || ee.length > 40 || [...p, ...ee].some((e) => e.length > 500),
|
|
562
562
|
formulaCheck: "requires-server-validation",
|
|
563
563
|
publishedValidation: !1
|
|
564
564
|
};
|
|
565
565
|
}
|
|
566
|
-
function W(e, t, n = [], r =
|
|
566
|
+
function W(e, t, n = [], r = _) {
|
|
567
567
|
let i = Ze(t, r);
|
|
568
568
|
if (e.nodes.length > 300 || e.links.length > 600) throw Error(r.t("platform.workflow-assistant.edit-capacity", "当前流程超过助手可编辑容量,请人工配置"));
|
|
569
569
|
let a = e, o = Object.create(null), s = `assistant_${crypto.randomUUID().replaceAll("-", "")}`, c = (e) => {
|
|
@@ -682,7 +682,7 @@ function W(e, t, n = [], r = v) {
|
|
|
682
682
|
diagnostics: U(a, n, r)
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
|
-
function G(e, t, n =
|
|
685
|
+
function G(e, t, n = _) {
|
|
686
686
|
let r = [], i = {
|
|
687
687
|
title: n.t("platform.workflow-assistant.label-title", "标题"),
|
|
688
688
|
approvalMode: n.t("platform.workflow-assistant.label-approval-mode", "审批/知会模式"),
|
|
@@ -740,7 +740,7 @@ function G(e, t, n = v) {
|
|
|
740
740
|
//#endregion
|
|
741
741
|
//#region src/platform-components/useWorkflowDesignSession.ts
|
|
742
742
|
function K() {
|
|
743
|
-
let e =
|
|
743
|
+
let e = le(), t = k({
|
|
744
744
|
nodes: [],
|
|
745
745
|
links: []
|
|
746
746
|
}), n = ze(t);
|
|
@@ -759,7 +759,7 @@ function K() {
|
|
|
759
759
|
function a(r, i, a) {
|
|
760
760
|
let o = n.checkpoint(), s = W(t.value, r, i, e);
|
|
761
761
|
return () => {
|
|
762
|
-
if (!a() || !o()) throw new
|
|
762
|
+
if (!a() || !o()) throw new v(new Se(e.t("platform.workflow-assistant.draft-changed", "流程草稿已变更,请重新读取")));
|
|
763
763
|
return t.value = s.design, {
|
|
764
764
|
changes: s.changes,
|
|
765
765
|
created: s.created,
|
|
@@ -778,7 +778,7 @@ function K() {
|
|
|
778
778
|
//#endregion
|
|
779
779
|
//#region src/views/useWorkflowConfigurationSession.ts
|
|
780
780
|
function et(e) {
|
|
781
|
-
let r = n(), i = ke(t, void 0), a =
|
|
781
|
+
let r = n(), i = ke(t, void 0), a = b(() => JSON.stringify([
|
|
782
782
|
r?.value?.userId,
|
|
783
783
|
r?.value?.tenantId,
|
|
784
784
|
r?.value?.organizationId,
|
|
@@ -794,7 +794,7 @@ function et(e) {
|
|
|
794
794
|
}), Me(() => {
|
|
795
795
|
o.value = !1;
|
|
796
796
|
});
|
|
797
|
-
let s = k("idle"), c =
|
|
797
|
+
let s = k("idle"), c = b(() => s.value !== "idle");
|
|
798
798
|
return {
|
|
799
799
|
...K(),
|
|
800
800
|
scope: a,
|
|
@@ -809,7 +809,7 @@ function q(e) {
|
|
|
809
809
|
return e.ready && e.editable && !e.busy && e.version?.publishStatus === "draft";
|
|
810
810
|
}
|
|
811
811
|
function J(e, t, n = () => []) {
|
|
812
|
-
let r = e.language ??
|
|
812
|
+
let r = e.language ?? _, i = () => {
|
|
813
813
|
let t = e.state();
|
|
814
814
|
if (!t.ready) throw new g(r.t("platform.workflow-assistant.not-ready", "流程尚未加载就绪,请稍后重新读取"));
|
|
815
815
|
return t;
|
|
@@ -818,9 +818,9 @@ function J(e, t, n = () => []) {
|
|
|
818
818
|
descriptor: {
|
|
819
819
|
code: "workflow.describe-draft",
|
|
820
820
|
description: "读取当前流程定义、版本、同一画布草稿、已选对象、字段和参与人限制。truncated 表示省略或裁剪,不能据此认定对象不存在。未保存草稿不代表已发布。仅已列出的标识可用于已有对象;批内新对象使用 created 引用。",
|
|
821
|
-
inputSchema:
|
|
821
|
+
inputSchema: oe()
|
|
822
822
|
},
|
|
823
|
-
parseInput:
|
|
823
|
+
parseInput: fe,
|
|
824
824
|
async execute() {
|
|
825
825
|
return Z(i(), r);
|
|
826
826
|
}
|
|
@@ -829,9 +829,9 @@ function J(e, t, n = () => []) {
|
|
|
829
829
|
descriptor: {
|
|
830
830
|
code: "workflow.diagnose-draft",
|
|
831
831
|
description: "只读诊断当前共享草稿的本地结构、必填、受支持参与人和条件配置。不保存、不调用会先保存的页面校验,不复制服务端发布规则。条件公式仍需服务端正式检查,人工保存、校验和发布后才能生效。",
|
|
832
|
-
inputSchema:
|
|
832
|
+
inputSchema: oe()
|
|
833
833
|
},
|
|
834
|
-
parseInput:
|
|
834
|
+
parseInput: fe,
|
|
835
835
|
async execute(t, n) {
|
|
836
836
|
let a = i(), o = X(U(a.design, a.fields, r)), s = [...new Set(a.design.links.map((e) => e.conditionExpression).filter((e) => !!e?.trim()))], c = s.filter((e) => e.length <= 2e3 && Ye(e, a.fields)).slice(0, 16), l = [];
|
|
837
837
|
if (e.validateCondition) for (let t of c) {
|
|
@@ -967,7 +967,7 @@ function X(e) {
|
|
|
967
967
|
truncated: e.truncated || e.errors.length > 30 || e.warnings.length > 30 || [...e.errors, ...e.warnings].some((e) => e.length > 300)
|
|
968
968
|
};
|
|
969
969
|
}
|
|
970
|
-
function Z(e, t =
|
|
970
|
+
function Z(e, t = _) {
|
|
971
971
|
let n = !1, r = (e, t = 300) => (e && e.length > t && (n = !0), e?.slice(0, t)), i = (t) => {
|
|
972
972
|
if ((t.participantPolicyText?.length ?? 0) > 12e3) return n = !0, {
|
|
973
973
|
configured: !0,
|
|
@@ -975,7 +975,7 @@ function Z(e, t = v) {
|
|
|
975
975
|
manualConfigurationRequired: !0
|
|
976
976
|
};
|
|
977
977
|
try {
|
|
978
|
-
let i =
|
|
978
|
+
let i = de(t.participantPolicyText);
|
|
979
979
|
return i.length > 16 && (n = !0), {
|
|
980
980
|
configured: !!i.length,
|
|
981
981
|
rules: i.slice(0, 16).map((t) => t.fieldName && !e.fields.some((e) => e.name === t.fieldName && Je(e)) ? { manualConfigurationRequired: !0 } : {
|
|
@@ -1099,7 +1099,7 @@ function Z(e, t = v) {
|
|
|
1099
1099
|
participantSupported: e.referenceModule === "iam.user"
|
|
1100
1100
|
})), p = e.selectedNodeKeys.slice(0, 20).map((e) => r(e, 128));
|
|
1101
1101
|
p.length < e.selectedNodeKeys.length && (n = !0);
|
|
1102
|
-
let
|
|
1102
|
+
let ee = r(e.selectedRouteKey, 128);
|
|
1103
1103
|
return {
|
|
1104
1104
|
moduleAlias: r(e.moduleAlias, 128),
|
|
1105
1105
|
definition: c,
|
|
@@ -1114,7 +1114,7 @@ function Z(e, t = v) {
|
|
|
1114
1114
|
routes: d,
|
|
1115
1115
|
fields: f,
|
|
1116
1116
|
selectedNodeKeys: p,
|
|
1117
|
-
selectedRouteKey:
|
|
1117
|
+
selectedRouteKey: ee,
|
|
1118
1118
|
truncated: n,
|
|
1119
1119
|
limits: {
|
|
1120
1120
|
participantWrites: [
|
|
@@ -1139,45 +1139,45 @@ function tt(e) {
|
|
|
1139
1139
|
//#endregion
|
|
1140
1140
|
//#region src/views/useWorkflowConfigurationAssistant.ts
|
|
1141
1141
|
function nt(e) {
|
|
1142
|
-
let t =
|
|
1142
|
+
let t = ce(), { scope: n, active: r } = e.session, i = k(!1), a = k(!1), o = k(!1), s = 0, c, l;
|
|
1143
1143
|
function u() {
|
|
1144
1144
|
s++, a.value = o.value = !1, i.value = !1, c?.(), c = void 0;
|
|
1145
1145
|
}
|
|
1146
|
-
async function
|
|
1146
|
+
async function d() {
|
|
1147
1147
|
if (u(), !r.value || !t) return;
|
|
1148
1148
|
let c = n.value, l = s;
|
|
1149
1149
|
i.value = !0;
|
|
1150
1150
|
try {
|
|
1151
|
-
let t =
|
|
1151
|
+
let t = m({
|
|
1152
1152
|
http: e.http,
|
|
1153
1153
|
moduleAlias: "platform.workflow.definition",
|
|
1154
1154
|
runtimeAccess: "VIEW"
|
|
1155
1155
|
}), i = await t.runtime.ready;
|
|
1156
1156
|
if (!r.value || l !== s || n.value !== c) return;
|
|
1157
|
-
let u = e.definitionId(),
|
|
1157
|
+
let u = e.definitionId(), d = await t.recordActions(u);
|
|
1158
1158
|
if (!r.value || l !== s || n.value !== c) return;
|
|
1159
|
-
let
|
|
1160
|
-
a.value =
|
|
1159
|
+
let f = (e) => i.actions.some((t) => t.actionCode === e && t.authorized === !0) && d.recordId === u && d.actions.some((t) => t.actionCode === e && t.available === !0);
|
|
1160
|
+
a.value = f("viewWorkflowDesign"), o.value = a.value && f("editWorkflowDesign");
|
|
1161
1161
|
} catch {} finally {
|
|
1162
1162
|
l === s && (i.value = !1);
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function f() {
|
|
1166
1166
|
t && !c && r.value && l && (c = t.registry.register({
|
|
1167
1167
|
pageInstanceKey: l,
|
|
1168
1168
|
executionScopeKey: () => n.value,
|
|
1169
1169
|
contextRevision: e.revision,
|
|
1170
1170
|
interactionRevision: e.interactionRevision,
|
|
1171
|
-
settle: (t) =>
|
|
1172
|
-
surface: J(e.adapter,
|
|
1171
|
+
settle: (t) => we(() => !i.value && !e.adapter.state().busy, t),
|
|
1172
|
+
surface: J(e.adapter, ne(e.http), () => t.capabilities?.() ?? [])
|
|
1173
1173
|
}));
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1176
|
-
r.value && (l ||= t?.activePageInstanceKey(), !(c || i.value) && (
|
|
1175
|
+
function p() {
|
|
1176
|
+
r.value && (l ||= t?.activePageInstanceKey(), !(c || i.value) && (f(), d().then(f)));
|
|
1177
1177
|
}
|
|
1178
1178
|
return Le(n, () => {
|
|
1179
|
-
u(), r.value &&
|
|
1180
|
-
}, { flush: "sync" }), Pe(
|
|
1179
|
+
u(), r.value && d().then(f);
|
|
1180
|
+
}, { flush: "sync" }), Pe(p), je(p), Ne(() => {
|
|
1181
1181
|
u();
|
|
1182
1182
|
}), Me(() => {
|
|
1183
1183
|
u();
|
|
@@ -1303,7 +1303,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1303
1303
|
key: 0,
|
|
1304
1304
|
class: "configuration-recovery",
|
|
1305
1305
|
role: "alert"
|
|
1306
|
-
}, dt = { key: 1 }, ft = { key: 3 }, pt = { class: "configuration-property-operations" }, mt = { class: "publish-nodes" }, ht = { key: 0 }, gt = { key: 0 }, _t = { key: 1 }, vt = { key: 0 }, yt = 720, bt = /*#__PURE__*/
|
|
1306
|
+
}, dt = { key: 1 }, ft = { key: 3 }, pt = { class: "configuration-property-operations" }, mt = { class: "publish-nodes" }, ht = { key: 0 }, gt = { key: 0 }, _t = { key: 1 }, vt = { key: 0 }, yt = 720, bt = /*#__PURE__*/ Ce(/* @__PURE__ */ D({
|
|
1307
1307
|
name: "WorkflowConfigurationView",
|
|
1308
1308
|
__name: "WorkflowConfigurationView",
|
|
1309
1309
|
props: {
|
|
@@ -1312,19 +1312,19 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1312
1312
|
definitionId: {}
|
|
1313
1313
|
},
|
|
1314
1314
|
setup(t) {
|
|
1315
|
-
let n =
|
|
1316
|
-
function
|
|
1317
|
-
return
|
|
1315
|
+
let n = le();
|
|
1316
|
+
function ne(e) {
|
|
1317
|
+
return pe(e, n);
|
|
1318
1318
|
}
|
|
1319
|
-
let
|
|
1319
|
+
let m = t, { context: oe, businessRuntime: ce, businessLoading: fe, fields: g, conditionTools: _ } = Te(() => m.moduleAlias), v = i(oe.http, m.moduleAlias), Se = k({
|
|
1320
1320
|
tasks: [],
|
|
1321
1321
|
queries: [],
|
|
1322
1322
|
generations: [],
|
|
1323
1323
|
associations: []
|
|
1324
|
-
}),
|
|
1324
|
+
}), Ce = b(() => (ce.value?.actions ?? []).map((e) => ({
|
|
1325
1325
|
value: e.actionCode,
|
|
1326
|
-
label: e.title ??
|
|
1327
|
-
}))),
|
|
1326
|
+
label: e.title ?? ne(e.actionCode)
|
|
1327
|
+
}))), we = k(), Ee = me(we, () => yt + c.compact + ie.columnGap), D = k(!1), ke = k(!1), Fe = b(() => [
|
|
1328
1328
|
{
|
|
1329
1329
|
key: "save",
|
|
1330
1330
|
title: n.t("platform.screen.WorkflowConfigurationView.save-draft", "保存草稿"),
|
|
@@ -1354,7 +1354,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1354
1354
|
level: "secondary",
|
|
1355
1355
|
disabled: !I.value || Y.value || X.value || z.value
|
|
1356
1356
|
}
|
|
1357
|
-
]), ze =
|
|
1357
|
+
]), ze = b(() => $.value?.nodeType === "branch" ? [{
|
|
1358
1358
|
key: "path",
|
|
1359
1359
|
title: n.t("platform.screen.WorkflowDesignProperties.add-branch-route", "增加分支路径"),
|
|
1360
1360
|
disabled: !Q.value
|
|
@@ -1375,7 +1375,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1375
1375
|
}
|
|
1376
1376
|
function Ye(e) {
|
|
1377
1377
|
try {
|
|
1378
|
-
return
|
|
1378
|
+
return de(e).map((e) => ({
|
|
1379
1379
|
INITIATOR_SELF: n.t("platform.workflow-participant.initiator", "提交人本人"),
|
|
1380
1380
|
USER: n.t("platform.workflow-participant.named-accounts", "指定账号"),
|
|
1381
1381
|
ROLE: n.t("platform.workflow-participant.role-members", "角色成员"),
|
|
@@ -1383,22 +1383,22 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1383
1383
|
ORG: n.t("platform.workflow-participant.organization-members", "组织成员"),
|
|
1384
1384
|
FIELD: n.t("platform.workflow-participant.participant-field", "业务人员字段"),
|
|
1385
1385
|
RELATIVE: n.t("platform.workflow-participant.relative-participants", "相对人员")
|
|
1386
|
-
}[e.type] ?? e.type) + (e.ids?.length ? n.t("platform.workflow-config.target-count", "({count} 个目标)", { count: e.ids.length }) : e.fieldName ? `(${
|
|
1386
|
+
}[e.type] ?? e.type) + (e.ids?.length ? n.t("platform.workflow-config.target-count", "({count} 个目标)", { count: e.ids.length }) : e.fieldName ? `(${g.value.find((t) => t.name === e.fieldName)?.label ?? e.fieldName})` : "")).join("、") || n.t("platform.workflow-config.empty-participants", "尚未配置参与人");
|
|
1387
1387
|
} catch {
|
|
1388
1388
|
return n.t("platform.workflow-config.invalid-participants", "人员配置格式无效");
|
|
1389
1389
|
}
|
|
1390
1390
|
}
|
|
1391
1391
|
let N = k(!1), P = k(), F = k([]), I = k(), L = k(), R = et({
|
|
1392
|
-
moduleAlias: () =>
|
|
1393
|
-
definitionId: () =>
|
|
1394
|
-
}), { recoveryRequired: z, submissionStatus: B } = R, V = k(), Xe = k(!1), H = k(!1), Ze = k(!1), Qe =
|
|
1392
|
+
moduleAlias: () => m.moduleAlias,
|
|
1393
|
+
definitionId: () => m.definitionId
|
|
1394
|
+
}), { recoveryRequired: z, submissionStatus: B } = R, V = k(), Xe = k(!1), H = k(!1), Ze = k(!1), Qe = b(() => !V.value || Xe.value || H.value || (W.value?.version.version ?? -1) > V.value.expectedVersion);
|
|
1395
1395
|
function $e() {
|
|
1396
1396
|
return Re(R.scope.value, window.sessionStorage);
|
|
1397
1397
|
}
|
|
1398
|
-
let U = k(""), W = k(), { design: G, history: K } = R, q = k(""), J = k(""), Y = k(!1), X = K.dirty, Z = k([]), tt =
|
|
1398
|
+
let U = k(""), W = k(), { design: G, history: K } = R, q = k(""), J = k(""), Y = k(!1), X = K.dirty, Z = k([]), tt = b(() => ["published", "archived"].includes(L.value?.publishStatus ?? "")), Q = b(() => L.value?.publishStatus === "draft" && !Y.value && !z.value), rt = k(""), bt = k(0), xt = nt({
|
|
1399
1399
|
session: R,
|
|
1400
|
-
http:
|
|
1401
|
-
definitionId: () =>
|
|
1400
|
+
http: oe.http,
|
|
1401
|
+
definitionId: () => m.definitionId,
|
|
1402
1402
|
interactionRevision: () => String(bt.value),
|
|
1403
1403
|
revision: () => JSON.stringify([
|
|
1404
1404
|
R.scope.value,
|
|
@@ -1406,29 +1406,29 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1406
1406
|
L.value,
|
|
1407
1407
|
I.value,
|
|
1408
1408
|
G.value,
|
|
1409
|
-
|
|
1409
|
+
g.value,
|
|
1410
1410
|
Z.value,
|
|
1411
1411
|
J.value,
|
|
1412
1412
|
Y.value,
|
|
1413
1413
|
B.value,
|
|
1414
1414
|
N.value,
|
|
1415
|
-
|
|
1415
|
+
fe.value,
|
|
1416
1416
|
xt.readable.value,
|
|
1417
1417
|
xt.writable.value,
|
|
1418
1418
|
R.active.value
|
|
1419
1419
|
]),
|
|
1420
1420
|
adapter: {
|
|
1421
1421
|
language: n,
|
|
1422
|
-
validateCondition: (e) =>
|
|
1422
|
+
validateCondition: (e) => v.validateCondition(e),
|
|
1423
1423
|
state: () => ({
|
|
1424
|
-
ready: R.active.value && xt.readable.value && rt.value === R.scope.value && !!(I.value && L.value &&
|
|
1424
|
+
ready: R.active.value && xt.readable.value && rt.value === R.scope.value && !!(I.value && L.value && ce.value) && !N.value && !P.value && !Y.value,
|
|
1425
1425
|
editable: Q.value && xt.writable.value,
|
|
1426
|
-
busy: Y.value || N.value ||
|
|
1427
|
-
moduleAlias:
|
|
1426
|
+
busy: Y.value || N.value || fe.value,
|
|
1427
|
+
moduleAlias: m.moduleAlias,
|
|
1428
1428
|
definition: I.value,
|
|
1429
1429
|
version: L.value,
|
|
1430
1430
|
design: G.value,
|
|
1431
|
-
fields:
|
|
1431
|
+
fields: g.value,
|
|
1432
1432
|
selectedNodeKeys: Z.value,
|
|
1433
1433
|
selectedRouteKey: J.value,
|
|
1434
1434
|
dirty: X.value,
|
|
@@ -1436,10 +1436,10 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1436
1436
|
}),
|
|
1437
1437
|
prepare: (e) => {
|
|
1438
1438
|
let t = R.scope.value;
|
|
1439
|
-
return R.prepare(e,
|
|
1439
|
+
return R.prepare(e, g.value, () => R.scope.value === t && R.active.value && xt.readable.value && xt.writable.value && Q.value && rt.value === t && !N.value && !P.value);
|
|
1440
1440
|
}
|
|
1441
1441
|
}
|
|
1442
|
-
}), $ =
|
|
1442
|
+
}), $ = b(() => G.value.nodes.find((e) => e.nodeKey === q.value)), St = b(() => G.value.links.find((e) => e.routeKey === J.value)), Ct = k(!1), wt = b(() => Q.value && !Ct.value && Z.value.length === 1 && $.value != null && ![
|
|
1443
1443
|
"start",
|
|
1444
1444
|
"end",
|
|
1445
1445
|
"converge"
|
|
@@ -1462,7 +1462,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1462
1462
|
}, i = t?.convergeMode ?? "all";
|
|
1463
1463
|
return `${r[i]}${i === "ratio" ? ` ${t?.convergeRatio ?? 100}%` : ""}`;
|
|
1464
1464
|
}
|
|
1465
|
-
|
|
1465
|
+
d(() => n.t("platform.workflow-config.configuration", "流程配置"), () => X.value, () => Y.value), Pe(() => {
|
|
1466
1466
|
Rt();
|
|
1467
1467
|
});
|
|
1468
1468
|
let Dt = 0, Ot = !1, kt = !1, At = 0, jt = 0, Mt = !1;
|
|
@@ -1482,7 +1482,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1482
1482
|
At++, jt++, Mt = !1, B.value = "idle", V.value = void 0, Xe.value = !1, H.value = !1, Ze.value = !1, W.value = void 0, Dt++, rt.value = "", I.value = void 0, L.value = void 0, F.value = [], K.reset({
|
|
1483
1483
|
nodes: [],
|
|
1484
1484
|
links: []
|
|
1485
|
-
}), Z.value = [], q.value = J.value = "", D.value = ke.value = !1, Y.value = !1,
|
|
1485
|
+
}), Z.value = [], q.value = J.value = "", D.value = ke.value = !1, Y.value = !1, v = i(oe.http, m.moduleAlias), R.active.value && Rt();
|
|
1486
1486
|
}, { flush: "sync" }), Ne(() => {
|
|
1487
1487
|
At++, Dt++, Mt || (Y.value = !1), N.value = !1;
|
|
1488
1488
|
}), Me(() => {
|
|
@@ -1496,10 +1496,10 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1496
1496
|
}
|
|
1497
1497
|
let e = ++Dt, t = Pt();
|
|
1498
1498
|
try {
|
|
1499
|
-
let n = await
|
|
1499
|
+
let n = await v.view(m.definitionId);
|
|
1500
1500
|
t() && e === Dt && (I.value = n);
|
|
1501
1501
|
} catch (n) {
|
|
1502
|
-
t() && e === Dt &&
|
|
1502
|
+
t() && e === Dt && y(n, {
|
|
1503
1503
|
source: "workflow-design",
|
|
1504
1504
|
phase: "load"
|
|
1505
1505
|
});
|
|
@@ -1509,7 +1509,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1509
1509
|
I.value ? It() : Rt();
|
|
1510
1510
|
}), e({
|
|
1511
1511
|
moduleAlias: "platform.workflow.definition",
|
|
1512
|
-
recordId: () =>
|
|
1512
|
+
recordId: () => m.definitionId,
|
|
1513
1513
|
handler: It
|
|
1514
1514
|
});
|
|
1515
1515
|
async function Lt(e, t = !1) {
|
|
@@ -1520,7 +1520,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1520
1520
|
try {
|
|
1521
1521
|
await e(n);
|
|
1522
1522
|
} catch (e) {
|
|
1523
|
-
n() &&
|
|
1523
|
+
n() && y(e, {
|
|
1524
1524
|
source: "workflow-design",
|
|
1525
1525
|
phase: "action"
|
|
1526
1526
|
});
|
|
@@ -1531,7 +1531,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1531
1531
|
async function Rt() {
|
|
1532
1532
|
if (Y.value || X.value) return;
|
|
1533
1533
|
N.value = !0, P.value = void 0;
|
|
1534
|
-
let e = Pt(), t =
|
|
1534
|
+
let e = Pt(), t = v, r = m.definitionId;
|
|
1535
1535
|
await Lt(async (e) => {
|
|
1536
1536
|
try {
|
|
1537
1537
|
V.value = $e().restore(), V.value && (B.value = "unknown", Ze.value = !0);
|
|
@@ -1548,17 +1548,17 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1548
1548
|
let c = await t.design(i.id, s.id);
|
|
1549
1549
|
if (!e()) return;
|
|
1550
1550
|
let l = s.publishStatus === "draft" && !c.nodes.length;
|
|
1551
|
-
l && (c = qe(i.approvalEnabled, n)), I.value = i,
|
|
1551
|
+
l && (c = qe(i.approvalEnabled, n)), I.value = i, Se.value = a, F.value = o, L.value = s, K.reset(c, l ? {
|
|
1552
1552
|
nodes: [],
|
|
1553
1553
|
links: []
|
|
1554
1554
|
} : c), rt.value = R.scope.value, Z.value = [], q.value = "", J.value = "", D.value = !1;
|
|
1555
1555
|
} catch (t) {
|
|
1556
|
-
e() && (P.value = () => a(
|
|
1556
|
+
e() && (P.value = () => a(f(t), n));
|
|
1557
1557
|
}
|
|
1558
1558
|
}), e() && (N.value = !1);
|
|
1559
1559
|
}
|
|
1560
1560
|
async function zt(e, t = Pt()) {
|
|
1561
|
-
let n = await
|
|
1561
|
+
let n = await v.design(I.value.id, e.id);
|
|
1562
1562
|
t() && (L.value = e, K.reset(n), Z.value = [], q.value = G.value.nodes[0]?.nodeKey ?? "", J.value = "", D.value = !1);
|
|
1563
1563
|
}
|
|
1564
1564
|
async function Bt(e) {
|
|
@@ -1569,13 +1569,13 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1569
1569
|
async function Vt() {
|
|
1570
1570
|
Q.value && L.value && I.value && await Lt(async (e) => {
|
|
1571
1571
|
let t = {
|
|
1572
|
-
requestId:
|
|
1572
|
+
requestId: l(),
|
|
1573
1573
|
versionId: L.value.id,
|
|
1574
1574
|
expectedVersion: L.value.version
|
|
1575
|
-
},
|
|
1576
|
-
|
|
1577
|
-
let
|
|
1578
|
-
if (n instanceof
|
|
1575
|
+
}, r = $e();
|
|
1576
|
+
r.save(t), V.value = t, Xe.value = !1, H.value = !1;
|
|
1577
|
+
let i = await v.saveDesign(I.value.id, L.value.id, L.value.version, G.value, t.requestId).catch((n) => {
|
|
1578
|
+
if (n instanceof ue && [
|
|
1579
1579
|
400,
|
|
1580
1580
|
401,
|
|
1581
1581
|
403,
|
|
@@ -1584,13 +1584,13 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1584
1584
|
422
|
|
1585
1585
|
].includes(n.status ?? 0)) {
|
|
1586
1586
|
try {
|
|
1587
|
-
|
|
1587
|
+
r.clear(t.requestId);
|
|
1588
1588
|
} catch (t) {
|
|
1589
1589
|
throw e() && (B.value = "unknown"), t;
|
|
1590
1590
|
}
|
|
1591
1591
|
e() && (V.value = void 0);
|
|
1592
1592
|
}
|
|
1593
|
-
throw e() && n instanceof
|
|
1593
|
+
throw e() && n instanceof ue && n.status === 409 && (B.value = "conflict"), e() && !(n instanceof ue && [
|
|
1594
1594
|
400,
|
|
1595
1595
|
401,
|
|
1596
1596
|
403,
|
|
@@ -1600,18 +1600,18 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1600
1600
|
].includes(n.status ?? 0)) && (B.value = "unknown"), n;
|
|
1601
1601
|
});
|
|
1602
1602
|
try {
|
|
1603
|
-
|
|
1603
|
+
r.clear(t.requestId);
|
|
1604
1604
|
} catch (t) {
|
|
1605
1605
|
throw e() && (B.value = "unknown"), t;
|
|
1606
1606
|
}
|
|
1607
|
-
e() && (V.value = void 0, L.value =
|
|
1607
|
+
e() && (V.value = void 0, L.value = i, F.value = F.value.map((e) => e.id === L.value.id ? L.value : e), K.markSaved(), ee(n.t("platform.workflow-config.draft-saved", "流程草稿已保存")));
|
|
1608
1608
|
}, !0);
|
|
1609
1609
|
}
|
|
1610
1610
|
async function Ht() {
|
|
1611
1611
|
if (Y.value || !V.value || !I.value || !L.value) return;
|
|
1612
1612
|
let e = V.value, t = I.value.id;
|
|
1613
1613
|
await Lt(async (n) => {
|
|
1614
|
-
let r = await
|
|
1614
|
+
let r = await v.abandonSave(t, e.versionId, e.requestId);
|
|
1615
1615
|
n() && (Xe.value = r.committed === !0, H.value = r.cancelled === !0);
|
|
1616
1616
|
}, !0), R.active.value && V.value === e && await Ut();
|
|
1617
1617
|
}
|
|
@@ -1620,15 +1620,15 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1620
1620
|
let e = I.value.id, t = L.value.id;
|
|
1621
1621
|
Y.value || (W.value = void 0, B.value === "idle" && (B.value = "review"), await Lt(async (r) => {
|
|
1622
1622
|
if (V.value) {
|
|
1623
|
-
let n = await
|
|
1623
|
+
let n = await v.saveReceipt(e, t, V.value.requestId);
|
|
1624
1624
|
if (!r()) return;
|
|
1625
1625
|
Xe.value = n.committed === !0, H.value = n.cancelled === !0;
|
|
1626
1626
|
}
|
|
1627
|
-
let i = await
|
|
1627
|
+
let i = await v.versions(e);
|
|
1628
1628
|
if (!r()) return;
|
|
1629
1629
|
let a = i.find((e) => e.id === t);
|
|
1630
1630
|
if (!a) throw Error(n.t("platform.workflow-config.version-missing", "当前流程版本已不存在"));
|
|
1631
|
-
let o = await
|
|
1631
|
+
let o = await v.design(e, t);
|
|
1632
1632
|
r() && (F.value = i.sort((e, t) => t.versionNo - e.versionNo), W.value = {
|
|
1633
1633
|
version: a,
|
|
1634
1634
|
design: o
|
|
@@ -1641,7 +1641,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1641
1641
|
try {
|
|
1642
1642
|
V.value && $e().clear(V.value.requestId);
|
|
1643
1643
|
} catch (e) {
|
|
1644
|
-
|
|
1644
|
+
y(e, {
|
|
1645
1645
|
source: "workflow-design",
|
|
1646
1646
|
phase: "action"
|
|
1647
1647
|
});
|
|
@@ -1653,28 +1653,28 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1653
1653
|
if (z.value) return;
|
|
1654
1654
|
let e = Pt();
|
|
1655
1655
|
X.value && await Vt(), e() && !X.value && L.value && await Lt(async (e) => {
|
|
1656
|
-
await
|
|
1656
|
+
await v.validate(I.value.id, L.value.id), e() && ee(n.t("platform.workflow-config.validated", "流程发布校验通过"));
|
|
1657
1657
|
});
|
|
1658
1658
|
}
|
|
1659
1659
|
async function Kt() {
|
|
1660
1660
|
if (z.value) return;
|
|
1661
1661
|
let e = Pt();
|
|
1662
|
-
if (G.value.nodes.some((e) => ["approval", "task"].includes(e.nodeType) && !
|
|
1663
|
-
|
|
1662
|
+
if (G.value.nodes.some((e) => ["approval", "task"].includes(e.nodeType) && !ae(e.participantPolicyText))) {
|
|
1663
|
+
y(Error(n.t("platform.workflow-config.participants-required", "请为每个审批或业务任务节点明确配置参与人")), {
|
|
1664
1664
|
source: "workflow-design",
|
|
1665
1665
|
phase: "validation"
|
|
1666
1666
|
});
|
|
1667
1667
|
return;
|
|
1668
1668
|
}
|
|
1669
1669
|
X.value && await Vt(), e() && !X.value && I.value && L.value && await Lt(async (e) => {
|
|
1670
|
-
let t = await
|
|
1670
|
+
let t = await v.publish(I.value.id, L.value.id, I.value.version, L.value.version);
|
|
1671
1671
|
if (e()) {
|
|
1672
|
-
L.value = t, F.value = F.value.map((e) => e.id === L.value.id ? L.value : e), K.markSaved(), ke.value = !1,
|
|
1672
|
+
L.value = t, F.value = F.value.map((e) => e.id === L.value.id ? L.value : e), K.markSaved(), ke.value = !1, ee(n.t("platform.workflow-config.published", "流程已发布,后续新申请使用该版本"));
|
|
1673
1673
|
try {
|
|
1674
|
-
let t = await
|
|
1674
|
+
let t = await v.view(I.value.id);
|
|
1675
1675
|
e() && (I.value = t);
|
|
1676
1676
|
} catch (t) {
|
|
1677
|
-
e() &&
|
|
1677
|
+
e() && y(t, {
|
|
1678
1678
|
source: "workflow-design",
|
|
1679
1679
|
phase: "load"
|
|
1680
1680
|
});
|
|
@@ -1684,7 +1684,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1684
1684
|
}
|
|
1685
1685
|
async function qt() {
|
|
1686
1686
|
z.value || X.value || I.value && await Lt(async (e) => {
|
|
1687
|
-
let t = await
|
|
1687
|
+
let t = await v.upgrade(I.value.id);
|
|
1688
1688
|
e() && (F.value = [t, ...F.value.filter((e) => e.id !== t.id)], await zt(t, e), e() && (G.value.nodes.length || (G.value = qe(I.value.approvalEnabled, n), Jt("approval"))));
|
|
1689
1689
|
}, !0);
|
|
1690
1690
|
}
|
|
@@ -1716,7 +1716,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1716
1716
|
try {
|
|
1717
1717
|
G.value = Ve(G.value, $t(), e, n), Jt(e);
|
|
1718
1718
|
} catch (e) {
|
|
1719
|
-
|
|
1719
|
+
y(e, {
|
|
1720
1720
|
source: "workflow-design",
|
|
1721
1721
|
phase: "validation"
|
|
1722
1722
|
});
|
|
@@ -1726,7 +1726,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1726
1726
|
if (Q.value) try {
|
|
1727
1727
|
G.value = He(G.value, q.value, `path_${Date.now().toString(36)}`, n);
|
|
1728
1728
|
} catch (e) {
|
|
1729
|
-
|
|
1729
|
+
y(e, {
|
|
1730
1730
|
source: "workflow-design",
|
|
1731
1731
|
phase: "validation"
|
|
1732
1732
|
});
|
|
@@ -1743,7 +1743,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1743
1743
|
}, n) || !sn(e)) return;
|
|
1744
1744
|
G.value = t, q.value = "", D.value = !1;
|
|
1745
1745
|
} catch (e) {
|
|
1746
|
-
|
|
1746
|
+
y(e, {
|
|
1747
1747
|
source: "workflow-design",
|
|
1748
1748
|
phase: "validation"
|
|
1749
1749
|
});
|
|
@@ -1755,7 +1755,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1755
1755
|
try {
|
|
1756
1756
|
G.value = Ge(G.value, t ?? "", Be(r, n.t("platform.workflow-config.new-approval-node", "新审批节点")), n), Jt(r);
|
|
1757
1757
|
} catch (e) {
|
|
1758
|
-
|
|
1758
|
+
y(e, {
|
|
1759
1759
|
source: "workflow-design",
|
|
1760
1760
|
phase: "validation"
|
|
1761
1761
|
});
|
|
@@ -1765,7 +1765,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1765
1765
|
if (Q.value) try {
|
|
1766
1766
|
G.value = Ke(G.value, q.value, n), q.value = "", D.value = !1;
|
|
1767
1767
|
} catch (e) {
|
|
1768
|
-
|
|
1768
|
+
y(e, {
|
|
1769
1769
|
source: "workflow-design",
|
|
1770
1770
|
phase: "validation"
|
|
1771
1771
|
});
|
|
@@ -1786,7 +1786,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1786
1786
|
Z.value = Z.value.filter((e) => n.has(e)), q.value && !n.has(q.value) && (q.value = "", D.value = !1), J.value && !t.includes(J.value) && (J.value = "", D.value = !1);
|
|
1787
1787
|
}, { flush: "sync" });
|
|
1788
1788
|
function sn(e) {
|
|
1789
|
-
return kt || !R.active.value ? !1 : Q.value && e() ? !0 : (
|
|
1789
|
+
return kt || !R.active.value ? !1 : Q.value && e() ? !0 : (p(n.t("platform.workflow-config.stale-edit", "流程已变更,本次操作未应用,请重新操作。")), !1);
|
|
1790
1790
|
}
|
|
1791
1791
|
function cn() {
|
|
1792
1792
|
Q.value && K.undo();
|
|
@@ -1799,7 +1799,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1799
1799
|
let t = it(G.value, Z.value);
|
|
1800
1800
|
e.clipboardData.setData("text/plain", t), e.preventDefault();
|
|
1801
1801
|
} catch (e) {
|
|
1802
|
-
|
|
1802
|
+
y(e, {
|
|
1803
1803
|
source: "workflow-design",
|
|
1804
1804
|
phase: "action"
|
|
1805
1805
|
});
|
|
@@ -1811,10 +1811,10 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1811
1811
|
}
|
|
1812
1812
|
function fn(e, t) {
|
|
1813
1813
|
if (!Q.value || !e.includes("muyun.workflow.fragment")) return;
|
|
1814
|
-
let r = at(G.value, t, e, `copy_${
|
|
1814
|
+
let r = at(G.value, t, e, `copy_${l().replaceAll("-", "")}`);
|
|
1815
1815
|
if (G.value = r.design, r.reconfigureSelectorKeys.length) {
|
|
1816
1816
|
let e = r.reconfigureSelectorKeys.map((e) => r.design.nodes.find((t) => t.nodeKey === e)?.title ?? e).join("、");
|
|
1817
|
-
|
|
1817
|
+
p(n.t("platform.workflow-config.paste-reconfigure-selectors", "已粘贴,以下人工分支需要重新配置选择来源:{names}。", { names: e })), Jt(r.reconfigureSelectorKeys[0]);
|
|
1818
1818
|
} else on(r.keys);
|
|
1819
1819
|
}
|
|
1820
1820
|
function pn(e) {
|
|
@@ -1825,7 +1825,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1825
1825
|
try {
|
|
1826
1826
|
fn(t, dn());
|
|
1827
1827
|
} catch (e) {
|
|
1828
|
-
|
|
1828
|
+
y(e, {
|
|
1829
1829
|
source: "workflow-design",
|
|
1830
1830
|
phase: "action"
|
|
1831
1831
|
});
|
|
@@ -1837,7 +1837,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1837
1837
|
if (!navigator.clipboard) throw Error("当前浏览器不支持访问剪贴板");
|
|
1838
1838
|
await navigator.clipboard.writeText(it(G.value, Z.value));
|
|
1839
1839
|
} catch (e) {
|
|
1840
|
-
|
|
1840
|
+
y(e, {
|
|
1841
1841
|
source: "workflow-design",
|
|
1842
1842
|
phase: "action"
|
|
1843
1843
|
});
|
|
@@ -1851,32 +1851,32 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1851
1851
|
let n = await navigator.clipboard.readText();
|
|
1852
1852
|
n.includes("muyun.workflow.fragment") && sn(e) && fn(n, t);
|
|
1853
1853
|
} catch (e) {
|
|
1854
|
-
|
|
1854
|
+
y(e, {
|
|
1855
1855
|
source: "workflow-design",
|
|
1856
1856
|
phase: "action"
|
|
1857
1857
|
});
|
|
1858
1858
|
}
|
|
1859
1859
|
}
|
|
1860
|
-
return (e,
|
|
1861
|
-
actions: M(() => [E(j(
|
|
1860
|
+
return (e, i) => (O(), C("section", ot, [E(j(ve), { title: I.value?.title ?? j(n).t("platform.workflow-config.configuration", "流程配置") }, Oe({
|
|
1861
|
+
actions: M(() => [E(j(r), {
|
|
1862
1862
|
class: "configuration-action-bar",
|
|
1863
1863
|
actions: Fe.value,
|
|
1864
|
-
onAction:
|
|
1864
|
+
onAction: i[0] ||= (e) => Je(e.key)
|
|
1865
1865
|
}, null, 8, ["actions"])]),
|
|
1866
1866
|
default: M(() => [
|
|
1867
1867
|
j(z) ? (O(), C("div", ut, [
|
|
1868
1868
|
w("p", null, A(Ze.value ? j(n).t("platform.workflow-config.save-restored", "检测到上次保存的查询引用。刷新前的本地草稿未恢复,请核实原请求与当前版本。") : j(B) === "review" ? j(n).t("platform.workflow-config.review-current", "本地草稿已保留,请读取当前版本后核对。") : j(n).t("platform.workflow-config.save-unknown", "上次保存未能确认,本地草稿已保留。请读取当前版本后重新核对。")), 1),
|
|
1869
|
-
E(j(
|
|
1869
|
+
E(j(h), {
|
|
1870
1870
|
disabled: Y.value,
|
|
1871
1871
|
onClick: Ut
|
|
1872
1872
|
}, {
|
|
1873
1873
|
default: M(() => [T(A(j(n).t("platform.workflow-config.read-current", "读取当前版本")), 1)]),
|
|
1874
1874
|
_: 1
|
|
1875
1875
|
}, 8, ["disabled"]),
|
|
1876
|
-
j(B) === "review" ? (O(),
|
|
1876
|
+
j(B) === "review" ? (O(), x(j(h), {
|
|
1877
1877
|
key: 0,
|
|
1878
1878
|
disabled: Y.value,
|
|
1879
|
-
onClick:
|
|
1879
|
+
onClick: i[2] ||= (e) => {
|
|
1880
1880
|
B.value = "idle", W.value = void 0;
|
|
1881
1881
|
}
|
|
1882
1882
|
}, {
|
|
@@ -1884,7 +1884,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1884
1884
|
_: 1
|
|
1885
1885
|
}, 8, ["disabled"])) : S("v-if", !0),
|
|
1886
1886
|
V.value && W.value ? (O(), C("p", dt, A(Xe.value ? j(n).t("platform.workflow-config.receipt-committed", "已确认原保存请求提交成功;以下为服务端当前版本,可能包含后续修改。") : H.value ? j(n).t("platform.workflow-config.receipt-cancelled", "原请求已终止,迟到的请求不会写入。请核对当前版本后继续。") : Qe.value ? j(n).t("platform.workflow-config.receipt-superseded", "未查到原请求回执,但版本已推进,原请求不能再覆盖当前版本。请核对后继续。") : j(n).t("platform.workflow-config.receipt-pending", "尚未查到原请求回执,结果仍不确定。请稍后重新核实,暂不能继续写入。")), 1)) : S("v-if", !0),
|
|
1887
|
-
V.value && !Xe.value && !H.value && !Qe.value ? (O(), C(
|
|
1887
|
+
V.value && !Xe.value && !H.value && !Qe.value ? (O(), C(De, { key: 2 }, [w("p", null, A(j(n).t("platform.workflow-config.abandon-help", "持续无法确认时,可终止原请求。服务器会确认已提交,或阻止尚未执行的请求;已提交内容不会撤销。")), 1), E(j(h), {
|
|
1888
1888
|
disabled: Y.value,
|
|
1889
1889
|
onClick: Ht
|
|
1890
1890
|
}, {
|
|
@@ -1892,25 +1892,25 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1892
1892
|
_: 1
|
|
1893
1893
|
}, 8, ["disabled"])], 64)) : S("v-if", !0),
|
|
1894
1894
|
H.value && !W.value ? (O(), C("p", ft, A(j(n).t("platform.workflow-config.receipt-cancelled", "原请求已终止,迟到的请求不会写入。请核对当前版本后继续。")), 1)) : S("v-if", !0),
|
|
1895
|
-
W.value ? (O(), C(
|
|
1895
|
+
W.value ? (O(), C(De, { key: 4 }, [
|
|
1896
1896
|
w("details", null, [
|
|
1897
1897
|
w("summary", null, A(j(n).t("platform.workflow-config.view-current", "查看服务端当前流程与完整配置")), 1),
|
|
1898
|
-
E(j(
|
|
1898
|
+
E(j(se), {
|
|
1899
1899
|
nodes: W.value.design.nodes,
|
|
1900
1900
|
routes: W.value.design.links,
|
|
1901
1901
|
"layout-json": W.value.design.layoutJson,
|
|
1902
1902
|
editable: !1,
|
|
1903
1903
|
interactive: "",
|
|
1904
|
-
onSelect:
|
|
1905
|
-
onSelectRoute:
|
|
1904
|
+
onSelect: i[3] ||= (e) => U.value = `node:${e}`,
|
|
1905
|
+
onSelectRoute: i[4] ||= (e) => U.value = `route:${e}`
|
|
1906
1906
|
}, null, 8, [
|
|
1907
1907
|
"nodes",
|
|
1908
1908
|
"routes",
|
|
1909
1909
|
"layout-json"
|
|
1910
1910
|
]),
|
|
1911
|
-
E(j(
|
|
1911
|
+
E(j(_e), {
|
|
1912
1912
|
value: U.value,
|
|
1913
|
-
"onUpdate:value":
|
|
1913
|
+
"onUpdate:value": i[5] ||= (e) => U.value = e,
|
|
1914
1914
|
options: [...W.value.design.nodes.map((e) => ({
|
|
1915
1915
|
value: `node:${e.nodeKey}`,
|
|
1916
1916
|
label: e.title ?? e.nodeKey
|
|
@@ -1924,13 +1924,13 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1924
1924
|
"node-key": U.value.startsWith("node:") ? U.value.slice(5) : "",
|
|
1925
1925
|
"route-key": U.value.startsWith("route:") ? U.value.slice(6) : "",
|
|
1926
1926
|
editable: !1,
|
|
1927
|
-
"condition-tools": j(
|
|
1928
|
-
http: j(
|
|
1927
|
+
"condition-tools": j(_),
|
|
1928
|
+
http: j(oe).http,
|
|
1929
1929
|
"module-alias": t.moduleAlias,
|
|
1930
|
-
fields: j(
|
|
1931
|
-
catalog:
|
|
1932
|
-
actions:
|
|
1933
|
-
onSelectRoute:
|
|
1930
|
+
fields: j(g),
|
|
1931
|
+
catalog: Se.value,
|
|
1932
|
+
actions: Ce.value,
|
|
1933
|
+
onSelectRoute: i[6] ||= (e) => U.value = `route:${e}`
|
|
1934
1934
|
}, null, 8, [
|
|
1935
1935
|
"design",
|
|
1936
1936
|
"node-key",
|
|
@@ -1944,28 +1944,28 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1944
1944
|
])
|
|
1945
1945
|
]),
|
|
1946
1946
|
w("p", null, A(j(n).t("platform.workflow-config.current-read", "已读取当前版本;这不代表原保存请求的回执。采用当前版本将替换本地草稿,保留本地草稿则需重新核对后保存。")), 1),
|
|
1947
|
-
E(j(
|
|
1947
|
+
E(j(h), {
|
|
1948
1948
|
disabled: Y.value || !Qe.value,
|
|
1949
|
-
onClick:
|
|
1949
|
+
onClick: i[7] ||= (e) => Wt(!1)
|
|
1950
1950
|
}, {
|
|
1951
1951
|
default: M(() => [T(A(j(n).t("platform.workflow-config.use-current", "采用当前版本")), 1)]),
|
|
1952
1952
|
_: 1
|
|
1953
1953
|
}, 8, ["disabled"]),
|
|
1954
|
-
E(j(
|
|
1954
|
+
E(j(h), {
|
|
1955
1955
|
disabled: Y.value || !Qe.value || Ze.value || W.value.version.publishStatus !== "draft",
|
|
1956
|
-
onClick:
|
|
1956
|
+
onClick: i[8] ||= (e) => Wt(!0)
|
|
1957
1957
|
}, {
|
|
1958
1958
|
default: M(() => [T(A(j(n).t("platform.workflow-config.keep-draft", "保留本地草稿并重新核对")), 1)]),
|
|
1959
1959
|
_: 1
|
|
1960
1960
|
}, 8, ["disabled"])
|
|
1961
1961
|
], 64)) : S("v-if", !0)
|
|
1962
1962
|
])) : S("v-if", !0),
|
|
1963
|
-
N.value ? (O(),
|
|
1964
|
-
P.value ? (O(),
|
|
1963
|
+
N.value ? (O(), x(j(te), { key: 1 })) : S("v-if", !0),
|
|
1964
|
+
P.value ? (O(), x(j(u), {
|
|
1965
1965
|
key: 2,
|
|
1966
1966
|
message: P.value()
|
|
1967
1967
|
}, null, 8, ["message"])) : S("v-if", !0),
|
|
1968
|
-
P.value ? (O(),
|
|
1968
|
+
P.value ? (O(), x(j(h), {
|
|
1969
1969
|
key: 3,
|
|
1970
1970
|
onClick: Rt
|
|
1971
1971
|
}, {
|
|
@@ -1975,10 +1975,10 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
1975
1975
|
I.value ? (O(), C("div", {
|
|
1976
1976
|
key: 4,
|
|
1977
1977
|
ref_key: "designHost",
|
|
1978
|
-
ref:
|
|
1978
|
+
ref: we,
|
|
1979
1979
|
class: "configuration-design",
|
|
1980
|
-
style: Ae({ gap: `${j(
|
|
1981
|
-
}, [(O(),
|
|
1980
|
+
style: Ae({ gap: `${j(ie).columnGap}px` })
|
|
1981
|
+
}, [(O(), x(j(se), {
|
|
1982
1982
|
key: L.value?.id,
|
|
1983
1983
|
nodes: j(G).nodes,
|
|
1984
1984
|
routes: j(G).links,
|
|
@@ -2003,12 +2003,12 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
2003
2003
|
onSelectRoute: Yt,
|
|
2004
2004
|
onLayoutChange: Xt
|
|
2005
2005
|
}, {
|
|
2006
|
-
actions: M(() => [E(j(
|
|
2006
|
+
actions: M(() => [E(j(ye), {
|
|
2007
2007
|
items: ze.value,
|
|
2008
2008
|
align: "start",
|
|
2009
2009
|
onSelect: We
|
|
2010
2010
|
}, {
|
|
2011
|
-
default: M(() => [E(j(
|
|
2011
|
+
default: M(() => [E(j(h), {
|
|
2012
2012
|
"icon-name": "plus",
|
|
2013
2013
|
disabled: !Q.value
|
|
2014
2014
|
}, {
|
|
@@ -2017,7 +2017,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
2017
2017
|
}, 8, ["disabled"])]),
|
|
2018
2018
|
_: 1
|
|
2019
2019
|
}, 8, ["items"])]),
|
|
2020
|
-
navigation: M(() => [E(j(
|
|
2020
|
+
navigation: M(() => [E(j(_e), {
|
|
2021
2021
|
class: "configuration-route-locator",
|
|
2022
2022
|
value: J.value || void 0,
|
|
2023
2023
|
placeholder: j(n).t("platform.screen.WorkflowConfigurationView.select-link", "选择连线"),
|
|
@@ -2025,7 +2025,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
2025
2025
|
value: e.routeKey,
|
|
2026
2026
|
label: `${e.title ?? j(n).t("platform.workflow-config.route", "路径")}:${j(G).nodes.find((t) => t.nodeKey === e.sourceNodeKey)?.title} → ${j(G).nodes.find((t) => t.nodeKey === e.targetNodeKey)?.title}`
|
|
2027
2027
|
})),
|
|
2028
|
-
"onUpdate:value":
|
|
2028
|
+
"onUpdate:value": i[9] ||= (e) => Yt(String(e))
|
|
2029
2029
|
}, null, 8, [
|
|
2030
2030
|
"value",
|
|
2031
2031
|
"placeholder",
|
|
@@ -2042,14 +2042,14 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
2042
2042
|
"selected-route-key",
|
|
2043
2043
|
"layout-json",
|
|
2044
2044
|
"editable"
|
|
2045
|
-
])), E(j(
|
|
2046
|
-
docked: !j(
|
|
2045
|
+
])), E(j(xe), {
|
|
2046
|
+
docked: !j(Ee),
|
|
2047
2047
|
width: "compact",
|
|
2048
2048
|
open: D.value,
|
|
2049
2049
|
title: $.value?.title ? j(n).t("platform.workflow-config.node-properties", "节点属性 · {title}", { title: $.value.title }) : j(n).t("platform.workflow-config.route-properties", "路径属性"),
|
|
2050
|
-
onClose:
|
|
2050
|
+
onClose: i[11] ||= (e) => D.value = !1
|
|
2051
2051
|
}, {
|
|
2052
|
-
operation: M(() => [w("div", pt, [$.value?.nodeType === "branch" ? (O(),
|
|
2052
|
+
operation: M(() => [w("div", pt, [$.value?.nodeType === "branch" ? (O(), x(j(h), {
|
|
2053
2053
|
key: 0,
|
|
2054
2054
|
danger: "",
|
|
2055
2055
|
disabled: !wt.value,
|
|
@@ -2057,7 +2057,7 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
2057
2057
|
}, {
|
|
2058
2058
|
default: M(() => [T(A(j(n).t("platform.screen.WorkflowDesignProperties.delete-entire-branch", "删除整个分支")), 1)]),
|
|
2059
2059
|
_: 1
|
|
2060
|
-
}, 8, ["disabled"])) : $.value ? (O(),
|
|
2060
|
+
}, 8, ["disabled"])) : $.value ? (O(), x(j(h), {
|
|
2061
2061
|
key: 1,
|
|
2062
2062
|
danger: "",
|
|
2063
2063
|
disabled: !wt.value,
|
|
@@ -2065,24 +2065,24 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
2065
2065
|
}, {
|
|
2066
2066
|
default: M(() => [T(A(j(n).t("platform.screen.WorkflowDesignProperties.delete-and-reconnect-adjacent-nodes", "删除节点")), 1)]),
|
|
2067
2067
|
_: 1
|
|
2068
|
-
}, 8, ["disabled"])) : S("v-if", !0), E(j(
|
|
2068
|
+
}, 8, ["disabled"])) : S("v-if", !0), E(j(h), {
|
|
2069
2069
|
disabled: Y.value,
|
|
2070
|
-
onClick:
|
|
2070
|
+
onClick: i[10] ||= (e) => D.value = !1
|
|
2071
2071
|
}, {
|
|
2072
2072
|
default: M(() => [T(A(j(n).t("platform.screen.WorkflowConfigurationView.finish-configuration", "完成配置")), 1)]),
|
|
2073
2073
|
_: 1
|
|
2074
2074
|
}, 8, ["disabled"])])]),
|
|
2075
2075
|
default: M(() => [E(j(re), {
|
|
2076
|
-
"condition-tools": j(
|
|
2076
|
+
"condition-tools": j(_),
|
|
2077
2077
|
design: j(G),
|
|
2078
2078
|
"node-key": q.value,
|
|
2079
2079
|
"route-key": J.value,
|
|
2080
2080
|
editable: Q.value,
|
|
2081
|
-
http: j(
|
|
2081
|
+
http: j(oe).http,
|
|
2082
2082
|
"module-alias": t.moduleAlias,
|
|
2083
|
-
fields: j(
|
|
2084
|
-
catalog:
|
|
2085
|
-
actions:
|
|
2083
|
+
fields: j(g),
|
|
2084
|
+
catalog: Se.value,
|
|
2085
|
+
actions: Ce.value,
|
|
2086
2086
|
onUpdateNode: Zt,
|
|
2087
2087
|
onUpdateRoute: Qt,
|
|
2088
2088
|
onSelectRoute: Yt,
|
|
@@ -2109,29 +2109,29 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
2109
2109
|
_: 2
|
|
2110
2110
|
}, [I.value ? {
|
|
2111
2111
|
name: "status",
|
|
2112
|
-
fn: M(() => [w("div", st, [E(j(
|
|
2112
|
+
fn: M(() => [w("div", st, [E(j(_e), {
|
|
2113
2113
|
class: "configuration-version-selector",
|
|
2114
2114
|
value: L.value?.id,
|
|
2115
2115
|
options: F.value.map((e) => ({
|
|
2116
2116
|
value: e.id,
|
|
2117
2117
|
label: j(n).t("platform.screen.WorkflowConfigurationView.version-value-value", "版本 {value1} · {value2}", {
|
|
2118
2118
|
value1: e.versionNo,
|
|
2119
|
-
value2:
|
|
2119
|
+
value2: ne(e.publishStatus)
|
|
2120
2120
|
})
|
|
2121
2121
|
})),
|
|
2122
2122
|
disabled: Y.value || j(X) || j(z),
|
|
2123
|
-
"onUpdate:value":
|
|
2123
|
+
"onUpdate:value": i[1] ||= (e) => Bt(String(e))
|
|
2124
2124
|
}, null, 8, [
|
|
2125
2125
|
"value",
|
|
2126
2126
|
"options",
|
|
2127
2127
|
"disabled"
|
|
2128
|
-
]), j(X) ? (O(),
|
|
2128
|
+
]), j(X) ? (O(), x(j(he), {
|
|
2129
2129
|
key: 0,
|
|
2130
2130
|
title: j(n).t("platform.screen.WorkflowConfigurationView.the-draft-has-unsaved-changes", "草稿有未保存的修改")
|
|
2131
2131
|
}, {
|
|
2132
2132
|
default: M(() => [w("span", ct, A(j(n).t("platform.workflow-config.unsaved", "未保存")), 1)]),
|
|
2133
2133
|
_: 1
|
|
2134
|
-
}, 8, ["title"])) : tt.value ? (O(),
|
|
2134
|
+
}, 8, ["title"])) : tt.value ? (O(), x(j(he), {
|
|
2135
2135
|
key: 1,
|
|
2136
2136
|
title: j(n).t("platform.screen.WorkflowConfigurationView.this-version-is-frozen-create-a-new", "此版本已冻结。修改流程请创建新版本;已有实例继续使用原版本。")
|
|
2137
2137
|
}, {
|
|
@@ -2139,13 +2139,13 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
2139
2139
|
_: 1
|
|
2140
2140
|
}, 8, ["title"])) : S("v-if", !0)])]),
|
|
2141
2141
|
key: "0"
|
|
2142
|
-
} : void 0]), 1032, ["title"]), E(j(
|
|
2142
|
+
} : void 0]), 1032, ["title"]), E(j(s), {
|
|
2143
2143
|
width: "extraWide",
|
|
2144
2144
|
open: ke.value,
|
|
2145
2145
|
title: j(n).t("platform.screen.WorkflowConfigurationView.confirm-workflow-publication", "确认发布流程"),
|
|
2146
|
-
onClose:
|
|
2146
|
+
onClose: i[12] ||= (e) => ke.value = !1
|
|
2147
2147
|
}, {
|
|
2148
|
-
operation: M(() => [E(j(
|
|
2148
|
+
operation: M(() => [E(j(h), {
|
|
2149
2149
|
type: "primary",
|
|
2150
2150
|
loading: Y.value,
|
|
2151
2151
|
onClick: Kt
|
|
@@ -2159,13 +2159,13 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
2159
2159
|
version: L.value?.versionNo
|
|
2160
2160
|
})), 1),
|
|
2161
2161
|
w("p", null, A(j(n).t("platform.workflow-config.matching-scope", "匹配范围")) + ":" + A(I.value?.organizationId ? j(n).t("platform.workflow-config.scoped-organizations", "指定组织及下级组织") : j(n).t("platform.workflow-config.all-organizations", "模块内全部组织")) + ";" + A(I.value?.defaultDefinition ? j(n).t("platform.workflow-config.default-workflow", "作为默认兜底流程") : j(n).t("platform.workflow-config.conditional-workflow", "按匹配条件选择")) + "。 " + A(I.value?.matchExpression ? j(n).t("platform.workflow-config.matching-expression", "匹配条件:{expression}", { expression: I.value.matchExpression }) : j(n).t("platform.workflow-config.no-matching-condition", "未设置额外条件")), 1),
|
|
2162
|
-
w("ul", mt, [(O(!0), C(
|
|
2162
|
+
w("ul", mt, [(O(!0), C(De, null, Ie(j(G).nodes.filter((e) => ["approval", "task"].includes(e.nodeType)), (e) => (O(), C("li", { key: e.nodeKey }, [
|
|
2163
2163
|
w("strong", null, A(e.title), 1),
|
|
2164
2164
|
T(" · " + A(Ye(e.participantPolicyText)) + " ", 1),
|
|
2165
|
-
w("details", null, [w("summary", null, A(j(n).t("platform.screen.WorkflowConfigurationView.view-complete-participant-rules", "查看完整人员规则")), 1), E(j(
|
|
2165
|
+
w("details", null, [w("summary", null, A(j(n).t("platform.screen.WorkflowConfigurationView.view-complete-participant-rules", "查看完整人员规则")), 1), E(j(be), {
|
|
2166
2166
|
value: e.participantPolicyText,
|
|
2167
|
-
http: j(
|
|
2168
|
-
fields: j(
|
|
2167
|
+
http: j(oe).http,
|
|
2168
|
+
fields: j(g),
|
|
2169
2169
|
disabled: ""
|
|
2170
2170
|
}, null, 8, [
|
|
2171
2171
|
"value",
|
|
@@ -2174,15 +2174,15 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
2174
2174
|
])]),
|
|
2175
2175
|
e.nodeType === "task" ? (O(), C("details", ht, [
|
|
2176
2176
|
w("summary", null, A(j(n).t("platform.screen.WorkflowConfigurationView.view-business-task-checks-and-instructions", "查看业务任务检查与办理指引")), 1),
|
|
2177
|
-
e.taskDefinitionId ? (O(), C("p", gt, A(j(n).t("platform.workflow-config.referenced-task", "引用任务")) + ":" + A(
|
|
2178
|
-
E(j(
|
|
2179
|
-
"condition-tools": j(
|
|
2177
|
+
e.taskDefinitionId ? (O(), C("p", gt, A(j(n).t("platform.workflow-config.referenced-task", "引用任务")) + ":" + A(Se.value.tasks.find((t) => t.id === e.taskDefinitionId)?.title ?? e.taskDefinitionId), 1)) : S("v-if", !0),
|
|
2178
|
+
E(j(ge), {
|
|
2179
|
+
"condition-tools": j(_),
|
|
2180
2180
|
value: e.nodeConfigText,
|
|
2181
2181
|
"module-alias": t.moduleAlias,
|
|
2182
|
-
fields: j(
|
|
2183
|
-
catalog:
|
|
2184
|
-
actions:
|
|
2185
|
-
associations:
|
|
2182
|
+
fields: j(g),
|
|
2183
|
+
catalog: Se.value,
|
|
2184
|
+
actions: Ce.value,
|
|
2185
|
+
associations: Se.value.associations.map((e) => ({
|
|
2186
2186
|
value: e.id,
|
|
2187
2187
|
label: e.title
|
|
2188
2188
|
})),
|
|
@@ -2199,16 +2199,16 @@ var ot = { class: "workflow-configuration" }, st = { class: "configuration-statu
|
|
|
2199
2199
|
])) : S("v-if", !0),
|
|
2200
2200
|
e.participantPolicyText?.includes("INITIATOR_SELF") ? (O(), C("p", _t, A(j(n).t("platform.screen.WorkflowConfigurationView.the-submitter-processes-this-node-confirm-that", "此节点由提交人本人办理,请确认符合业务要求。")), 1)) : S("v-if", !0)
|
|
2201
2201
|
]))), 128))]),
|
|
2202
|
-
(O(!0), C(
|
|
2202
|
+
(O(!0), C(De, null, Ie(j(G).nodes.filter((e) => e.nodeType === "branch"), (e) => (O(), C("div", { key: e.nodeKey }, [
|
|
2203
2203
|
w("strong", null, A(e.title) + " · " + A(e.routeMode === "manual" ? j(n).t("platform.workflow-config.manual-route", "人工单选") : j(n).t("platform.workflow-config.auto-route", "自动判定(全部命中出口)")), 1),
|
|
2204
2204
|
e.routeMode === "manual" ? (O(), C("p", vt, A(j(n).t("platform.workflow-config.selector-summary", "由{title}的实际办理人选路;{reason}。", {
|
|
2205
2205
|
title: j(G).nodes.find((t) => t.nodeKey === e.selectorNodeKey)?.title ?? j(n).t("platform.workflow-config.missing-selector", "未配置选择节点"),
|
|
2206
2206
|
reason: e.requireManualSelectionReason ? j(n).t("platform.workflow-config.reason-required", "必须填写原因") : j(n).t("platform.workflow-config.reason-optional", "原因选填")
|
|
2207
2207
|
})), 1)) : S("v-if", !0),
|
|
2208
|
-
w("ul", null, [(O(!0), C(
|
|
2208
|
+
w("ul", null, [(O(!0), C(De, null, Ie(j(G).links.filter((t) => t.sourceNodeKey === e.nodeKey), (e) => (O(), C("li", { key: e.routeKey }, A(e.title ?? j(n).t("platform.workflow-config.exit", "出口")) + ":" + A(e.defaultRoute ? j(n).t("platform.workflow-config.fallback-exit", "默认兜底") : e.conditionExpression || j(n).t("platform.workflow-config.unconditional", "无条件(始终命中)")), 1))), 128))]),
|
|
2209
2209
|
w("p", null, A(j(n).t("platform.workflow-config.convergence-counting", "汇聚:{summary},只计算有效出口。", { summary: Et(e) })), 1)
|
|
2210
2210
|
]))), 128)),
|
|
2211
|
-
w("details", null, [w("summary", null, A(j(n).t("platform.screen.WorkflowConfigurationView.view-published-workflow", "查看发布流程图")), 1), E(j(
|
|
2211
|
+
w("details", null, [w("summary", null, A(j(n).t("platform.screen.WorkflowConfigurationView.view-published-workflow", "查看发布流程图")), 1), E(j(se), {
|
|
2212
2212
|
presentation: "detail",
|
|
2213
2213
|
nodes: j(G).nodes,
|
|
2214
2214
|
routes: j(G).links,
|