@ximatai/muyun-web-app 0.26.26 → 0.26.28
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-BPnAoGim.js → BusinessActivityLogView-DlNB97pu.js} +2 -2
- package/dist/{BusinessLogListDrawer-CXabZOOM.js → BusinessLogListDrawer-ByiwQP1m.js} +163 -163
- package/dist/CodeConfigurationView-91B9dHjD.js +2333 -0
- package/dist/{ConfigurationTranslationView-BsWyLeRd.js → ConfigurationTranslationView-ClovkYJt.js} +22 -22
- package/dist/{LoginAuditLogView-D3TJdzWM.js → LoginAuditLogView-Blg9giRX.js} +2 -2
- package/dist/{ModuleActionManagementView-C9LiwMM3.js → ModuleActionManagementView-Chr_XTJ3.js} +193 -193
- package/dist/{ModuleGovernanceView-CYZzHLHa.js → ModuleGovernanceView-BNlRHqSj.js} +4054 -4072
- package/dist/{RequestErrorLogView-D85h_q4P.js → RequestErrorLogView-CGczIKQy.js} +2 -2
- package/dist/{RoleDetailWorkspaceView-VHvh-_Sj.js → RoleDetailWorkspaceView-CPH9cga9.js} +75 -75
- package/dist/{RuntimeLogView-D-MrVfT7.js → RuntimeLogView-DF-1k-9y.js} +60 -60
- package/dist/WorkflowAdministrationView-CCXry0G4.js +650 -0
- package/dist/WorkflowConfigurationView-BqSfYua2.js +2227 -0
- package/dist/{WorkflowWorkbenchView-BN3ckTHB.js → WorkflowWorkbenchView-DUFfO3Gf.js} +248 -248
- package/dist/{codeConfiguration-B5OjCYZ6.js → codeConfiguration-BRxveKen.js} +71 -54
- package/dist/configurationEditorNavigation-DeXvfJyr.js +15 -0
- package/dist/formulaReferences-CKkkdA_R.js +23 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1239 -1131
- package/dist/{moduleMenuWorkspace-DhI4_LpA.js → moduleMenuWorkspace-D_A94ZgR.js} +218 -229
- package/dist/{platform-components-Ca8SikTY.js → platform-components-DSMqalgQ.js} +4660 -4538
- package/dist/{platform-workbench-DpXhb4F6.js → platform-workbench-B53hydzq.js} +6055 -5909
- package/dist/types/dynamic-page-runtime/ModulePageBusinessSession.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/ModulePageHost.vue.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +37 -3
- package/dist/types/dynamic-page-runtime/ModulePageHostSession.vue.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/ModuleReferenceRecordDetailBrowser.vue.d.ts +16 -4
- package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/recordFormAssistantCapabilities.d.ts +4 -2
- package/dist/types/dynamic-page-runtime/recordFormDraftAccess.d.ts +2 -0
- package/dist/types/dynamic-page-runtime/useModulePageSession.d.ts +1 -0
- package/dist/types/platform-admin-runtime/realtime.d.ts +3 -1
- package/dist/types/platform-components/BusinessNotificationPanel.vue.d.ts +2 -0
- package/dist/types/platform-components/ReferenceRecordDetailBrowser.vue.d.ts +11 -1
- package/dist/types/platform-components/index.d.ts +2 -2
- package/dist/types/platform-components/optionFieldOptionCache.d.ts +11 -1
- package/dist/types/platform-components/recordFormFieldModel.d.ts +1 -0
- package/dist/types/platform-components/referenceRecordDetailBrowser.d.ts +17 -2
- package/dist/types/platform-components/useWorkflowDesignSession.d.ts +141 -0
- package/dist/types/platform-components/workflowDesignEditing.d.ts +8 -7
- package/dist/types/platform-components/workflowDesignOperations.d.ts +107 -0
- package/dist/types/views/CodeRuleRecoveryPanel.vue.d.ts +20 -0
- package/dist/types/views/businessRuleGovernance.d.ts +1 -2
- package/dist/types/views/codeConfiguration.d.ts +29 -1
- package/dist/types/views/codeConfigurationAssistantSurface.d.ts +17 -0
- package/dist/types/views/codeRuleSaveRecovery.d.ts +12 -0
- package/dist/types/views/useCodeConfigurationAssistant.d.ts +10 -0
- package/dist/types/views/useCodeConfigurationSession.d.ts +16 -0
- package/dist/types/views/useWorkflowConfigurationAssistant.d.ts +16 -0
- package/dist/types/views/useWorkflowConfigurationContext.d.ts +16 -2
- package/dist/types/views/useWorkflowConfigurationSession.d.ts +146 -0
- package/dist/types/views/workflowConfigurationAssistantSurface.d.ts +169 -0
- package/dist/types/views/workflowSaveRecovery.d.ts +11 -0
- package/dist/types/vue-ui-antdv/components/sidePanelHost.d.ts +3 -1
- package/dist/types/vue-ui-antdv/index.d.ts +1 -0
- 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/formulaReferences.d.ts +2 -0
- package/dist/types/web-core/index.d.ts +1 -0
- package/dist/types/web-core/operationConfirmation.d.ts +13 -8
- package/dist/types/web-core/workflow.d.ts +11 -1
- package/dist/useWorkflowConfigurationContext-BuBDdUcQ.js +78 -0
- package/dist/{workspaceViews-CLOyLZMZ.js → workspaceViews-BSVtjZj1.js} +689 -689
- package/package.json +1 -1
- package/dist/CodeConfigurationView-B1Lgdnkj.js +0 -1667
- package/dist/WorkflowAdministrationView-DHPlIJXF.js +0 -650
- package/dist/WorkflowConfigurationView-BhQl7NjM.js +0 -980
- package/dist/useWorkflowConfigurationContext-DpzBpKa3.js +0 -66
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { Et as e, St as t, m as n } from "./platform-workbench-B53hydzq.js";
|
|
2
|
+
import { Aa as r, Ia as i, Na as a, Sa as o, Si as s, Ur as c, Wa as l, ba as u, br as d, dr as f, ga as p, ir as m, lo as h, mr as g, no as _, oi as v, vr as y, xa as b } from "./platform-components-DSMqalgQ.js";
|
|
3
|
+
import "./configurationEditorNavigation-DeXvfJyr.js";
|
|
4
|
+
import { Fragment as x, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createTextVNode as D, createVNode as O, defineComponent as k, inject as A, openBlock as j, ref as M, shallowRef as N, toDisplayString as P, unref as F, withCtx as I } from "vue";
|
|
4
5
|
//#region src/platform-admin-runtime/module-menu/moduleMenuClient.ts
|
|
5
|
-
function
|
|
6
|
-
let n =
|
|
6
|
+
function L(t) {
|
|
7
|
+
let n = v(t, { moduleAlias: "platform.menu_scheme" });
|
|
7
8
|
return {
|
|
8
9
|
async schemes() {
|
|
9
10
|
let e = [];
|
|
@@ -27,219 +28,219 @@ function z(t) {
|
|
|
27
28
|
return t.request({ path: `/platform.module/${encodeURIComponent(e)}/context` });
|
|
28
29
|
},
|
|
29
30
|
insert(e, n, r) {
|
|
30
|
-
return
|
|
31
|
+
return v(h(t, { "X-MuYun-Page-Context": JSON.stringify({ scheme: e }) }), { moduleAlias: "platform.menu" }).insert(n, { requestId: r });
|
|
31
32
|
},
|
|
32
33
|
view(e, n) {
|
|
33
|
-
return
|
|
34
|
+
return v(h(t, { "X-MuYun-Page-Context": JSON.stringify({ scheme: e }) }), { moduleAlias: "platform.menu" }).view(n);
|
|
34
35
|
},
|
|
35
36
|
receipt(e, n) {
|
|
36
|
-
return
|
|
37
|
+
return v(h(t, { "X-MuYun-Page-Context": JSON.stringify({ scheme: e }) }), { moduleAlias: "platform.menu" }).saveReceipt(n);
|
|
37
38
|
},
|
|
38
39
|
visible: () => e(t).mine().then((e) => e.records)
|
|
39
40
|
};
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
+
function R(e, t = _) {
|
|
42
43
|
return e ? e.scopeType === "system" ? t.t("platform.screen.moduleMenuClient.system-configuration-users", "系统配置用户") : e.organizationId ? t.t("platform.screen.moduleMenuClient.users-in-organization-value", "机构 {value1} 的用户", { value1: e.organizationId }) : e.tenantId ? t.t("platform.screen.moduleMenuClient.users-in-tenant-value", "租户 {value1} 的用户", { value1: e.tenantId }) : t.t("platform.screen.moduleMenuClient.audience-not-declared", "尚未声明适用范围") : t.t("platform.screen.moduleMenuClient.not-yet-determined", "尚未确定");
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
+
function z(e, t = "", n = _) {
|
|
45
46
|
return e.flatMap(({ record: e, children: r }) => {
|
|
46
|
-
let i =
|
|
47
|
+
let i = l(e, "title", n) ?? e.title, a = t ? `${t} / ${i}` : i;
|
|
47
48
|
return [{
|
|
48
49
|
menu: e,
|
|
49
50
|
path: a
|
|
50
|
-
}, ...
|
|
51
|
+
}, ...z(r, a, n)];
|
|
51
52
|
});
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
+
function B(e, t = !1, n = _) {
|
|
54
55
|
return e.map(({ record: e, children: r }) => {
|
|
55
56
|
let i = t || e.enabled === !1;
|
|
56
57
|
return {
|
|
57
58
|
value: e.id,
|
|
58
|
-
title:
|
|
59
|
+
title: l(e, "title", n) ?? e.title,
|
|
59
60
|
disabled: i || !!e.moduleAlias,
|
|
60
|
-
children:
|
|
61
|
+
children: B(r, i, n)
|
|
61
62
|
};
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
65
|
//#endregion
|
|
65
66
|
//#region src/platform-admin-runtime/module-menu/ModuleMenuEditor.vue?vue&type=script&setup=true&lang.ts
|
|
66
|
-
var
|
|
67
|
+
var V = { class: "module-menu-form" }, ee = { key: 0 }, H = {
|
|
67
68
|
key: 1,
|
|
68
69
|
class: "hint"
|
|
69
|
-
},
|
|
70
|
+
}, U = { class: "hint" }, W = {
|
|
70
71
|
key: 2,
|
|
71
72
|
role: "status"
|
|
72
|
-
},
|
|
73
|
+
}, G = { class: "hint" }, K = {
|
|
73
74
|
key: 1,
|
|
74
75
|
class: "hint"
|
|
75
|
-
},
|
|
76
|
+
}, te = {
|
|
76
77
|
key: 2,
|
|
77
78
|
role: "status"
|
|
78
|
-
},
|
|
79
|
+
}, q = {
|
|
79
80
|
key: 3,
|
|
80
81
|
role: "status"
|
|
81
|
-
},
|
|
82
|
+
}, J = {
|
|
82
83
|
key: 5,
|
|
83
84
|
role: "alert"
|
|
84
|
-
},
|
|
85
|
+
}, Y = /*#__PURE__*/ d(/* @__PURE__ */ k({
|
|
85
86
|
__name: "ModuleMenuEditor",
|
|
86
87
|
props: {
|
|
87
88
|
session: {},
|
|
88
89
|
showSave: { type: Boolean }
|
|
89
90
|
},
|
|
90
91
|
emits: ["saved", "opened"],
|
|
91
|
-
setup(e, { expose:
|
|
92
|
-
let i = e, a = r, o = i.session,
|
|
92
|
+
setup(e, { expose: t, emit: r }) {
|
|
93
|
+
let i = e, a = r, o = i.session, s = o.language, c = n();
|
|
93
94
|
async function u() {
|
|
94
95
|
try {
|
|
95
96
|
await o.startAnother();
|
|
96
97
|
} catch (e) {
|
|
97
|
-
o.reportFailure(e instanceof Error ? e :
|
|
98
|
+
o.reportFailure(e instanceof Error ? e : b(s, "platform.screen.ModuleMenuEditor.cannot-start-a-new-entry-right-now", "暂时无法开始新入口"));
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
|
-
let
|
|
101
|
+
let d = S(() => o.loading.value || o.saving.value || o.resultUnknown.value || !o.authorized.value), p = S(() => d.value || o.updating.value), h = S(() => o.options.value.map((e) => ({
|
|
101
102
|
value: e.id,
|
|
102
|
-
label: `${
|
|
103
|
-
}))),
|
|
103
|
+
label: `${l(e, "title", s) ?? e.alias ?? e.id} · ${R(e, s)}`
|
|
104
|
+
}))), _ = S(() => [{
|
|
104
105
|
value: "root",
|
|
105
|
-
title:
|
|
106
|
-
children:
|
|
106
|
+
title: s.t("platform.screen.moduleMenuWorkspace.top-level", "顶层"),
|
|
107
|
+
children: B(o.tree.value, !1, s)
|
|
107
108
|
}]);
|
|
108
|
-
async function
|
|
109
|
+
async function v() {
|
|
109
110
|
try {
|
|
110
111
|
await (await o.prepare()).execute(), a("saved");
|
|
111
112
|
} catch (e) {
|
|
112
|
-
o.resultUnknown.value || o.reportFailure(e instanceof Error ? e :
|
|
113
|
+
o.resultUnknown.value || o.reportFailure(e instanceof Error ? e : b(s, "platform.screen.ModuleMenuEditor.cannot-add-the-entry-right-now", "暂时无法添加入口"));
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
116
|
async function k() {
|
|
116
117
|
try {
|
|
117
118
|
await o.lookupPending() && a("saved");
|
|
118
119
|
} catch {
|
|
119
|
-
o.reportFailure(
|
|
120
|
+
o.reportFailure(b(s, "platform.screen.ModuleMenuEditor.the-result-cannot-be-verified-right-now-retry-the-lookup", "结果暂时无法核实,请重试查询,勿重复添加。"));
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
123
|
async function A() {
|
|
123
|
-
await o.refreshVisibility(), o.visibleMenu.value &&
|
|
124
|
+
await o.refreshVisibility(), o.visibleMenu.value && c?.openMenu && (c.openMenu(o.visibleMenu.value), a("opened"));
|
|
124
125
|
}
|
|
125
|
-
return
|
|
126
|
-
|
|
127
|
-
E("strong", null, F(
|
|
128
|
-
E("p", null, F(
|
|
129
|
-
E("p",
|
|
130
|
-
|
|
126
|
+
return t({ save: v }), (t, n) => (j(), T("div", V, [
|
|
127
|
+
F(o).saved.value ? (j(), T(x, { key: 1 }, [
|
|
128
|
+
E("strong", null, P(F(s).t("platform.screen.ModuleMenuEditor.added-to-menu", "已添加到菜单")), 1),
|
|
129
|
+
E("p", null, P(F(o).savedPath.value), 1),
|
|
130
|
+
E("p", G, P(F(s).t("platform.screen.ModuleMenuEditor.audience", "适用范围:")) + P(F(o).savedAudience.value), 1),
|
|
131
|
+
F(o).visibleMenu.value && F(c)?.openMenu ? (j(), C(F(y), {
|
|
131
132
|
key: 0,
|
|
132
133
|
type: "primary",
|
|
133
134
|
onClick: A
|
|
134
135
|
}, {
|
|
135
|
-
default:
|
|
136
|
+
default: I(() => [D(P(F(s).t("platform.screen.ModuleMenuEntriesSection.open", "打开")), 1)]),
|
|
136
137
|
_: 1
|
|
137
|
-
})) :
|
|
138
|
-
O(
|
|
139
|
-
disabled:
|
|
138
|
+
})) : F(o).visibilityChecked.value ? (j(), T("p", K, P(F(s).t("platform.screen.ModuleMenuEditor.the-entry-was-saved-but-is-not-visible-in-navigation", "入口已保存,当前登录身份的导航暂不可见。请由适用范围内的使用者核实;若其也看不到,再检查上级菜单状态和业务访问权限。")), 1)) : w("v-if", !0),
|
|
139
|
+
O(F(y), {
|
|
140
|
+
disabled: F(o).saving.value,
|
|
140
141
|
onClick: u
|
|
141
142
|
}, {
|
|
142
|
-
default:
|
|
143
|
+
default: I(() => [D(P(F(s).t("platform.screen.ModuleMenuEditor.add-another-entry", "另加一个入口")), 1)]),
|
|
143
144
|
_: 1
|
|
144
145
|
}, 8, ["disabled"]),
|
|
145
|
-
|
|
146
|
+
F(o).error.value ? (j(), C(F(y), {
|
|
146
147
|
key: 2,
|
|
147
|
-
disabled:
|
|
148
|
-
onClick:
|
|
148
|
+
disabled: F(o).saving.value,
|
|
149
|
+
onClick: F(o).refreshVisibility
|
|
149
150
|
}, {
|
|
150
|
-
default:
|
|
151
|
+
default: I(() => [D(P(F(s).t("platform.screen.ModuleMenuEditor.refresh-navigation", "刷新导航")), 1)]),
|
|
151
152
|
_: 1
|
|
152
153
|
}, 8, ["disabled", "onClick"])) : w("v-if", !0)
|
|
153
|
-
], 64)) : (
|
|
154
|
-
E("label", null, [D(F(
|
|
155
|
-
value:
|
|
156
|
-
disabled:
|
|
157
|
-
"aria-label":
|
|
158
|
-
"onUpdate:value": n[0] ||= (e) =>
|
|
154
|
+
], 64)) : (j(), T(x, { key: 0 }, [
|
|
155
|
+
E("label", null, [D(P(F(s).t("platform.screen.ModuleMenuEditor.menu-name", "菜单名称")), 1), O(F(f), {
|
|
156
|
+
value: F(o).title.value,
|
|
157
|
+
disabled: p.value,
|
|
158
|
+
"aria-label": F(s).t("platform.screen.ModuleMenuEditor.menu-name", "菜单名称"),
|
|
159
|
+
"onUpdate:value": n[0] ||= (e) => F(o).update({ title: String(e ?? "") })
|
|
159
160
|
}, null, 8, [
|
|
160
161
|
"value",
|
|
161
162
|
"disabled",
|
|
162
163
|
"aria-label"
|
|
163
164
|
])]),
|
|
164
|
-
|
|
165
|
-
value:
|
|
166
|
-
options:
|
|
165
|
+
h.value.length > 1 ? (j(), T("label", ee, [D(P(F(s).t("platform.screen.ModuleMenuEditor.menu-scheme", "菜单方案")), 1), O(F(g), {
|
|
166
|
+
value: F(o).schemeId.value,
|
|
167
|
+
options: h.value,
|
|
167
168
|
"allow-clear": !1,
|
|
168
|
-
disabled:
|
|
169
|
-
"onUpdate:value": n[1] ||= (e) =>
|
|
169
|
+
disabled: d.value,
|
|
170
|
+
"onUpdate:value": n[1] ||= (e) => F(o).update({ schemeId: String(e ?? "") })
|
|
170
171
|
}, null, 8, [
|
|
171
172
|
"value",
|
|
172
173
|
"options",
|
|
173
174
|
"disabled"
|
|
174
175
|
])])) : w("v-if", !0),
|
|
175
|
-
E("label", null, [D(F(
|
|
176
|
-
value:
|
|
177
|
-
"tree-data":
|
|
176
|
+
E("label", null, [D(P(F(s).t("platform.screen.ModuleMenuEditor.position", "放置位置")), 1), O(F(m), {
|
|
177
|
+
value: F(o).parentId.value,
|
|
178
|
+
"tree-data": _.value,
|
|
178
179
|
"allow-clear": !1,
|
|
179
|
-
disabled:
|
|
180
|
-
loading:
|
|
181
|
-
"onUpdate:value": n[2] ||= (e) =>
|
|
180
|
+
disabled: p.value,
|
|
181
|
+
loading: F(o).loading.value || F(o).updating.value,
|
|
182
|
+
"onUpdate:value": n[2] ||= (e) => F(o).update({ parentId: String(e ?? "root") })
|
|
182
183
|
}, null, 8, [
|
|
183
184
|
"value",
|
|
184
185
|
"tree-data",
|
|
185
186
|
"disabled",
|
|
186
187
|
"loading"
|
|
187
188
|
])]),
|
|
188
|
-
E("label", null, [D(F(
|
|
189
|
-
value:
|
|
189
|
+
E("label", null, [D(P(F(s).t("platform.screen.ModuleMenuEditor.open-mode", "打开方式")), 1), O(F(g), {
|
|
190
|
+
value: F(o).openMode.value,
|
|
190
191
|
"allow-clear": !1,
|
|
191
|
-
disabled:
|
|
192
|
+
disabled: p.value,
|
|
192
193
|
options: [{
|
|
193
194
|
value: "tab",
|
|
194
|
-
label:
|
|
195
|
+
label: F(s).t("platform.screen.ModuleMenuEditor.open-in-a-workbench-tab", "页签内打开")
|
|
195
196
|
}, {
|
|
196
197
|
value: "window",
|
|
197
|
-
label:
|
|
198
|
+
label: F(s).t("platform.screen.ModuleMenuEditor.open-in-a-new-window", "新窗口打开")
|
|
198
199
|
}],
|
|
199
|
-
"onUpdate:value": n[3] ||= (e) =>
|
|
200
|
+
"onUpdate:value": n[3] ||= (e) => F(o).update({ openMode: e === "window" ? "window" : "tab" })
|
|
200
201
|
}, null, 8, [
|
|
201
202
|
"value",
|
|
202
203
|
"disabled",
|
|
203
204
|
"options"
|
|
204
205
|
])]),
|
|
205
|
-
|
|
206
|
-
E("p",
|
|
207
|
-
|
|
208
|
-
e.showSave && !
|
|
206
|
+
F(o).duplicate.value ? (j(), T("p", H, P(F(s).t("platform.screen.ModuleMenuEditor.duplicate-position", "此位置已有「{title}」,仍可另加入口。", { title: F(l)(F(o).duplicate.value.menu, "title", F(s)) })), 1)) : w("v-if", !0),
|
|
207
|
+
E("p", U, P(F(s).t("platform.screen.ModuleMenuEditor.adds-an-access-entry-only-it-does-not-activate-applications", "只添加访问入口,不开通应用或授予业务权限。")), 1),
|
|
208
|
+
F(o).updating.value ? (j(), T("p", W, P(F(s).t("platform.screen.ModuleMenuEditor.loading-the-menu-scheme-wait-for-the-candidate-to-be", "正在读取菜单方案,请等待候选就绪。")), 1)) : w("v-if", !0),
|
|
209
|
+
e.showSave && !F(o).resultUnknown.value ? (j(), C(F(y), {
|
|
209
210
|
key: 3,
|
|
210
211
|
type: "primary",
|
|
211
|
-
disabled: !
|
|
212
|
-
loading:
|
|
213
|
-
onClick:
|
|
212
|
+
disabled: !F(o).canSave.value,
|
|
213
|
+
loading: F(o).saving.value,
|
|
214
|
+
onClick: v
|
|
214
215
|
}, {
|
|
215
|
-
default:
|
|
216
|
+
default: I(() => [D(P(F(s).t("platform.screen.ModuleMenuEditor.add-entry", "添加入口")), 1)]),
|
|
216
217
|
_: 1
|
|
217
218
|
}, 8, ["disabled", "loading"])) : w("v-if", !0),
|
|
218
|
-
|
|
219
|
+
F(o).resultUnknown.value ? (j(), C(F(y), {
|
|
219
220
|
key: 4,
|
|
220
221
|
onClick: k
|
|
221
222
|
}, {
|
|
222
|
-
default:
|
|
223
|
+
default: I(() => [D(P(F(s).t("platform.screen.ModuleMenuEditor.check-save-result", "查询保存结果")), 1)]),
|
|
223
224
|
_: 1
|
|
224
225
|
})) : w("v-if", !0)
|
|
225
226
|
], 64)),
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
F(o).entryIssue.value ? (j(), T("p", te, P(F(o).entryIssue.value), 1)) : w("v-if", !0),
|
|
228
|
+
F(o).ready.value && !F(o).authorized.value ? (j(), T("p", q, P(F(s).t("platform.screen.ModuleMenuEditor.you-do-not-have-permission-to-add-menu-entries", "当前没有添加菜单入口权限。")), 1)) : w("v-if", !0),
|
|
229
|
+
F(o).error.value && F(o).ready.value && !F(o).saved.value && !F(o).resultUnknown.value ? (j(), C(F(y), {
|
|
229
230
|
key: 4,
|
|
230
|
-
disabled:
|
|
231
|
-
onClick:
|
|
231
|
+
disabled: F(o).saving.value,
|
|
232
|
+
onClick: F(o).load
|
|
232
233
|
}, {
|
|
233
|
-
default:
|
|
234
|
+
default: I(() => [D(P(F(s).t("platform.screen.ModuleMenuEditor.reload-candidate", "重新读取候选")), 1)]),
|
|
234
235
|
_: 1
|
|
235
236
|
}, 8, ["disabled", "onClick"])) : w("v-if", !0),
|
|
236
|
-
|
|
237
|
-
|
|
237
|
+
F(o).error.value ? (j(), T("p", J, P(F(o).error.value), 1)) : w("v-if", !0),
|
|
238
|
+
F(o).error.value && !F(o).ready.value && !F(o).resultUnknown.value ? (j(), C(F(y), {
|
|
238
239
|
key: 6,
|
|
239
|
-
disabled:
|
|
240
|
-
onClick:
|
|
240
|
+
disabled: F(o).saving.value,
|
|
241
|
+
onClick: F(o).load
|
|
241
242
|
}, {
|
|
242
|
-
default:
|
|
243
|
+
default: I(() => [D(P(F(s).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
|
|
243
244
|
_: 1
|
|
244
245
|
}, 8, ["disabled", "onClick"])) : w("v-if", !0)
|
|
245
246
|
]));
|
|
@@ -247,54 +248,54 @@ var H = { class: "module-menu-form" }, U = { key: 0 }, W = {
|
|
|
247
248
|
}), [["__scopeId", "data-v-1081a9ba"]]);
|
|
248
249
|
//#endregion
|
|
249
250
|
//#region src/platform-admin-runtime/module-menu/moduleMenuReceiptStore.ts
|
|
250
|
-
function
|
|
251
|
-
let
|
|
252
|
-
function
|
|
253
|
-
if (!n()) throw new
|
|
254
|
-
return
|
|
251
|
+
function ne(e, t, n, r = s, i, a = _) {
|
|
252
|
+
let o = `muyun.menu-pending.${JSON.stringify([e, t])}`, c = { persistence: "backend" }, l;
|
|
253
|
+
function d() {
|
|
254
|
+
if (!n()) throw new u(b(a, "platform.screen.moduleMenuReceiptStore.the-menu-editing-identity-has-changed", "菜单编辑身份已变化"));
|
|
255
|
+
return i ?? window.sessionStorage;
|
|
255
256
|
}
|
|
256
|
-
function
|
|
257
|
-
if (!/^[a-zA-Z0-9-]{16,80}$/.test(e)) throw new
|
|
257
|
+
function f(e) {
|
|
258
|
+
if (!/^[a-zA-Z0-9-]{16,80}$/.test(e)) throw new u(b(a, "platform.screen.moduleMenuReceiptStore.the-original-entry-lookup-reference-is-invalid", "原入口查询标识无效"));
|
|
258
259
|
return `menu.pending.r${e.toLowerCase().replaceAll("-", "")}`;
|
|
259
260
|
}
|
|
260
261
|
return {
|
|
261
262
|
async restore() {
|
|
262
|
-
if (
|
|
263
|
-
let e = await
|
|
264
|
-
if (!e) throw new
|
|
263
|
+
if (l = d().getItem(o) ?? void 0, !l) return;
|
|
264
|
+
let e = await r.restore(f(l), void 0, c);
|
|
265
|
+
if (!e) throw new u(b(a, "platform.screen.moduleMenuReceiptStore.the-original-entry-lookup-reference-cannot-be-read-right-now", "原入口查询引用暂不可读取,请核实后重试"));
|
|
265
266
|
return e;
|
|
266
267
|
},
|
|
267
268
|
async save(e) {
|
|
268
|
-
if (e.kind !== "record-save") throw new
|
|
269
|
-
let t =
|
|
270
|
-
|
|
269
|
+
if (e.kind !== "record-save") throw new u(b(a, "platform.screen.moduleMenuReceiptStore.the-original-entry-lookup-reference-is-invalid", "原入口查询标识无效"));
|
|
270
|
+
let t = d();
|
|
271
|
+
l = e.requestId, await r.set(f(l), e, c), d(), t.setItem(o, l);
|
|
271
272
|
},
|
|
272
273
|
async clear() {
|
|
273
|
-
let e =
|
|
274
|
-
t && (await
|
|
274
|
+
let e = d(), t = l;
|
|
275
|
+
t && (await r.remove(f(t), c), d(), e.getItem(o) === t && e.removeItem(o), l === t && (l = void 0));
|
|
275
276
|
}
|
|
276
277
|
};
|
|
277
278
|
}
|
|
278
279
|
//#endregion
|
|
279
280
|
//#region src/platform-admin-runtime/module-menu/moduleMenuSession.ts
|
|
280
|
-
function
|
|
281
|
-
let
|
|
281
|
+
function X(e, n, s, d, f = e.visible, m = _) {
|
|
282
|
+
let h = M(0), g = M(!1), v = M(!1), y = M(!1), x = N(), C = S(() => x.value ? x.value instanceof u || x.value instanceof p ? o(x.value, m) : i(a(x.value), m) : "");
|
|
282
283
|
function w(e) {
|
|
283
|
-
x.value = e instanceof Error ? e : new
|
|
284
|
+
x.value = e instanceof Error ? e : new u(e);
|
|
284
285
|
}
|
|
285
286
|
function T(e) {
|
|
286
|
-
w(e instanceof Error ? e :
|
|
287
|
+
w(e instanceof Error ? e : b(m, "platform.screen.moduleMenuSession.the-operation-is-temporarily-unavailable-retry", "操作暂不可用,请重试。"));
|
|
287
288
|
}
|
|
288
|
-
let E =
|
|
289
|
+
let E = N(), D = S(() => E.value ? ae(E.value, m) : ""), O = M(""), k = M(""), A = M("root"), j = M("tab"), P = N([]), F = N([]), I = N(), L = M(""), B = N(), V = M(""), ee = S(() => B.value ? R(B.value, m) : V.value), H = N(), U = M(!1), W = M(!1), G = M(!1), K = M(!1), te = !1, q = 0, J = 0, Y, ne = !1, X = () => !te && s.valid(), Z = S(() => P.value.filter((e) => e.enabled !== !1 && e.id)), ce = S(() => ie(F.value, m)), le = S(() => X() && G.value && W.value && !g.value && !v.value && !y.value && !Y && !I.value && !D.value && !!O.value.trim()), ue = S(() => z(F.value, "", m).find(({ menu: e }) => e.moduleAlias === n && e.parentId === A.value));
|
|
289
290
|
function Q() {
|
|
290
|
-
if (!X()) throw new
|
|
291
|
+
if (!X()) throw new u(b(m, "platform.screen.moduleMenuSession.the-menu-editing-scope-has-changed-reopen-the-editor", "菜单编辑范围已变化,请重新打开"));
|
|
291
292
|
}
|
|
292
293
|
function $(e = !1) {
|
|
293
|
-
if (Q(), !G.value || !W.value || g.value || y.value || Y || I.value || !e &&
|
|
294
|
+
if (Q(), !G.value || !W.value || g.value || y.value || Y || I.value || !e && v.value) throw new u(b(m, "platform.screen.moduleMenuSession.wait-for-the-menu-candidate-to-be-ready-or-check", "请先等待菜单候选就绪,或查询未确定的保存结果"));
|
|
294
295
|
}
|
|
295
296
|
async function de() {
|
|
296
297
|
if (Q(), I.value || Y && G.value) return;
|
|
297
|
-
J++,
|
|
298
|
+
J++, v.value = !1;
|
|
298
299
|
let r = ++q;
|
|
299
300
|
g.value = !0, G.value = !1, x.value = void 0;
|
|
300
301
|
try {
|
|
@@ -302,28 +303,28 @@ function re(e, t, u, d, f = e.visible, p = r) {
|
|
|
302
303
|
let e = await d.restore();
|
|
303
304
|
if (!X() || r !== q) return;
|
|
304
305
|
if (e) {
|
|
305
|
-
let
|
|
306
|
-
if (
|
|
306
|
+
let n = t(e);
|
|
307
|
+
if (n.kind !== "record-save" || n.moduleAlias !== "platform.menu" || !n.pageContext?.scheme) throw new u(b(m, "platform.screen.moduleMenuSession.the-original-entry-lookup-scope-is-invalid-verify-the-save", "原入口查询范围无效,请核实保存结果后继续"));
|
|
307
308
|
Y = {
|
|
308
|
-
requestId:
|
|
309
|
-
schemeId:
|
|
309
|
+
requestId: n.requestId,
|
|
310
|
+
schemeId: n.pageContext.scheme
|
|
310
311
|
}, K.value = !0;
|
|
311
312
|
}
|
|
312
313
|
ne = !0;
|
|
313
314
|
}
|
|
314
315
|
let [i, a, o, s] = await Promise.all([
|
|
315
316
|
e.schemes(),
|
|
316
|
-
e.context(
|
|
317
|
+
e.context(n),
|
|
317
318
|
e.context("platform.menu"),
|
|
318
319
|
e.visible()
|
|
319
320
|
]);
|
|
320
321
|
if (!X() || r !== q) return;
|
|
321
|
-
W.value = o.actions.some((e) => e.actionCode === "create" && e.authorized), E.value = a,
|
|
322
|
-
let c = s[0]?.record.schemeId,
|
|
323
|
-
if (!
|
|
324
|
-
let f = await e.tree(
|
|
322
|
+
W.value = o.actions.some((e) => e.actionCode === "create" && e.authorized), E.value = a, P.value = i, O.value ||= a.title ?? n, j.value = a.entryType === "link" ? "window" : "tab";
|
|
323
|
+
let c = s[0]?.record.schemeId, l = Z.value.find((e) => e.id === (Y?.schemeId ?? k.value)) ?? Z.value.find((e) => e.id === c) ?? Z.value[0];
|
|
324
|
+
if (!l?.id) throw new u(b(m, "platform.screen.moduleMenuSession.no-menu-schemes-are-available-configure-an-applicable-scheme-first", "暂无可用菜单方案,请先配置适用的菜单方案"));
|
|
325
|
+
let f = await e.tree(l.id);
|
|
325
326
|
if (!X() || r !== q) return;
|
|
326
|
-
k.value =
|
|
327
|
+
k.value = l.id, F.value = f, A.value = "root", G.value = !0, h.value++;
|
|
327
328
|
} catch (e) {
|
|
328
329
|
X() && r === q && T(e);
|
|
329
330
|
} finally {
|
|
@@ -332,11 +333,11 @@ function re(e, t, u, d, f = e.visible, p = r) {
|
|
|
332
333
|
}
|
|
333
334
|
function fe(t) {
|
|
334
335
|
let n = t.schemeId ?? k.value;
|
|
335
|
-
if (!Z.value.some((e) => e.id === n)) throw new
|
|
336
|
+
if (!Z.value.some((e) => e.id === n)) throw new u(b(m, "platform.screen.moduleMenuSession.select-an-available-menu-scheme", "请选择当前可用的菜单方案"));
|
|
336
337
|
let r = t.title ?? O.value;
|
|
337
|
-
if ([...r].length > 120) throw new
|
|
338
|
+
if ([...r].length > 120) throw new u(b(m, "platform.screen.moduleMenuSession.the-menu-name-must-not-exceed-120-characters", "菜单名称不能超过120个字符"));
|
|
338
339
|
let i = t.parentId ?? (n === k.value ? A.value : "root"), a = t.openMode ?? j.value, o = (e) => {
|
|
339
|
-
if (i !== "root" && !
|
|
340
|
+
if (i !== "root" && !ie(e).some((e) => e.menu.id === i)) throw new u(b(m, "platform.screen.moduleMenuSession.select-an-enabled-directory-in-the-current-scheme", "请选择当前方案中的启用目录"));
|
|
340
341
|
return {
|
|
341
342
|
schemeId: n,
|
|
342
343
|
nodes: e,
|
|
@@ -348,30 +349,30 @@ function re(e, t, u, d, f = e.visible, p = r) {
|
|
|
348
349
|
return n === k.value ? o(F.value) : e.tree(n).then(o);
|
|
349
350
|
}
|
|
350
351
|
function pe(e) {
|
|
351
|
-
k.value = e.schemeId, F.value = e.nodes, A.value = e.parentId, O.value = e.title, j.value = e.openMode,
|
|
352
|
+
k.value = e.schemeId, F.value = e.nodes, A.value = e.parentId, O.value = e.title, j.value = e.openMode, h.value++;
|
|
352
353
|
}
|
|
353
354
|
async function me(e) {
|
|
354
355
|
$();
|
|
355
|
-
let t =
|
|
356
|
+
let t = h.value, n = await fe(e);
|
|
356
357
|
return () => {
|
|
357
|
-
if ($(), t !==
|
|
358
|
+
if ($(), t !== h.value) throw new u(b(m, "platform.screen.moduleMenuSession.the-menu-candidate-has-changed-reload-it", "菜单候选已变化,请重新读取"));
|
|
358
359
|
pe(n);
|
|
359
360
|
};
|
|
360
361
|
}
|
|
361
362
|
async function he(e) {
|
|
362
363
|
let t;
|
|
363
364
|
try {
|
|
364
|
-
$(!0), t = ++J,
|
|
365
|
-
let n = ++
|
|
365
|
+
$(!0), t = ++J, v.value = !0;
|
|
366
|
+
let n = ++h.value;
|
|
366
367
|
x.value = void 0;
|
|
367
368
|
let r = fe(e), i = "then" in r ? await r : r;
|
|
368
369
|
if (!X() || t !== J) return;
|
|
369
|
-
if ($(!0), n !==
|
|
370
|
+
if ($(!0), n !== h.value) throw new u(b(m, "platform.screen.moduleMenuSession.the-menu-candidate-has-changed-reload-it", "菜单候选已变化,请重新读取"));
|
|
370
371
|
pe(i), x.value = void 0;
|
|
371
372
|
} catch (e) {
|
|
372
373
|
X() && (t === void 0 || t === J) && T(e);
|
|
373
374
|
} finally {
|
|
374
|
-
t === J && (
|
|
375
|
+
t === J && (v.value = !1);
|
|
375
376
|
}
|
|
376
377
|
}
|
|
377
378
|
async function ge() {
|
|
@@ -382,9 +383,9 @@ function re(e, t, u, d, f = e.visible, p = r) {
|
|
|
382
383
|
try {
|
|
383
384
|
let t = await f();
|
|
384
385
|
if (!X() || I.value?.id !== e) return;
|
|
385
|
-
H.value =
|
|
386
|
+
H.value = z(t).find(({ menu: t }) => t.id === e)?.menu, U.value = !0, x.value = void 0;
|
|
386
387
|
} catch {
|
|
387
|
-
X() && w(
|
|
388
|
+
X() && w(b(m, "platform.screen.moduleMenuSession.the-menu-was-added-but-navigation-could-not-be-refreshed", "菜单已添加,导航刷新失败。请查询或刷新导航,无需重复添加。"));
|
|
388
389
|
}
|
|
389
390
|
}
|
|
390
391
|
}
|
|
@@ -396,34 +397,34 @@ function re(e, t, u, d, f = e.visible, p = r) {
|
|
|
396
397
|
} : await e.view(r.schemeId, t));
|
|
397
398
|
Q(), I.value = i;
|
|
398
399
|
let a = r.audienceScheme ?? Z.value.find((e) => e.id === i.schemeId);
|
|
399
|
-
|
|
400
|
+
B.value = a ? { ...a } : void 0, V.value = r.audience ?? "", L.value = r.path ?? [
|
|
400
401
|
(() => {
|
|
401
402
|
let e = Z.value.find((e) => e.id === i.schemeId);
|
|
402
|
-
return e &&
|
|
403
|
+
return e && l(e, "title", m);
|
|
403
404
|
})(),
|
|
404
|
-
|
|
405
|
+
z(F.value, "", m).find(({ menu: e }) => e.id === i.parentId)?.path,
|
|
405
406
|
i.title
|
|
406
|
-
].filter(Boolean).join(" / "), Y = void 0, K.value = !1,
|
|
407
|
+
].filter(Boolean).join(" / "), Y = void 0, K.value = !1, h.value++, await d.clear().catch(() => {}), X() && await ge();
|
|
407
408
|
}
|
|
408
409
|
return {
|
|
409
|
-
title:
|
|
410
|
-
lines: X() ? [L.value, U.value ? H.value ?
|
|
410
|
+
title: m.t("platform.screen.moduleMenuSession.menu-entry-saved", "菜单入口已保存"),
|
|
411
|
+
lines: X() ? [L.value, U.value ? H.value ? m.t("platform.screen.moduleMenuSession.visible-to-the-current-user-the-business-page-can-be", "当前用户可见,可打开业务页面。") : m.t("platform.screen.moduleMenuSession.the-entry-was-saved-but-is-not-visible-to-the", "入口已保存;当前登录身份暂不可见,请由适用范围内的使用者核实导航。") : m.t("platform.screen.moduleMenuSession.navigation-visibility-has-not-been-verified-do-not-add-the", "导航可见性尚未核实;不要重复添加。")] : [m.t("platform.screen.moduleMenuSession.the-save-completed-verify-the-entry-in-its-original-scope", "保存已完成,请在原范围核实入口。")]
|
|
411
412
|
};
|
|
412
413
|
}
|
|
413
|
-
async function ve(
|
|
414
|
-
let [i, a, o,
|
|
415
|
-
e.context(
|
|
414
|
+
async function ve(t, r) {
|
|
415
|
+
let [i, a, o, s] = await Promise.all([
|
|
416
|
+
e.context(n),
|
|
416
417
|
e.context("platform.menu"),
|
|
417
418
|
e.schemes(),
|
|
418
|
-
e.tree(
|
|
419
|
+
e.tree(t.schemeId)
|
|
419
420
|
]);
|
|
420
|
-
if (Q(), !a.actions.some((e) => e.actionCode === "create" && e.authorized)) throw new
|
|
421
|
-
let
|
|
422
|
-
if (
|
|
423
|
-
let u = o.find((e) => e.id ===
|
|
424
|
-
if (!u) throw new
|
|
425
|
-
if (
|
|
426
|
-
let d =
|
|
421
|
+
if (Q(), !a.actions.some((e) => e.actionCode === "create" && e.authorized)) throw new p(b(m, "platform.screen.moduleMenuSession.you-do-not-have-permission-to-add-menu-entries", "当前没有添加菜单入口权限"));
|
|
422
|
+
let c = oe(i, m);
|
|
423
|
+
if (c) throw new p(c);
|
|
424
|
+
let u = o.find((e) => e.id === t.schemeId && e.enabled !== !1);
|
|
425
|
+
if (!u) throw new p(b(m, "platform.screen.moduleMenuSession.the-menu-scheme-is-no-longer-available", "菜单方案已不可用"));
|
|
426
|
+
if (t.parentId !== "root" && !ie(s).some((e) => e.menu.id === t.parentId)) throw new p(b(m, "platform.screen.moduleMenuSession.the-target-directory-is-no-longer-available-review-the-entry", "放置目录已不可用,请重新审阅"));
|
|
427
|
+
let d = t.parentId === "root" ? [] : re(s, t.parentId), f = JSON.stringify([
|
|
427
428
|
u.id,
|
|
428
429
|
u.alias ?? null,
|
|
429
430
|
u.title ?? null,
|
|
@@ -432,72 +433,72 @@ function re(e, t, u, d, f = e.visible, p = r) {
|
|
|
432
433
|
u.organizationId ?? null,
|
|
433
434
|
d.map((e) => [e.id, e.title])
|
|
434
435
|
]);
|
|
435
|
-
if (r && f !== r) throw new
|
|
436
|
+
if (r && f !== r) throw new p(b(m, "platform.screen.moduleMenuSession.the-menu-scheme-audience-or-directory-has-changed-reload-and", "菜单方案适用范围或目录已变化,请重新读取候选并审阅"));
|
|
436
437
|
return {
|
|
437
438
|
scheme: u,
|
|
438
439
|
signature: f,
|
|
439
440
|
path: [
|
|
440
|
-
|
|
441
|
-
...d.map((e) =>
|
|
442
|
-
|
|
441
|
+
l(u, "title", m) ?? u.alias,
|
|
442
|
+
...d.map((e) => l(e, "title", m)),
|
|
443
|
+
t.title
|
|
443
444
|
].filter(Boolean).join(" / ")
|
|
444
445
|
};
|
|
445
446
|
}
|
|
446
447
|
async function ye() {
|
|
447
|
-
if ($(), !le.value) throw new
|
|
448
|
-
let
|
|
449
|
-
moduleAlias:
|
|
448
|
+
if ($(), !le.value) throw new u(b(m, "platform.screen.moduleMenuSession.provide-a-menu-name-and-an-available-business-page", "请补齐菜单名称及可用业务页面"));
|
|
449
|
+
let t = h.value, i = {
|
|
450
|
+
moduleAlias: n,
|
|
450
451
|
schemeId: k.value,
|
|
451
452
|
parentId: A.value,
|
|
452
453
|
title: O.value.trim(),
|
|
453
454
|
openMode: j.value,
|
|
454
455
|
enabled: !0
|
|
455
|
-
},
|
|
456
|
-
if ($(),
|
|
457
|
-
let o =
|
|
456
|
+
}, a = await ve(i);
|
|
457
|
+
if ($(), h.value !== t) throw new u(b(m, "platform.screen.moduleMenuSession.the-menu-candidate-has-changed-review-it-again", "菜单候选已变化,请重新审阅"));
|
|
458
|
+
let o = a.path, f = c(), g = () => X() && s.active() && G.value && W.value && !v.value && !Y && !I.value && h.value === t, _ = {
|
|
458
459
|
kind: "record-save",
|
|
459
460
|
moduleAlias: "platform.menu",
|
|
460
461
|
requestId: f,
|
|
461
|
-
pageContext: { scheme:
|
|
462
|
+
pageContext: { scheme: i.schemeId }
|
|
462
463
|
};
|
|
463
464
|
return {
|
|
464
|
-
receiptReference:
|
|
465
|
+
receiptReference: _,
|
|
465
466
|
presentation: {
|
|
466
|
-
title:
|
|
467
|
+
title: m.t("platform.screen.moduleMenuSession.add-a-business-entry", "添加业务入口"),
|
|
467
468
|
lines: [
|
|
468
469
|
o,
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
...ue.value ? [
|
|
470
|
+
m.t("platform.screen.moduleMenuSession.audience-value", "适用范围:{value1}", { value1: R(a.scheme, m) }),
|
|
471
|
+
m.t("platform.screen.moduleMenuSession.open-mode-value", "打开方式:{value1}", { value1: i.openMode === "window" ? m.t("platform.screen.moduleMenuSession.new-window", "新窗口") : m.t("platform.screen.moduleMenuSession.workbench-tab", "页签内") }),
|
|
472
|
+
m.t("platform.screen.moduleMenuSession.adds-an-entry-only-it-does-not-activate-applications-or", "只添加入口,不开通应用或授予业务权限。"),
|
|
473
|
+
...ue.value ? [m.t("platform.screen.moduleMenuSession.this-position-already-contains-value-another-entry-will-be-added", "此位置已有「{value1}」,本次将另加一个入口。", { value1: l(ue.value.menu, "title", m) })] : []
|
|
473
474
|
],
|
|
474
475
|
details: {
|
|
475
|
-
title:
|
|
476
|
-
lines: [
|
|
476
|
+
title: m.t("platform.screen.moduleMenuSession.view-target-module", "查看目标模块"),
|
|
477
|
+
lines: [n]
|
|
477
478
|
}
|
|
478
479
|
},
|
|
479
|
-
confirmLabel:
|
|
480
|
+
confirmLabel: m.t("platform.screen.moduleMenuSession.confirm-entry-creation", "确认添加入口"),
|
|
480
481
|
expiresAt: Date.now() + 3e5,
|
|
481
482
|
isCurrent: g,
|
|
482
483
|
async execute() {
|
|
483
|
-
if (!g() || y.value) throw new
|
|
484
|
+
if (!g() || y.value) throw new p(b(m, "platform.screen.moduleMenuSession.the-menu-candidate-or-editing-scope-has-changed-review-it", "菜单候选或编辑范围已变化,请重新审阅"));
|
|
484
485
|
y.value = !0, x.value = void 0;
|
|
485
|
-
let
|
|
486
|
+
let n = !1;
|
|
486
487
|
try {
|
|
487
|
-
if (await ve(
|
|
488
|
+
if (await ve(i, a.signature), !g() || (Y = {
|
|
488
489
|
requestId: f,
|
|
489
|
-
schemeId:
|
|
490
|
-
record:
|
|
490
|
+
schemeId: i.schemeId,
|
|
491
|
+
record: i,
|
|
491
492
|
path: o,
|
|
492
|
-
audience:
|
|
493
|
-
audienceScheme: { ...
|
|
494
|
-
}, await d.save(
|
|
495
|
-
|
|
496
|
-
let
|
|
497
|
-
return await _e(
|
|
493
|
+
audience: R(a.scheme, m),
|
|
494
|
+
audienceScheme: { ...a.scheme }
|
|
495
|
+
}, await d.save(_), !X() || !s.active() || h.value !== t)) throw new p(b(m, "platform.screen.moduleMenuSession.the-menu-candidate-or-editing-scope-has-changed-review-it", "菜单候选或编辑范围已变化,请重新审阅"));
|
|
496
|
+
n = !0;
|
|
497
|
+
let r = await e.insert(i.schemeId, i, f);
|
|
498
|
+
return await _e(r.record.id, r.record);
|
|
498
499
|
} catch (e) {
|
|
499
500
|
if (X()) {
|
|
500
|
-
if (!
|
|
501
|
+
if (!n || e instanceof p || e instanceof r && [
|
|
501
502
|
400,
|
|
502
503
|
401,
|
|
503
504
|
403,
|
|
@@ -508,11 +509,11 @@ function re(e, t, u, d, f = e.visible, p = r) {
|
|
|
508
509
|
try {
|
|
509
510
|
Y && await d.clear(), Y = void 0;
|
|
510
511
|
} catch {
|
|
511
|
-
Y && (Y.rejected = !0), K.value = !0, w(
|
|
512
|
+
Y && (Y.rejected = !0), K.value = !0, w(b(m, "platform.screen.moduleMenuSession.the-operation-was-not-submitted-but-the-original-request-reference", "操作未提交,但原请求标识尚未清除,请先查询结果。"));
|
|
512
513
|
}
|
|
513
|
-
throw new
|
|
514
|
+
throw new p(se(e, m));
|
|
514
515
|
}
|
|
515
|
-
Y && (K.value = !0,
|
|
516
|
+
Y && (K.value = !0, h.value++), Y ? w(b(m, "platform.screen.moduleMenuSession.the-save-result-is-unresolved-check-the-original-request-result", "保存结果尚未确定,请查询原请求结果,勿重复添加。")) : T(e);
|
|
516
517
|
}
|
|
517
518
|
throw e;
|
|
518
519
|
} finally {
|
|
@@ -525,19 +526,19 @@ function re(e, t, u, d, f = e.visible, p = r) {
|
|
|
525
526
|
async function be() {
|
|
526
527
|
if (Q(), !Y || y.value) return;
|
|
527
528
|
let t = Y;
|
|
528
|
-
if (t.rejected) return await d.clear(), Q(), Y === t ? (Y = void 0, K.value = !1, x.value = void 0,
|
|
529
|
-
title:
|
|
530
|
-
lines: [
|
|
529
|
+
if (t.rejected) return await d.clear(), Q(), Y === t ? (Y = void 0, K.value = !1, x.value = void 0, h.value++, {
|
|
530
|
+
title: m.t("platform.operation.not-submitted", "操作未提交"),
|
|
531
|
+
lines: [m.t("platform.screen.moduleMenuSession.the-recovery-reference-was-cleared-you-can-review-and-add", "恢复标识已清除,可以重新审阅并添加入口。")]
|
|
531
532
|
}) : void 0;
|
|
532
533
|
let n = await e.receipt(t.schemeId, t.requestId);
|
|
533
534
|
if (Q(), Y === t && n.committed && n.recordId) return _e(n.recordId);
|
|
534
535
|
}
|
|
535
536
|
return {
|
|
536
|
-
moduleAlias:
|
|
537
|
-
language:
|
|
538
|
-
revision:
|
|
537
|
+
moduleAlias: n,
|
|
538
|
+
language: m,
|
|
539
|
+
revision: h,
|
|
539
540
|
loading: g,
|
|
540
|
-
updating:
|
|
541
|
+
updating: v,
|
|
541
542
|
saving: y,
|
|
542
543
|
error: C,
|
|
543
544
|
reportFailure: w,
|
|
@@ -547,10 +548,10 @@ function re(e, t, u, d, f = e.visible, p = r) {
|
|
|
547
548
|
schemeId: k,
|
|
548
549
|
parentId: A,
|
|
549
550
|
openMode: j,
|
|
550
|
-
schemes:
|
|
551
|
+
schemes: P,
|
|
551
552
|
tree: F,
|
|
552
553
|
options: Z,
|
|
553
|
-
directories:
|
|
554
|
+
directories: ce,
|
|
554
555
|
saved: I,
|
|
555
556
|
savedPath: L,
|
|
556
557
|
savedAudience: ee,
|
|
@@ -568,59 +569,47 @@ function re(e, t, u, d, f = e.visible, p = r) {
|
|
|
568
569
|
lookupPending: be,
|
|
569
570
|
refreshVisibility: ge,
|
|
570
571
|
async startAnother() {
|
|
571
|
-
if (Q(), !I.value || y.value || Y) throw new
|
|
572
|
-
await d.clear(), Q(), I.value = void 0, L.value = "",
|
|
572
|
+
if (Q(), !I.value || y.value || Y) throw new u(b(m, "platform.screen.moduleMenuSession.verify-the-current-entry-save-result-first", "请先核实当前入口保存结果"));
|
|
573
|
+
await d.clear(), Q(), I.value = void 0, L.value = "", B.value = void 0, V.value = "", H.value = void 0, U.value = !1, G.value = !1, h.value++, await de();
|
|
573
574
|
},
|
|
574
575
|
dispose() {
|
|
575
|
-
te = !0, q++, J++,
|
|
576
|
+
te = !0, q++, J++, v.value = !1, h.value++;
|
|
576
577
|
},
|
|
577
578
|
invalidate() {
|
|
578
|
-
J++,
|
|
579
|
+
J++, v.value = !1, h.value++;
|
|
579
580
|
}
|
|
580
581
|
};
|
|
581
582
|
}
|
|
582
|
-
function
|
|
583
|
+
function re(e, t, n = []) {
|
|
583
584
|
for (let r of e) {
|
|
584
585
|
let e = [...n, r.record];
|
|
585
586
|
if (r.record.id === t) return e;
|
|
586
|
-
let i =
|
|
587
|
+
let i = re(r.children, t, e);
|
|
587
588
|
if (i.length) return i;
|
|
588
589
|
}
|
|
589
590
|
return [];
|
|
590
591
|
}
|
|
591
|
-
function
|
|
592
|
+
function ie(e, t = _) {
|
|
592
593
|
let n = (e) => e.filter(({ record: e }) => e.enabled !== !1).map((e) => ({
|
|
593
594
|
...e,
|
|
594
595
|
children: n(e.children)
|
|
595
596
|
}));
|
|
596
|
-
return
|
|
597
|
+
return z(n(e), "", t).filter(({ menu: e }) => !e.moduleAlias);
|
|
597
598
|
}
|
|
598
|
-
function
|
|
599
|
-
return
|
|
599
|
+
function ae(e, t = _) {
|
|
600
|
+
return oe(e, t)?.message ?? "";
|
|
600
601
|
}
|
|
601
|
-
function
|
|
602
|
-
return e.entryType === "route" ? e.entryRoute ? void 0 :
|
|
602
|
+
function oe(e, t) {
|
|
603
|
+
return e.entryType === "route" ? e.entryRoute ? void 0 : b(t, "platform.screen.moduleMenuSession.this-module-has-no-page-address-return-to-its-configuration", "该模块尚未配置页面地址,请返回模块补充。") : e.entryType === "link" ? e.entryExternalUrl ? void 0 : b(t, "platform.screen.moduleMenuSession.this-module-has-no-link-address-return-to-its-configuration", "该模块尚未配置链接地址,请返回模块补充。") : e.uiDescriptor?.page ? void 0 : b(t, "platform.screen.moduleMenuSession.this-module-has-no-available-business-page-publish-its-page", "该模块尚无可用业务页面,请先发布页面配置。");
|
|
603
604
|
}
|
|
604
|
-
function
|
|
605
|
-
return e instanceof
|
|
606
|
-
}
|
|
607
|
-
//#endregion
|
|
608
|
-
//#region src/views/configurationEditorNavigation.ts
|
|
609
|
-
async function le(e, t, n = r) {
|
|
610
|
-
if (t?.aborted || (e() || await new Promise((r, i) => {
|
|
611
|
-
let a = (e) => {
|
|
612
|
-
s(), clearTimeout(c), t?.removeEventListener("abort", o), e ? i(e) : r();
|
|
613
|
-
}, o = () => a(new DOMException("Navigation cancelled", "AbortError")), s = L(e, (e) => {
|
|
614
|
-
e && a();
|
|
615
|
-
}, { flush: "post" }), c = setTimeout(() => a(new l(v(n, "platform.screen.configurationEditorNavigation.the-configuration-page-is-not-ready-reopen-it-before-continuing", "配置页面尚未就绪,请重新打开后继续。"))), 15e3);
|
|
616
|
-
t?.addEventListener("abort", o, { once: !0 });
|
|
617
|
-
}), await j(), t?.aborted)) throw new DOMException("Navigation cancelled", "AbortError");
|
|
605
|
+
function se(e, t = _) {
|
|
606
|
+
return e instanceof u || e instanceof p ? e.textMessage ?? e.message : e instanceof Error ? e.message : b(t, "platform.screen.moduleMenuSession.the-operation-is-temporarily-unavailable-retry", "操作暂不可用,请重试。");
|
|
618
607
|
}
|
|
619
608
|
//#endregion
|
|
620
609
|
//#region src/platform-admin-runtime/module-menu/moduleMenuWorkspace.ts
|
|
621
|
-
var
|
|
622
|
-
function
|
|
623
|
-
return A(
|
|
610
|
+
var Z = Symbol("module-menu-workspace");
|
|
611
|
+
function ce() {
|
|
612
|
+
return A(Z, void 0);
|
|
624
613
|
}
|
|
625
614
|
//#endregion
|
|
626
|
-
export {
|
|
615
|
+
export { L as a, Y as i, X as n, z as o, ne as r, ce as t };
|