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