@ximatai/muyun-web-app 0.26.16 → 0.26.18
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-DVM_GB5y.js → BusinessActivityLogView-CNW817Sf.js} +2 -2
- package/dist/BusinessLogListDrawer-YiJxOlnD.js +864 -0
- package/dist/CodeConfigurationView-DU8tjPMt.js +1667 -0
- package/dist/{ConfigurationTranslationView-B0FosDyz.js → ConfigurationTranslationView-CbBt5s1q.js} +51 -51
- package/dist/{LoginAuditLogView-3tAozKlC.js → LoginAuditLogView-CZF1Jfq_.js} +2 -2
- package/dist/{ModuleActionManagementView-CJRNShGg.js → ModuleActionManagementView-CaiXH1l_.js} +208 -208
- package/dist/{ModuleGovernanceView-DsqR_Sj7.js → ModuleGovernanceView-CcwGyO3x.js} +4331 -4475
- package/dist/{RequestErrorLogView-C4yH-TSX.js → RequestErrorLogView-DpudZrC2.js} +2 -2
- package/dist/RoleDetailWorkspaceView-DNMGsAJC.js +1435 -0
- package/dist/{RuntimeLogView-CoKKpJ39.js → RuntimeLogView-444BL_xs.js} +61 -61
- package/dist/WorkflowAdministrationView-C-VIjvwB.js +650 -0
- package/dist/WorkflowConfigurationView-DLFY2x7V.js +1110 -0
- package/dist/WorkflowWorkbenchView-Gr02dbBc.js +759 -0
- package/dist/codeConfiguration-ChJ6ktRR.js +208 -0
- package/dist/index.css +1 -1
- package/dist/index.js +624 -598
- package/dist/moduleMenuWorkspace-B8DKwC3L.js +626 -0
- package/dist/{platform-components-Cl5ZZiuU.js → platform-components-5AE0j2_3.js} +9579 -6839
- package/dist/{platform-workbench-CAHoriIf.js → platform-workbench-BhZPARiH.js} +6345 -6478
- package/dist/types/app/CurrentUserProfileDialog.vue.d.ts +1 -1
- package/dist/types/app/DevelopmentTopbarActions.vue.d.ts +9 -0
- package/dist/types/app/useAssistantAvailability.d.ts +8 -0
- package/dist/types/app/useCurrentUserProfile.d.ts +12 -0
- package/dist/types/app/workbenchRouteSync.d.ts +2 -0
- package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +9 -3
- package/dist/types/consumer/index.d.ts +2 -1
- package/dist/types/dynamic-page-runtime/ModulePageBusinessSession.d.ts +8 -8
- package/dist/types/dynamic-page-runtime/ModulePageHostRuntime.vue.d.ts +214 -92
- package/dist/types/dynamic-page-runtime/assistantQueryCapabilities.d.ts +1 -0
- package/dist/types/dynamic-page-runtime/composables/useManagedDetailRelationRuntime.d.ts +2 -2
- package/dist/types/dynamic-page-runtime/composables/useNavigatorRuntime.d.ts +2 -2
- package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +2 -2
- package/dist/types/dynamic-page-runtime/useModulePageSession.d.ts +4 -4
- package/dist/types/dynamic-page-runtime/useModuleRecordDataChanges.d.ts +4 -0
- package/dist/types/main.d.ts +0 -1
- package/dist/types/platform-admin-runtime/ModuleCodeConfigurationStatus.vue.d.ts +7 -0
- package/dist/types/platform-admin-runtime/moduleCodeConfiguration.d.ts +15 -0
- package/dist/types/platform-components/BusinessContentGenerationPanel.vue.d.ts +22 -0
- package/dist/types/platform-components/BusinessContentQueryNotice.vue.d.ts +17 -0
- package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +2 -2
- package/dist/types/platform-components/DictionaryOptionDialog.vue.d.ts +4 -4
- package/dist/types/platform-components/DictionaryOptionDialogChoiceList.vue.d.ts +1 -1
- package/dist/types/platform-components/DictionaryPicker.vue.d.ts +4 -4
- package/dist/types/platform-components/ObjectPickerInput.vue.d.ts +2 -2
- package/dist/types/platform-components/QueryCriteriaGroupEditor.vue.d.ts +2 -2
- package/dist/types/platform-components/RecordContentSourceField.vue.d.ts +22 -0
- package/dist/types/platform-components/RecordContentTranslationField.vue.d.ts +26 -0
- package/dist/types/platform-components/RecordDataExchangeSurface.vue.d.ts +26 -0
- package/dist/types/platform-components/RecordDetailFields.vue.d.ts +3 -2
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +5 -2
- package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordQueryListCell.vue.d.ts +1 -0
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordQueryListSurface.vue.d.ts +1 -1
- package/dist/types/{dynamic-page-runtime/ModuleDataExchangeSurface.vue.d.ts → platform-components/RecordQuerySortSelector.vue.d.ts} +5 -9
- package/dist/types/platform-components/RecordRelationActionButton.vue.d.ts +16 -0
- package/dist/types/platform-components/RecordRelationValue.vue.d.ts +2 -0
- package/dist/types/platform-components/StaticManagementLayout.vue.d.ts +7 -2
- package/dist/types/{dynamic-page-runtime → platform-components}/TenantScopeExplorer.vue.d.ts +1 -1
- package/dist/types/platform-components/WorkflowRecordPanel.vue.d.ts +2 -0
- package/dist/types/platform-components/WorkflowTimeline.vue.d.ts +4 -0
- package/dist/types/platform-components/crudRecordListModel.d.ts +1 -0
- package/dist/types/platform-components/index.d.ts +3 -0
- package/dist/types/platform-components/loadExplorerRecords.d.ts +3 -0
- package/dist/types/platform-components/managementWorkspaceLayout.d.ts +10 -0
- package/dist/types/platform-components/recordDetailFieldModel.d.ts +2 -0
- package/dist/types/platform-components/recordFormFieldModel.d.ts +6 -0
- package/dist/types/platform-components/recordQueryListQueryController.d.ts +2 -0
- package/dist/types/platform-components/recordSurfaceActivity.d.ts +3 -0
- package/dist/types/platform-components/recycleBinState.d.ts +1 -0
- package/dist/types/platform-components/referencePickerModel.d.ts +6 -2
- package/dist/types/platform-components/scopedTreePickerModel.d.ts +4 -0
- package/dist/types/platform-components/useBusinessCodeForm.d.ts +36 -0
- package/dist/types/platform-workbench/Workbench.vue.d.ts +13 -4
- package/dist/types/platform-workbench/WorkbenchGlobalTools.vue.d.ts +28 -0
- package/dist/types/platform-workbench/WorkbenchLanguageSettings.vue.d.ts +11 -0
- package/dist/types/platform-workbench/WorkbenchPageTitle.vue.d.ts +10 -0
- package/dist/types/platform-workbench/menuGroupLayout.d.ts +5 -0
- package/dist/types/platform-workbench/menuTreeModel.d.ts +1 -2
- package/dist/types/platform-workbench/useAssistantConversation.d.ts +1 -1
- package/dist/types/platform-workbench/useAssistantConversationArchive.d.ts +1 -1
- package/dist/types/platform-workbench/useLanguagePreferenceSelection.d.ts +7 -0
- package/dist/types/views/CodeConfigurationView.vue.d.ts +8 -0
- package/dist/types/views/CodeRuleFormatEditor.vue.d.ts +17 -0
- package/dist/types/views/PageQuerySummaryEditor.vue.d.ts +4 -4
- package/dist/types/views/WorkflowSelectionFields.vue.d.ts +28 -0
- package/dist/types/views/codeConfiguration.d.ts +127 -0
- package/dist/types/views/codeConfigurationWorkspaceView.d.ts +5 -0
- package/dist/types/views/metadataEditorSession.d.ts +4 -0
- package/dist/types/views/metadataOrchestrationState.d.ts +3 -0
- package/dist/types/views/metadataWorkspace.d.ts +8 -0
- package/dist/types/views/moduleGovernanceWorkspaceView.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiDatePicker.vue.d.ts +33 -0
- package/dist/types/vue-ui-antdv/components/UiDropdown.vue.d.ts +1 -0
- package/dist/types/vue-ui-antdv/components/UiHelp.vue.d.ts +16 -0
- package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiModal.vue.d.ts +9 -6
- package/dist/types/vue-ui-antdv/components/UiPopover.vue.d.ts +12 -4
- package/dist/types/vue-ui-antdv/datePickerCalendar.d.ts +472 -0
- package/dist/types/vue-ui-antdv/datePickerValue.d.ts +6 -0
- package/dist/types/vue-ui-antdv/index.d.ts +3 -0
- package/dist/types/vue-ui-antdv/languageLocales.d.ts +2 -0
- package/dist/types/vue-ui-antdv/types.d.ts +2 -0
- package/dist/types/vue-ui-antdv/typography.d.ts +25 -0
- package/dist/types/web-contracts/index.d.ts +146 -1
- package/dist/types/web-contracts/workflow.d.ts +10 -0
- package/dist/types/web-core/assistantTurnClient.d.ts +2 -0
- package/dist/types/web-core/businessContent.d.ts +38 -0
- package/dist/types/web-core/businessContentLanguage.d.ts +18 -0
- package/dist/types/web-core/index.d.ts +5 -0
- package/dist/types/web-core/languagePreference.d.ts +2 -2
- package/dist/types/web-core/module/dataExchangeClient.d.ts +83 -1
- package/dist/types/web-core/module/staticModuleClient.d.ts +9 -3
- package/dist/types/web-core/presentationTexts.d.ts +5 -0
- package/dist/types/web-core/recordReadRefreshGuard.d.ts +7 -0
- package/dist/types/web-core/useBusinessContentGenerationBatch.d.ts +36 -0
- package/dist/types/web-core/useBusinessContentReading.d.ts +30 -0
- package/dist/types/web-core/workflow.d.ts +2 -1
- package/dist/{workspaceViews-BIYGPUAO.js → workspaceViews-DeBqozVb.js} +1062 -918
- package/package.json +4 -1
- package/dist/BusinessLogListDrawer-BciMLY9z.js +0 -864
- package/dist/RoleDetailWorkspaceView-BpOoGUwS.js +0 -1435
- package/dist/WorkflowAdministrationView-DmUV6vWS.js +0 -650
- package/dist/WorkflowConfigurationView-pghDbWEh.js +0 -975
- package/dist/WorkflowWorkbenchView-BwWxyDen.js +0 -747
- package/dist/moduleGovernanceWorkspaceView-DGEV3ZyT.js +0 -667
|
@@ -1,667 +0,0 @@
|
|
|
1
|
-
import { gt as e, p as t, wt as n, yt as r } from "./platform-workbench-CAHoriIf.js";
|
|
2
|
-
import { $i as i, Ar as a, Bn as o, Ci as s, Fn as c, Gn as l, Ii as u, Ni as d, Ti as f, Vn as p, Wi as m, bi as h, gr as g, oa as _, qn as v, wi as y, zi as b } from "./platform-components-Cl5ZZiuU.js";
|
|
3
|
-
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, defineAsyncComponent as k, defineComponent as A, inject as j, nextTick as M, openBlock as N, ref as P, shallowRef as F, toDisplayString as I, unref as L, watch as R, withCtx as z } from "vue";
|
|
4
|
-
//#region src/platform-workbench/workspaceViewContract.ts
|
|
5
|
-
function ee(e) {
|
|
6
|
-
return e;
|
|
7
|
-
}
|
|
8
|
-
//#endregion
|
|
9
|
-
//#region src/platform-admin-runtime/module-menu/moduleMenuClient.ts
|
|
10
|
-
function B(e) {
|
|
11
|
-
let t = g(e, { moduleAlias: "platform.menu_scheme" });
|
|
12
|
-
return {
|
|
13
|
-
async schemes() {
|
|
14
|
-
let e = [];
|
|
15
|
-
for (let n = 1;; n++) {
|
|
16
|
-
let r = await t.query({ page: {
|
|
17
|
-
pageNum: n,
|
|
18
|
-
pageSize: 100
|
|
19
|
-
} });
|
|
20
|
-
if (e.push(...r.records), e.length >= r.total || r.records.length === 0) return e;
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
async tree(t) {
|
|
24
|
-
return (await e.request({
|
|
25
|
-
method: "POST",
|
|
26
|
-
path: "/platform.menu/tree/query",
|
|
27
|
-
headers: { "X-MuYun-Page-Context": JSON.stringify({ scheme: t }) },
|
|
28
|
-
body: { externalQueryValues: { schemeId: t } }
|
|
29
|
-
})).records;
|
|
30
|
-
},
|
|
31
|
-
context(t) {
|
|
32
|
-
return e.request({ path: `/platform.module/${encodeURIComponent(t)}/context` });
|
|
33
|
-
},
|
|
34
|
-
insert(t, n, r) {
|
|
35
|
-
return g(_(e, { "X-MuYun-Page-Context": JSON.stringify({ scheme: t }) }), { moduleAlias: "platform.menu" }).insert(n, { requestId: r });
|
|
36
|
-
},
|
|
37
|
-
view(t, n) {
|
|
38
|
-
return g(_(e, { "X-MuYun-Page-Context": JSON.stringify({ scheme: t }) }), { moduleAlias: "platform.menu" }).view(n);
|
|
39
|
-
},
|
|
40
|
-
receipt(t, n) {
|
|
41
|
-
return g(_(e, { "X-MuYun-Page-Context": JSON.stringify({ scheme: t }) }), { moduleAlias: "platform.menu" }).saveReceipt(n);
|
|
42
|
-
},
|
|
43
|
-
visible: () => n(e).mine().then((e) => e.records)
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function V(e, t = i) {
|
|
47
|
-
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", "尚未确定");
|
|
48
|
-
}
|
|
49
|
-
function H(e, t = "", n = i) {
|
|
50
|
-
return e.flatMap(({ record: e, children: r }) => {
|
|
51
|
-
let i = m(e, "title", n) ?? e.title, a = t ? `${t} / ${i}` : i;
|
|
52
|
-
return [{
|
|
53
|
-
menu: e,
|
|
54
|
-
path: a
|
|
55
|
-
}, ...H(r, a, n)];
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
function U(e, t = !1, n = i) {
|
|
59
|
-
return e.map(({ record: e, children: r }) => {
|
|
60
|
-
let i = t || e.enabled === !1;
|
|
61
|
-
return {
|
|
62
|
-
value: e.id,
|
|
63
|
-
title: m(e, "title", n) ?? e.title,
|
|
64
|
-
disabled: i || !!e.moduleAlias,
|
|
65
|
-
children: U(r, i, n)
|
|
66
|
-
};
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
//#endregion
|
|
70
|
-
//#region src/platform-admin-runtime/module-menu/ModuleMenuEditor.vue?vue&type=script&setup=true&lang.ts
|
|
71
|
-
var W = { class: "module-menu-form" }, G = { key: 0 }, K = {
|
|
72
|
-
key: 1,
|
|
73
|
-
class: "hint"
|
|
74
|
-
}, te = { class: "hint" }, q = {
|
|
75
|
-
key: 2,
|
|
76
|
-
role: "status"
|
|
77
|
-
}, J = { class: "hint" }, Y = {
|
|
78
|
-
key: 1,
|
|
79
|
-
class: "hint"
|
|
80
|
-
}, ne = {
|
|
81
|
-
key: 2,
|
|
82
|
-
role: "status"
|
|
83
|
-
}, X = {
|
|
84
|
-
key: 3,
|
|
85
|
-
role: "status"
|
|
86
|
-
}, Z = {
|
|
87
|
-
key: 5,
|
|
88
|
-
role: "alert"
|
|
89
|
-
}, re = /*#__PURE__*/ v(/* @__PURE__ */ A({
|
|
90
|
-
__name: "ModuleMenuEditor",
|
|
91
|
-
props: {
|
|
92
|
-
session: {},
|
|
93
|
-
showSave: { type: Boolean }
|
|
94
|
-
},
|
|
95
|
-
emits: ["saved", "opened"],
|
|
96
|
-
setup(e, { expose: n, emit: r }) {
|
|
97
|
-
let i = e, a = r, s = i.session, u = s.language, d = t();
|
|
98
|
-
async function f() {
|
|
99
|
-
try {
|
|
100
|
-
await s.startAnother();
|
|
101
|
-
} catch (e) {
|
|
102
|
-
s.reportFailure(e instanceof Error ? e : y(u, "platform.screen.ModuleMenuEditor.cannot-start-a-new-entry-right-now", "暂时无法开始新入口"));
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
let h = S(() => s.loading.value || s.saving.value || s.resultUnknown.value || !s.authorized.value), g = S(() => h.value || s.updating.value), _ = S(() => s.options.value.map((e) => ({
|
|
106
|
-
value: e.id,
|
|
107
|
-
label: `${m(e, "title", u) ?? e.alias ?? e.id} · ${V(e, u)}`
|
|
108
|
-
}))), v = S(() => [{
|
|
109
|
-
value: "root",
|
|
110
|
-
title: u.t("platform.screen.moduleMenuWorkspace.top-level", "顶层"),
|
|
111
|
-
children: U(s.tree.value, !1, u)
|
|
112
|
-
}]);
|
|
113
|
-
async function b() {
|
|
114
|
-
try {
|
|
115
|
-
await (await s.prepare()).execute(), a("saved");
|
|
116
|
-
} catch (e) {
|
|
117
|
-
s.resultUnknown.value || s.reportFailure(e instanceof Error ? e : y(u, "platform.screen.ModuleMenuEditor.cannot-add-the-entry-right-now", "暂时无法添加入口"));
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
async function k() {
|
|
121
|
-
try {
|
|
122
|
-
await s.lookupPending() && a("saved");
|
|
123
|
-
} catch {
|
|
124
|
-
s.reportFailure(y(u, "platform.screen.ModuleMenuEditor.the-result-cannot-be-verified-right-now-retry-the-lookup", "结果暂时无法核实,请重试查询,勿重复添加。"));
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
async function A() {
|
|
128
|
-
await s.refreshVisibility(), s.visibleMenu.value && d?.openMenu && (d.openMenu(s.visibleMenu.value), a("opened"));
|
|
129
|
-
}
|
|
130
|
-
return n({ save: b }), (t, n) => (N(), T("div", W, [
|
|
131
|
-
L(s).saved.value ? (N(), T(x, { key: 1 }, [
|
|
132
|
-
E("strong", null, I(L(u).t("platform.screen.ModuleMenuEditor.added-to-menu", "已添加到菜单")), 1),
|
|
133
|
-
E("p", null, I(L(s).savedPath.value), 1),
|
|
134
|
-
E("p", J, I(L(u).t("platform.screen.ModuleMenuEditor.audience", "适用范围:")) + I(L(s).savedAudience.value), 1),
|
|
135
|
-
L(s).visibleMenu.value && L(d)?.openMenu ? (N(), C(L(l), {
|
|
136
|
-
key: 0,
|
|
137
|
-
type: "primary",
|
|
138
|
-
onClick: A
|
|
139
|
-
}, {
|
|
140
|
-
default: z(() => [D(I(L(u).t("platform.screen.ModuleMenuEntriesSection.open", "打开")), 1)]),
|
|
141
|
-
_: 1
|
|
142
|
-
})) : L(s).visibilityChecked.value ? (N(), T("p", Y, I(L(u).t("platform.screen.ModuleMenuEditor.the-entry-was-saved-but-is-not-visible-in-navigation", "入口已保存,当前登录身份的导航暂不可见。请由适用范围内的使用者核实;若其也看不到,再检查上级菜单状态和业务访问权限。")), 1)) : w("v-if", !0),
|
|
143
|
-
O(L(l), {
|
|
144
|
-
disabled: L(s).saving.value,
|
|
145
|
-
onClick: f
|
|
146
|
-
}, {
|
|
147
|
-
default: z(() => [D(I(L(u).t("platform.screen.ModuleMenuEditor.add-another-entry", "另加一个入口")), 1)]),
|
|
148
|
-
_: 1
|
|
149
|
-
}, 8, ["disabled"]),
|
|
150
|
-
L(s).error.value ? (N(), C(L(l), {
|
|
151
|
-
key: 2,
|
|
152
|
-
disabled: L(s).saving.value,
|
|
153
|
-
onClick: L(s).refreshVisibility
|
|
154
|
-
}, {
|
|
155
|
-
default: z(() => [D(I(L(u).t("platform.screen.ModuleMenuEditor.refresh-navigation", "刷新导航")), 1)]),
|
|
156
|
-
_: 1
|
|
157
|
-
}, 8, ["disabled", "onClick"])) : w("v-if", !0)
|
|
158
|
-
], 64)) : (N(), T(x, { key: 0 }, [
|
|
159
|
-
E("label", null, [D(I(L(u).t("platform.screen.ModuleMenuEditor.menu-name", "菜单名称")), 1), O(L(o), {
|
|
160
|
-
value: L(s).title.value,
|
|
161
|
-
disabled: g.value,
|
|
162
|
-
"aria-label": L(u).t("platform.screen.ModuleMenuEditor.menu-name", "菜单名称"),
|
|
163
|
-
"onUpdate:value": n[0] ||= (e) => L(s).update({ title: String(e ?? "") })
|
|
164
|
-
}, null, 8, [
|
|
165
|
-
"value",
|
|
166
|
-
"disabled",
|
|
167
|
-
"aria-label"
|
|
168
|
-
])]),
|
|
169
|
-
_.value.length > 1 ? (N(), T("label", G, [D(I(L(u).t("platform.screen.ModuleMenuEditor.menu-scheme", "菜单方案")), 1), O(L(p), {
|
|
170
|
-
value: L(s).schemeId.value,
|
|
171
|
-
options: _.value,
|
|
172
|
-
"allow-clear": !1,
|
|
173
|
-
disabled: h.value,
|
|
174
|
-
"onUpdate:value": n[1] ||= (e) => L(s).update({ schemeId: String(e ?? "") })
|
|
175
|
-
}, null, 8, [
|
|
176
|
-
"value",
|
|
177
|
-
"options",
|
|
178
|
-
"disabled"
|
|
179
|
-
])])) : w("v-if", !0),
|
|
180
|
-
E("label", null, [D(I(L(u).t("platform.screen.ModuleMenuEditor.position", "放置位置")), 1), O(L(c), {
|
|
181
|
-
value: L(s).parentId.value,
|
|
182
|
-
"tree-data": v.value,
|
|
183
|
-
"allow-clear": !1,
|
|
184
|
-
disabled: g.value,
|
|
185
|
-
loading: L(s).loading.value || L(s).updating.value,
|
|
186
|
-
"onUpdate:value": n[2] ||= (e) => L(s).update({ parentId: String(e ?? "root") })
|
|
187
|
-
}, null, 8, [
|
|
188
|
-
"value",
|
|
189
|
-
"tree-data",
|
|
190
|
-
"disabled",
|
|
191
|
-
"loading"
|
|
192
|
-
])]),
|
|
193
|
-
E("details", null, [E("summary", null, I(L(u).t("platform.screen.ModuleMenuEditor.more-settings", "更多设置")), 1), E("label", null, [D(I(L(u).t("platform.screen.ModuleMenuEditor.open-mode", "打开方式")), 1), O(L(p), {
|
|
194
|
-
value: L(s).openMode.value,
|
|
195
|
-
"allow-clear": !1,
|
|
196
|
-
disabled: g.value,
|
|
197
|
-
options: [{
|
|
198
|
-
value: "tab",
|
|
199
|
-
label: L(u).t("platform.screen.ModuleMenuEditor.open-in-a-workbench-tab", "页签内打开")
|
|
200
|
-
}, {
|
|
201
|
-
value: "window",
|
|
202
|
-
label: L(u).t("platform.screen.ModuleMenuEditor.open-in-a-new-window", "新窗口打开")
|
|
203
|
-
}],
|
|
204
|
-
"onUpdate:value": n[3] ||= (e) => L(s).update({ openMode: e === "window" ? "window" : "tab" })
|
|
205
|
-
}, null, 8, [
|
|
206
|
-
"value",
|
|
207
|
-
"disabled",
|
|
208
|
-
"options"
|
|
209
|
-
])])]),
|
|
210
|
-
L(s).duplicate.value ? (N(), T("p", K, I(L(u).t("platform.screen.ModuleMenuEditor.duplicate-position", "此位置已有「{title}」,仍可另加入口。", { title: L(m)(L(s).duplicate.value.menu, "title", L(u)) })), 1)) : w("v-if", !0),
|
|
211
|
-
E("p", te, I(L(u).t("platform.screen.ModuleMenuEditor.adds-an-access-entry-only-it-does-not-activate-applications", "只添加访问入口,不开通应用或授予业务权限。")), 1),
|
|
212
|
-
L(s).updating.value ? (N(), T("p", q, I(L(u).t("platform.screen.ModuleMenuEditor.loading-the-menu-scheme-wait-for-the-candidate-to-be", "正在读取菜单方案,请等待候选就绪。")), 1)) : w("v-if", !0),
|
|
213
|
-
e.showSave && !L(s).resultUnknown.value ? (N(), C(L(l), {
|
|
214
|
-
key: 3,
|
|
215
|
-
type: "primary",
|
|
216
|
-
disabled: !L(s).canSave.value,
|
|
217
|
-
loading: L(s).saving.value,
|
|
218
|
-
onClick: b
|
|
219
|
-
}, {
|
|
220
|
-
default: z(() => [D(I(L(u).t("platform.screen.ModuleMenuEditor.add-entry", "添加入口")), 1)]),
|
|
221
|
-
_: 1
|
|
222
|
-
}, 8, ["disabled", "loading"])) : w("v-if", !0),
|
|
223
|
-
L(s).resultUnknown.value ? (N(), C(L(l), {
|
|
224
|
-
key: 4,
|
|
225
|
-
onClick: k
|
|
226
|
-
}, {
|
|
227
|
-
default: z(() => [D(I(L(u).t("platform.screen.ModuleMenuEditor.check-save-result", "查询保存结果")), 1)]),
|
|
228
|
-
_: 1
|
|
229
|
-
})) : w("v-if", !0)
|
|
230
|
-
], 64)),
|
|
231
|
-
L(s).entryIssue.value ? (N(), T("p", ne, I(L(s).entryIssue.value), 1)) : w("v-if", !0),
|
|
232
|
-
L(s).ready.value && !L(s).authorized.value ? (N(), T("p", X, I(L(u).t("platform.screen.ModuleMenuEditor.you-do-not-have-permission-to-add-menu-entries", "当前没有添加菜单入口权限。")), 1)) : w("v-if", !0),
|
|
233
|
-
L(s).error.value && L(s).ready.value && !L(s).saved.value && !L(s).resultUnknown.value ? (N(), C(L(l), {
|
|
234
|
-
key: 4,
|
|
235
|
-
disabled: L(s).saving.value,
|
|
236
|
-
onClick: L(s).load
|
|
237
|
-
}, {
|
|
238
|
-
default: z(() => [D(I(L(u).t("platform.screen.ModuleMenuEditor.reload-candidate", "重新读取候选")), 1)]),
|
|
239
|
-
_: 1
|
|
240
|
-
}, 8, ["disabled", "onClick"])) : w("v-if", !0),
|
|
241
|
-
L(s).error.value ? (N(), T("p", Z, I(L(s).error.value), 1)) : w("v-if", !0),
|
|
242
|
-
L(s).error.value && !L(s).ready.value && !L(s).resultUnknown.value ? (N(), C(L(l), {
|
|
243
|
-
key: 6,
|
|
244
|
-
disabled: L(s).saving.value,
|
|
245
|
-
onClick: L(s).load
|
|
246
|
-
}, {
|
|
247
|
-
default: z(() => [D(I(L(u).t("platform.screen.WorkflowWorkbenchView.retry", "重试")), 1)]),
|
|
248
|
-
_: 1
|
|
249
|
-
}, 8, ["disabled", "onClick"])) : w("v-if", !0)
|
|
250
|
-
]));
|
|
251
|
-
}
|
|
252
|
-
}), [["__scopeId", "data-v-7043fb84"]]);
|
|
253
|
-
//#endregion
|
|
254
|
-
//#region src/platform-admin-runtime/module-menu/moduleMenuReceiptStore.ts
|
|
255
|
-
function ie(e, t, n, r = a, o, c = i) {
|
|
256
|
-
let l = `muyun.menu-pending.${JSON.stringify([e, t])}`, u = { persistence: "backend" }, d;
|
|
257
|
-
function f() {
|
|
258
|
-
if (!n()) throw new s(y(c, "platform.screen.moduleMenuReceiptStore.the-menu-editing-identity-has-changed", "菜单编辑身份已变化"));
|
|
259
|
-
return o ?? window.sessionStorage;
|
|
260
|
-
}
|
|
261
|
-
function p(e) {
|
|
262
|
-
if (!/^[a-zA-Z0-9-]{16,80}$/.test(e)) throw new s(y(c, "platform.screen.moduleMenuReceiptStore.the-original-entry-lookup-reference-is-invalid", "原入口查询标识无效"));
|
|
263
|
-
return `menu.pending.r${e.toLowerCase().replaceAll("-", "")}`;
|
|
264
|
-
}
|
|
265
|
-
return {
|
|
266
|
-
async restore() {
|
|
267
|
-
if (d = f().getItem(l) ?? void 0, !d) return;
|
|
268
|
-
let e = await r.restore(p(d), void 0, u);
|
|
269
|
-
if (!e) throw new s(y(c, "platform.screen.moduleMenuReceiptStore.the-original-entry-lookup-reference-cannot-be-read-right-now", "原入口查询引用暂不可读取,请核实后重试"));
|
|
270
|
-
return e;
|
|
271
|
-
},
|
|
272
|
-
async save(e) {
|
|
273
|
-
if (e.kind !== "record-save") throw new s(y(c, "platform.screen.moduleMenuReceiptStore.the-original-entry-lookup-reference-is-invalid", "原入口查询标识无效"));
|
|
274
|
-
let t = f();
|
|
275
|
-
d = e.requestId, await r.set(p(d), e, u), f(), t.setItem(l, d);
|
|
276
|
-
},
|
|
277
|
-
async clear() {
|
|
278
|
-
let e = f(), t = d;
|
|
279
|
-
t && (await r.remove(p(t), u), f(), e.getItem(l) === t && e.removeItem(l), d === t && (d = void 0));
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
//#endregion
|
|
284
|
-
//#region src/platform-admin-runtime/module-menu/moduleMenuSession.ts
|
|
285
|
-
function ae(t, n, a, o, c = t.visible, l = i) {
|
|
286
|
-
let p = P(0), g = P(!1), _ = P(!1), v = P(!1), x = F(), C = S(() => x.value ? x.value instanceof s || x.value instanceof h ? f(x.value, l) : b(u(x.value), l) : "");
|
|
287
|
-
function w(e) {
|
|
288
|
-
x.value = e instanceof Error ? e : new s(e);
|
|
289
|
-
}
|
|
290
|
-
function T(e) {
|
|
291
|
-
w(e instanceof Error ? e : y(l, "platform.screen.moduleMenuSession.the-operation-is-temporarily-unavailable-retry", "操作暂不可用,请重试。"));
|
|
292
|
-
}
|
|
293
|
-
let E = F(), D = S(() => E.value ? ce(E.value, l) : ""), O = P(""), k = P(""), A = P("root"), j = P("tab"), M = F([]), N = F([]), I = F(), L = P(""), R = F(), z = P(""), ee = S(() => R.value ? V(R.value, l) : z.value), B = F(), U = P(!1), W = P(!1), G = P(!1), K = P(!1), te = !1, q = 0, J = 0, Y, ne = !1, X = () => !te && a.valid(), Z = S(() => M.value.filter((e) => e.enabled !== !1 && e.id)), re = S(() => se(N.value, l)), ie = S(() => X() && G.value && W.value && !g.value && !_.value && !v.value && !Y && !I.value && !D.value && !!O.value.trim()), ae = S(() => H(N.value, "", l).find(({ menu: e }) => e.moduleAlias === n && e.parentId === A.value));
|
|
294
|
-
function Q() {
|
|
295
|
-
if (!X()) throw new s(y(l, "platform.screen.moduleMenuSession.the-menu-editing-scope-has-changed-reopen-the-editor", "菜单编辑范围已变化,请重新打开"));
|
|
296
|
-
}
|
|
297
|
-
function $(e = !1) {
|
|
298
|
-
if (Q(), !G.value || !W.value || g.value || v.value || Y || I.value || !e && _.value) throw new s(y(l, "platform.screen.moduleMenuSession.wait-for-the-menu-candidate-to-be-ready-or-check", "请先等待菜单候选就绪,或查询未确定的保存结果"));
|
|
299
|
-
}
|
|
300
|
-
async function de() {
|
|
301
|
-
if (Q(), I.value || Y && G.value) return;
|
|
302
|
-
J++, _.value = !1;
|
|
303
|
-
let e = ++q;
|
|
304
|
-
g.value = !0, G.value = !1, x.value = void 0;
|
|
305
|
-
try {
|
|
306
|
-
if (!ne) {
|
|
307
|
-
let t = await o.restore();
|
|
308
|
-
if (!X() || e !== q) return;
|
|
309
|
-
if (t) {
|
|
310
|
-
let e = r(t);
|
|
311
|
-
if (e.kind !== "record-save" || e.moduleAlias !== "platform.menu" || !e.pageContext?.scheme) throw new s(y(l, "platform.screen.moduleMenuSession.the-original-entry-lookup-scope-is-invalid-verify-the-save", "原入口查询范围无效,请核实保存结果后继续"));
|
|
312
|
-
Y = {
|
|
313
|
-
requestId: e.requestId,
|
|
314
|
-
schemeId: e.pageContext.scheme
|
|
315
|
-
}, K.value = !0;
|
|
316
|
-
}
|
|
317
|
-
ne = !0;
|
|
318
|
-
}
|
|
319
|
-
let [i, a, c, u] = await Promise.all([
|
|
320
|
-
t.schemes(),
|
|
321
|
-
t.context(n),
|
|
322
|
-
t.context("platform.menu"),
|
|
323
|
-
t.visible()
|
|
324
|
-
]);
|
|
325
|
-
if (!X() || e !== q) return;
|
|
326
|
-
W.value = c.actions.some((e) => e.actionCode === "create" && e.authorized), E.value = a, M.value = i, O.value ||= a.title ?? n, j.value = a.entryType === "link" ? "window" : "tab";
|
|
327
|
-
let d = u[0]?.record.schemeId, f = Z.value.find((e) => e.id === (Y?.schemeId ?? k.value)) ?? Z.value.find((e) => e.id === d) ?? Z.value[0];
|
|
328
|
-
if (!f?.id) throw new s(y(l, "platform.screen.moduleMenuSession.no-menu-schemes-are-available-configure-an-applicable-scheme-first", "暂无可用菜单方案,请先配置适用的菜单方案"));
|
|
329
|
-
let m = await t.tree(f.id);
|
|
330
|
-
if (!X() || e !== q) return;
|
|
331
|
-
k.value = f.id, N.value = m, A.value = "root", G.value = !0, p.value++;
|
|
332
|
-
} catch (t) {
|
|
333
|
-
X() && e === q && T(t);
|
|
334
|
-
} finally {
|
|
335
|
-
X() && e === q && (g.value = !1);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
function fe(e) {
|
|
339
|
-
let n = e.schemeId ?? k.value;
|
|
340
|
-
if (!Z.value.some((e) => e.id === n)) throw new s(y(l, "platform.screen.moduleMenuSession.select-an-available-menu-scheme", "请选择当前可用的菜单方案"));
|
|
341
|
-
let r = e.title ?? O.value;
|
|
342
|
-
if ([...r].length > 120) throw new s(y(l, "platform.screen.moduleMenuSession.the-menu-name-must-not-exceed-120-characters", "菜单名称不能超过120个字符"));
|
|
343
|
-
let i = e.parentId ?? (n === k.value ? A.value : "root"), a = e.openMode ?? j.value, o = (e) => {
|
|
344
|
-
if (i !== "root" && !se(e).some((e) => e.menu.id === i)) throw new s(y(l, "platform.screen.moduleMenuSession.select-an-enabled-directory-in-the-current-scheme", "请选择当前方案中的启用目录"));
|
|
345
|
-
return {
|
|
346
|
-
schemeId: n,
|
|
347
|
-
nodes: e,
|
|
348
|
-
parentId: i,
|
|
349
|
-
title: r,
|
|
350
|
-
openMode: a
|
|
351
|
-
};
|
|
352
|
-
};
|
|
353
|
-
return n === k.value ? o(N.value) : t.tree(n).then(o);
|
|
354
|
-
}
|
|
355
|
-
function pe(e) {
|
|
356
|
-
k.value = e.schemeId, N.value = e.nodes, A.value = e.parentId, O.value = e.title, j.value = e.openMode, p.value++;
|
|
357
|
-
}
|
|
358
|
-
async function me(e) {
|
|
359
|
-
$();
|
|
360
|
-
let t = p.value, n = await fe(e);
|
|
361
|
-
return () => {
|
|
362
|
-
if ($(), t !== p.value) throw new s(y(l, "platform.screen.moduleMenuSession.the-menu-candidate-has-changed-reload-it", "菜单候选已变化,请重新读取"));
|
|
363
|
-
pe(n);
|
|
364
|
-
};
|
|
365
|
-
}
|
|
366
|
-
async function he(e) {
|
|
367
|
-
let t;
|
|
368
|
-
try {
|
|
369
|
-
$(!0), t = ++J, _.value = !0;
|
|
370
|
-
let n = ++p.value;
|
|
371
|
-
x.value = void 0;
|
|
372
|
-
let r = fe(e), i = "then" in r ? await r : r;
|
|
373
|
-
if (!X() || t !== J) return;
|
|
374
|
-
if ($(!0), n !== p.value) throw new s(y(l, "platform.screen.moduleMenuSession.the-menu-candidate-has-changed-reload-it", "菜单候选已变化,请重新读取"));
|
|
375
|
-
pe(i), x.value = void 0;
|
|
376
|
-
} catch (e) {
|
|
377
|
-
X() && (t === void 0 || t === J) && T(e);
|
|
378
|
-
} finally {
|
|
379
|
-
t === J && (_.value = !1);
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
async function ge() {
|
|
383
|
-
Q();
|
|
384
|
-
let e = I.value?.id;
|
|
385
|
-
if (e) {
|
|
386
|
-
U.value = !1, B.value = void 0;
|
|
387
|
-
try {
|
|
388
|
-
let t = await c();
|
|
389
|
-
if (!X() || I.value?.id !== e) return;
|
|
390
|
-
B.value = H(t).find(({ menu: t }) => t.id === e)?.menu, U.value = !0, x.value = void 0;
|
|
391
|
-
} catch {
|
|
392
|
-
X() && w(y(l, "platform.screen.moduleMenuSession.the-menu-was-added-but-navigation-could-not-be-refreshed", "菜单已添加,导航刷新失败。请查询或刷新导航,无需重复添加。"));
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
async function _e(e, n) {
|
|
397
|
-
if (X()) {
|
|
398
|
-
let r = Y, i = n ?? (r.record ? {
|
|
399
|
-
...r.record,
|
|
400
|
-
id: e
|
|
401
|
-
} : await t.view(r.schemeId, e));
|
|
402
|
-
Q(), I.value = i;
|
|
403
|
-
let a = r.audienceScheme ?? Z.value.find((e) => e.id === i.schemeId);
|
|
404
|
-
R.value = a ? { ...a } : void 0, z.value = r.audience ?? "", L.value = r.path ?? [
|
|
405
|
-
(() => {
|
|
406
|
-
let e = Z.value.find((e) => e.id === i.schemeId);
|
|
407
|
-
return e && m(e, "title", l);
|
|
408
|
-
})(),
|
|
409
|
-
H(N.value, "", l).find(({ menu: e }) => e.id === i.parentId)?.path,
|
|
410
|
-
i.title
|
|
411
|
-
].filter(Boolean).join(" / "), Y = void 0, K.value = !1, p.value++, await o.clear().catch(() => {}), X() && await ge();
|
|
412
|
-
}
|
|
413
|
-
return {
|
|
414
|
-
title: l.t("platform.screen.moduleMenuSession.menu-entry-saved", "菜单入口已保存"),
|
|
415
|
-
lines: X() ? [L.value, U.value ? B.value ? l.t("platform.screen.moduleMenuSession.visible-to-the-current-user-the-business-page-can-be", "当前用户可见,可打开业务页面。") : l.t("platform.screen.moduleMenuSession.the-entry-was-saved-but-is-not-visible-to-the", "入口已保存;当前登录身份暂不可见,请由适用范围内的使用者核实导航。") : l.t("platform.screen.moduleMenuSession.navigation-visibility-has-not-been-verified-do-not-add-the", "导航可见性尚未核实;不要重复添加。")] : [l.t("platform.screen.moduleMenuSession.the-save-completed-verify-the-entry-in-its-original-scope", "保存已完成,请在原范围核实入口。")]
|
|
416
|
-
};
|
|
417
|
-
}
|
|
418
|
-
async function ve(e, r) {
|
|
419
|
-
let [i, a, o, s] = await Promise.all([
|
|
420
|
-
t.context(n),
|
|
421
|
-
t.context("platform.menu"),
|
|
422
|
-
t.schemes(),
|
|
423
|
-
t.tree(e.schemeId)
|
|
424
|
-
]);
|
|
425
|
-
if (Q(), !a.actions.some((e) => e.actionCode === "create" && e.authorized)) throw new h(y(l, "platform.screen.moduleMenuSession.you-do-not-have-permission-to-add-menu-entries", "当前没有添加菜单入口权限"));
|
|
426
|
-
let c = le(i, l);
|
|
427
|
-
if (c) throw new h(c);
|
|
428
|
-
let u = o.find((t) => t.id === e.schemeId && t.enabled !== !1);
|
|
429
|
-
if (!u) throw new h(y(l, "platform.screen.moduleMenuSession.the-menu-scheme-is-no-longer-available", "菜单方案已不可用"));
|
|
430
|
-
if (e.parentId !== "root" && !se(s).some((t) => t.menu.id === e.parentId)) throw new h(y(l, "platform.screen.moduleMenuSession.the-target-directory-is-no-longer-available-review-the-entry", "放置目录已不可用,请重新审阅"));
|
|
431
|
-
let d = e.parentId === "root" ? [] : oe(s, e.parentId), f = JSON.stringify([
|
|
432
|
-
u.id,
|
|
433
|
-
u.alias ?? null,
|
|
434
|
-
u.title ?? null,
|
|
435
|
-
u.scopeType ?? null,
|
|
436
|
-
u.tenantId ?? null,
|
|
437
|
-
u.organizationId ?? null,
|
|
438
|
-
d.map((e) => [e.id, e.title])
|
|
439
|
-
]);
|
|
440
|
-
if (r && f !== r) throw new h(y(l, "platform.screen.moduleMenuSession.the-menu-scheme-audience-or-directory-has-changed-reload-and", "菜单方案适用范围或目录已变化,请重新读取候选并审阅"));
|
|
441
|
-
return {
|
|
442
|
-
scheme: u,
|
|
443
|
-
signature: f,
|
|
444
|
-
path: [
|
|
445
|
-
m(u, "title", l) ?? u.alias,
|
|
446
|
-
...d.map((e) => m(e, "title", l)),
|
|
447
|
-
e.title
|
|
448
|
-
].filter(Boolean).join(" / ")
|
|
449
|
-
};
|
|
450
|
-
}
|
|
451
|
-
async function ye() {
|
|
452
|
-
if ($(), !ie.value) throw new s(y(l, "platform.screen.moduleMenuSession.provide-a-menu-name-and-an-available-business-page", "请补齐菜单名称及可用业务页面"));
|
|
453
|
-
let r = p.value, i = {
|
|
454
|
-
moduleAlias: n,
|
|
455
|
-
schemeId: k.value,
|
|
456
|
-
parentId: A.value,
|
|
457
|
-
title: O.value.trim(),
|
|
458
|
-
openMode: j.value,
|
|
459
|
-
enabled: !0
|
|
460
|
-
}, c = await ve(i);
|
|
461
|
-
if ($(), p.value !== r) throw new s(y(l, "platform.screen.moduleMenuSession.the-menu-candidate-has-changed-review-it-again", "菜单候选已变化,请重新审阅"));
|
|
462
|
-
let u = c.path, f = e(), g = () => X() && a.active() && G.value && W.value && !_.value && !Y && !I.value && p.value === r, b = {
|
|
463
|
-
kind: "record-save",
|
|
464
|
-
moduleAlias: "platform.menu",
|
|
465
|
-
requestId: f,
|
|
466
|
-
pageContext: { scheme: i.schemeId }
|
|
467
|
-
};
|
|
468
|
-
return {
|
|
469
|
-
receiptReference: b,
|
|
470
|
-
presentation: {
|
|
471
|
-
title: l.t("platform.screen.moduleMenuSession.add-a-business-entry", "添加业务入口"),
|
|
472
|
-
lines: [
|
|
473
|
-
u,
|
|
474
|
-
l.t("platform.screen.moduleMenuSession.audience-value", "适用范围:{value1}", { value1: V(c.scheme, l) }),
|
|
475
|
-
l.t("platform.screen.moduleMenuSession.open-mode-value", "打开方式:{value1}", { value1: i.openMode === "window" ? l.t("platform.screen.moduleMenuSession.new-window", "新窗口") : l.t("platform.screen.moduleMenuSession.workbench-tab", "页签内") }),
|
|
476
|
-
l.t("platform.screen.moduleMenuSession.adds-an-entry-only-it-does-not-activate-applications-or", "只添加入口,不开通应用或授予业务权限。"),
|
|
477
|
-
...ae.value ? [l.t("platform.screen.moduleMenuSession.this-position-already-contains-value-another-entry-will-be-added", "此位置已有「{value1}」,本次将另加一个入口。", { value1: m(ae.value.menu, "title", l) })] : []
|
|
478
|
-
],
|
|
479
|
-
details: {
|
|
480
|
-
title: l.t("platform.screen.moduleMenuSession.view-target-module", "查看目标模块"),
|
|
481
|
-
lines: [n]
|
|
482
|
-
}
|
|
483
|
-
},
|
|
484
|
-
confirmLabel: l.t("platform.screen.moduleMenuSession.confirm-entry-creation", "确认添加入口"),
|
|
485
|
-
expiresAt: Date.now() + 3e5,
|
|
486
|
-
isCurrent: g,
|
|
487
|
-
async execute() {
|
|
488
|
-
if (!g() || v.value) throw new h(y(l, "platform.screen.moduleMenuSession.the-menu-candidate-or-editing-scope-has-changed-review-it", "菜单候选或编辑范围已变化,请重新审阅"));
|
|
489
|
-
v.value = !0, x.value = void 0;
|
|
490
|
-
let e = !1;
|
|
491
|
-
try {
|
|
492
|
-
if (await ve(i, c.signature), !g() || (Y = {
|
|
493
|
-
requestId: f,
|
|
494
|
-
schemeId: i.schemeId,
|
|
495
|
-
record: i,
|
|
496
|
-
path: u,
|
|
497
|
-
audience: V(c.scheme, l),
|
|
498
|
-
audienceScheme: { ...c.scheme }
|
|
499
|
-
}, await o.save(b), !X() || !a.active() || p.value !== r)) throw new h(y(l, "platform.screen.moduleMenuSession.the-menu-candidate-or-editing-scope-has-changed-review-it", "菜单候选或编辑范围已变化,请重新审阅"));
|
|
500
|
-
e = !0;
|
|
501
|
-
let n = await t.insert(i.schemeId, i, f);
|
|
502
|
-
return await _e(n.record.id, n.record);
|
|
503
|
-
} catch (t) {
|
|
504
|
-
if (X()) {
|
|
505
|
-
if (!e || t instanceof h || t instanceof d && [
|
|
506
|
-
400,
|
|
507
|
-
401,
|
|
508
|
-
403,
|
|
509
|
-
404,
|
|
510
|
-
409,
|
|
511
|
-
422
|
|
512
|
-
].includes(t.status ?? 0)) {
|
|
513
|
-
try {
|
|
514
|
-
Y && await o.clear(), Y = void 0;
|
|
515
|
-
} catch {
|
|
516
|
-
Y && (Y.rejected = !0), K.value = !0, w(y(l, "platform.screen.moduleMenuSession.the-operation-was-not-submitted-but-the-original-request-reference", "操作未提交,但原请求标识尚未清除,请先查询结果。"));
|
|
517
|
-
}
|
|
518
|
-
throw new h(ue(t, l));
|
|
519
|
-
}
|
|
520
|
-
Y && (K.value = !0, p.value++), Y ? w(y(l, "platform.screen.moduleMenuSession.the-save-result-is-unresolved-check-the-original-request-result", "保存结果尚未确定,请查询原请求结果,勿重复添加。")) : T(t);
|
|
521
|
-
}
|
|
522
|
-
throw t;
|
|
523
|
-
} finally {
|
|
524
|
-
X() && (v.value = !1);
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
lookup: be
|
|
528
|
-
};
|
|
529
|
-
}
|
|
530
|
-
async function be() {
|
|
531
|
-
if (Q(), !Y || v.value) return;
|
|
532
|
-
let e = Y;
|
|
533
|
-
if (e.rejected) return await o.clear(), Q(), Y === e ? (Y = void 0, K.value = !1, x.value = void 0, p.value++, {
|
|
534
|
-
title: l.t("platform.operation.not-submitted", "操作未提交"),
|
|
535
|
-
lines: [l.t("platform.screen.moduleMenuSession.the-recovery-reference-was-cleared-you-can-review-and-add", "恢复标识已清除,可以重新审阅并添加入口。")]
|
|
536
|
-
}) : void 0;
|
|
537
|
-
let n = await t.receipt(e.schemeId, e.requestId);
|
|
538
|
-
if (Q(), Y === e && n.committed && n.recordId) return _e(n.recordId);
|
|
539
|
-
}
|
|
540
|
-
return {
|
|
541
|
-
moduleAlias: n,
|
|
542
|
-
language: l,
|
|
543
|
-
revision: p,
|
|
544
|
-
loading: g,
|
|
545
|
-
updating: _,
|
|
546
|
-
saving: v,
|
|
547
|
-
error: C,
|
|
548
|
-
reportFailure: w,
|
|
549
|
-
failureCause: () => x.value,
|
|
550
|
-
entryIssue: D,
|
|
551
|
-
title: O,
|
|
552
|
-
schemeId: k,
|
|
553
|
-
parentId: A,
|
|
554
|
-
openMode: j,
|
|
555
|
-
schemes: M,
|
|
556
|
-
tree: N,
|
|
557
|
-
options: Z,
|
|
558
|
-
directories: re,
|
|
559
|
-
saved: I,
|
|
560
|
-
savedPath: L,
|
|
561
|
-
savedAudience: ee,
|
|
562
|
-
visibleMenu: B,
|
|
563
|
-
visibilityChecked: U,
|
|
564
|
-
authorized: W,
|
|
565
|
-
ready: G,
|
|
566
|
-
resultUnknown: K,
|
|
567
|
-
canSave: ie,
|
|
568
|
-
duplicate: ae,
|
|
569
|
-
load: de,
|
|
570
|
-
update: he,
|
|
571
|
-
planRevision: me,
|
|
572
|
-
prepare: ye,
|
|
573
|
-
lookupPending: be,
|
|
574
|
-
refreshVisibility: ge,
|
|
575
|
-
async startAnother() {
|
|
576
|
-
if (Q(), !I.value || v.value || Y) throw new s(y(l, "platform.screen.moduleMenuSession.verify-the-current-entry-save-result-first", "请先核实当前入口保存结果"));
|
|
577
|
-
await o.clear(), Q(), I.value = void 0, L.value = "", R.value = void 0, z.value = "", B.value = void 0, U.value = !1, G.value = !1, p.value++, await de();
|
|
578
|
-
},
|
|
579
|
-
dispose() {
|
|
580
|
-
te = !0, q++, J++, _.value = !1, p.value++;
|
|
581
|
-
},
|
|
582
|
-
invalidate() {
|
|
583
|
-
J++, _.value = !1, p.value++;
|
|
584
|
-
}
|
|
585
|
-
};
|
|
586
|
-
}
|
|
587
|
-
function oe(e, t, n = []) {
|
|
588
|
-
for (let r of e) {
|
|
589
|
-
let e = [...n, r.record];
|
|
590
|
-
if (r.record.id === t) return e;
|
|
591
|
-
let i = oe(r.children, t, e);
|
|
592
|
-
if (i.length) return i;
|
|
593
|
-
}
|
|
594
|
-
return [];
|
|
595
|
-
}
|
|
596
|
-
function se(e, t = i) {
|
|
597
|
-
let n = (e) => e.filter(({ record: e }) => e.enabled !== !1).map((e) => ({
|
|
598
|
-
...e,
|
|
599
|
-
children: n(e.children)
|
|
600
|
-
}));
|
|
601
|
-
return H(n(e), "", t).filter(({ menu: e }) => !e.moduleAlias);
|
|
602
|
-
}
|
|
603
|
-
function ce(e, t = i) {
|
|
604
|
-
return le(e, t)?.message ?? "";
|
|
605
|
-
}
|
|
606
|
-
function le(e, t) {
|
|
607
|
-
return e.entryType === "route" ? e.entryRoute ? void 0 : y(t, "platform.screen.moduleMenuSession.this-module-has-no-page-address-return-to-its-configuration", "该模块尚未配置页面地址,请返回模块补充。") : e.entryType === "link" ? e.entryExternalUrl ? void 0 : y(t, "platform.screen.moduleMenuSession.this-module-has-no-link-address-return-to-its-configuration", "该模块尚未配置链接地址,请返回模块补充。") : e.uiDescriptor?.page ? void 0 : y(t, "platform.screen.moduleMenuSession.this-module-has-no-available-business-page-publish-its-page", "该模块尚无可用业务页面,请先发布页面配置。");
|
|
608
|
-
}
|
|
609
|
-
function ue(e, t = i) {
|
|
610
|
-
return e instanceof s || e instanceof h ? e.textMessage ?? e.message : e instanceof Error ? e.message : y(t, "platform.screen.moduleMenuSession.the-operation-is-temporarily-unavailable-retry", "操作暂不可用,请重试。");
|
|
611
|
-
}
|
|
612
|
-
//#endregion
|
|
613
|
-
//#region src/views/configurationEditorNavigation.ts
|
|
614
|
-
async function Q(e, t, n = i) {
|
|
615
|
-
if (t?.aborted || (e() || await new Promise((r, i) => {
|
|
616
|
-
let a = (e) => {
|
|
617
|
-
c(), clearTimeout(l), t?.removeEventListener("abort", o), e ? i(e) : r();
|
|
618
|
-
}, o = () => a(new DOMException("Navigation cancelled", "AbortError")), c = R(e, (e) => {
|
|
619
|
-
e && a();
|
|
620
|
-
}, { flush: "post" }), l = setTimeout(() => a(new s(y(n, "platform.screen.configurationEditorNavigation.the-configuration-page-is-not-ready-reopen-it-before-continuing", "配置页面尚未就绪,请重新打开后继续。"))), 15e3);
|
|
621
|
-
t?.addEventListener("abort", o, { once: !0 });
|
|
622
|
-
}), await M(), t?.aborted)) throw new DOMException("Navigation cancelled", "AbortError");
|
|
623
|
-
}
|
|
624
|
-
//#endregion
|
|
625
|
-
//#region src/platform-admin-runtime/module-menu/moduleMenuWorkspace.ts
|
|
626
|
-
var $ = Symbol("module-menu-workspace");
|
|
627
|
-
function de() {
|
|
628
|
-
return j($, void 0);
|
|
629
|
-
}
|
|
630
|
-
//#endregion
|
|
631
|
-
//#region src/views/moduleGovernanceWorkspaceView.ts
|
|
632
|
-
var fe = [
|
|
633
|
-
"overview",
|
|
634
|
-
"metadata",
|
|
635
|
-
"actions",
|
|
636
|
-
"rules",
|
|
637
|
-
"ui",
|
|
638
|
-
"menu",
|
|
639
|
-
"preview"
|
|
640
|
-
], pe = ee({
|
|
641
|
-
type: "platform.module.governance",
|
|
642
|
-
route: "/_platform/workspace/platform.module.governance",
|
|
643
|
-
moduleAlias: "platform.module",
|
|
644
|
-
component: k(() => import("./ModuleGovernanceView-DsqR_Sj7.js")),
|
|
645
|
-
layout: "workspace",
|
|
646
|
-
routeTitle: "模块管理",
|
|
647
|
-
routeTitleKey: "platform.workspace-view.modules.route-title",
|
|
648
|
-
presentations: ["tab"],
|
|
649
|
-
titleArgsOf: (e) => ({ module: e.moduleTitle ?? e.moduleAlias }),
|
|
650
|
-
titleKey: "platform.workspace-view.governance.title",
|
|
651
|
-
titleOf: (e) => `低代码治理:${e.moduleTitle ?? e.moduleAlias}`,
|
|
652
|
-
tabIdentityParamsOf: (e) => ({ moduleAlias: e.moduleAlias }),
|
|
653
|
-
parentRouteQueryOf: () => ({}),
|
|
654
|
-
parse(e) {
|
|
655
|
-
let t = e.moduleAlias, n = e.moduleTitle, r = e.governanceTab === "diagnostics" ? "preview" : e.governanceTab;
|
|
656
|
-
if (typeof t == "string" && t) return {
|
|
657
|
-
moduleAlias: t,
|
|
658
|
-
...typeof n == "string" && n ? { moduleTitle: n } : {},
|
|
659
|
-
...me(r) ? { governanceTab: r } : {}
|
|
660
|
-
};
|
|
661
|
-
}
|
|
662
|
-
});
|
|
663
|
-
function me(e) {
|
|
664
|
-
return typeof e == "string" && fe.includes(e);
|
|
665
|
-
}
|
|
666
|
-
//#endregion
|
|
667
|
-
export { ae as a, B as c, Q as i, H as l, pe as n, ie as o, de as r, re as s, fe as t, ee as u };
|