@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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Et as e, St as t, m as n } from "./platform-workbench-
|
|
2
|
-
import {
|
|
3
|
-
import "./configurationEditorNavigation-
|
|
1
|
+
import { Et as e, St as t, m as n } from "./platform-workbench-CBLyxlvV.js";
|
|
2
|
+
import { Fa as r, Hr as i, Ma as a, Ua as o, _r as s, ai as c, ba as l, co as u, ha as d, ka as f, pr as p, rr as m, to as h, ur as g, xa as _, xi as v, ya as y, yr as b } from "./platform-components-CT5wnPa0.js";
|
|
3
|
+
import "./configurationEditorNavigation-DteTknF3.js";
|
|
4
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";
|
|
5
5
|
//#region src/platform-admin-runtime/module-menu/moduleMenuClient.ts
|
|
6
6
|
function L(t) {
|
|
7
|
-
let n =
|
|
7
|
+
let n = c(t, { moduleAlias: "platform.menu_scheme" });
|
|
8
8
|
return {
|
|
9
9
|
async schemes() {
|
|
10
10
|
let e = [];
|
|
@@ -28,35 +28,35 @@ function L(t) {
|
|
|
28
28
|
return t.request({ path: `/platform.module/${encodeURIComponent(e)}/context` });
|
|
29
29
|
},
|
|
30
30
|
insert(e, n, r) {
|
|
31
|
-
return
|
|
31
|
+
return c(u(t, { "X-MuYun-Page-Context": JSON.stringify({ scheme: e }) }), { moduleAlias: "platform.menu" }).insert(n, { requestId: r });
|
|
32
32
|
},
|
|
33
33
|
view(e, n) {
|
|
34
|
-
return
|
|
34
|
+
return c(u(t, { "X-MuYun-Page-Context": JSON.stringify({ scheme: e }) }), { moduleAlias: "platform.menu" }).view(n);
|
|
35
35
|
},
|
|
36
36
|
receipt(e, n) {
|
|
37
|
-
return
|
|
37
|
+
return c(u(t, { "X-MuYun-Page-Context": JSON.stringify({ scheme: e }) }), { moduleAlias: "platform.menu" }).saveReceipt(n);
|
|
38
38
|
},
|
|
39
39
|
visible: () => e(t).mine().then((e) => e.records)
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function R(e, t =
|
|
42
|
+
function R(e, t = h) {
|
|
43
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", "尚未确定");
|
|
44
44
|
}
|
|
45
|
-
function z(e, t = "", n =
|
|
45
|
+
function z(e, t = "", n = h) {
|
|
46
46
|
return e.flatMap(({ record: e, children: r }) => {
|
|
47
|
-
let i =
|
|
47
|
+
let i = o(e, "title", n) ?? e.title, a = t ? `${t} / ${i}` : i;
|
|
48
48
|
return [{
|
|
49
49
|
menu: e,
|
|
50
50
|
path: a
|
|
51
51
|
}, ...z(r, a, n)];
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
function B(e, t = !1, n =
|
|
54
|
+
function B(e, t = !1, n = h) {
|
|
55
55
|
return e.map(({ record: e, children: r }) => {
|
|
56
56
|
let i = t || e.enabled === !1;
|
|
57
57
|
return {
|
|
58
58
|
value: e.id,
|
|
59
|
-
title:
|
|
59
|
+
title: o(e, "title", n) ?? e.title,
|
|
60
60
|
disabled: i || !!e.moduleAlias,
|
|
61
61
|
children: B(r, i, n)
|
|
62
62
|
};
|
|
@@ -82,7 +82,7 @@ var V = { class: "module-menu-form" }, ee = { key: 0 }, H = {
|
|
|
82
82
|
}, J = {
|
|
83
83
|
key: 5,
|
|
84
84
|
role: "alert"
|
|
85
|
-
}, Y = /*#__PURE__*/
|
|
85
|
+
}, Y = /*#__PURE__*/ b(/* @__PURE__ */ k({
|
|
86
86
|
__name: "ModuleMenuEditor",
|
|
87
87
|
props: {
|
|
88
88
|
session: {},
|
|
@@ -90,157 +90,157 @@ var V = { class: "module-menu-form" }, ee = { key: 0 }, H = {
|
|
|
90
90
|
},
|
|
91
91
|
emits: ["saved", "opened"],
|
|
92
92
|
setup(e, { expose: t, emit: r }) {
|
|
93
|
-
let i = e, a = r,
|
|
94
|
-
async function
|
|
93
|
+
let i = e, a = r, c = i.session, u = c.language, d = n();
|
|
94
|
+
async function f() {
|
|
95
95
|
try {
|
|
96
|
-
await
|
|
96
|
+
await c.startAnother();
|
|
97
97
|
} catch (e) {
|
|
98
|
-
|
|
98
|
+
c.reportFailure(e instanceof Error ? e : l(u, "platform.screen.ModuleMenuEditor.cannot-start-a-new-entry-right-now", "暂时无法开始新入口"));
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
let
|
|
101
|
+
let h = S(() => c.loading.value || c.saving.value || c.resultUnknown.value || !c.authorized.value), _ = S(() => h.value || c.updating.value), v = S(() => c.options.value.map((e) => ({
|
|
102
102
|
value: e.id,
|
|
103
|
-
label: `${
|
|
104
|
-
}))),
|
|
103
|
+
label: `${o(e, "title", u) ?? e.alias ?? e.id} · ${R(e, u)}`
|
|
104
|
+
}))), y = S(() => [{
|
|
105
105
|
value: "root",
|
|
106
|
-
title:
|
|
107
|
-
children: B(
|
|
106
|
+
title: u.t("platform.screen.moduleMenuWorkspace.top-level", "顶层"),
|
|
107
|
+
children: B(c.tree.value, !1, u)
|
|
108
108
|
}]);
|
|
109
|
-
async function
|
|
109
|
+
async function b() {
|
|
110
110
|
try {
|
|
111
|
-
await (await
|
|
111
|
+
await (await c.prepare()).execute(), a("saved");
|
|
112
112
|
} catch (e) {
|
|
113
|
-
|
|
113
|
+
c.resultUnknown.value || c.reportFailure(e instanceof Error ? e : l(u, "platform.screen.ModuleMenuEditor.cannot-add-the-entry-right-now", "暂时无法添加入口"));
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
async function k() {
|
|
117
117
|
try {
|
|
118
|
-
await
|
|
118
|
+
await c.lookupPending() && a("saved");
|
|
119
119
|
} catch {
|
|
120
|
-
|
|
120
|
+
c.reportFailure(l(u, "platform.screen.ModuleMenuEditor.the-result-cannot-be-verified-right-now-retry-the-lookup", "结果暂时无法核实,请重试查询,勿重复添加。"));
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
async function A() {
|
|
124
|
-
await
|
|
124
|
+
await c.refreshVisibility(), c.visibleMenu.value && d?.openMenu && (d.openMenu(c.visibleMenu.value), a("opened"));
|
|
125
125
|
}
|
|
126
|
-
return t({ save:
|
|
127
|
-
F(
|
|
128
|
-
E("strong", null, P(F(
|
|
129
|
-
E("p", null, P(F(
|
|
130
|
-
E("p", G, P(F(
|
|
131
|
-
F(
|
|
126
|
+
return t({ save: b }), (t, n) => (j(), T("div", V, [
|
|
127
|
+
F(c).saved.value ? (j(), T(x, { key: 1 }, [
|
|
128
|
+
E("strong", null, P(F(u).t("platform.screen.ModuleMenuEditor.added-to-menu", "已添加到菜单")), 1),
|
|
129
|
+
E("p", null, P(F(c).savedPath.value), 1),
|
|
130
|
+
E("p", G, P(F(u).t("platform.screen.ModuleMenuEditor.audience", "适用范围:")) + P(F(c).savedAudience.value), 1),
|
|
131
|
+
F(c).visibleMenu.value && F(d)?.openMenu ? (j(), C(F(s), {
|
|
132
132
|
key: 0,
|
|
133
133
|
type: "primary",
|
|
134
134
|
onClick: A
|
|
135
135
|
}, {
|
|
136
|
-
default: I(() => [D(P(F(
|
|
136
|
+
default: I(() => [D(P(F(u).t("platform.screen.ModuleMenuEntriesSection.open", "打开")), 1)]),
|
|
137
137
|
_: 1
|
|
138
|
-
})) : F(
|
|
139
|
-
O(F(
|
|
140
|
-
disabled: F(
|
|
141
|
-
onClick:
|
|
138
|
+
})) : F(c).visibilityChecked.value ? (j(), T("p", K, P(F(u).t("platform.screen.ModuleMenuEditor.the-entry-was-saved-but-is-not-visible-in-navigation", "入口已保存,当前登录身份的导航暂不可见。请由适用范围内的使用者核实;若其也看不到,再检查上级菜单状态和业务访问权限。")), 1)) : w("v-if", !0),
|
|
139
|
+
O(F(s), {
|
|
140
|
+
disabled: F(c).saving.value,
|
|
141
|
+
onClick: f
|
|
142
142
|
}, {
|
|
143
|
-
default: I(() => [D(P(F(
|
|
143
|
+
default: I(() => [D(P(F(u).t("platform.screen.ModuleMenuEditor.add-another-entry", "另加一个入口")), 1)]),
|
|
144
144
|
_: 1
|
|
145
145
|
}, 8, ["disabled"]),
|
|
146
|
-
F(
|
|
146
|
+
F(c).error.value ? (j(), C(F(s), {
|
|
147
147
|
key: 2,
|
|
148
|
-
disabled: F(
|
|
149
|
-
onClick: F(
|
|
148
|
+
disabled: F(c).saving.value,
|
|
149
|
+
onClick: F(c).refreshVisibility
|
|
150
150
|
}, {
|
|
151
|
-
default: I(() => [D(P(F(
|
|
151
|
+
default: I(() => [D(P(F(u).t("platform.screen.ModuleMenuEditor.refresh-navigation", "刷新导航")), 1)]),
|
|
152
152
|
_: 1
|
|
153
153
|
}, 8, ["disabled", "onClick"])) : w("v-if", !0)
|
|
154
154
|
], 64)) : (j(), T(x, { key: 0 }, [
|
|
155
|
-
E("label", null, [D(P(F(
|
|
156
|
-
value: F(
|
|
157
|
-
disabled:
|
|
158
|
-
"aria-label": F(
|
|
159
|
-
"onUpdate:value": n[0] ||= (e) => F(
|
|
155
|
+
E("label", null, [D(P(F(u).t("platform.screen.ModuleMenuEditor.menu-name", "菜单名称")), 1), O(F(g), {
|
|
156
|
+
value: F(c).title.value,
|
|
157
|
+
disabled: _.value,
|
|
158
|
+
"aria-label": F(u).t("platform.screen.ModuleMenuEditor.menu-name", "菜单名称"),
|
|
159
|
+
"onUpdate:value": n[0] ||= (e) => F(c).update({ title: String(e ?? "") })
|
|
160
160
|
}, null, 8, [
|
|
161
161
|
"value",
|
|
162
162
|
"disabled",
|
|
163
163
|
"aria-label"
|
|
164
164
|
])]),
|
|
165
|
-
|
|
166
|
-
value: F(
|
|
167
|
-
options:
|
|
165
|
+
v.value.length > 1 ? (j(), T("label", ee, [D(P(F(u).t("platform.screen.ModuleMenuEditor.menu-scheme", "菜单方案")), 1), O(F(p), {
|
|
166
|
+
value: F(c).schemeId.value,
|
|
167
|
+
options: v.value,
|
|
168
168
|
"allow-clear": !1,
|
|
169
|
-
disabled:
|
|
170
|
-
"onUpdate:value": n[1] ||= (e) => F(
|
|
169
|
+
disabled: h.value,
|
|
170
|
+
"onUpdate:value": n[1] ||= (e) => F(c).update({ schemeId: String(e ?? "") })
|
|
171
171
|
}, null, 8, [
|
|
172
172
|
"value",
|
|
173
173
|
"options",
|
|
174
174
|
"disabled"
|
|
175
175
|
])])) : w("v-if", !0),
|
|
176
|
-
E("label", null, [D(P(F(
|
|
177
|
-
value: F(
|
|
178
|
-
"tree-data":
|
|
176
|
+
E("label", null, [D(P(F(u).t("platform.screen.ModuleMenuEditor.position", "放置位置")), 1), O(F(m), {
|
|
177
|
+
value: F(c).parentId.value,
|
|
178
|
+
"tree-data": y.value,
|
|
179
179
|
"allow-clear": !1,
|
|
180
|
-
disabled:
|
|
181
|
-
loading: F(
|
|
182
|
-
"onUpdate:value": n[2] ||= (e) => F(
|
|
180
|
+
disabled: _.value,
|
|
181
|
+
loading: F(c).loading.value || F(c).updating.value,
|
|
182
|
+
"onUpdate:value": n[2] ||= (e) => F(c).update({ parentId: String(e ?? "root") })
|
|
183
183
|
}, null, 8, [
|
|
184
184
|
"value",
|
|
185
185
|
"tree-data",
|
|
186
186
|
"disabled",
|
|
187
187
|
"loading"
|
|
188
188
|
])]),
|
|
189
|
-
E("label", null, [D(P(F(
|
|
190
|
-
value: F(
|
|
189
|
+
E("label", null, [D(P(F(u).t("platform.screen.ModuleMenuEditor.open-mode", "打开方式")), 1), O(F(p), {
|
|
190
|
+
value: F(c).openMode.value,
|
|
191
191
|
"allow-clear": !1,
|
|
192
|
-
disabled:
|
|
192
|
+
disabled: _.value,
|
|
193
193
|
options: [{
|
|
194
194
|
value: "tab",
|
|
195
|
-
label: F(
|
|
195
|
+
label: F(u).t("platform.screen.ModuleMenuEditor.open-in-a-workbench-tab", "页签内打开")
|
|
196
196
|
}, {
|
|
197
197
|
value: "window",
|
|
198
|
-
label: F(
|
|
198
|
+
label: F(u).t("platform.screen.ModuleMenuEditor.open-in-a-new-window", "新窗口打开")
|
|
199
199
|
}],
|
|
200
|
-
"onUpdate:value": n[3] ||= (e) => F(
|
|
200
|
+
"onUpdate:value": n[3] ||= (e) => F(c).update({ openMode: e === "window" ? "window" : "tab" })
|
|
201
201
|
}, null, 8, [
|
|
202
202
|
"value",
|
|
203
203
|
"disabled",
|
|
204
204
|
"options"
|
|
205
205
|
])]),
|
|
206
|
-
F(
|
|
207
|
-
E("p", U, P(F(
|
|
208
|
-
F(
|
|
209
|
-
e.showSave && !F(
|
|
206
|
+
F(c).duplicate.value ? (j(), T("p", H, P(F(u).t("platform.screen.ModuleMenuEditor.duplicate-position", "此位置已有「{title}」,仍可另加入口。", { title: F(o)(F(c).duplicate.value.menu, "title", F(u)) })), 1)) : w("v-if", !0),
|
|
207
|
+
E("p", U, P(F(u).t("platform.screen.ModuleMenuEditor.adds-an-access-entry-only-it-does-not-activate-applications", "只添加访问入口,不开通应用或授予业务权限。")), 1),
|
|
208
|
+
F(c).updating.value ? (j(), T("p", W, P(F(u).t("platform.screen.ModuleMenuEditor.loading-the-menu-scheme-wait-for-the-candidate-to-be", "正在读取菜单方案,请等待候选就绪。")), 1)) : w("v-if", !0),
|
|
209
|
+
e.showSave && !F(c).resultUnknown.value ? (j(), C(F(s), {
|
|
210
210
|
key: 3,
|
|
211
211
|
type: "primary",
|
|
212
|
-
disabled: !F(
|
|
213
|
-
loading: F(
|
|
214
|
-
onClick:
|
|
212
|
+
disabled: !F(c).canSave.value,
|
|
213
|
+
loading: F(c).saving.value,
|
|
214
|
+
onClick: b
|
|
215
215
|
}, {
|
|
216
|
-
default: I(() => [D(P(F(
|
|
216
|
+
default: I(() => [D(P(F(u).t("platform.screen.ModuleMenuEditor.add-entry", "添加入口")), 1)]),
|
|
217
217
|
_: 1
|
|
218
218
|
}, 8, ["disabled", "loading"])) : w("v-if", !0),
|
|
219
|
-
F(
|
|
219
|
+
F(c).resultUnknown.value ? (j(), C(F(s), {
|
|
220
220
|
key: 4,
|
|
221
221
|
onClick: k
|
|
222
222
|
}, {
|
|
223
|
-
default: I(() => [D(P(F(
|
|
223
|
+
default: I(() => [D(P(F(u).t("platform.screen.ModuleMenuEditor.check-save-result", "查询保存结果")), 1)]),
|
|
224
224
|
_: 1
|
|
225
225
|
})) : w("v-if", !0)
|
|
226
226
|
], 64)),
|
|
227
|
-
F(
|
|
228
|
-
F(
|
|
229
|
-
F(
|
|
227
|
+
F(c).entryIssue.value ? (j(), T("p", te, P(F(c).entryIssue.value), 1)) : w("v-if", !0),
|
|
228
|
+
F(c).ready.value && !F(c).authorized.value ? (j(), T("p", q, P(F(u).t("platform.screen.ModuleMenuEditor.you-do-not-have-permission-to-add-menu-entries", "当前没有添加菜单入口权限。")), 1)) : w("v-if", !0),
|
|
229
|
+
F(c).error.value && F(c).ready.value && !F(c).saved.value && !F(c).resultUnknown.value ? (j(), C(F(s), {
|
|
230
230
|
key: 4,
|
|
231
|
-
disabled: F(
|
|
232
|
-
onClick: F(
|
|
231
|
+
disabled: F(c).saving.value,
|
|
232
|
+
onClick: F(c).load
|
|
233
233
|
}, {
|
|
234
|
-
default: I(() => [D(P(F(
|
|
234
|
+
default: I(() => [D(P(F(u).t("platform.screen.ModuleMenuEditor.reload-candidate", "重新读取候选")), 1)]),
|
|
235
235
|
_: 1
|
|
236
236
|
}, 8, ["disabled", "onClick"])) : w("v-if", !0),
|
|
237
|
-
F(
|
|
238
|
-
F(
|
|
237
|
+
F(c).error.value ? (j(), T("p", J, P(F(c).error.value), 1)) : w("v-if", !0),
|
|
238
|
+
F(c).error.value && !F(c).ready.value && !F(c).resultUnknown.value ? (j(), C(F(s), {
|
|
239
239
|
key: 6,
|
|
240
|
-
disabled: F(
|
|
241
|
-
onClick: F(
|
|
240
|
+
disabled: F(c).saving.value,
|
|
241
|
+
onClick: F(c).load
|
|
242
242
|
}, {
|
|
243
|
-
default: I(() => [D(P(F(
|
|
243
|
+
default: I(() => [D(P(F(u).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
|
|
244
244
|
_: 1
|
|
245
245
|
}, 8, ["disabled", "onClick"])) : w("v-if", !0)
|
|
246
246
|
]));
|
|
@@ -248,50 +248,50 @@ var V = { class: "module-menu-form" }, ee = { key: 0 }, H = {
|
|
|
248
248
|
}), [["__scopeId", "data-v-1081a9ba"]]);
|
|
249
249
|
//#endregion
|
|
250
250
|
//#region src/platform-admin-runtime/module-menu/moduleMenuReceiptStore.ts
|
|
251
|
-
function ne(e, t, n, r =
|
|
252
|
-
let o = `muyun.menu-pending.${JSON.stringify([e, t])}`,
|
|
253
|
-
function
|
|
254
|
-
if (!n()) throw new
|
|
251
|
+
function ne(e, t, n, r = v, i, a = h) {
|
|
252
|
+
let o = `muyun.menu-pending.${JSON.stringify([e, t])}`, s = { persistence: "backend" }, c;
|
|
253
|
+
function u() {
|
|
254
|
+
if (!n()) throw new y(l(a, "platform.screen.moduleMenuReceiptStore.the-menu-editing-identity-has-changed", "菜单编辑身份已变化"));
|
|
255
255
|
return i ?? window.sessionStorage;
|
|
256
256
|
}
|
|
257
|
-
function
|
|
258
|
-
if (!/^[a-zA-Z0-9-]{16,80}$/.test(e)) throw new
|
|
257
|
+
function d(e) {
|
|
258
|
+
if (!/^[a-zA-Z0-9-]{16,80}$/.test(e)) throw new y(l(a, "platform.screen.moduleMenuReceiptStore.the-original-entry-lookup-reference-is-invalid", "原入口查询标识无效"));
|
|
259
259
|
return `menu.pending.r${e.toLowerCase().replaceAll("-", "")}`;
|
|
260
260
|
}
|
|
261
261
|
return {
|
|
262
262
|
async restore() {
|
|
263
|
-
if (
|
|
264
|
-
let e = await r.restore(
|
|
265
|
-
if (!e) throw new
|
|
263
|
+
if (c = u().getItem(o) ?? void 0, !c) return;
|
|
264
|
+
let e = await r.restore(d(c), void 0, s);
|
|
265
|
+
if (!e) throw new y(l(a, "platform.screen.moduleMenuReceiptStore.the-original-entry-lookup-reference-cannot-be-read-right-now", "原入口查询引用暂不可读取,请核实后重试"));
|
|
266
266
|
return e;
|
|
267
267
|
},
|
|
268
268
|
async save(e) {
|
|
269
|
-
if (e.kind !== "record-save") throw new
|
|
270
|
-
let t =
|
|
271
|
-
|
|
269
|
+
if (e.kind !== "record-save") throw new y(l(a, "platform.screen.moduleMenuReceiptStore.the-original-entry-lookup-reference-is-invalid", "原入口查询标识无效"));
|
|
270
|
+
let t = u();
|
|
271
|
+
c = e.requestId, await r.set(d(c), e, s), u(), t.setItem(o, c);
|
|
272
272
|
},
|
|
273
273
|
async clear() {
|
|
274
|
-
let e =
|
|
275
|
-
t && (await r.remove(
|
|
274
|
+
let e = u(), t = c;
|
|
275
|
+
t && (await r.remove(d(t), s), u(), e.getItem(o) === t && e.removeItem(o), c === t && (c = void 0));
|
|
276
276
|
}
|
|
277
277
|
};
|
|
278
278
|
}
|
|
279
279
|
//#endregion
|
|
280
280
|
//#region src/platform-admin-runtime/module-menu/moduleMenuSession.ts
|
|
281
|
-
function X(e, n, s,
|
|
282
|
-
let
|
|
281
|
+
function X(e, n, s, c, u = e.visible, p = h) {
|
|
282
|
+
let m = M(0), g = M(!1), v = M(!1), b = M(!1), x = N(), C = S(() => x.value ? x.value instanceof y || x.value instanceof d ? _(x.value, p) : r(a(x.value), p) : "");
|
|
283
283
|
function w(e) {
|
|
284
|
-
x.value = e instanceof Error ? e : new
|
|
284
|
+
x.value = e instanceof Error ? e : new y(e);
|
|
285
285
|
}
|
|
286
286
|
function T(e) {
|
|
287
|
-
w(e instanceof Error ? e :
|
|
287
|
+
w(e instanceof Error ? e : l(p, "platform.screen.moduleMenuSession.the-operation-is-temporarily-unavailable-retry", "操作暂不可用,请重试。"));
|
|
288
288
|
}
|
|
289
|
-
let E = N(), D = S(() => E.value ? ae(E.value,
|
|
289
|
+
let E = N(), D = S(() => E.value ? ae(E.value, p) : ""), 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, p) : 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, p)), le = S(() => X() && G.value && W.value && !g.value && !v.value && !b.value && !Y && !I.value && !D.value && !!O.value.trim()), ue = S(() => z(F.value, "", p).find(({ menu: e }) => e.moduleAlias === n && e.parentId === A.value));
|
|
290
290
|
function Q() {
|
|
291
|
-
if (!X()) throw new
|
|
291
|
+
if (!X()) throw new y(l(p, "platform.screen.moduleMenuSession.the-menu-editing-scope-has-changed-reopen-the-editor", "菜单编辑范围已变化,请重新打开"));
|
|
292
292
|
}
|
|
293
293
|
function $(e = !1) {
|
|
294
|
-
if (Q(), !G.value || !W.value || g.value ||
|
|
294
|
+
if (Q(), !G.value || !W.value || g.value || b.value || Y || I.value || !e && v.value) throw new y(l(p, "platform.screen.moduleMenuSession.wait-for-the-menu-candidate-to-be-ready-or-check", "请先等待菜单候选就绪,或查询未确定的保存结果"));
|
|
295
295
|
}
|
|
296
296
|
async function de() {
|
|
297
297
|
if (Q(), I.value || Y && G.value) return;
|
|
@@ -300,11 +300,11 @@ function X(e, n, s, d, f = e.visible, m = _) {
|
|
|
300
300
|
g.value = !0, G.value = !1, x.value = void 0;
|
|
301
301
|
try {
|
|
302
302
|
if (!ne) {
|
|
303
|
-
let e = await
|
|
303
|
+
let e = await c.restore();
|
|
304
304
|
if (!X() || r !== q) return;
|
|
305
305
|
if (e) {
|
|
306
306
|
let n = t(e);
|
|
307
|
-
if (n.kind !== "record-save" || n.moduleAlias !== "platform.menu" || !n.pageContext?.scheme) throw new
|
|
307
|
+
if (n.kind !== "record-save" || n.moduleAlias !== "platform.menu" || !n.pageContext?.scheme) throw new y(l(p, "platform.screen.moduleMenuSession.the-original-entry-lookup-scope-is-invalid-verify-the-save", "原入口查询范围无效,请核实保存结果后继续"));
|
|
308
308
|
Y = {
|
|
309
309
|
requestId: n.requestId,
|
|
310
310
|
schemeId: n.pageContext.scheme
|
|
@@ -320,11 +320,11 @@ function X(e, n, s, d, f = e.visible, m = _) {
|
|
|
320
320
|
]);
|
|
321
321
|
if (!X() || r !== q) return;
|
|
322
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
|
|
324
|
-
if (!
|
|
325
|
-
let f = await e.tree(
|
|
323
|
+
let u = s[0]?.record.schemeId, d = Z.value.find((e) => e.id === (Y?.schemeId ?? k.value)) ?? Z.value.find((e) => e.id === u) ?? Z.value[0];
|
|
324
|
+
if (!d?.id) throw new y(l(p, "platform.screen.moduleMenuSession.no-menu-schemes-are-available-configure-an-applicable-scheme-first", "暂无可用菜单方案,请先配置适用的菜单方案"));
|
|
325
|
+
let f = await e.tree(d.id);
|
|
326
326
|
if (!X() || r !== q) return;
|
|
327
|
-
k.value =
|
|
327
|
+
k.value = d.id, F.value = f, A.value = "root", G.value = !0, m.value++;
|
|
328
328
|
} catch (e) {
|
|
329
329
|
X() && r === q && T(e);
|
|
330
330
|
} finally {
|
|
@@ -333,11 +333,11 @@ function X(e, n, s, d, f = e.visible, m = _) {
|
|
|
333
333
|
}
|
|
334
334
|
function fe(t) {
|
|
335
335
|
let n = t.schemeId ?? k.value;
|
|
336
|
-
if (!Z.value.some((e) => e.id === n)) throw new
|
|
336
|
+
if (!Z.value.some((e) => e.id === n)) throw new y(l(p, "platform.screen.moduleMenuSession.select-an-available-menu-scheme", "请选择当前可用的菜单方案"));
|
|
337
337
|
let r = t.title ?? O.value;
|
|
338
|
-
if ([...r].length > 120) throw new
|
|
338
|
+
if ([...r].length > 120) throw new y(l(p, "platform.screen.moduleMenuSession.the-menu-name-must-not-exceed-120-characters", "菜单名称不能超过120个字符"));
|
|
339
339
|
let i = t.parentId ?? (n === k.value ? A.value : "root"), a = t.openMode ?? j.value, o = (e) => {
|
|
340
|
-
if (i !== "root" && !ie(e).some((e) => e.menu.id === i)) throw new
|
|
340
|
+
if (i !== "root" && !ie(e).some((e) => e.menu.id === i)) throw new y(l(p, "platform.screen.moduleMenuSession.select-an-enabled-directory-in-the-current-scheme", "请选择当前方案中的启用目录"));
|
|
341
341
|
return {
|
|
342
342
|
schemeId: n,
|
|
343
343
|
nodes: e,
|
|
@@ -349,13 +349,13 @@ function X(e, n, s, d, f = e.visible, m = _) {
|
|
|
349
349
|
return n === k.value ? o(F.value) : e.tree(n).then(o);
|
|
350
350
|
}
|
|
351
351
|
function pe(e) {
|
|
352
|
-
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, m.value++;
|
|
353
353
|
}
|
|
354
354
|
async function me(e) {
|
|
355
355
|
$();
|
|
356
|
-
let t =
|
|
356
|
+
let t = m.value, n = await fe(e);
|
|
357
357
|
return () => {
|
|
358
|
-
if ($(), t !==
|
|
358
|
+
if ($(), t !== m.value) throw new y(l(p, "platform.screen.moduleMenuSession.the-menu-candidate-has-changed-reload-it", "菜单候选已变化,请重新读取"));
|
|
359
359
|
pe(n);
|
|
360
360
|
};
|
|
361
361
|
}
|
|
@@ -363,11 +363,11 @@ function X(e, n, s, d, f = e.visible, m = _) {
|
|
|
363
363
|
let t;
|
|
364
364
|
try {
|
|
365
365
|
$(!0), t = ++J, v.value = !0;
|
|
366
|
-
let n = ++
|
|
366
|
+
let n = ++m.value;
|
|
367
367
|
x.value = void 0;
|
|
368
368
|
let r = fe(e), i = "then" in r ? await r : r;
|
|
369
369
|
if (!X() || t !== J) return;
|
|
370
|
-
if ($(!0), n !==
|
|
370
|
+
if ($(!0), n !== m.value) throw new y(l(p, "platform.screen.moduleMenuSession.the-menu-candidate-has-changed-reload-it", "菜单候选已变化,请重新读取"));
|
|
371
371
|
pe(i), x.value = void 0;
|
|
372
372
|
} catch (e) {
|
|
373
373
|
X() && (t === void 0 || t === J) && T(e);
|
|
@@ -381,11 +381,11 @@ function X(e, n, s, d, f = e.visible, m = _) {
|
|
|
381
381
|
if (e) {
|
|
382
382
|
U.value = !1, H.value = void 0;
|
|
383
383
|
try {
|
|
384
|
-
let t = await
|
|
384
|
+
let t = await u();
|
|
385
385
|
if (!X() || I.value?.id !== e) return;
|
|
386
386
|
H.value = z(t).find(({ menu: t }) => t.id === e)?.menu, U.value = !0, x.value = void 0;
|
|
387
387
|
} catch {
|
|
388
|
-
X() && w(
|
|
388
|
+
X() && w(l(p, "platform.screen.moduleMenuSession.the-menu-was-added-but-navigation-could-not-be-refreshed", "菜单已添加,导航刷新失败。请查询或刷新导航,无需重复添加。"));
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
391
|
}
|
|
@@ -400,105 +400,105 @@ function X(e, n, s, d, f = e.visible, m = _) {
|
|
|
400
400
|
B.value = a ? { ...a } : void 0, V.value = r.audience ?? "", L.value = r.path ?? [
|
|
401
401
|
(() => {
|
|
402
402
|
let e = Z.value.find((e) => e.id === i.schemeId);
|
|
403
|
-
return e &&
|
|
403
|
+
return e && o(e, "title", p);
|
|
404
404
|
})(),
|
|
405
|
-
z(F.value, "",
|
|
405
|
+
z(F.value, "", p).find(({ menu: e }) => e.id === i.parentId)?.path,
|
|
406
406
|
i.title
|
|
407
|
-
].filter(Boolean).join(" / "), Y = void 0, K.value = !1,
|
|
407
|
+
].filter(Boolean).join(" / "), Y = void 0, K.value = !1, m.value++, await c.clear().catch(() => {}), X() && await ge();
|
|
408
408
|
}
|
|
409
409
|
return {
|
|
410
|
-
title:
|
|
411
|
-
lines: X() ? [L.value, U.value ? H.value ?
|
|
410
|
+
title: p.t("platform.screen.moduleMenuSession.menu-entry-saved", "菜单入口已保存"),
|
|
411
|
+
lines: X() ? [L.value, U.value ? H.value ? p.t("platform.screen.moduleMenuSession.visible-to-the-current-user-the-business-page-can-be", "当前用户可见,可打开业务页面。") : p.t("platform.screen.moduleMenuSession.the-entry-was-saved-but-is-not-visible-to-the", "入口已保存;当前登录身份暂不可见,请由适用范围内的使用者核实导航。") : p.t("platform.screen.moduleMenuSession.navigation-visibility-has-not-been-verified-do-not-add-the", "导航可见性尚未核实;不要重复添加。")] : [p.t("platform.screen.moduleMenuSession.the-save-completed-verify-the-entry-in-its-original-scope", "保存已完成,请在原范围核实入口。")]
|
|
412
412
|
};
|
|
413
413
|
}
|
|
414
414
|
async function ve(t, r) {
|
|
415
|
-
let [i, a,
|
|
415
|
+
let [i, a, s, c] = await Promise.all([
|
|
416
416
|
e.context(n),
|
|
417
417
|
e.context("platform.menu"),
|
|
418
418
|
e.schemes(),
|
|
419
419
|
e.tree(t.schemeId)
|
|
420
420
|
]);
|
|
421
|
-
if (Q(), !a.actions.some((e) => e.actionCode === "create" && e.authorized)) throw new
|
|
422
|
-
let
|
|
423
|
-
if (
|
|
424
|
-
let
|
|
425
|
-
if (!
|
|
426
|
-
if (t.parentId !== "root" && !ie(
|
|
427
|
-
let
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
421
|
+
if (Q(), !a.actions.some((e) => e.actionCode === "create" && e.authorized)) throw new d(l(p, "platform.screen.moduleMenuSession.you-do-not-have-permission-to-add-menu-entries", "当前没有添加菜单入口权限"));
|
|
422
|
+
let u = oe(i, p);
|
|
423
|
+
if (u) throw new d(u);
|
|
424
|
+
let f = s.find((e) => e.id === t.schemeId && e.enabled !== !1);
|
|
425
|
+
if (!f) throw new d(l(p, "platform.screen.moduleMenuSession.the-menu-scheme-is-no-longer-available", "菜单方案已不可用"));
|
|
426
|
+
if (t.parentId !== "root" && !ie(c).some((e) => e.menu.id === t.parentId)) throw new d(l(p, "platform.screen.moduleMenuSession.the-target-directory-is-no-longer-available-review-the-entry", "放置目录已不可用,请重新审阅"));
|
|
427
|
+
let m = t.parentId === "root" ? [] : re(c, t.parentId), h = JSON.stringify([
|
|
428
|
+
f.id,
|
|
429
|
+
f.alias ?? null,
|
|
430
|
+
f.title ?? null,
|
|
431
|
+
f.scopeType ?? null,
|
|
432
|
+
f.tenantId ?? null,
|
|
433
|
+
f.organizationId ?? null,
|
|
434
|
+
m.map((e) => [e.id, e.title])
|
|
435
435
|
]);
|
|
436
|
-
if (r &&
|
|
436
|
+
if (r && h !== r) throw new d(l(p, "platform.screen.moduleMenuSession.the-menu-scheme-audience-or-directory-has-changed-reload-and", "菜单方案适用范围或目录已变化,请重新读取候选并审阅"));
|
|
437
437
|
return {
|
|
438
|
-
scheme:
|
|
439
|
-
signature:
|
|
438
|
+
scheme: f,
|
|
439
|
+
signature: h,
|
|
440
440
|
path: [
|
|
441
|
-
|
|
442
|
-
...
|
|
441
|
+
o(f, "title", p) ?? f.alias,
|
|
442
|
+
...m.map((e) => o(e, "title", p)),
|
|
443
443
|
t.title
|
|
444
444
|
].filter(Boolean).join(" / ")
|
|
445
445
|
};
|
|
446
446
|
}
|
|
447
447
|
async function ye() {
|
|
448
|
-
if ($(), !le.value) throw new
|
|
449
|
-
let t =
|
|
448
|
+
if ($(), !le.value) throw new y(l(p, "platform.screen.moduleMenuSession.provide-a-menu-name-and-an-available-business-page", "请补齐菜单名称及可用业务页面"));
|
|
449
|
+
let t = m.value, r = {
|
|
450
450
|
moduleAlias: n,
|
|
451
451
|
schemeId: k.value,
|
|
452
452
|
parentId: A.value,
|
|
453
453
|
title: O.value.trim(),
|
|
454
454
|
openMode: j.value,
|
|
455
455
|
enabled: !0
|
|
456
|
-
}, a = await ve(
|
|
457
|
-
if ($(),
|
|
458
|
-
let
|
|
456
|
+
}, a = await ve(r);
|
|
457
|
+
if ($(), m.value !== t) throw new y(l(p, "platform.screen.moduleMenuSession.the-menu-candidate-has-changed-review-it-again", "菜单候选已变化,请重新审阅"));
|
|
458
|
+
let u = a.path, h = i(), g = () => X() && s.active() && G.value && W.value && !v.value && !Y && !I.value && m.value === t, _ = {
|
|
459
459
|
kind: "record-save",
|
|
460
460
|
moduleAlias: "platform.menu",
|
|
461
|
-
requestId:
|
|
462
|
-
pageContext: { scheme:
|
|
461
|
+
requestId: h,
|
|
462
|
+
pageContext: { scheme: r.schemeId }
|
|
463
463
|
};
|
|
464
464
|
return {
|
|
465
465
|
receiptReference: _,
|
|
466
466
|
presentation: {
|
|
467
|
-
title:
|
|
467
|
+
title: p.t("platform.screen.moduleMenuSession.add-a-business-entry", "添加业务入口"),
|
|
468
468
|
lines: [
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
...ue.value ? [
|
|
469
|
+
u,
|
|
470
|
+
p.t("platform.screen.moduleMenuSession.audience-value", "适用范围:{value1}", { value1: R(a.scheme, p) }),
|
|
471
|
+
p.t("platform.screen.moduleMenuSession.open-mode-value", "打开方式:{value1}", { value1: r.openMode === "window" ? p.t("platform.screen.moduleMenuSession.new-window", "新窗口") : p.t("platform.screen.moduleMenuSession.workbench-tab", "页签内") }),
|
|
472
|
+
p.t("platform.screen.moduleMenuSession.adds-an-entry-only-it-does-not-activate-applications-or", "只添加入口,不开通应用或授予业务权限。"),
|
|
473
|
+
...ue.value ? [p.t("platform.screen.moduleMenuSession.this-position-already-contains-value-another-entry-will-be-added", "此位置已有「{value1}」,本次将另加一个入口。", { value1: o(ue.value.menu, "title", p) })] : []
|
|
474
474
|
],
|
|
475
475
|
details: {
|
|
476
|
-
title:
|
|
476
|
+
title: p.t("platform.screen.moduleMenuSession.view-target-module", "查看目标模块"),
|
|
477
477
|
lines: [n]
|
|
478
478
|
}
|
|
479
479
|
},
|
|
480
|
-
confirmLabel:
|
|
480
|
+
confirmLabel: p.t("platform.screen.moduleMenuSession.confirm-entry-creation", "确认添加入口"),
|
|
481
481
|
expiresAt: Date.now() + 3e5,
|
|
482
482
|
isCurrent: g,
|
|
483
483
|
async execute() {
|
|
484
|
-
if (!g() ||
|
|
485
|
-
|
|
484
|
+
if (!g() || b.value) throw new d(l(p, "platform.screen.moduleMenuSession.the-menu-candidate-or-editing-scope-has-changed-review-it", "菜单候选或编辑范围已变化,请重新审阅"));
|
|
485
|
+
b.value = !0, x.value = void 0;
|
|
486
486
|
let n = !1;
|
|
487
487
|
try {
|
|
488
|
-
if (await ve(
|
|
489
|
-
requestId:
|
|
490
|
-
schemeId:
|
|
491
|
-
record:
|
|
492
|
-
path:
|
|
493
|
-
audience: R(a.scheme,
|
|
488
|
+
if (await ve(r, a.signature), !g() || (Y = {
|
|
489
|
+
requestId: h,
|
|
490
|
+
schemeId: r.schemeId,
|
|
491
|
+
record: r,
|
|
492
|
+
path: u,
|
|
493
|
+
audience: R(a.scheme, p),
|
|
494
494
|
audienceScheme: { ...a.scheme }
|
|
495
|
-
}, await
|
|
495
|
+
}, await c.save(_), !X() || !s.active() || m.value !== t)) throw new d(l(p, "platform.screen.moduleMenuSession.the-menu-candidate-or-editing-scope-has-changed-review-it", "菜单候选或编辑范围已变化,请重新审阅"));
|
|
496
496
|
n = !0;
|
|
497
|
-
let
|
|
498
|
-
return await _e(
|
|
497
|
+
let i = await e.insert(r.schemeId, r, h);
|
|
498
|
+
return await _e(i.record.id, i.record);
|
|
499
499
|
} catch (e) {
|
|
500
500
|
if (X()) {
|
|
501
|
-
if (!n || e instanceof
|
|
501
|
+
if (!n || e instanceof d || e instanceof f && [
|
|
502
502
|
400,
|
|
503
503
|
401,
|
|
504
504
|
403,
|
|
@@ -507,39 +507,39 @@ function X(e, n, s, d, f = e.visible, m = _) {
|
|
|
507
507
|
422
|
|
508
508
|
].includes(e.status ?? 0)) {
|
|
509
509
|
try {
|
|
510
|
-
Y && await
|
|
510
|
+
Y && await c.clear(), Y = void 0;
|
|
511
511
|
} catch {
|
|
512
|
-
Y && (Y.rejected = !0), K.value = !0, w(
|
|
512
|
+
Y && (Y.rejected = !0), K.value = !0, w(l(p, "platform.screen.moduleMenuSession.the-operation-was-not-submitted-but-the-original-request-reference", "操作未提交,但原请求标识尚未清除,请先查询结果。"));
|
|
513
513
|
}
|
|
514
|
-
throw new
|
|
514
|
+
throw new d(se(e, p));
|
|
515
515
|
}
|
|
516
|
-
Y && (K.value = !0,
|
|
516
|
+
Y && (K.value = !0, m.value++), Y ? w(l(p, "platform.screen.moduleMenuSession.the-save-result-is-unresolved-check-the-original-request-result", "保存结果尚未确定,请查询原请求结果,勿重复添加。")) : T(e);
|
|
517
517
|
}
|
|
518
518
|
throw e;
|
|
519
519
|
} finally {
|
|
520
|
-
X() && (
|
|
520
|
+
X() && (b.value = !1);
|
|
521
521
|
}
|
|
522
522
|
},
|
|
523
523
|
lookup: be
|
|
524
524
|
};
|
|
525
525
|
}
|
|
526
526
|
async function be() {
|
|
527
|
-
if (Q(), !Y ||
|
|
527
|
+
if (Q(), !Y || b.value) return;
|
|
528
528
|
let t = Y;
|
|
529
|
-
if (t.rejected) return await
|
|
530
|
-
title:
|
|
531
|
-
lines: [
|
|
529
|
+
if (t.rejected) return await c.clear(), Q(), Y === t ? (Y = void 0, K.value = !1, x.value = void 0, m.value++, {
|
|
530
|
+
title: p.t("platform.operation.not-submitted", "操作未提交"),
|
|
531
|
+
lines: [p.t("platform.screen.moduleMenuSession.the-recovery-reference-was-cleared-you-can-review-and-add", "恢复标识已清除,可以重新审阅并添加入口。")]
|
|
532
532
|
}) : void 0;
|
|
533
533
|
let n = await e.receipt(t.schemeId, t.requestId);
|
|
534
534
|
if (Q(), Y === t && n.committed && n.recordId) return _e(n.recordId);
|
|
535
535
|
}
|
|
536
536
|
return {
|
|
537
537
|
moduleAlias: n,
|
|
538
|
-
language:
|
|
539
|
-
revision:
|
|
538
|
+
language: p,
|
|
539
|
+
revision: m,
|
|
540
540
|
loading: g,
|
|
541
541
|
updating: v,
|
|
542
|
-
saving:
|
|
542
|
+
saving: b,
|
|
543
543
|
error: C,
|
|
544
544
|
reportFailure: w,
|
|
545
545
|
failureCause: () => x.value,
|
|
@@ -569,14 +569,14 @@ function X(e, n, s, d, f = e.visible, m = _) {
|
|
|
569
569
|
lookupPending: be,
|
|
570
570
|
refreshVisibility: ge,
|
|
571
571
|
async startAnother() {
|
|
572
|
-
if (Q(), !I.value ||
|
|
573
|
-
await
|
|
572
|
+
if (Q(), !I.value || b.value || Y) throw new y(l(p, "platform.screen.moduleMenuSession.verify-the-current-entry-save-result-first", "请先核实当前入口保存结果"));
|
|
573
|
+
await c.clear(), Q(), I.value = void 0, L.value = "", B.value = void 0, V.value = "", H.value = void 0, U.value = !1, G.value = !1, m.value++, await de();
|
|
574
574
|
},
|
|
575
575
|
dispose() {
|
|
576
|
-
te = !0, q++, J++, v.value = !1,
|
|
576
|
+
te = !0, q++, J++, v.value = !1, m.value++;
|
|
577
577
|
},
|
|
578
578
|
invalidate() {
|
|
579
|
-
J++, v.value = !1,
|
|
579
|
+
J++, v.value = !1, m.value++;
|
|
580
580
|
}
|
|
581
581
|
};
|
|
582
582
|
}
|
|
@@ -589,21 +589,21 @@ function re(e, t, n = []) {
|
|
|
589
589
|
}
|
|
590
590
|
return [];
|
|
591
591
|
}
|
|
592
|
-
function ie(e, t =
|
|
592
|
+
function ie(e, t = h) {
|
|
593
593
|
let n = (e) => e.filter(({ record: e }) => e.enabled !== !1).map((e) => ({
|
|
594
594
|
...e,
|
|
595
595
|
children: n(e.children)
|
|
596
596
|
}));
|
|
597
597
|
return z(n(e), "", t).filter(({ menu: e }) => !e.moduleAlias);
|
|
598
598
|
}
|
|
599
|
-
function ae(e, t =
|
|
599
|
+
function ae(e, t = h) {
|
|
600
600
|
return oe(e, t)?.message ?? "";
|
|
601
601
|
}
|
|
602
602
|
function oe(e, t) {
|
|
603
|
-
return e.entryType === "route" ? e.entryRoute ? void 0 :
|
|
603
|
+
return e.entryType === "route" ? e.entryRoute ? void 0 : l(t, "platform.screen.moduleMenuSession.this-module-has-no-page-address-return-to-its-configuration", "该模块尚未配置页面地址,请返回模块补充。") : e.entryType === "link" ? e.entryExternalUrl ? void 0 : l(t, "platform.screen.moduleMenuSession.this-module-has-no-link-address-return-to-its-configuration", "该模块尚未配置链接地址,请返回模块补充。") : e.uiDescriptor?.page ? void 0 : l(t, "platform.screen.moduleMenuSession.this-module-has-no-available-business-page-publish-its-page", "该模块尚无可用业务页面,请先发布页面配置。");
|
|
604
604
|
}
|
|
605
|
-
function se(e, t =
|
|
606
|
-
return e instanceof
|
|
605
|
+
function se(e, t = h) {
|
|
606
|
+
return e instanceof y || e instanceof d ? e.textMessage ?? e.message : e instanceof Error ? e.message : l(t, "platform.screen.moduleMenuSession.the-operation-is-temporarily-unavailable-retry", "操作暂不可用,请重试。");
|
|
607
607
|
}
|
|
608
608
|
//#endregion
|
|
609
609
|
//#region src/platform-admin-runtime/module-menu/moduleMenuWorkspace.ts
|