@ximatai/muyun-web-app 0.26.25 → 0.26.27
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-a6oZ2t9t.js → BusinessActivityLogView-Bbe-GbNG.js} +2 -2
- package/dist/BusinessLogListDrawer-BmF-14We.js +868 -0
- package/dist/CodeConfigurationView-DdPfBjoC.js +1667 -0
- package/dist/{ConfigurationTranslationView-Cd8ezR4t.js → ConfigurationTranslationView-B3Cr9Wes.js} +48 -48
- package/dist/{LoginAuditLogView-DyvHTCXH.js → LoginAuditLogView-DOwkqtVB.js} +2 -2
- package/dist/{ModuleActionManagementView-y3t2YHKF.js → ModuleActionManagementView-DNXAhdXk.js} +145 -145
- package/dist/{ModuleGovernanceView-BqJq2Pxm.js → ModuleGovernanceView-g5W2R_Zl.js} +3131 -3131
- package/dist/{RequestErrorLogView-2iPeAi3b.js → RequestErrorLogView-9GIz2mkQ.js} +2 -2
- package/dist/RoleDetailWorkspaceView-BuqRT0pd.js +1435 -0
- package/dist/{RuntimeLogView-CulSgS0l.js → RuntimeLogView-C5i19Z-u.js} +55 -55
- package/dist/WorkflowAdministrationView-CnoTudpI.js +650 -0
- package/dist/{WorkflowConfigurationView-DpONX2nN.js → WorkflowConfigurationView-Cku-F1Fm.js} +33 -33
- package/dist/{WorkflowWorkbenchView-CGo1eZjr.js → WorkflowWorkbenchView-DbWqspEB.js} +34 -34
- package/dist/{codeConfiguration-fZiz0PNC.js → codeConfiguration-Bno8cWxB.js} +45 -45
- package/dist/index.css +1 -1
- package/dist/index.js +784 -676
- package/dist/{moduleMenuWorkspace-AZ4G9BpZ.js → moduleMenuWorkspace-DW13bHG5.js} +179 -179
- package/dist/{platform-components-D98pyZ77.js → platform-components-D3NvMY3T.js} +3302 -3260
- package/dist/{platform-workbench-BBLDvT9V.js → platform-workbench-C4OFiuG5.js} +4969 -4910
- package/dist/types/dynamic-page-runtime/ModulePageHost.vue.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +12 -3
- package/dist/types/dynamic-page-runtime/ModulePageHostSession.vue.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/ModuleReferenceRecordDetailBrowser.vue.d.ts +4 -1
- package/dist/types/dynamic-page-runtime/recordFormAssistantCapabilities.d.ts +1 -1
- package/dist/types/platform-admin-runtime/realtime.d.ts +3 -1
- package/dist/types/platform-components/ReferenceRecordDetailBrowser.vue.d.ts +1 -1
- package/dist/types/platform-components/referenceRecordDetailBrowser.d.ts +5 -2
- package/dist/types/web-contracts/operation.d.ts +7 -0
- package/dist/types/web-core/assistantConfirmation.d.ts +4 -4
- package/dist/types/web-core/assistantSurface.d.ts +2 -2
- package/dist/types/web-core/businessNotificationSession.d.ts +27 -0
- package/dist/types/web-core/index.d.ts +1 -0
- package/dist/types/web-core/operationConfirmation.d.ts +13 -8
- package/dist/{useWorkflowConfigurationContext-BcK19EXl.js → useWorkflowConfigurationContext-eQKyqe6_.js} +2 -2
- package/dist/{workspaceViews-Dr7RZXvX.js → workspaceViews-D2Uh4KAq.js} +610 -610
- package/package.json +1 -1
- package/dist/BusinessLogListDrawer-DtSXpK6g.js +0 -868
- package/dist/CodeConfigurationView-BVu1ZnH-.js +0 -1667
- package/dist/RoleDetailWorkspaceView-G-5VAV_B.js +0 -1435
- package/dist/WorkflowAdministrationView-y8VBYMLZ.js +0 -650
package/dist/{WorkflowConfigurationView-DpONX2nN.js → WorkflowConfigurationView-Cku-F1Fm.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as e } from "./platform-workbench-
|
|
2
|
-
import {
|
|
3
|
-
import { t as ve } from "./useWorkflowConfigurationContext-
|
|
1
|
+
import { E as e } from "./platform-workbench-C4OFiuG5.js";
|
|
2
|
+
import { In as t, Ir as n, Kn as r, Ln as i, Mn as a, Nn as o, Pa as s, Pn as c, Qt as ee, Vn as te, Wt as ne, a as re, bn as l, c as ie, d as ae, fr as oe, gr as u, in as se, ja as ce, l as le, m as ue, n as de, o as fe, q as pe, ro as me, s as he, t as ge, tr as _e, vr as d } from "./platform-components-D3NvMY3T.js";
|
|
3
|
+
import { t as ve } from "./useWorkflowConfigurationContext-eQKyqe6_.js";
|
|
4
4
|
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as ye, createTextVNode as v, createVNode as y, defineComponent as b, normalizeStyle as be, onActivated as xe, onBeforeUnmount as Se, onMounted as Ce, onScopeDispose as x, openBlock as S, ref as C, renderList as we, toDisplayString as w, unref as T, watch as Te, withCtx as E } from "vue";
|
|
5
5
|
//#region src/platform-components/useWorkflowDesignHistory.ts
|
|
6
6
|
function Ee(e, t = 100) {
|
|
@@ -343,7 +343,7 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
343
343
|
definitionId: {}
|
|
344
344
|
},
|
|
345
345
|
setup(d) {
|
|
346
|
-
let b =
|
|
346
|
+
let b = me();
|
|
347
347
|
function x(e) {
|
|
348
348
|
return ue(e, b);
|
|
349
349
|
}
|
|
@@ -355,7 +355,7 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
355
355
|
}), Ye = p(() => (qe.value?.actions ?? []).map((e) => ({
|
|
356
356
|
value: e.actionCode,
|
|
357
357
|
label: e.title ?? x(e.actionCode)
|
|
358
|
-
}))), Xe = C(), Ze = de(Xe, () => Ke +
|
|
358
|
+
}))), Xe = C(), Ze = de(Xe, () => Ke + te.compact + se.columnGap), N = C(!1), P = C(!1), Qe = p(() => [
|
|
359
359
|
{
|
|
360
360
|
key: "save",
|
|
361
361
|
title: b.t("platform.screen.WorkflowConfigurationView.save-draft", "保存草稿"),
|
|
@@ -439,7 +439,7 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
439
439
|
}, r = t?.convergeMode ?? "all";
|
|
440
440
|
return `${n[r]}${r === "ratio" ? ` ${t?.convergeRatio ?? 100}%` : ""}`;
|
|
441
441
|
}
|
|
442
|
-
|
|
442
|
+
n(() => b.t("platform.workflow-config.configuration", "流程配置"), () => W.value, () => H.value), Ce(() => {
|
|
443
443
|
dt();
|
|
444
444
|
});
|
|
445
445
|
let X = 0, ct = !1, lt = !1;
|
|
@@ -496,7 +496,7 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
496
496
|
links: []
|
|
497
497
|
} : i), G.value = [], B.value = "", V.value = "", N.value = !1;
|
|
498
498
|
} catch (e) {
|
|
499
|
-
F.value = () => s(
|
|
499
|
+
F.value = () => s(ce(e), b);
|
|
500
500
|
}
|
|
501
501
|
}), rt.value = !1);
|
|
502
502
|
}
|
|
@@ -511,16 +511,16 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
511
511
|
}
|
|
512
512
|
async function mt() {
|
|
513
513
|
R.value && L.value && await Z(async () => {
|
|
514
|
-
R.value = await A.saveDesign(L.value.id, R.value.id, R.value.version, z.value), I.value = I.value.map((e) => e.id === R.value.id ? R.value : e), U.markSaved(),
|
|
514
|
+
R.value = await A.saveDesign(L.value.id, R.value.id, R.value.version, z.value), I.value = I.value.map((e) => e.id === R.value.id ? R.value : e), U.markSaved(), o(b.t("platform.workflow-config.draft-saved", "流程草稿已保存"));
|
|
515
515
|
});
|
|
516
516
|
}
|
|
517
517
|
async function ht() {
|
|
518
518
|
W.value && await mt(), !W.value && R.value && await Z(async () => {
|
|
519
|
-
await A.validate(L.value.id, R.value.id),
|
|
519
|
+
await A.validate(L.value.id, R.value.id), o(b.t("platform.workflow-config.validated", "流程发布校验通过"));
|
|
520
520
|
});
|
|
521
521
|
}
|
|
522
522
|
async function gt() {
|
|
523
|
-
if (z.value.nodes.some((e) => ["approval", "task"].includes(e.nodeType) && !
|
|
523
|
+
if (z.value.nodes.some((e) => ["approval", "task"].includes(e.nodeType) && !ie(e.participantPolicyText))) {
|
|
524
524
|
l(Error(b.t("platform.workflow-config.participants-required", "请为每个审批或业务任务节点明确配置参与人")), {
|
|
525
525
|
source: "workflow-design",
|
|
526
526
|
phase: "validation"
|
|
@@ -528,7 +528,7 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
528
528
|
return;
|
|
529
529
|
}
|
|
530
530
|
W.value && await mt(), !W.value && L.value && R.value && (await Z(async () => {
|
|
531
|
-
R.value = await A.publish(L.value.id, R.value.id, L.value.version, R.value.version), I.value = I.value.map((e) => e.id === R.value.id ? R.value : e), L.value = await A.view(L.value.id), U.markSaved(), P.value = !1,
|
|
531
|
+
R.value = await A.publish(L.value.id, R.value.id, L.value.version, R.value.version), I.value = I.value.map((e) => e.id === R.value.id ? R.value : e), L.value = await A.view(L.value.id), U.markSaved(), P.value = !1, o(b.t("platform.workflow-config.published", "流程已发布,后续新申请使用该版本"));
|
|
532
532
|
}), await dt());
|
|
533
533
|
}
|
|
534
534
|
async function _t() {
|
|
@@ -590,7 +590,7 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
590
590
|
async function wt() {
|
|
591
591
|
if (K.value) try {
|
|
592
592
|
let e = U.checkpoint(), t = ke(z.value, B.value);
|
|
593
|
-
if (!await
|
|
593
|
+
if (!await c({
|
|
594
594
|
title: b.t("platform.workflow-config.delete-branch-confirm", "删除整个分支?"),
|
|
595
595
|
content: b.t("platform.workflow-config.delete-branch-detail", "将删除分支、配对汇聚及其中 {count} 个节点,并连接前后路径。", { count: z.value.nodes.length - t.nodes.length - 2 }),
|
|
596
596
|
danger: !0,
|
|
@@ -635,7 +635,7 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
635
635
|
G.value = G.value.filter((e) => n.has(e)), B.value && !n.has(B.value) && (B.value = "", N.value = !1), V.value && !t.includes(V.value) && (V.value = "", N.value = !1);
|
|
636
636
|
}, { flush: "sync" });
|
|
637
637
|
function Ot(e) {
|
|
638
|
-
return lt ? !1 : K.value && e() ? !0 : (
|
|
638
|
+
return lt ? !1 : K.value && e() ? !0 : (a(b.t("platform.workflow-config.stale-edit", "流程已变更,本次操作未应用,请重新操作。")), !1);
|
|
639
639
|
}
|
|
640
640
|
function kt() {
|
|
641
641
|
K.value && U.undo();
|
|
@@ -663,7 +663,7 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
663
663
|
let n = Fe(z.value, t, e, `copy_${crypto.randomUUID().replaceAll("-", "")}`);
|
|
664
664
|
if (z.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
|
+
a(b.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) {
|
|
@@ -706,15 +706,15 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
706
706
|
});
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
|
-
return (e,
|
|
710
|
-
actions: E(() => [y(T(
|
|
709
|
+
return (e, n) => (S(), g("section", Ie, [y(T(pe), { title: L.value?.title ?? T(b).t("platform.workflow-config.configuration", "流程配置") }, ye({
|
|
710
|
+
actions: E(() => [y(T(ee), {
|
|
711
711
|
class: "configuration-action-bar",
|
|
712
712
|
actions: Qe.value,
|
|
713
|
-
onAction:
|
|
713
|
+
onAction: n[0] ||= (e) => tt(e.key)
|
|
714
714
|
}, null, 8, ["actions"])]),
|
|
715
715
|
default: E(() => [
|
|
716
|
-
rt.value ? (S(), m(T(
|
|
717
|
-
F.value ? (S(), m(T(
|
|
716
|
+
rt.value ? (S(), m(T(i), { key: 0 })) : h("v-if", !0),
|
|
717
|
+
F.value ? (S(), m(T(t), {
|
|
718
718
|
key: 1,
|
|
719
719
|
message: F.value()
|
|
720
720
|
}, null, 8, ["message"])) : h("v-if", !0),
|
|
@@ -730,8 +730,8 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
730
730
|
ref_key: "designHost",
|
|
731
731
|
ref: Xe,
|
|
732
732
|
class: "configuration-design",
|
|
733
|
-
style: be({ gap: `${T(
|
|
734
|
-
}, [(S(), m(T(
|
|
733
|
+
style: be({ gap: `${T(se).columnGap}px` })
|
|
734
|
+
}, [(S(), m(T(ae), {
|
|
735
735
|
key: R.value?.id,
|
|
736
736
|
nodes: z.value.nodes,
|
|
737
737
|
routes: z.value.links,
|
|
@@ -756,7 +756,7 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
756
756
|
onSelectRoute: vt,
|
|
757
757
|
onLayoutChange: yt
|
|
758
758
|
}, {
|
|
759
|
-
actions: E(() => [y(T(
|
|
759
|
+
actions: E(() => [y(T(r), {
|
|
760
760
|
items: $e.value,
|
|
761
761
|
align: "start",
|
|
762
762
|
onSelect: et
|
|
@@ -770,7 +770,7 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
770
770
|
}, 8, ["disabled"])]),
|
|
771
771
|
_: 1
|
|
772
772
|
}, 8, ["items"])]),
|
|
773
|
-
navigation: E(() => [y(T(
|
|
773
|
+
navigation: E(() => [y(T(oe), {
|
|
774
774
|
class: "configuration-route-locator",
|
|
775
775
|
value: V.value || void 0,
|
|
776
776
|
placeholder: T(b).t("platform.screen.WorkflowConfigurationView.select-link", "选择连线"),
|
|
@@ -778,7 +778,7 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
778
778
|
value: e.routeKey,
|
|
779
779
|
label: `${e.title ?? T(b).t("platform.workflow-config.route", "路径")}:${z.value.nodes.find((t) => t.nodeKey === e.sourceNodeKey)?.title} → ${z.value.nodes.find((t) => t.nodeKey === e.targetNodeKey)?.title}`
|
|
780
780
|
})),
|
|
781
|
-
"onUpdate:value":
|
|
781
|
+
"onUpdate:value": n[2] ||= (e) => vt(String(e))
|
|
782
782
|
}, null, 8, [
|
|
783
783
|
"value",
|
|
784
784
|
"placeholder",
|
|
@@ -800,7 +800,7 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
800
800
|
width: "compact",
|
|
801
801
|
open: N.value,
|
|
802
802
|
title: q.value?.title ? T(b).t("platform.workflow-config.node-properties", "节点属性 · {title}", { title: q.value.title }) : T(b).t("platform.workflow-config.route-properties", "路径属性"),
|
|
803
|
-
onClose:
|
|
803
|
+
onClose: n[4] ||= (e) => N.value = !1
|
|
804
804
|
}, {
|
|
805
805
|
operation: E(() => [_("div", Be, [q.value?.nodeType === "branch" ? (S(), m(T(u), {
|
|
806
806
|
key: 0,
|
|
@@ -820,12 +820,12 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
820
820
|
_: 1
|
|
821
821
|
}, 8, ["disabled"])) : h("v-if", !0), y(T(u), {
|
|
822
822
|
disabled: H.value,
|
|
823
|
-
onClick:
|
|
823
|
+
onClick: n[3] ||= (e) => N.value = !1
|
|
824
824
|
}, {
|
|
825
825
|
default: E(() => [v(w(T(b).t("platform.screen.WorkflowConfigurationView.finish-configuration", "完成配置")), 1)]),
|
|
826
826
|
_: 1
|
|
827
827
|
}, 8, ["disabled"])])]),
|
|
828
|
-
default: E(() => [y(T(
|
|
828
|
+
default: E(() => [y(T(re), {
|
|
829
829
|
"condition-tools": T(Je),
|
|
830
830
|
design: z.value,
|
|
831
831
|
"node-key": B.value,
|
|
@@ -862,7 +862,7 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
862
862
|
_: 2
|
|
863
863
|
}, [L.value ? {
|
|
864
864
|
name: "status",
|
|
865
|
-
fn: E(() => [_("div", Le, [y(T(
|
|
865
|
+
fn: E(() => [_("div", Le, [y(T(oe), {
|
|
866
866
|
class: "configuration-version-selector",
|
|
867
867
|
value: R.value?.id,
|
|
868
868
|
options: I.value.map((e) => ({
|
|
@@ -873,7 +873,7 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
873
873
|
})
|
|
874
874
|
})),
|
|
875
875
|
disabled: H.value || T(W),
|
|
876
|
-
"onUpdate:value":
|
|
876
|
+
"onUpdate:value": n[1] ||= (e) => pt(String(e))
|
|
877
877
|
}, null, 8, [
|
|
878
878
|
"value",
|
|
879
879
|
"options",
|
|
@@ -892,11 +892,11 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
892
892
|
_: 1
|
|
893
893
|
}, 8, ["title"])) : h("v-if", !0)])]),
|
|
894
894
|
key: "0"
|
|
895
|
-
} : void 0]), 1032, ["title"]), y(T(
|
|
895
|
+
} : void 0]), 1032, ["title"]), y(T(ne), {
|
|
896
896
|
width: "extraWide",
|
|
897
897
|
open: P.value,
|
|
898
898
|
title: T(b).t("platform.screen.WorkflowConfigurationView.confirm-workflow-publication", "确认发布流程"),
|
|
899
|
-
onClose:
|
|
899
|
+
onClose: n[5] ||= (e) => P.value = !1
|
|
900
900
|
}, {
|
|
901
901
|
operation: E(() => [y(T(u), {
|
|
902
902
|
type: "primary",
|
|
@@ -928,7 +928,7 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
928
928
|
e.nodeType === "task" ? (S(), g("details", He, [
|
|
929
929
|
_("summary", null, w(T(b).t("platform.screen.WorkflowConfigurationView.view-business-task-checks-and-instructions", "查看业务任务检查与办理指引")), 1),
|
|
930
930
|
e.taskDefinitionId ? (S(), g("p", Ue, w(T(b).t("platform.workflow-config.referenced-task", "引用任务")) + ":" + w(M.value.tasks.find((t) => t.id === e.taskDefinitionId)?.title ?? e.taskDefinitionId), 1)) : h("v-if", !0),
|
|
931
|
-
y(T(
|
|
931
|
+
y(T(fe), {
|
|
932
932
|
"condition-tools": T(Je),
|
|
933
933
|
value: e.nodeConfigText,
|
|
934
934
|
"module-alias": d.moduleAlias,
|
|
@@ -961,7 +961,7 @@ var Ie = { class: "workflow-configuration" }, Le = { class: "configuration-statu
|
|
|
961
961
|
_("ul", null, [(S(!0), g(f, null, we(z.value.links.filter((t) => t.sourceNodeKey === e.nodeKey), (e) => (S(), g("li", { key: e.routeKey }, w(e.title ?? T(b).t("platform.workflow-config.exit", "出口")) + ":" + w(e.defaultRoute ? T(b).t("platform.workflow-config.fallback-exit", "默认兜底") : e.conditionExpression || T(b).t("platform.workflow-config.unconditional", "无条件(始终命中)")), 1))), 128))]),
|
|
962
962
|
_("p", null, w(T(b).t("platform.workflow-config.convergence-counting", "汇聚:{summary},只计算有效出口。", { summary: st(e) })), 1)
|
|
963
963
|
]))), 128)),
|
|
964
|
-
_("details", null, [_("summary", null, w(T(b).t("platform.screen.WorkflowConfigurationView.view-published-workflow", "查看发布流程图")), 1), y(T(
|
|
964
|
+
_("details", null, [_("summary", null, w(T(b).t("platform.screen.WorkflowConfigurationView.view-published-workflow", "查看发布流程图")), 1), y(T(ae), {
|
|
965
965
|
presentation: "detail",
|
|
966
966
|
nodes: z.value.nodes,
|
|
967
967
|
routes: z.value.links,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as e, _ as t, s as n, y as r } from "./platform-workbench-
|
|
2
|
-
import { $r as ee,
|
|
1
|
+
import { D as e, _ as t, s as n, y as r } from "./platform-workbench-C4OFiuG5.js";
|
|
2
|
+
import { $r as ee, Fa as te, In as ne, Ir as re, Jt as ie, Nn as ae, Pn as oe, Rr as i, St as se, Vt as ce, Wt as le, Xr as ue, bn as a, fr as o, gr as s, h as de, ln as c, lr as fe, m as pe, ni as me, ot as he, p as l, pr as ge, ro as _e, so as ve, u as ye, vr as be, vt as xe, za as Se } from "./platform-components-D3NvMY3T.js";
|
|
3
3
|
import { Fragment as Ce, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineComponent as _, normalizeClass as we, openBlock as v, ref as y, renderList as Te, shallowRef as Ee, toDisplayString as b, unref as x, watch as De, withCtx as S } from "vue";
|
|
4
4
|
//#region src/views/WorkflowWorkbenchView.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields" }, Ae = {
|
|
@@ -11,27 +11,27 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
11
11
|
}, Ne = { class: "workflow-field" }, Pe = { class: "date-filters" }, Fe = { class: "workflow-field" }, Ie = { class: "workflow-field" }, Le = { class: "workflow-query-controls" }, Re = { key: 0 }, ze = { class: "policy-form" }, Be = { class: "workflow-field" }, Ve = { class: "workflow-field" }, He = { class: "workflow-field" }, Ue = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "workflow-field"
|
|
14
|
-
}, C = /*#__PURE__*/
|
|
14
|
+
}, C = /*#__PURE__*/ be(/* @__PURE__ */ _({
|
|
15
15
|
name: "WorkflowWorkbenchView",
|
|
16
16
|
__name: "WorkflowWorkbenchView",
|
|
17
|
-
setup(
|
|
18
|
-
let _ =
|
|
17
|
+
setup(be) {
|
|
18
|
+
let _ = _e();
|
|
19
19
|
function C(e) {
|
|
20
|
-
return
|
|
20
|
+
return pe(e, _);
|
|
21
21
|
}
|
|
22
|
-
let We = ee(), w = r(), Ge = n(), T = y(w?.value?.system && typeof Ge.query.tenantId == "string" ? Ge.query.tenantId : void 0), E = u(() => T.value ?
|
|
22
|
+
let We = ee(), w = r(), Ge = n(), T = y(w?.value?.system && typeof Ge.query.tenantId == "string" ? Ge.query.tenantId : void 0), E = u(() => T.value ? ve(We.http, { "X-MuYun-Tenant-Id": T.value }) : We.http), Ke = u(() => de(E.value)), D = u(() => i(E.value)), qe = ue({
|
|
23
23
|
http: We.http,
|
|
24
24
|
language: _,
|
|
25
25
|
moduleAlias: "iam.tenant",
|
|
26
26
|
runtimeAccess: "REFERENCE"
|
|
27
|
-
}), Je = u(() => !w?.value?.system || !!T.value), Ye = u(() =>
|
|
27
|
+
}), Je = u(() => !w?.value?.system || !!T.value), Ye = u(() => ue({
|
|
28
28
|
http: E.value,
|
|
29
29
|
language: _,
|
|
30
30
|
moduleAlias: "iam.user",
|
|
31
31
|
runtimeAccess: "VIEW"
|
|
32
32
|
})), O = y("todo"), k = y(1), A = y(30), Xe = y(0), Ze = y(0), j = y([]), M = y(), N = y(!1), P = y(""), F = y(""), I = y({}), L = y({}), R = y({}), Qe = u(() => ({
|
|
33
33
|
...R.value,
|
|
34
|
-
...Object.fromEntries(Object.entries(L.value).map(([e, t]) => [e,
|
|
34
|
+
...Object.fromEntries(Object.entries(L.value).map(([e, t]) => [e, Se(t.title, t.titleText, _)]))
|
|
35
35
|
})), z = y({}), B = y(""), V = y(""), H = y(!1), $e = y(), et = u(() => [
|
|
36
36
|
{
|
|
37
37
|
key: "todo",
|
|
@@ -63,14 +63,14 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
63
63
|
function nt(e, t) {
|
|
64
64
|
if (e.business?.readable === !1) return _.t("platform.screen.WorkflowWorkbenchView.restricted-business-record", "受限业务记录");
|
|
65
65
|
let n = typeof t == "string" ? t : e.business?.title;
|
|
66
|
-
return n == null ? _.t("platform.screen.WorkflowWorkbenchView.untitled-business-record", "未命名业务") :
|
|
66
|
+
return n == null ? _.t("platform.screen.WorkflowWorkbenchView.untitled-business-record", "未命名业务") : te(n, e.business?.titleContentText, _) ?? n;
|
|
67
67
|
}
|
|
68
68
|
let rt = u(() => j.value.map((e) => ({
|
|
69
69
|
...e,
|
|
70
70
|
id: e.taskId ?? e.instanceId,
|
|
71
|
-
nodeTitle:
|
|
71
|
+
nodeTitle: Se(e.nodeTitle ?? "", e.nodeTitleText, _),
|
|
72
72
|
title: nt(e),
|
|
73
|
-
moduleTitle: e.business?.moduleTitle == null ? Qe.value[e.moduleAlias] ?? _.t("platform.screen.WorkflowWorkbenchView.business-module", "业务模块") :
|
|
73
|
+
moduleTitle: e.business?.moduleTitle == null ? Qe.value[e.moduleAlias] ?? _.t("platform.screen.WorkflowWorkbenchView.business-module", "业务模块") : Se(e.business.moduleTitle, e.business.moduleTitleText, _),
|
|
74
74
|
status: C(e.taskStatus ?? e.instanceStatus),
|
|
75
75
|
received: st(e.receivedAt),
|
|
76
76
|
completed: st(e.completedAt),
|
|
@@ -132,7 +132,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
132
132
|
}]
|
|
133
133
|
]), U = Ee();
|
|
134
134
|
De([() => M.value?.moduleAlias, E], ([e, t]) => {
|
|
135
|
-
U.value = e ?
|
|
135
|
+
U.value = e ? ue({
|
|
136
136
|
http: t,
|
|
137
137
|
language: _,
|
|
138
138
|
moduleAlias: e,
|
|
@@ -140,7 +140,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
140
140
|
}) : void 0;
|
|
141
141
|
}, { immediate: !0 });
|
|
142
142
|
let W = y(), at = y(/* @__PURE__ */ new Map()), G = y(!1), K = y(""), ot = u(() => {
|
|
143
|
-
let e = U.value ?
|
|
143
|
+
let e = U.value ? ce(me(U.value.runtime)?.uiDescriptor) : void 0;
|
|
144
144
|
return new Map([...at.value].map(([t, n]) => [t, e?.get(t) ?? n]));
|
|
145
145
|
});
|
|
146
146
|
function st(e) {
|
|
@@ -230,7 +230,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
230
230
|
try {
|
|
231
231
|
let r = await n.runtime.ready, ee = await n.crud.view(t.recordId);
|
|
232
232
|
if (e !== lt) return;
|
|
233
|
-
at.value =
|
|
233
|
+
at.value = ce(r.uiDescriptor), W.value = ee;
|
|
234
234
|
} catch (t) {
|
|
235
235
|
e === lt && (K.value = _.t("platform.screen.WorkflowWorkbenchView.unable-to-load-business-details-retry-or", "业务详情加载失败,请重试或检查业务读取权限。"), a(t, {
|
|
236
236
|
source: "workflow-workbench",
|
|
@@ -270,7 +270,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
270
270
|
moduleAliases: [],
|
|
271
271
|
principalCanProcess: !1
|
|
272
272
|
}), yt = y(""), bt = u(() => J.value && JSON.stringify(Z.value) !== yt.value);
|
|
273
|
-
|
|
273
|
+
re(() => _.t("platform.unsaved-source.WorkflowWorkbenchView", "个人委托"), () => bt.value, () => Y.value);
|
|
274
274
|
let Q = 0;
|
|
275
275
|
function $(e, t) {
|
|
276
276
|
return e === Q && t === T.value && J.value;
|
|
@@ -356,7 +356,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
356
356
|
moduleAliases: r.moduleScopeType === "all" ? [] : r.moduleAliases
|
|
357
357
|
}
|
|
358
358
|
}), !$(e, t) || (St(), await Ct(), !$(e, t))) return;
|
|
359
|
-
|
|
359
|
+
ae(_.t("platform.screen.WorkflowWorkbenchView.delegation-saved", "委托规则已保存,仅影响后续新任务"));
|
|
360
360
|
} catch (n) {
|
|
361
361
|
$(e, t) && a(n, {
|
|
362
362
|
source: "workflow-delegation",
|
|
@@ -386,7 +386,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
388
|
return (e, t) => (v(), p("section", Oe, [
|
|
389
|
-
g(x(
|
|
389
|
+
g(x(xe), {
|
|
390
390
|
tabs: et.value,
|
|
391
391
|
"active-key": O.value,
|
|
392
392
|
label: x(_).t("platform.screen.WorkflowWorkbenchView.approval-workbench-groups", "审批工作台分组"),
|
|
@@ -400,12 +400,12 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
400
400
|
"label",
|
|
401
401
|
"disabled"
|
|
402
402
|
]),
|
|
403
|
-
P.value ? (v(), d(x(
|
|
403
|
+
P.value ? (v(), d(x(ne), {
|
|
404
404
|
key: 0,
|
|
405
405
|
title: x(_).t("platform.screen.WorkflowWorkbenchView.unable-to-load-tasks", "无法加载任务"),
|
|
406
406
|
message: P.value
|
|
407
407
|
}, null, 8, ["title", "message"])) : f("v-if", !0),
|
|
408
|
-
g(x(
|
|
408
|
+
g(x(ie), {
|
|
409
409
|
title: et.value.find((e) => e.key === O.value)?.title ?? x(_).t("platform.screen.WorkflowWorkbenchView.workflow-tasks", "审批任务"),
|
|
410
410
|
columns: it.value,
|
|
411
411
|
rows: rt.value,
|
|
@@ -454,7 +454,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
454
454
|
x(w)?.system ? (v(), p("label", Ae, [g(x(c), null, {
|
|
455
455
|
default: S(() => [h(b(x(_).t("platform.screen.WorkflowWorkbenchView.business-tenant", "业务租户")), 1)]),
|
|
456
456
|
_: 1
|
|
457
|
-
}), g(x(
|
|
457
|
+
}), g(x(he), {
|
|
458
458
|
value: T.value,
|
|
459
459
|
"onUpdate:value": t[1] ||= (e) => T.value = e,
|
|
460
460
|
disabled: H.value || J.value || Y.value,
|
|
@@ -485,7 +485,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
485
485
|
Je.value ? (v(), p("label", Me, [g(x(c), null, {
|
|
486
486
|
default: S(() => [h(b(x(_).t("platform.screen.WorkflowWorkbenchView.submitter", "发起人")), 1)]),
|
|
487
487
|
_: 1
|
|
488
|
-
}), g(x(
|
|
488
|
+
}), g(x(he), {
|
|
489
489
|
value: I.value.submitterUserId,
|
|
490
490
|
"onUpdate:value": t[3] ||= (e) => I.value.submitterUserId = e,
|
|
491
491
|
disabled: H.value,
|
|
@@ -527,12 +527,12 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
527
527
|
"options",
|
|
528
528
|
"placeholder"
|
|
529
529
|
])]),
|
|
530
|
-
m("div", Pe, [m("label", Fe, [h(b(x(_).t("platform.screen.WorkflowWorkbenchView.received-from", "接收开始日期")), 1), g(x(
|
|
530
|
+
m("div", Pe, [m("label", Fe, [h(b(x(_).t("platform.screen.WorkflowWorkbenchView.received-from", "接收开始日期")), 1), g(x(fe), {
|
|
531
531
|
value: B.value,
|
|
532
532
|
"onUpdate:value": t[5] ||= (e) => B.value = e,
|
|
533
533
|
type: "date",
|
|
534
534
|
disabled: H.value
|
|
535
|
-
}, null, 8, ["value", "disabled"])]), m("label", Ie, [h(b(x(_).t("platform.screen.WorkflowWorkbenchView.received-until", "接收结束日期")), 1), g(x(
|
|
535
|
+
}, null, 8, ["value", "disabled"])]), m("label", Ie, [h(b(x(_).t("platform.screen.WorkflowWorkbenchView.received-until", "接收结束日期")), 1), g(x(fe), {
|
|
536
536
|
value: V.value,
|
|
537
537
|
"onUpdate:value": t[6] ||= (e) => V.value = e,
|
|
538
538
|
type: "date",
|
|
@@ -568,7 +568,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
568
568
|
"page-size",
|
|
569
569
|
"pagination-disabled"
|
|
570
570
|
]),
|
|
571
|
-
g(x(
|
|
571
|
+
g(x(le), {
|
|
572
572
|
open: !!M.value,
|
|
573
573
|
title: M.value ? nt(M.value, W.value?.title) : x(_).t("platform.screen.WorkflowWorkbenchView.business-processing-details", "业务办理详情"),
|
|
574
574
|
width: "wide",
|
|
@@ -584,7 +584,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
584
584
|
}, 8, ["disabled"])]),
|
|
585
585
|
default: S(() => [
|
|
586
586
|
G.value ? (v(), p("p", Re, b(x(_).t("platform.screen.WorkflowWorkbenchView.loading-business-details", "加载业务详情…")), 1)) : f("v-if", !0),
|
|
587
|
-
K.value ? (v(), d(x(
|
|
587
|
+
K.value ? (v(), d(x(ne), {
|
|
588
588
|
key: 1,
|
|
589
589
|
title: x(_).t("platform.screen.WorkflowWorkbenchView.unable-to-read-business-details", "无法读取业务详情"),
|
|
590
590
|
message: K.value
|
|
@@ -596,7 +596,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
596
596
|
default: S(() => [h(b(x(_).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
|
|
597
597
|
_: 1
|
|
598
598
|
})) : f("v-if", !0),
|
|
599
|
-
W.value ? (v(), d(x(
|
|
599
|
+
W.value ? (v(), d(x(se), {
|
|
600
600
|
key: 3,
|
|
601
601
|
record: W.value,
|
|
602
602
|
fields: ot.value,
|
|
@@ -606,7 +606,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
606
606
|
"fields",
|
|
607
607
|
"option-context"
|
|
608
608
|
])) : f("v-if", !0),
|
|
609
|
-
M.value && U.value && W.value && !G.value && !K.value ? (v(), d(x(
|
|
609
|
+
M.value && U.value && W.value && !G.value && !K.value ? (v(), d(x(ye), {
|
|
610
610
|
ref_key: "panel",
|
|
611
611
|
ref: $e,
|
|
612
612
|
key: M.value.instanceId,
|
|
@@ -625,7 +625,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
625
625
|
]),
|
|
626
626
|
_: 1
|
|
627
627
|
}, 8, ["open", "title"]),
|
|
628
|
-
g(x(
|
|
628
|
+
g(x(le), {
|
|
629
629
|
open: J.value,
|
|
630
630
|
title: Z.value.id ? x(_).t("platform.screen.WorkflowWorkbenchView.edit-personal-delegation", "编辑个人委托") : x(_).t("platform.screen.WorkflowWorkbenchView.personal-delegation-settings", "个人代办设置"),
|
|
631
631
|
"before-close": Et,
|
|
@@ -646,7 +646,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
646
646
|
_: 1
|
|
647
647
|
}, 8, ["disabled"])]),
|
|
648
648
|
default: S(() => [
|
|
649
|
-
X.value ? (v(), d(x(
|
|
649
|
+
X.value ? (v(), d(x(ne), {
|
|
650
650
|
key: 0,
|
|
651
651
|
title: x(_).t("platform.screen.WorkflowWorkbenchView.complete-the-delegation-rule", "请完善委托规则"),
|
|
652
652
|
message: X.value
|
|
@@ -655,7 +655,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
655
655
|
m("label", Be, [g(x(c), { required: "" }, {
|
|
656
656
|
default: S(() => [h(b(x(_).t("platform.screen.WorkflowWorkbenchView.rule-name", "规则名称")), 1)]),
|
|
657
657
|
_: 1
|
|
658
|
-
}), g(x(
|
|
658
|
+
}), g(x(fe), {
|
|
659
659
|
value: Z.value.title,
|
|
660
660
|
"onUpdate:value": t[13] ||= (e) => Z.value.title = e,
|
|
661
661
|
disabled: Y.value
|
|
@@ -663,7 +663,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
663
663
|
m("label", Ve, [g(x(c), { required: "" }, {
|
|
664
664
|
default: S(() => [h(b(x(_).t("platform.screen.WorkflowWorkbenchView.delegate", "代办人")), 1)]),
|
|
665
665
|
_: 1
|
|
666
|
-
}), g(x(
|
|
666
|
+
}), g(x(he), {
|
|
667
667
|
value: Z.value.delegateUserId,
|
|
668
668
|
"onUpdate:value": t[14] ||= (e) => Z.value.delegateUserId = e,
|
|
669
669
|
context: Ye.value,
|
|
@@ -706,7 +706,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
706
706
|
"disabled",
|
|
707
707
|
"options"
|
|
708
708
|
])])) : f("v-if", !0),
|
|
709
|
-
g(x(
|
|
709
|
+
g(x(ge), {
|
|
710
710
|
checked: Z.value.principalCanProcess,
|
|
711
711
|
"onUpdate:checked": t[17] ||= (e) => Z.value.principalCanProcess = e,
|
|
712
712
|
disabled: Y.value
|
|
@@ -722,7 +722,7 @@ var Oe = { class: "workflow-workbench" }, ke = { class: "workflow-query-fields"
|
|
|
722
722
|
class: "policy-row"
|
|
723
723
|
}, [
|
|
724
724
|
m("strong", null, b(e.title) + " · " + b(e.enabled ? x(_).t("platform.screen.WorkflowWorkbenchView.enabled", "启用") : x(_).t("platform.screen.WorkflowWorkbenchView.disabled", "停用")), 1),
|
|
725
|
-
g(x(
|
|
725
|
+
g(x(he), {
|
|
726
726
|
value: e.delegateUserId,
|
|
727
727
|
context: Ye.value,
|
|
728
728
|
"load-options": Ke.value,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./platform-workbench-
|
|
2
|
-
import {
|
|
1
|
+
import "./platform-workbench-C4OFiuG5.js";
|
|
2
|
+
import { Nt as e, eo as t, va as n, xa as r, ya as i, za as a } from "./platform-components-D3NvMY3T.js";
|
|
3
3
|
import { defineAsyncComponent as o } from "vue";
|
|
4
4
|
//#region src/platform-workbench/workspaceViewContract.ts
|
|
5
5
|
function s(e) {
|
|
@@ -20,7 +20,7 @@ var c = [
|
|
|
20
20
|
type: "platform.module.governance",
|
|
21
21
|
route: "/_platform/workspace/platform.module.governance",
|
|
22
22
|
moduleAlias: "platform.module",
|
|
23
|
-
component: o(() => import("./ModuleGovernanceView-
|
|
23
|
+
component: o(() => import("./ModuleGovernanceView-g5W2R_Zl.js")),
|
|
24
24
|
layout: "workspace",
|
|
25
25
|
routeTitle: "模块管理",
|
|
26
26
|
routeTitleKey: "platform.workspace-view.modules.route-title",
|
|
@@ -53,9 +53,9 @@ var d = [
|
|
|
53
53
|
"VALUE_MAPPING",
|
|
54
54
|
"FORMULA"
|
|
55
55
|
];
|
|
56
|
-
function f(
|
|
57
|
-
let
|
|
58
|
-
return
|
|
56
|
+
function f(e, n = t) {
|
|
57
|
+
let r = a(e.title, e.titleText, n);
|
|
58
|
+
return e.ownerTitle ? `${e.ownerTitle} · ${r}` : r;
|
|
59
59
|
}
|
|
60
60
|
function p(e, t) {
|
|
61
61
|
return e.request({ path: `/platform.module/${encodeURIComponent(t)}/code-configuration` });
|
|
@@ -112,18 +112,18 @@ function _(e) {
|
|
|
112
112
|
"VALUE_MAPPING"
|
|
113
113
|
].includes(e.segmentType) && !!e.sourceRef?.trim());
|
|
114
114
|
}
|
|
115
|
-
function v(
|
|
116
|
-
if (
|
|
117
|
-
...
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
].some((e) => e != null && !Number.isSafeInteger(e))) throw new
|
|
123
|
-
let
|
|
124
|
-
return
|
|
115
|
+
function v(e, r = t) {
|
|
116
|
+
if (e.mode !== "MANUAL" && [
|
|
117
|
+
...e.segments.map((e) => e.length),
|
|
118
|
+
e.sequencePolicy?.startValue,
|
|
119
|
+
e.sequencePolicy?.stepValue,
|
|
120
|
+
e.sequencePolicy?.sequenceLength,
|
|
121
|
+
e.sequencePolicy?.maxValue
|
|
122
|
+
].some((e) => e != null && !Number.isSafeInteger(e))) throw new n(i(r, "platform.code.config.integer-required", "流水策略和片段长度须为可准确表示的整数。"));
|
|
123
|
+
let a = JSON.parse(JSON.stringify(e));
|
|
124
|
+
return a.orgScopeId = a.orgScopeType === "GLOBAL" ? null : a.orgScopeId, a.globalDefault = a.orgScopeType === "GLOBAL", a.effectiveFrom ||= null, a.effectiveTo ||= null, a.mode === "MANUAL" ? (a.segments = [], a.sequencePolicy = null, a.linkedUpdate = !1) : a.segments.some((e) => e.segmentType === "SEQUENCE") || (a.sequencePolicy = null), _(a) || (a.linkedUpdate = !1), a.segments.forEach((e, t) => {
|
|
125
125
|
e.sortOrder = t;
|
|
126
|
-
}),
|
|
126
|
+
}), a;
|
|
127
127
|
}
|
|
128
128
|
function y(e, t) {
|
|
129
129
|
let n = /* @__PURE__ */ new Map();
|
|
@@ -145,60 +145,60 @@ function y(e, t) {
|
|
|
145
145
|
function b(e) {
|
|
146
146
|
return /^(BOOLEAN|BOOL)$/i.test(e.type) ? "boolean" : /^(INT|INTEGER|LONG|DECIMAL|DOUBLE|FLOAT|NUMBER|BIGDECIMAL)$/i.test(e.type) ? "number" : /^(DATE|LOCALDATE)$/i.test(e.type) ? "date" : /^(DATETIME|LOCALDATETIME)$/i.test(e.type) ? "datetime" : "text";
|
|
147
147
|
}
|
|
148
|
-
function x(
|
|
148
|
+
function x(r, a, o = t) {
|
|
149
149
|
let s = {};
|
|
150
|
-
for (let
|
|
151
|
-
let
|
|
152
|
-
if (
|
|
153
|
-
if (b(
|
|
154
|
-
let
|
|
155
|
-
if (c === void 0) throw new
|
|
156
|
-
s[
|
|
157
|
-
} else if (b(
|
|
158
|
-
if (
|
|
159
|
-
s[
|
|
160
|
-
} else s[
|
|
150
|
+
for (let t of r) {
|
|
151
|
+
let r = a[t.fieldName];
|
|
152
|
+
if (r !== void 0 && r !== "") {
|
|
153
|
+
if (b(t) === "number") {
|
|
154
|
+
let a = t.type.toUpperCase(), c = e(r, a === "LONG" ? "LONG" : ["DECIMAL", "BIGDECIMAL"].includes(a) ? "DECIMAL" : ["INT", "INTEGER"].includes(a) ? "INTEGER" : void 0);
|
|
155
|
+
if (c === void 0) throw new n(i(o, "platform.code.config.number-required", "{field}请输入有效数字", { field: f(t, o) }));
|
|
156
|
+
s[t.fieldName] = c;
|
|
157
|
+
} else if (b(t) === "boolean") {
|
|
158
|
+
if (r !== "true" && r !== "false") throw new n(i(o, "platform.code.config.boolean-required", "{field}请输入 true 或 false", { field: f(t, o) }));
|
|
159
|
+
s[t.fieldName] = r === "true";
|
|
160
|
+
} else s[t.fieldName] = r;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
return s;
|
|
164
164
|
}
|
|
165
|
-
function S(
|
|
165
|
+
function S(e, a = t) {
|
|
166
166
|
let o = "/platform.code_rule";
|
|
167
167
|
return {
|
|
168
|
-
targets: (
|
|
169
|
-
rules: (
|
|
170
|
-
async bind(
|
|
171
|
-
return
|
|
168
|
+
targets: (t) => e.request({ path: o + "/targets" + (t ? `?moduleAlias=${encodeURIComponent(t)}` : "") }),
|
|
169
|
+
rules: (t) => e.request({ path: `${o}/rules?moduleAlias=${encodeURIComponent(t.moduleAlias)}&entityAlias=${encodeURIComponent(t.entityAlias)}` }),
|
|
170
|
+
async bind(t, n, i, a) {
|
|
171
|
+
return r(await e.request({
|
|
172
172
|
method: "POST",
|
|
173
173
|
path: o + "/binding",
|
|
174
174
|
body: {
|
|
175
|
-
moduleAlias:
|
|
176
|
-
entityAlias:
|
|
175
|
+
moduleAlias: t.moduleAlias,
|
|
176
|
+
entityAlias: t.entityAlias,
|
|
177
177
|
fieldName: n.fieldName,
|
|
178
|
-
role:
|
|
178
|
+
role: i,
|
|
179
179
|
trigger: a,
|
|
180
180
|
expectedVersion: n.bindingVersion ?? null
|
|
181
181
|
}
|
|
182
182
|
}));
|
|
183
183
|
},
|
|
184
|
-
async save(
|
|
185
|
-
return
|
|
184
|
+
async save(t) {
|
|
185
|
+
return r(await e.request({
|
|
186
186
|
method: "POST",
|
|
187
187
|
path: o + "/saveTree",
|
|
188
|
-
body: v(
|
|
188
|
+
body: v(t, a)
|
|
189
189
|
}));
|
|
190
190
|
},
|
|
191
|
-
async preview(
|
|
192
|
-
if (!Number.isSafeInteger(c) || c < 0) throw new
|
|
193
|
-
return
|
|
191
|
+
async preview(t, s, c, l) {
|
|
192
|
+
if (!Number.isSafeInteger(c) || c < 0) throw new n(i(a, "platform.code.config.trial-sequence-required", "试算流水值须为非负整数。"));
|
|
193
|
+
return r(await e.request({
|
|
194
194
|
method: "POST",
|
|
195
195
|
path: o + "/preview",
|
|
196
196
|
...l ? { signal: l } : {},
|
|
197
197
|
body: {
|
|
198
|
-
rule: v(
|
|
198
|
+
rule: v(t, a),
|
|
199
199
|
context: s,
|
|
200
200
|
sequenceValue: c,
|
|
201
|
-
organizationId:
|
|
201
|
+
organizationId: t.orgScopeId ?? null
|
|
202
202
|
}
|
|
203
203
|
}));
|
|
204
204
|
}
|