@ximatai/muyun-web-app 0.26.7 → 0.26.8
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/{EmployeeDetailWorkspaceView-DYJLlkSz.js → EmployeeDetailWorkspaceView-DswEDSxH.js} +1 -1
- package/dist/{EmployeeManagementView-taxWUa7g.js → EmployeeManagementView-C9STtw08.js} +385 -386
- package/dist/{MetadataOrchestrationView-B-CPudJl.js → MetadataOrchestrationView-DKYVGMzy.js} +95 -95
- package/dist/{ModuleActionManagementView-CmVj0e0C.js → ModuleActionManagementView-DiVzuPdu.js} +72 -72
- package/dist/{RoleAuthorizationView-q_6CsBYq.js → RoleAuthorizationView-C0s4Bog7.js} +47 -47
- package/dist/{RoleDetailWorkspaceView-DmJlJgAj.js → RoleDetailWorkspaceView-dqHxKVfd.js} +1 -1
- package/dist/{RoleManagementView-HCa9rH0f.js → RoleManagementView-D43pUCxi.js} +468 -469
- package/dist/{SystemUserDetailWorkspaceView-U6Ij0US1.js → SystemUserDetailWorkspaceView-CQ9WeLrR.js} +1 -1
- package/dist/SystemUserManagementView-D75_ylYk.js +758 -0
- package/dist/{UserDetailWorkspaceView-OPYvD6mH.js → UserDetailWorkspaceView-BCST01d2.js} +1 -1
- package/dist/UserManagementView-CcdvDo_y.js +964 -0
- package/dist/index.css +1 -1
- package/dist/index.js +2278 -4726
- package/dist/{pageRealtime-CzJlr9hs.js → pageRealtime-EAiGWKEo.js} +87 -85
- package/dist/{platform-components-DKKWbNrz.js → platform-components-CFU_zR7-.js} +2145 -1866
- package/dist/types/app/workbenchStartup.d.ts +6 -2
- package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +2 -2
- package/dist/types/consumer/index.d.ts +4 -3
- package/dist/types/dynamic-page-runtime/DynamicModuleWorkspaceDetailView.vue.d.ts +10 -0
- package/dist/types/dynamic-page-runtime/DynamicRecordDetailActions.vue.d.ts +38 -0
- package/dist/types/dynamic-page-runtime/NavigatorManagementEditor.vue.d.ts +25 -0
- package/dist/types/dynamic-page-runtime/PageNavigatorExplorer.vue.d.ts +43 -0
- package/dist/types/dynamic-page-runtime/detailSurfacePreference.d.ts +10 -0
- package/dist/types/dynamic-page-runtime/index.d.ts +2 -1
- package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +38 -0
- package/dist/types/dynamic-page-runtime/modulePageNavigation.d.ts +1 -1
- package/dist/types/dynamic-page-runtime/pageContextRuntime.d.ts +6 -0
- package/dist/types/dynamic-page-runtime/recordDetailController.d.ts +27 -0
- package/dist/types/platform-admin-runtime/index.d.ts +1 -1
- package/dist/types/platform-admin-runtime/platformAdminRoutes.d.ts +5 -0
- package/dist/types/platform-admin-runtime/realtime.d.ts +2 -1
- package/dist/types/platform-components/BusinessNotificationPanel.vue.d.ts +12 -0
- package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +6 -0
- package/dist/types/platform-components/ManagementPanelHeader.vue.d.ts +5 -3
- package/dist/types/platform-components/ManagementWorkspace.vue.d.ts +8 -2
- package/dist/types/platform-components/RecordActionBar.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordDetailDrawer.vue.d.ts +4 -1
- package/dist/types/platform-components/RecordDetailLayout.vue.d.ts +8 -6
- package/dist/types/platform-components/RecordDetailPanel.vue.d.ts +7 -5
- package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +4 -1
- package/dist/types/platform-components/RecordMultiPicker.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordPanelButton.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordPicker.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +9 -2
- package/dist/types/platform-components/RecordStatusSwitch.vue.d.ts +3 -0
- package/dist/types/platform-components/StaticManagementLayout.vue.d.ts +13 -7
- package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +3 -0
- package/dist/types/platform-components/index.d.ts +4 -2
- package/dist/types/platform-components/managementWorkspaceLayout.d.ts +14 -0
- package/dist/types/platform-components/recordFormFieldModel.d.ts +2 -2
- package/dist/types/platform-components/recycleBinState.d.ts +2 -0
- package/dist/types/platform-components/scopedTreeModuleContext.d.ts +11 -0
- package/dist/types/platform-workbench/index.d.ts +1 -0
- package/dist/types/platform-workbench/menuNavigation.d.ts +3 -0
- package/dist/types/platform-workbench/modulePageWorkspaceViews.d.ts +7 -0
- package/dist/types/platform-workbench/workbenchLayout.d.ts +36 -0
- package/dist/types/platform-workbench/workbenchNavigation.d.ts +2 -0
- package/dist/types/platform-workbench/workspaceViewHost.d.ts +2 -0
- package/dist/types/vue-ui-antdv/components/UiButton.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiDataTable.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiModal.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiSelect.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +7 -1
- package/dist/types/vue-ui-antdv/index.d.ts +1 -0
- package/dist/types/web-contracts/index.d.ts +110 -17
- package/dist/types/web-core/businessNotifications.d.ts +3 -0
- package/dist/types/web-core/index.d.ts +1 -0
- package/dist/types/web-core/module/moduleContext.d.ts +1 -0
- package/dist/types/web-core/module/runtimeContext.d.ts +3 -1
- package/dist/types/web-core/module/staticModuleClient.d.ts +8 -1
- package/dist/types/web-core/realtime.d.ts +5 -1
- package/dist/{useUserSessionRows-CBHEzRFQ.js → useUserSessionRows-DCpUZCzN.js} +2 -2
- package/dist/workspaceViewSessions-Dj1LjdG1.js +4984 -0
- package/package.json +1 -1
- package/dist/SystemUserManagementView-C1CkKivH.js +0 -758
- package/dist/UserManagementView-gbCL9SnC.js +0 -965
- package/dist/currentUserContext-B1lj1WgF.js +0 -11
- package/dist/types/views/ApplicationManagementView.vue.d.ts +0 -3
- package/dist/types/views/DepartmentManagementView.vue.d.ts +0 -3
- package/dist/types/views/FieldSpecManagementView.vue.d.ts +0 -3
- package/dist/types/views/OrganizationManagementView.vue.d.ts +0 -3
- package/dist/types/views/applicationManagementState.d.ts +0 -64
- package/dist/types/views/departmentManagementState.d.ts +0 -137
- package/dist/types/views/fieldSpecManagementState.d.ts +0 -80
- package/dist/types/views/organizationManagementState.d.ts +0 -64
- package/dist/workspaceViewSessions-DkB9myrq.js +0 -3252
|
@@ -0,0 +1,4984 @@
|
|
|
1
|
+
import { $t as e, A as t, B as n, C as r, D as i, F as a, Ft as o, I as s, It as c, L as l, N as u, Nt as d, O as f, Pt as p, R as ee, Rt as te, S as ne, V as m, Vt as re, X as h, Z as ie, _ as ae, _t as oe, bt as se, ct as ce, d as le, dt as g, ft as _, g as ue, h as de, ht as v, j as fe, k as pe, kt as y, m as me, nt as b, rn as he, s as ge, u as _e, ut as x, v as ve, w as ye, y as S, z as be } from "./platform-components-CFU_zR7-.js";
|
|
2
|
+
import { Fragment as C, Transition as xe, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createSlots as Se, createStaticVNode as k, createTextVNode as A, createVNode as j, defineAsyncComponent as Ce, defineComponent as M, getCurrentInstance as N, h as P, inject as F, mergeProps as I, nextTick as we, normalizeClass as L, normalizeStyle as Te, onMounted as Ee, onUnmounted as De, openBlock as R, provide as z, ref as B, renderList as V, renderSlot as Oe, resolveComponent as H, resolveDynamicComponent as U, toDisplayString as W, toValue as ke, unref as G, vShow as Ae, watch as je, withCtx as K, withDirectives as Me, withKeys as Ne, withModifiers as Pe } from "vue";
|
|
3
|
+
//#region src/platform-workbench/WorkbenchBrandControl.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var q = ["src", "alt"], Fe = {
|
|
5
|
+
key: 1,
|
|
6
|
+
class: "workbench-brand-mark"
|
|
7
|
+
}, J = {
|
|
8
|
+
key: 2,
|
|
9
|
+
class: "workbench-brand-copy"
|
|
10
|
+
}, Ie = { key: 0 }, Le = { class: "workbench-brand-actions" }, Re = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "workbench-menu-depth",
|
|
13
|
+
role: "group",
|
|
14
|
+
"aria-label": "侧栏菜单层级"
|
|
15
|
+
}, ze = [
|
|
16
|
+
"aria-pressed",
|
|
17
|
+
"title",
|
|
18
|
+
"onClick"
|
|
19
|
+
], Be = ["aria-label", "title"], Ve = /*#__PURE__*/ o(/* @__PURE__ */ M({
|
|
20
|
+
name: "WorkbenchBrandControl",
|
|
21
|
+
__name: "WorkbenchBrandControl",
|
|
22
|
+
props: {
|
|
23
|
+
presentation: {},
|
|
24
|
+
compactOpen: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !1
|
|
27
|
+
},
|
|
28
|
+
tenantLabel: { default: "系统工作区" },
|
|
29
|
+
logoSrc: { default: void 0 },
|
|
30
|
+
showTitleArea: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !0
|
|
33
|
+
},
|
|
34
|
+
brandTitle: { default: "MuYun" },
|
|
35
|
+
brandSubtitle: { default: void 0 },
|
|
36
|
+
expandedMenuDepth: { default: 1 },
|
|
37
|
+
presentationToggleVisible: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: !0
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
emits: [
|
|
43
|
+
"openCompactMenu",
|
|
44
|
+
"scheduleCompactMenuClose",
|
|
45
|
+
"closeCompactMenu",
|
|
46
|
+
"changePresentation",
|
|
47
|
+
"changeExpandedMenuDepth"
|
|
48
|
+
],
|
|
49
|
+
setup(e, { emit: t }) {
|
|
50
|
+
let n = e, r = t;
|
|
51
|
+
function i(e, t) {
|
|
52
|
+
if (n.presentation !== "compact" || !(t.currentTarget instanceof HTMLElement)) return;
|
|
53
|
+
let i = t.currentTarget.getBoundingClientRect();
|
|
54
|
+
r("openCompactMenu", e, {
|
|
55
|
+
left: i.left,
|
|
56
|
+
top: i.top,
|
|
57
|
+
right: i.right,
|
|
58
|
+
bottom: i.bottom
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function a() {
|
|
62
|
+
n.presentation === "compact" && r("scheduleCompactMenuClose");
|
|
63
|
+
}
|
|
64
|
+
function o(e) {
|
|
65
|
+
n.presentation === "compact" && e.key === "Escape" && r("closeCompactMenu");
|
|
66
|
+
}
|
|
67
|
+
function s() {
|
|
68
|
+
r("changePresentation", n.presentation === "compact" ? "expanded" : "compact");
|
|
69
|
+
}
|
|
70
|
+
function c(e) {
|
|
71
|
+
r("changeExpandedMenuDepth", e);
|
|
72
|
+
}
|
|
73
|
+
return (t, n) => (R(), D("div", { class: L(["workbench-brand-control", [`workbench-brand-control--${e.presentation}`, { "workbench-brand-control--with-title": e.showTitleArea }]]) }, [(R(), T(U(e.presentation === "compact" ? "button" : "div"), {
|
|
74
|
+
class: L(["workbench-brand-identity", {
|
|
75
|
+
"workbench-brand-identity--open": e.compactOpen,
|
|
76
|
+
"workbench-brand-identity--with-title": e.showTitleArea
|
|
77
|
+
}]),
|
|
78
|
+
type: e.presentation === "compact" ? "button" : void 0,
|
|
79
|
+
"aria-label": e.presentation === "compact" ? "系统菜单" : void 0,
|
|
80
|
+
"aria-expanded": e.presentation === "compact" ? e.compactOpen : void 0,
|
|
81
|
+
"aria-controls": e.presentation === "compact" ? "workbench-compact-menu" : void 0,
|
|
82
|
+
onMouseenter: n[0] ||= (e) => i("pointer", e),
|
|
83
|
+
onMouseleave: a,
|
|
84
|
+
onFocus: n[1] ||= (e) => i("focus", e),
|
|
85
|
+
onFocusout: a,
|
|
86
|
+
onClick: n[2] ||= (e) => i("click", e),
|
|
87
|
+
onKeydown: o
|
|
88
|
+
}, {
|
|
89
|
+
default: K(() => [e.logoSrc ? (R(), D("img", {
|
|
90
|
+
key: 0,
|
|
91
|
+
class: "workbench-brand-logo",
|
|
92
|
+
src: e.logoSrc,
|
|
93
|
+
alt: `${e.tenantLabel} 标志`
|
|
94
|
+
}, null, 8, q)) : (R(), D("span", Fe, [j(G(p), { name: "app" })])), e.showTitleArea ? (R(), D("span", J, [O("strong", null, W(e.brandTitle), 1), e.presentation === "expanded" ? (R(), D("small", Ie, W(e.brandSubtitle ?? e.tenantLabel), 1)) : E("v-if", !0)])) : E("v-if", !0)]),
|
|
95
|
+
_: 1
|
|
96
|
+
}, 40, [
|
|
97
|
+
"class",
|
|
98
|
+
"type",
|
|
99
|
+
"aria-label",
|
|
100
|
+
"aria-expanded",
|
|
101
|
+
"aria-controls"
|
|
102
|
+
])), O("div", Le, [e.presentation === "expanded" ? (R(), D("div", Re, [(R(), D(C, null, V([
|
|
103
|
+
1,
|
|
104
|
+
2,
|
|
105
|
+
3
|
|
106
|
+
], (t) => O("button", {
|
|
107
|
+
key: t,
|
|
108
|
+
class: L(["workbench-menu-depth-option", { selected: e.expandedMenuDepth === t }]),
|
|
109
|
+
type: "button",
|
|
110
|
+
"aria-pressed": e.expandedMenuDepth === t,
|
|
111
|
+
title: `侧栏显示至第 ${t} 级菜单`,
|
|
112
|
+
onClick: (e) => c(t)
|
|
113
|
+
}, W(t), 11, ze)), 64))])) : E("v-if", !0), e.presentationToggleVisible ? (R(), D("button", {
|
|
114
|
+
key: 1,
|
|
115
|
+
class: "workbench-brand-presentation-toggle",
|
|
116
|
+
type: "button",
|
|
117
|
+
"aria-label": e.presentation === "compact" ? "展开侧栏菜单" : "收敛侧栏菜单",
|
|
118
|
+
title: e.presentation === "compact" ? "展开侧栏菜单" : "收敛侧栏菜单",
|
|
119
|
+
onClick: s
|
|
120
|
+
}, [j(G(p), { name: e.presentation === "compact" ? "menu-expand" : "menu-collapse" }, null, 8, ["name"])], 8, Be)) : E("v-if", !0)])], 2));
|
|
121
|
+
}
|
|
122
|
+
}), [["__scopeId", "data-v-24015cee"]]), He = {
|
|
123
|
+
key: 0,
|
|
124
|
+
class: "deep-children"
|
|
125
|
+
}, Y = /*#__PURE__*/ o(/* @__PURE__ */ M({
|
|
126
|
+
name: "WorkbenchMenuTree",
|
|
127
|
+
__name: "WorkbenchMenuTree",
|
|
128
|
+
props: {
|
|
129
|
+
node: {},
|
|
130
|
+
level: {},
|
|
131
|
+
selectedMenuId: {},
|
|
132
|
+
selectedPathIds: {}
|
|
133
|
+
},
|
|
134
|
+
emits: ["selectMenu"],
|
|
135
|
+
setup(e, { emit: t }) {
|
|
136
|
+
let n = e, r = t, i = w(() => n.level ?? 0), a = w(() => n.node.record.id === n.selectedMenuId), o = w(() => !a.value && n.selectedPathIds?.includes(n.node.record.id) === !0);
|
|
137
|
+
function s() {
|
|
138
|
+
n.node.target && r("selectMenu", n.node.record, n.node.target);
|
|
139
|
+
}
|
|
140
|
+
function c(e, t) {
|
|
141
|
+
r("selectMenu", e, t);
|
|
142
|
+
}
|
|
143
|
+
return (t, n) => {
|
|
144
|
+
let r = H("WorkbenchMenuTree", !0);
|
|
145
|
+
return R(), D("li", {
|
|
146
|
+
class: "deep-node",
|
|
147
|
+
style: Te({ "--depth": i.value })
|
|
148
|
+
}, [(R(), T(U(e.node.navigable ? "button" : "div"), {
|
|
149
|
+
class: L(["deep-node-button", {
|
|
150
|
+
navigable: e.node.navigable,
|
|
151
|
+
branch: e.node.hasChildren,
|
|
152
|
+
selected: a.value,
|
|
153
|
+
"selected-path": o.value
|
|
154
|
+
}]),
|
|
155
|
+
type: e.node.navigable ? "button" : void 0,
|
|
156
|
+
"aria-current": e.node.navigable && a.value ? "page" : void 0,
|
|
157
|
+
onClick: n[0] ||= (t) => e.node.navigable && s()
|
|
158
|
+
}, {
|
|
159
|
+
default: K(() => [O("span", null, W(e.node.record.title), 1)]),
|
|
160
|
+
_: 1
|
|
161
|
+
}, 8, [
|
|
162
|
+
"class",
|
|
163
|
+
"type",
|
|
164
|
+
"aria-current"
|
|
165
|
+
])), e.node.hasChildren ? (R(), D("ul", He, [(R(!0), D(C, null, V(e.node.children, (t) => (R(), T(r, {
|
|
166
|
+
key: t.record.id,
|
|
167
|
+
node: t,
|
|
168
|
+
level: i.value + 1,
|
|
169
|
+
"selected-menu-id": e.selectedMenuId,
|
|
170
|
+
"selected-path-ids": e.selectedPathIds,
|
|
171
|
+
onSelectMenu: c
|
|
172
|
+
}, null, 8, [
|
|
173
|
+
"node",
|
|
174
|
+
"level",
|
|
175
|
+
"selected-menu-id",
|
|
176
|
+
"selected-path-ids"
|
|
177
|
+
]))), 128))])) : E("v-if", !0)], 4);
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
}), [["__scopeId", "data-v-118b89e0"]]), Ue = ["aria-current"], We = ["aria-label", "aria-expanded"], Ge = [
|
|
181
|
+
"disabled",
|
|
182
|
+
"aria-current",
|
|
183
|
+
"aria-expanded",
|
|
184
|
+
"aria-controls"
|
|
185
|
+
], Ke = {
|
|
186
|
+
key: 0,
|
|
187
|
+
class: "sidebar-menu-entry-indicator",
|
|
188
|
+
"aria-hidden": "true"
|
|
189
|
+
}, qe = /*#__PURE__*/ o(/* @__PURE__ */ M({
|
|
190
|
+
name: "WorkbenchSidebarMenuEntry",
|
|
191
|
+
__name: "WorkbenchSidebarMenuEntry",
|
|
192
|
+
props: {
|
|
193
|
+
node: {},
|
|
194
|
+
mode: {},
|
|
195
|
+
selected: { type: Boolean },
|
|
196
|
+
selectedPath: { type: Boolean },
|
|
197
|
+
active: { type: Boolean }
|
|
198
|
+
},
|
|
199
|
+
emits: [
|
|
200
|
+
"select",
|
|
201
|
+
"openChildren",
|
|
202
|
+
"toggleChildren"
|
|
203
|
+
],
|
|
204
|
+
setup(e, { emit: t }) {
|
|
205
|
+
let n = e, r = t, i = B(), a = w(() => n.mode === "flyout" && n.node.hasChildren), o = w(() => a.value && n.node.navigable), s = w(() => n.mode === "inline" && !n.node.navigable);
|
|
206
|
+
function c(e) {
|
|
207
|
+
a.value && i.value && r("openChildren", n.node, e, i.value);
|
|
208
|
+
}
|
|
209
|
+
function l() {
|
|
210
|
+
a.value && i.value && r("toggleChildren", n.node, i.value);
|
|
211
|
+
}
|
|
212
|
+
function u() {
|
|
213
|
+
n.node.navigable ? r("select", n.node) : l();
|
|
214
|
+
}
|
|
215
|
+
return (t, n) => s.value ? (R(), D("div", {
|
|
216
|
+
key: 0,
|
|
217
|
+
ref_key: "entryRoot",
|
|
218
|
+
ref: i,
|
|
219
|
+
class: L(["sidebar-menu-entry sidebar-menu-entry--group", { "selected-path": e.selectedPath }])
|
|
220
|
+
}, [O("span", null, W(e.node.record.title), 1)], 2)) : o.value ? (R(), D("div", {
|
|
221
|
+
key: 1,
|
|
222
|
+
ref_key: "entryRoot",
|
|
223
|
+
ref: i,
|
|
224
|
+
class: L(["sidebar-menu-entry sidebar-menu-entry--split navigable branch", {
|
|
225
|
+
selected: e.selected,
|
|
226
|
+
"selected-path": e.selectedPath,
|
|
227
|
+
active: e.active
|
|
228
|
+
}]),
|
|
229
|
+
onMouseenter: c
|
|
230
|
+
}, [O("button", {
|
|
231
|
+
class: "sidebar-menu-entry-main navigable",
|
|
232
|
+
type: "button",
|
|
233
|
+
"aria-current": e.selected ? "page" : void 0,
|
|
234
|
+
onClick: n[0] ||= (t) => r("select", e.node)
|
|
235
|
+
}, [O("span", null, W(e.node.record.title), 1)], 8, Ue), O("button", {
|
|
236
|
+
class: "sidebar-menu-entry-trigger",
|
|
237
|
+
type: "button",
|
|
238
|
+
"aria-label": `${e.active ? "收起" : "展开"}${e.node.record.title}下级菜单`,
|
|
239
|
+
"aria-expanded": e.active,
|
|
240
|
+
"aria-controls": "workbench-sidebar-submenu-panel",
|
|
241
|
+
onClick: Pe(l, ["stop"])
|
|
242
|
+
}, [...n[1] ||= [O("i", {
|
|
243
|
+
class: "sidebar-menu-entry-indicator",
|
|
244
|
+
"aria-hidden": "true"
|
|
245
|
+
}, null, -1)]], 8, We)], 34)) : (R(), D("button", {
|
|
246
|
+
key: 2,
|
|
247
|
+
ref_key: "entryRoot",
|
|
248
|
+
ref: i,
|
|
249
|
+
class: L(["sidebar-menu-entry", {
|
|
250
|
+
navigable: e.node.navigable,
|
|
251
|
+
selected: e.selected,
|
|
252
|
+
"selected-path": e.selectedPath,
|
|
253
|
+
branch: a.value,
|
|
254
|
+
active: e.active
|
|
255
|
+
}]),
|
|
256
|
+
type: "button",
|
|
257
|
+
disabled: !e.node.navigable && !a.value,
|
|
258
|
+
"aria-current": e.selected ? "page" : void 0,
|
|
259
|
+
"aria-expanded": a.value ? e.active : void 0,
|
|
260
|
+
"aria-controls": a.value ? "workbench-sidebar-submenu-panel" : void 0,
|
|
261
|
+
onMouseenter: c,
|
|
262
|
+
onClick: u
|
|
263
|
+
}, [O("span", null, W(e.node.record.title), 1), a.value ? (R(), D("i", Ke)) : E("v-if", !0)], 42, Ge));
|
|
264
|
+
}
|
|
265
|
+
}), [["__scopeId", "data-v-e2ae6d87"]]);
|
|
266
|
+
//#endregion
|
|
267
|
+
//#region src/platform-workbench/menuHoverClickIntent.ts
|
|
268
|
+
function Je(e, t = Date.now) {
|
|
269
|
+
let n;
|
|
270
|
+
return {
|
|
271
|
+
markHoverActivation(e) {
|
|
272
|
+
n = {
|
|
273
|
+
menuId: e,
|
|
274
|
+
at: t()
|
|
275
|
+
};
|
|
276
|
+
},
|
|
277
|
+
consumeImmediateClick(r) {
|
|
278
|
+
let i = n;
|
|
279
|
+
if (n = void 0, !i || i.menuId !== r) return !1;
|
|
280
|
+
let a = t() - i.at;
|
|
281
|
+
return a >= 0 && a <= e;
|
|
282
|
+
},
|
|
283
|
+
clear() {
|
|
284
|
+
n = void 0;
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
//#endregion
|
|
289
|
+
//#region src/platform-workbench/menuPointerAim.ts
|
|
290
|
+
function Ye(e, t, n) {
|
|
291
|
+
return e.x < t.x ? !1 : Xe(e, t, {
|
|
292
|
+
x: n.left + 12,
|
|
293
|
+
y: n.top - 8
|
|
294
|
+
}, {
|
|
295
|
+
x: n.left + 12,
|
|
296
|
+
y: n.bottom + 8
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
function Xe(e, t, n, r) {
|
|
300
|
+
let i = Ze(e, t, n), a = Ze(e, n, r), o = Ze(e, r, t);
|
|
301
|
+
return !((i < 0 || a < 0 || o < 0) && (i > 0 || a > 0 || o > 0));
|
|
302
|
+
}
|
|
303
|
+
function Ze(e, t, n) {
|
|
304
|
+
return (e.y - t.y) * (n.x - t.x) - (e.x - t.x) * (n.y - t.y);
|
|
305
|
+
}
|
|
306
|
+
//#endregion
|
|
307
|
+
//#region src/platform-workbench/workbenchLayout.ts
|
|
308
|
+
function Qe(e, t) {
|
|
309
|
+
return Math.max(0, Math.round(e - t));
|
|
310
|
+
}
|
|
311
|
+
function $e(e, t, n, r, i = 8) {
|
|
312
|
+
let a = i, o = Math.max(a, n - t - i);
|
|
313
|
+
return Math.round(Math.min(Math.max(e, a), o) - r);
|
|
314
|
+
}
|
|
315
|
+
function et(e, t, n = 5, r = 8) {
|
|
316
|
+
let i = e.left + e.width, a = e.top + e.height, o = t.top + t.height;
|
|
317
|
+
return [
|
|
318
|
+
`M ${e.left} ${e.top}`,
|
|
319
|
+
`H ${i - r}`,
|
|
320
|
+
`Q ${i} ${e.top} ${i} ${e.top + r}`,
|
|
321
|
+
`V ${a - r}`,
|
|
322
|
+
`Q ${i} ${a} ${i - r} ${a}`,
|
|
323
|
+
`H ${e.left}`,
|
|
324
|
+
`V ${o}`,
|
|
325
|
+
`H ${t.left + n}`,
|
|
326
|
+
`Q ${t.left} ${o} ${t.left} ${o - n}`,
|
|
327
|
+
`V ${t.top + n}`,
|
|
328
|
+
`Q ${t.left} ${t.top} ${t.left + n} ${t.top}`,
|
|
329
|
+
`H ${e.left}`,
|
|
330
|
+
`V ${e.top}`
|
|
331
|
+
].join(" ");
|
|
332
|
+
}
|
|
333
|
+
function tt(e, t, n = 5, r = 4, i) {
|
|
334
|
+
if (i && Math.abs(i.left - e.right) <= 1 && i.right > i.left && i.bottom > i.top && i.top >= e.top) {
|
|
335
|
+
let a = i.bottom > e.bottom;
|
|
336
|
+
return [
|
|
337
|
+
`M ${t.left + n} ${t.top}`,
|
|
338
|
+
`H ${t.right - n}`,
|
|
339
|
+
`Q ${t.right} ${t.top} ${t.right} ${t.top + n}`,
|
|
340
|
+
`V ${e.top}`,
|
|
341
|
+
`H ${e.right}`,
|
|
342
|
+
`V ${i.top}`,
|
|
343
|
+
`H ${i.right - 8}`,
|
|
344
|
+
`Q ${i.right} ${i.top} ${i.right} ${i.top + 8}`,
|
|
345
|
+
`V ${i.bottom - 8}`,
|
|
346
|
+
`Q ${i.right} ${i.bottom} ${i.right - 8} ${i.bottom}`,
|
|
347
|
+
`H ${e.right}`,
|
|
348
|
+
...a ? [`V ${e.bottom}`, `H ${e.left + r}`] : [
|
|
349
|
+
`V ${e.bottom - r}`,
|
|
350
|
+
`Q ${e.right} ${e.bottom} ${e.right - r} ${e.bottom}`,
|
|
351
|
+
`H ${e.left + r}`
|
|
352
|
+
],
|
|
353
|
+
`Q ${e.left} ${e.bottom} ${e.left} ${e.bottom - r}`,
|
|
354
|
+
`V ${e.top + r}`,
|
|
355
|
+
`Q ${e.left} ${e.top} ${e.left + r} ${e.top}`,
|
|
356
|
+
`H ${t.left}`,
|
|
357
|
+
`V ${t.top + n}`,
|
|
358
|
+
`Q ${t.left} ${t.top} ${t.left + n} ${t.top}`
|
|
359
|
+
].join(" ");
|
|
360
|
+
}
|
|
361
|
+
return [
|
|
362
|
+
`M ${t.left + n} ${t.top}`,
|
|
363
|
+
`H ${t.right - n}`,
|
|
364
|
+
`Q ${t.right} ${t.top} ${t.right} ${t.top + n}`,
|
|
365
|
+
`V ${e.top}`,
|
|
366
|
+
`H ${e.right - r}`,
|
|
367
|
+
`Q ${e.right} ${e.top} ${e.right} ${e.top + r}`,
|
|
368
|
+
`V ${e.bottom - r}`,
|
|
369
|
+
`Q ${e.right} ${e.bottom} ${e.right - r} ${e.bottom}`,
|
|
370
|
+
`H ${e.left + r}`,
|
|
371
|
+
`Q ${e.left} ${e.bottom} ${e.left} ${e.bottom - r}`,
|
|
372
|
+
`V ${e.top + r}`,
|
|
373
|
+
`Q ${e.left} ${e.top} ${e.left + r} ${e.top}`,
|
|
374
|
+
`H ${t.left}`,
|
|
375
|
+
`V ${t.top + n}`,
|
|
376
|
+
`Q ${t.left} ${t.top} ${t.left + n} ${t.top}`
|
|
377
|
+
].join(" ");
|
|
378
|
+
}
|
|
379
|
+
function nt(e, t) {
|
|
380
|
+
return t ? "compact" : e;
|
|
381
|
+
}
|
|
382
|
+
//#endregion
|
|
383
|
+
//#region src/platform-workbench/menuNavigation.ts
|
|
384
|
+
var rt = ["/_workspace"], it = "_muyunMenuId", X = "_muyunTitle", at = "_muyunEntryParams", ot = [
|
|
385
|
+
"entryParamsJson",
|
|
386
|
+
"menuId",
|
|
387
|
+
"title"
|
|
388
|
+
];
|
|
389
|
+
function st(e) {
|
|
390
|
+
if (e.enabled !== !1 && !(!e.openMode || !e.moduleAlias)) return e.externalUrl ? {
|
|
391
|
+
menuId: e.id,
|
|
392
|
+
menuType: "link",
|
|
393
|
+
openMode: e.openMode,
|
|
394
|
+
externalUrl: e.externalUrl,
|
|
395
|
+
moduleAlias: e.moduleAlias,
|
|
396
|
+
entryParamsJson: e.entryParamsJson
|
|
397
|
+
} : e.route ? {
|
|
398
|
+
menuId: e.id,
|
|
399
|
+
menuType: "route",
|
|
400
|
+
openMode: e.openMode,
|
|
401
|
+
route: e.route,
|
|
402
|
+
moduleAlias: e.moduleAlias,
|
|
403
|
+
entryParamsJson: e.entryParamsJson
|
|
404
|
+
} : {
|
|
405
|
+
menuId: e.id,
|
|
406
|
+
menuType: "module",
|
|
407
|
+
openMode: e.openMode,
|
|
408
|
+
moduleAlias: e.moduleAlias,
|
|
409
|
+
pageMode: e.pageMode,
|
|
410
|
+
defaultUiConfigId: e.defaultUiConfigId,
|
|
411
|
+
defaultQueryTemplateId: e.defaultQueryTemplateId,
|
|
412
|
+
entryParamsJson: e.entryParamsJson
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
function ct(e) {
|
|
416
|
+
return e.openMode === "tab";
|
|
417
|
+
}
|
|
418
|
+
function lt(e) {
|
|
419
|
+
return e.openMode === "window";
|
|
420
|
+
}
|
|
421
|
+
function Z(e, t = {}) {
|
|
422
|
+
if (e.menuType === "module") {
|
|
423
|
+
let n = t.businessModuleRoutes?.[e.moduleAlias];
|
|
424
|
+
return n ? {
|
|
425
|
+
pageType: "business-route",
|
|
426
|
+
openMode: "workbench-route",
|
|
427
|
+
hostType: "business-route-host",
|
|
428
|
+
title: t.title,
|
|
429
|
+
layout: vt({ route: n }, t),
|
|
430
|
+
menuId: e.menuId,
|
|
431
|
+
target: {
|
|
432
|
+
route: n,
|
|
433
|
+
moduleAlias: e.moduleAlias
|
|
434
|
+
},
|
|
435
|
+
entryParamsJson: e.entryParamsJson,
|
|
436
|
+
tabPolicy: {
|
|
437
|
+
identity: "by-menu",
|
|
438
|
+
closable: !0,
|
|
439
|
+
cacheable: !0
|
|
440
|
+
}
|
|
441
|
+
} : {
|
|
442
|
+
pageType: "dynamic-module",
|
|
443
|
+
openMode: "dynamic-runner",
|
|
444
|
+
hostType: "dynamic-module-host",
|
|
445
|
+
title: t.title,
|
|
446
|
+
menuId: e.menuId,
|
|
447
|
+
target: {
|
|
448
|
+
moduleAlias: e.moduleAlias,
|
|
449
|
+
pageMode: e.pageMode,
|
|
450
|
+
defaultUiConfigId: e.defaultUiConfigId,
|
|
451
|
+
defaultQueryTemplateId: e.defaultQueryTemplateId
|
|
452
|
+
},
|
|
453
|
+
params: e.query,
|
|
454
|
+
entryParamsJson: e.entryParamsJson,
|
|
455
|
+
tabPolicy: {
|
|
456
|
+
identity: "by-menu",
|
|
457
|
+
closable: !0,
|
|
458
|
+
cacheable: !0
|
|
459
|
+
}
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
if (e.menuType === "route") {
|
|
463
|
+
let n = t.dynamicModuleRoutes?.[e.route];
|
|
464
|
+
if (n) return {
|
|
465
|
+
pageType: "dynamic-module",
|
|
466
|
+
openMode: "dynamic-runner",
|
|
467
|
+
hostType: "dynamic-module-host",
|
|
468
|
+
title: t.title,
|
|
469
|
+
menuId: e.menuId,
|
|
470
|
+
target: {
|
|
471
|
+
moduleAlias: n,
|
|
472
|
+
pageMode: "LIST"
|
|
473
|
+
},
|
|
474
|
+
params: e.query,
|
|
475
|
+
entryParamsJson: e.entryParamsJson,
|
|
476
|
+
tabPolicy: {
|
|
477
|
+
identity: e.menuId ? "by-menu" : "by-target",
|
|
478
|
+
closable: !0,
|
|
479
|
+
cacheable: !0
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
let r = gt(e.route, e.query, e.moduleAlias), i = _t(r, t) ? "business-route" : "platform-route", a = {
|
|
483
|
+
openMode: "workbench-route",
|
|
484
|
+
title: t.title,
|
|
485
|
+
menuId: e.menuId,
|
|
486
|
+
target: r,
|
|
487
|
+
params: e.query,
|
|
488
|
+
entryParamsJson: e.entryParamsJson,
|
|
489
|
+
tabPolicy: {
|
|
490
|
+
identity: e.menuId ? "by-menu" : "by-target",
|
|
491
|
+
closable: !0,
|
|
492
|
+
cacheable: !0
|
|
493
|
+
}
|
|
494
|
+
};
|
|
495
|
+
return i === "business-route" ? {
|
|
496
|
+
...a,
|
|
497
|
+
pageType: i,
|
|
498
|
+
hostType: "business-route-host",
|
|
499
|
+
layout: vt(r, t)
|
|
500
|
+
} : {
|
|
501
|
+
...a,
|
|
502
|
+
pageType: i,
|
|
503
|
+
hostType: "platform-route-host"
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
return e.openMode === "tab" ? {
|
|
507
|
+
pageType: "remote-url",
|
|
508
|
+
openMode: "iframe",
|
|
509
|
+
hostType: "external-page-host",
|
|
510
|
+
title: t.title,
|
|
511
|
+
menuId: e.menuId,
|
|
512
|
+
target: {
|
|
513
|
+
url: e.externalUrl,
|
|
514
|
+
moduleAlias: e.moduleAlias
|
|
515
|
+
},
|
|
516
|
+
entryParamsJson: e.entryParamsJson,
|
|
517
|
+
tabPolicy: {
|
|
518
|
+
identity: e.menuId ? "by-menu" : "by-target",
|
|
519
|
+
closable: !0
|
|
520
|
+
}
|
|
521
|
+
} : {
|
|
522
|
+
pageType: "external-link",
|
|
523
|
+
openMode: "new-window",
|
|
524
|
+
hostType: "external-page-host",
|
|
525
|
+
title: t.title,
|
|
526
|
+
menuId: e.menuId,
|
|
527
|
+
target: {
|
|
528
|
+
url: e.externalUrl,
|
|
529
|
+
moduleAlias: e.moduleAlias
|
|
530
|
+
},
|
|
531
|
+
entryParamsJson: e.entryParamsJson,
|
|
532
|
+
tabPolicy: {
|
|
533
|
+
identity: e.menuId ? "by-menu" : "by-target",
|
|
534
|
+
closable: !0
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
function ut(e, t, n = {}) {
|
|
539
|
+
if (!ct(t)) throw Error(`WINDOW menu target cannot be opened as a workbench tab: ${t.menuId}`);
|
|
540
|
+
let r = Z(t, {
|
|
541
|
+
...n,
|
|
542
|
+
title: n.title ?? e.title
|
|
543
|
+
});
|
|
544
|
+
return {
|
|
545
|
+
key: ft(r),
|
|
546
|
+
title: e.title,
|
|
547
|
+
target: t,
|
|
548
|
+
pageDescriptor: r,
|
|
549
|
+
restoreState: r.restoreState,
|
|
550
|
+
closable: !0
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
function dt(e) {
|
|
554
|
+
for (let t of e) {
|
|
555
|
+
let e = st(t.record);
|
|
556
|
+
if (e && ct(e)) return t.record;
|
|
557
|
+
let n = dt(t.children);
|
|
558
|
+
if (n) return n;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
function ft(e) {
|
|
562
|
+
return e.tabPolicy.identity === "by-menu" && e.menuId ? `menu:${e.menuId}` : e.tabPolicy.identity === "by-params" && e.params ? `${e.menuId ? `menu:${e.menuId}` : `${e.pageType}:${bt(e)}`}:${St(e.params)}` : `${e.pageType}:${bt(e)}`;
|
|
563
|
+
}
|
|
564
|
+
function pt(e) {
|
|
565
|
+
if (e.pageType === "platform-route" || e.pageType === "business-route") return e.target.route ? xt(e.target.route, {
|
|
566
|
+
...e.target.query ?? e.params,
|
|
567
|
+
[at]: e.entryParamsJson,
|
|
568
|
+
[it]: e.menuId,
|
|
569
|
+
[X]: e.title
|
|
570
|
+
}) : xt("/platform/workspace", {
|
|
571
|
+
...e.target.query ?? e.params ?? {},
|
|
572
|
+
pageType: e.pageType,
|
|
573
|
+
routeName: e.target.routeName,
|
|
574
|
+
pageKey: e.target.pageKey,
|
|
575
|
+
[it]: e.menuId,
|
|
576
|
+
[X]: e.title
|
|
577
|
+
});
|
|
578
|
+
if (e.pageType === "dynamic-module") {
|
|
579
|
+
let t = e.target.pageMode?.toLowerCase() ?? "list";
|
|
580
|
+
return xt(`/platform/dynamic/${e.target.moduleAlias}/${t}`, {
|
|
581
|
+
...e.params,
|
|
582
|
+
[at]: e.entryParamsJson,
|
|
583
|
+
uiConfigId: e.target.defaultUiConfigId,
|
|
584
|
+
queryTemplateId: e.target.defaultQueryTemplateId,
|
|
585
|
+
[it]: e.menuId,
|
|
586
|
+
[X]: e.title
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
return e.pageType === "remote-url" || e.pageType === "external-link" ? xt("/platform/external", {
|
|
590
|
+
url: e.target.url,
|
|
591
|
+
mode: e.openMode,
|
|
592
|
+
[it]: e.menuId,
|
|
593
|
+
[X]: e.title
|
|
594
|
+
}) : Mt(e);
|
|
595
|
+
}
|
|
596
|
+
function mt(e, t = {}) {
|
|
597
|
+
let n = Et(e), r = n.pathname, i = Ot(n.searchParams), a = t.dynamicModuleRoutes?.[r];
|
|
598
|
+
if (a) {
|
|
599
|
+
let e = Q(i, it, "menuId");
|
|
600
|
+
return {
|
|
601
|
+
pageType: "dynamic-module",
|
|
602
|
+
openMode: "dynamic-runner",
|
|
603
|
+
hostType: "dynamic-module-host",
|
|
604
|
+
title: Q(i, X, "title") ?? t.title,
|
|
605
|
+
menuId: e,
|
|
606
|
+
target: {
|
|
607
|
+
moduleAlias: a,
|
|
608
|
+
pageMode: "LIST"
|
|
609
|
+
},
|
|
610
|
+
params: Dt(i, [
|
|
611
|
+
...ot,
|
|
612
|
+
it,
|
|
613
|
+
X
|
|
614
|
+
]),
|
|
615
|
+
entryParamsJson: Q(i, at, "entryParamsJson"),
|
|
616
|
+
tabPolicy: e ? {
|
|
617
|
+
identity: "by-menu",
|
|
618
|
+
closable: !0,
|
|
619
|
+
cacheable: !0
|
|
620
|
+
} : {
|
|
621
|
+
identity: "by-target",
|
|
622
|
+
closable: !0,
|
|
623
|
+
cacheable: !0
|
|
624
|
+
}
|
|
625
|
+
};
|
|
626
|
+
}
|
|
627
|
+
if (r === "/platform/dynamic") throw Error(`Invalid dynamic module URL: ${e}`);
|
|
628
|
+
if (r.startsWith("/platform/dynamic/")) {
|
|
629
|
+
let [, , , n, a] = r.split("/");
|
|
630
|
+
if (!n) throw Error(`Invalid dynamic module URL: ${e}`);
|
|
631
|
+
let o = Dt(i, [
|
|
632
|
+
...ot,
|
|
633
|
+
at,
|
|
634
|
+
it,
|
|
635
|
+
X,
|
|
636
|
+
"queryTemplateId",
|
|
637
|
+
"uiConfigId"
|
|
638
|
+
]), s = Q(i, it, "menuId");
|
|
639
|
+
return {
|
|
640
|
+
pageType: "dynamic-module",
|
|
641
|
+
openMode: "dynamic-runner",
|
|
642
|
+
hostType: "dynamic-module-host",
|
|
643
|
+
title: Q(i, X, "title") ?? t.title,
|
|
644
|
+
menuId: s,
|
|
645
|
+
target: {
|
|
646
|
+
moduleAlias: decodeURIComponent(n ?? ""),
|
|
647
|
+
pageMode: jt(a),
|
|
648
|
+
defaultUiConfigId: kt(i.uiConfigId),
|
|
649
|
+
defaultQueryTemplateId: kt(i.queryTemplateId)
|
|
650
|
+
},
|
|
651
|
+
params: o,
|
|
652
|
+
entryParamsJson: Q(i, at, "entryParamsJson"),
|
|
653
|
+
tabPolicy: s ? {
|
|
654
|
+
identity: "by-menu",
|
|
655
|
+
closable: !0,
|
|
656
|
+
cacheable: !0
|
|
657
|
+
} : {
|
|
658
|
+
identity: "by-target",
|
|
659
|
+
closable: !0,
|
|
660
|
+
cacheable: !0
|
|
661
|
+
}
|
|
662
|
+
};
|
|
663
|
+
}
|
|
664
|
+
if (r === "/platform/external") {
|
|
665
|
+
let n = kt(i.url) ?? "";
|
|
666
|
+
if (!n) throw Error(`Invalid external page URL: ${e}`);
|
|
667
|
+
let r = kt(i.mode) === "new-window" ? "new-window" : "iframe", a = Q(i, it, "menuId"), o = a ? {
|
|
668
|
+
identity: "by-menu",
|
|
669
|
+
closable: !0
|
|
670
|
+
} : {
|
|
671
|
+
identity: "by-target",
|
|
672
|
+
closable: !0
|
|
673
|
+
};
|
|
674
|
+
return r === "iframe" ? {
|
|
675
|
+
pageType: "remote-url",
|
|
676
|
+
openMode: r,
|
|
677
|
+
hostType: "external-page-host",
|
|
678
|
+
title: Q(i, X, "title") ?? t.title,
|
|
679
|
+
menuId: a,
|
|
680
|
+
target: { url: n },
|
|
681
|
+
tabPolicy: o
|
|
682
|
+
} : {
|
|
683
|
+
pageType: "external-link",
|
|
684
|
+
openMode: r,
|
|
685
|
+
hostType: "external-page-host",
|
|
686
|
+
title: Q(i, X, "title") ?? t.title,
|
|
687
|
+
menuId: a,
|
|
688
|
+
target: { url: n },
|
|
689
|
+
tabPolicy: o
|
|
690
|
+
};
|
|
691
|
+
}
|
|
692
|
+
if (r === "/platform/workspace" && !i.routeName && !i.pageKey) throw Error(`Invalid workspace URL: ${e}`);
|
|
693
|
+
if (r === "/platform/workspace" && (i.routeName || i.pageKey)) {
|
|
694
|
+
let e = {
|
|
695
|
+
routeName: kt(i.routeName),
|
|
696
|
+
pageKey: kt(i.pageKey),
|
|
697
|
+
query: Dt(i, [
|
|
698
|
+
...ot,
|
|
699
|
+
it,
|
|
700
|
+
X,
|
|
701
|
+
"pageType",
|
|
702
|
+
"routeName",
|
|
703
|
+
"pageKey"
|
|
704
|
+
])
|
|
705
|
+
}, n = kt(i.pageType) === "business-route" ? "business-route" : "platform-route", r = Q(i, it, "menuId"), a = {
|
|
706
|
+
openMode: "workbench-route",
|
|
707
|
+
title: Q(i, X, "title") ?? t.title,
|
|
708
|
+
menuId: r,
|
|
709
|
+
target: e,
|
|
710
|
+
params: e.query,
|
|
711
|
+
tabPolicy: r ? {
|
|
712
|
+
identity: "by-menu",
|
|
713
|
+
closable: !0,
|
|
714
|
+
cacheable: !0
|
|
715
|
+
} : {
|
|
716
|
+
identity: "by-target",
|
|
717
|
+
closable: !0,
|
|
718
|
+
cacheable: !0
|
|
719
|
+
}
|
|
720
|
+
};
|
|
721
|
+
return n === "business-route" ? {
|
|
722
|
+
...a,
|
|
723
|
+
pageType: "business-route",
|
|
724
|
+
hostType: "business-route-host",
|
|
725
|
+
layout: vt(e, t)
|
|
726
|
+
} : {
|
|
727
|
+
...a,
|
|
728
|
+
pageType: "platform-route",
|
|
729
|
+
hostType: "platform-route-host"
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
|
+
let o = yt(r, t) ? "business-route" : "platform-route", s = Q(i, it), c = Dt(i, [
|
|
733
|
+
at,
|
|
734
|
+
it,
|
|
735
|
+
X
|
|
736
|
+
]), l = {
|
|
737
|
+
openMode: "workbench-route",
|
|
738
|
+
title: Q(i, X) ?? t.title,
|
|
739
|
+
menuId: s,
|
|
740
|
+
target: {
|
|
741
|
+
route: r,
|
|
742
|
+
query: c
|
|
743
|
+
},
|
|
744
|
+
params: c,
|
|
745
|
+
entryParamsJson: Q(i, at),
|
|
746
|
+
tabPolicy: s ? {
|
|
747
|
+
identity: "by-menu",
|
|
748
|
+
closable: !0,
|
|
749
|
+
cacheable: !0
|
|
750
|
+
} : {
|
|
751
|
+
identity: "by-target",
|
|
752
|
+
closable: !0,
|
|
753
|
+
cacheable: !0
|
|
754
|
+
}
|
|
755
|
+
};
|
|
756
|
+
return o === "business-route" ? {
|
|
757
|
+
...l,
|
|
758
|
+
pageType: "business-route",
|
|
759
|
+
hostType: "business-route-host",
|
|
760
|
+
layout: vt(l.target, t)
|
|
761
|
+
} : {
|
|
762
|
+
...l,
|
|
763
|
+
pageType: "platform-route",
|
|
764
|
+
hostType: "platform-route-host"
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
function ht(e, t = {}) {
|
|
768
|
+
try {
|
|
769
|
+
return mt(e, t);
|
|
770
|
+
} catch {
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
function gt(e, t, n) {
|
|
775
|
+
return e.startsWith("/") ? {
|
|
776
|
+
route: e,
|
|
777
|
+
moduleAlias: n,
|
|
778
|
+
query: t
|
|
779
|
+
} : e.includes(".") ? {
|
|
780
|
+
routeName: e,
|
|
781
|
+
moduleAlias: n,
|
|
782
|
+
query: t
|
|
783
|
+
} : {
|
|
784
|
+
pageKey: e,
|
|
785
|
+
moduleAlias: n,
|
|
786
|
+
query: t
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
function _t(e, t) {
|
|
790
|
+
return (e.route ? yt(e.route, t) : !1) || (e.routeName ? t.businessRouteNames?.includes(e.routeName) === !0 : !1) || (e.pageKey ? t.businessPageKeys?.includes(e.pageKey) === !0 : !1);
|
|
791
|
+
}
|
|
792
|
+
function vt(e, t) {
|
|
793
|
+
return e.route ? t.businessRouteLayouts?.[e.route] : void 0;
|
|
794
|
+
}
|
|
795
|
+
function yt(e, t) {
|
|
796
|
+
let n = Tt(e, t.businessRoutePrefixes ?? rt);
|
|
797
|
+
if (n < 0) return !1;
|
|
798
|
+
let r = Tt(e, t.platformRoutePrefixes ?? At);
|
|
799
|
+
return r < 0 || n > r;
|
|
800
|
+
}
|
|
801
|
+
function bt(e) {
|
|
802
|
+
return e.pageType === "platform-route" || e.pageType === "business-route" ? e.target.route ?? e.target.routeName ?? e.target.pageKey ?? "route" : e.pageType === "dynamic-module" ? [e.target.moduleAlias, e.target.pageMode ?? "LIST"].join(":") : e.target.url;
|
|
803
|
+
}
|
|
804
|
+
function xt(e, t) {
|
|
805
|
+
let n = t ? St(t) : "";
|
|
806
|
+
return n ? `${e}${e.includes("?") ? "&" : "?"}${n}` : e;
|
|
807
|
+
}
|
|
808
|
+
function St(e) {
|
|
809
|
+
let t = new URLSearchParams();
|
|
810
|
+
for (let n of Object.keys(e).sort()) {
|
|
811
|
+
let r = e[n];
|
|
812
|
+
if (Array.isArray(r)) {
|
|
813
|
+
for (let e of r) Ct(t, n, e);
|
|
814
|
+
continue;
|
|
815
|
+
}
|
|
816
|
+
Ct(t, n, r);
|
|
817
|
+
}
|
|
818
|
+
return t.toString();
|
|
819
|
+
}
|
|
820
|
+
function Ct(e, t, n) {
|
|
821
|
+
n != null && e.append(t, String(n));
|
|
822
|
+
}
|
|
823
|
+
function wt(e, t) {
|
|
824
|
+
let n = t.endsWith("/") ? t.slice(0, -1) : t;
|
|
825
|
+
return e === n || e.startsWith(`${n}/`);
|
|
826
|
+
}
|
|
827
|
+
function Tt(e, t) {
|
|
828
|
+
let n = -1;
|
|
829
|
+
for (let r of t) {
|
|
830
|
+
let t = r.endsWith("/") ? r.slice(0, -1) : r;
|
|
831
|
+
wt(e, t) && (n = Math.max(n, t.length));
|
|
832
|
+
}
|
|
833
|
+
return n;
|
|
834
|
+
}
|
|
835
|
+
function Et(e) {
|
|
836
|
+
return new URL(e, "http://muyun.local");
|
|
837
|
+
}
|
|
838
|
+
function Dt(e, t) {
|
|
839
|
+
let n = {};
|
|
840
|
+
for (let r of Object.keys(e)) t.includes(r) || (n[r] = e[r]);
|
|
841
|
+
return Object.keys(n).length > 0 ? n : void 0;
|
|
842
|
+
}
|
|
843
|
+
function Ot(e) {
|
|
844
|
+
let t = {};
|
|
845
|
+
for (let n of e.keys()) {
|
|
846
|
+
let r = e.getAll(n);
|
|
847
|
+
t[n] = r.length > 1 ? r : r[0];
|
|
848
|
+
}
|
|
849
|
+
return t;
|
|
850
|
+
}
|
|
851
|
+
function kt(e) {
|
|
852
|
+
return Array.isArray(e) ? e[0] === null || e[0] === void 0 ? void 0 : String(e[0]) : e == null ? void 0 : String(e);
|
|
853
|
+
}
|
|
854
|
+
function Q(e, t, n) {
|
|
855
|
+
return kt(e[t]) ?? (n ? kt(e[n]) : void 0);
|
|
856
|
+
}
|
|
857
|
+
var At = ["/platform"];
|
|
858
|
+
function jt(e) {
|
|
859
|
+
let t = e?.toUpperCase();
|
|
860
|
+
return t === "LIST" || t === "FORM" || t === "DETAIL" ? t : void 0;
|
|
861
|
+
}
|
|
862
|
+
function Mt(e) {
|
|
863
|
+
throw Error(`Unsupported page descriptor: ${JSON.stringify(e)}`);
|
|
864
|
+
}
|
|
865
|
+
//#endregion
|
|
866
|
+
//#region src/platform-workbench/menuTreeModel.ts
|
|
867
|
+
function Nt(e) {
|
|
868
|
+
return e.map(Ht);
|
|
869
|
+
}
|
|
870
|
+
function Pt(e, t) {
|
|
871
|
+
let n = t.trim().toLowerCase();
|
|
872
|
+
return n ? e.map((e) => {
|
|
873
|
+
let t = Pt(e.children, n);
|
|
874
|
+
if (!Ut(e, n)) return t.length > 0 ? {
|
|
875
|
+
...e,
|
|
876
|
+
children: t
|
|
877
|
+
} : void 0;
|
|
878
|
+
if (e.navigable) return {
|
|
879
|
+
...e,
|
|
880
|
+
children: t
|
|
881
|
+
};
|
|
882
|
+
let r = Ft(e.children);
|
|
883
|
+
return r.length > 0 ? {
|
|
884
|
+
...e,
|
|
885
|
+
children: r
|
|
886
|
+
} : void 0;
|
|
887
|
+
}).filter((e) => !!e) : e;
|
|
888
|
+
}
|
|
889
|
+
function Ft(e) {
|
|
890
|
+
return e.map((e) => {
|
|
891
|
+
let t = Ft(e.children);
|
|
892
|
+
return e.navigable || t.length > 0 ? {
|
|
893
|
+
...e,
|
|
894
|
+
children: t
|
|
895
|
+
} : void 0;
|
|
896
|
+
}).filter((e) => !!e);
|
|
897
|
+
}
|
|
898
|
+
function It(e, t, n = []) {
|
|
899
|
+
for (let r of e) {
|
|
900
|
+
let e = [...n, r];
|
|
901
|
+
if (r.record.id === t) return e;
|
|
902
|
+
let i = It(r.children, t, e);
|
|
903
|
+
if (i.length > 0) return i;
|
|
904
|
+
}
|
|
905
|
+
return [];
|
|
906
|
+
}
|
|
907
|
+
function Lt(e, t) {
|
|
908
|
+
for (let n of e) {
|
|
909
|
+
if (n.record.id === t) return n;
|
|
910
|
+
let e = Lt(n.children, t);
|
|
911
|
+
if (e) return e;
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
function Rt(e) {
|
|
915
|
+
for (let t of e.children) for (let e of t.children) if (e.hasChildren) return e.record.id;
|
|
916
|
+
}
|
|
917
|
+
function zt(e, t, n = 3) {
|
|
918
|
+
let r = t ? Lt(e.children, t) : void 0, i = e.children;
|
|
919
|
+
return {
|
|
920
|
+
root: e,
|
|
921
|
+
groups: i,
|
|
922
|
+
columns: Bt(i, n),
|
|
923
|
+
activeDeepRoot: r?.hasChildren ? r : void 0
|
|
924
|
+
};
|
|
925
|
+
}
|
|
926
|
+
function Bt(e, t) {
|
|
927
|
+
if (e.length === 0) return [];
|
|
928
|
+
let n = Math.max(1, Math.min(Math.floor(t), e.length)), r = Array.from({ length: n }, () => []), i = e.reduce((e, t) => e + Vt(t), 0) / n, a = 0, o = 0;
|
|
929
|
+
for (let t = 0; t < e.length; t += 1) {
|
|
930
|
+
let s = e[t], c = Vt(s), l = e.length - t, u = n - a;
|
|
931
|
+
r[a].length > 0 && a < n - 1 && (l <= u || o + c > i) && (a += 1, o = 0), r[a].push(s), o += c;
|
|
932
|
+
}
|
|
933
|
+
return r;
|
|
934
|
+
}
|
|
935
|
+
function Vt(e) {
|
|
936
|
+
let t = $(e.record.title), n = e.children.reduce((e, t) => {
|
|
937
|
+
let n = t.hasChildren ? .7 + t.children.length * .25 : 0;
|
|
938
|
+
return e + 1 + n + $(t.record.title) * .4;
|
|
939
|
+
}, 0);
|
|
940
|
+
return 1.25 + t + n;
|
|
941
|
+
}
|
|
942
|
+
function $(e) {
|
|
943
|
+
return Math.max(0, Math.ceil(e.length / 10) - 1) * .35;
|
|
944
|
+
}
|
|
945
|
+
function Ht(e) {
|
|
946
|
+
let t = Nt(e.children), n = st(e.record);
|
|
947
|
+
return {
|
|
948
|
+
record: e.record,
|
|
949
|
+
children: t,
|
|
950
|
+
target: n,
|
|
951
|
+
navigable: !!n,
|
|
952
|
+
hasChildren: t.length > 0
|
|
953
|
+
};
|
|
954
|
+
}
|
|
955
|
+
function Ut(e, t) {
|
|
956
|
+
return e.record.title.toLowerCase().includes(t) || e.record.moduleAlias?.toLowerCase().includes(t) === !0 || e.record.route?.toLowerCase().includes(t) === !0;
|
|
957
|
+
}
|
|
958
|
+
//#endregion
|
|
959
|
+
//#region src/platform-workbench/realtimeStatus.ts
|
|
960
|
+
function Wt(e) {
|
|
961
|
+
if (e === "connected") return {
|
|
962
|
+
label: "实时连接正常",
|
|
963
|
+
title: "与平台实时服务连接正常",
|
|
964
|
+
tone: e
|
|
965
|
+
};
|
|
966
|
+
if (e === "connecting") return {
|
|
967
|
+
label: "实时连接中",
|
|
968
|
+
title: "正在连接平台实时服务",
|
|
969
|
+
tone: e
|
|
970
|
+
};
|
|
971
|
+
if (e === "disconnected") return {
|
|
972
|
+
label: "实时连接已断开",
|
|
973
|
+
title: "与平台实时服务的连接已断开,正在等待恢复",
|
|
974
|
+
tone: e
|
|
975
|
+
};
|
|
976
|
+
}
|
|
977
|
+
//#endregion
|
|
978
|
+
//#region src/platform-workbench/WorkbenchMenu.vue?vue&type=script&setup=true&lang.ts
|
|
979
|
+
var Gt = ["id"], Kt = {
|
|
980
|
+
key: 0,
|
|
981
|
+
class: "menu-search"
|
|
982
|
+
}, qt = {
|
|
983
|
+
class: "root-menu",
|
|
984
|
+
"aria-label": "主导航"
|
|
985
|
+
}, Jt = {
|
|
986
|
+
key: 0,
|
|
987
|
+
class: "root-menu-list"
|
|
988
|
+
}, Yt = ["onMouseenter"], Xt = ["aria-current", "onClick"], Zt = [
|
|
989
|
+
"aria-label",
|
|
990
|
+
"aria-expanded",
|
|
991
|
+
"onClick"
|
|
992
|
+
], Qt = {
|
|
993
|
+
key: 0,
|
|
994
|
+
class: "root-menu-branch-indicator",
|
|
995
|
+
"aria-hidden": "true"
|
|
996
|
+
}, $t = {
|
|
997
|
+
key: 2,
|
|
998
|
+
class: "sidebar-menu-level sidebar-menu-level--2"
|
|
999
|
+
}, en = {
|
|
1000
|
+
key: 0,
|
|
1001
|
+
class: "sidebar-menu-level sidebar-menu-level--3"
|
|
1002
|
+
}, tn = {
|
|
1003
|
+
key: 1,
|
|
1004
|
+
class: "compact-menu-tools"
|
|
1005
|
+
}, nn = { class: "menu-search" }, rn = ["title"], an = {
|
|
1006
|
+
class: "compact-mega-outline compact-mega-outline--shadow",
|
|
1007
|
+
"aria-hidden": "true"
|
|
1008
|
+
}, on = ["d"], sn = {
|
|
1009
|
+
class: "compact-mega-outline compact-mega-outline--stroke",
|
|
1010
|
+
"aria-hidden": "true"
|
|
1011
|
+
}, cn = ["d"], ln = {
|
|
1012
|
+
key: 1,
|
|
1013
|
+
class: "sidebar-submenu-outline sidebar-submenu-outline--shadow",
|
|
1014
|
+
"aria-hidden": "true"
|
|
1015
|
+
}, un = ["d"], dn = {
|
|
1016
|
+
key: 2,
|
|
1017
|
+
class: "sidebar-submenu-outline sidebar-submenu-outline--stroke",
|
|
1018
|
+
"aria-hidden": "true"
|
|
1019
|
+
}, fn = ["d"], pn = {
|
|
1020
|
+
key: 3,
|
|
1021
|
+
class: "mega-outline mega-outline--shadow",
|
|
1022
|
+
"aria-hidden": "true"
|
|
1023
|
+
}, mn = ["d"], hn = {
|
|
1024
|
+
key: 4,
|
|
1025
|
+
class: "mega-outline mega-outline--stroke",
|
|
1026
|
+
"aria-hidden": "true"
|
|
1027
|
+
}, gn = ["d"], _n = { class: "mega-body" }, vn = { class: "mega-groups" }, yn = [
|
|
1028
|
+
"disabled",
|
|
1029
|
+
"aria-current",
|
|
1030
|
+
"onClick"
|
|
1031
|
+
], bn = { class: "mega-entry-list" }, xn = ["onKeydown"], Sn = [
|
|
1032
|
+
"disabled",
|
|
1033
|
+
"aria-current",
|
|
1034
|
+
"aria-label",
|
|
1035
|
+
"aria-expanded",
|
|
1036
|
+
"aria-controls",
|
|
1037
|
+
"onClick"
|
|
1038
|
+
], Cn = {
|
|
1039
|
+
key: 0,
|
|
1040
|
+
class: "mega-entry-indicator",
|
|
1041
|
+
"aria-hidden": "true"
|
|
1042
|
+
}, wn = [
|
|
1043
|
+
"aria-label",
|
|
1044
|
+
"aria-expanded",
|
|
1045
|
+
"onClick",
|
|
1046
|
+
"onKeydown"
|
|
1047
|
+
], Tn = ["onKeydown"], En = ["aria-label"], Dn = { class: "sidebar-submenu-tree" }, On = 168, kn = 18, An = 28, jn = 1040, Mn = 24, Nn = 620, Pn = 500, Fn = 2, In = 320, Ln = 140, Rn = 240, zn = /*#__PURE__*/ o(/* @__PURE__ */ M({
|
|
1048
|
+
name: "WorkbenchMenu",
|
|
1049
|
+
__name: "WorkbenchMenu",
|
|
1050
|
+
props: {
|
|
1051
|
+
menus: {},
|
|
1052
|
+
selectedMenuId: { default: void 0 },
|
|
1053
|
+
tenantLabel: { default: "系统工作区" },
|
|
1054
|
+
logoSrc: { default: void 0 },
|
|
1055
|
+
showTitleArea: {
|
|
1056
|
+
type: Boolean,
|
|
1057
|
+
default: !0
|
|
1058
|
+
},
|
|
1059
|
+
brandTitle: { default: "MuYun" },
|
|
1060
|
+
brandSubtitle: { default: void 0 },
|
|
1061
|
+
searchPlaceholder: { default: "" },
|
|
1062
|
+
realtimeStatus: { default: "unavailable" },
|
|
1063
|
+
presentation: { default: "expanded" },
|
|
1064
|
+
expandedMenuDepth: { default: 1 },
|
|
1065
|
+
compactOpen: {
|
|
1066
|
+
type: Boolean,
|
|
1067
|
+
default: !1
|
|
1068
|
+
},
|
|
1069
|
+
compactTop: { default: 54 },
|
|
1070
|
+
compactAnchor: { default: void 0 }
|
|
1071
|
+
},
|
|
1072
|
+
emits: [
|
|
1073
|
+
"selectMenu",
|
|
1074
|
+
"invalidMenu",
|
|
1075
|
+
"compactMenuEnter",
|
|
1076
|
+
"compactMenuLeave",
|
|
1077
|
+
"compactMenuClose",
|
|
1078
|
+
"changePresentation",
|
|
1079
|
+
"changeExpandedMenuDepth"
|
|
1080
|
+
],
|
|
1081
|
+
setup(e, { emit: t }) {
|
|
1082
|
+
let n = e, r = t, i = B(), a = B(), o = B(), s = B(), c = B(""), l = B(), u = B(), d = B(), f = B(8), ee = B(0), te = B(0), ne = B(0), m = B(0), re = B(0), h = B(34), ie = B(820), ae = B(3), se = B(), ce = B(0), le = B(0), g = B(0), _ = B(0), ue = B(0), de = B(0), v = B(29), fe = Je(Rn), pe = w(() => Nt(n.menus)), me = w(() => Pt(pe.value, c.value)), b = w(() => n.selectedMenuId ? It(pe.value, n.selectedMenuId) : []), he = w(() => b.value[0]?.record.id), ge = w(() => b.value.map((e) => e.record.id)), _e = w(() => Wt(n.realtimeStatus)), x = w(() => {
|
|
1083
|
+
let e = l.value ? Lt(me.value, l.value) : void 0;
|
|
1084
|
+
return e?.hasChildren ? e : void 0;
|
|
1085
|
+
}), ve = w(() => x.value ? zt(x.value, u.value, ae.value) : void 0), ye = w(() => et({
|
|
1086
|
+
left: ee.value,
|
|
1087
|
+
top: f.value,
|
|
1088
|
+
width: te.value,
|
|
1089
|
+
height: ne.value
|
|
1090
|
+
}, {
|
|
1091
|
+
left: m.value,
|
|
1092
|
+
top: re.value,
|
|
1093
|
+
height: h.value
|
|
1094
|
+
}, 6)), S = w(() => ve.value?.activeDeepRoot), be = w(() => d.value ? Lt(me.value, d.value) : void 0), Se = w(() => et({
|
|
1095
|
+
left: le.value,
|
|
1096
|
+
top: ce.value,
|
|
1097
|
+
width: g.value,
|
|
1098
|
+
height: _.value
|
|
1099
|
+
}, {
|
|
1100
|
+
left: ue.value,
|
|
1101
|
+
top: de.value,
|
|
1102
|
+
height: v.value
|
|
1103
|
+
})), A = w(() => {
|
|
1104
|
+
let e = n.compactAnchor, t = se.value, r = i.value?.getBoundingClientRect();
|
|
1105
|
+
if (!N.value || !n.compactOpen || !e || !t || !r) return;
|
|
1106
|
+
let a = x.value ? {
|
|
1107
|
+
left: ee.value,
|
|
1108
|
+
top: f.value,
|
|
1109
|
+
right: ee.value + te.value,
|
|
1110
|
+
bottom: f.value + ne.value
|
|
1111
|
+
} : void 0;
|
|
1112
|
+
return tt(t, {
|
|
1113
|
+
left: Math.round(e.left - r.left),
|
|
1114
|
+
top: Math.round(e.top - r.top),
|
|
1115
|
+
right: Math.round(e.right - r.left)
|
|
1116
|
+
}, 5, 4, a);
|
|
1117
|
+
}), Ce = w(() => ve.value?.columns.length ?? 1), M = w(() => n.presentation === "expanded" || n.compactOpen), N = w(() => n.presentation === "compact"), P = w(() => N.value || n.expandedMenuDepth === 1), F, I, z, Oe = 0, H, ke = [], Ae;
|
|
1118
|
+
je(() => n.compactOpen, (e) => {
|
|
1119
|
+
if (!e) {
|
|
1120
|
+
Ke();
|
|
1121
|
+
return;
|
|
1122
|
+
}
|
|
1123
|
+
}), je(() => n.expandedMenuDepth, () => Ke()), je(() => n.presentation, () => Ke()), je(() => [
|
|
1124
|
+
n.compactOpen,
|
|
1125
|
+
n.compactAnchor,
|
|
1126
|
+
n.presentation
|
|
1127
|
+
], () => {
|
|
1128
|
+
if (N.value && n.compactOpen) {
|
|
1129
|
+
we(X);
|
|
1130
|
+
return;
|
|
1131
|
+
}
|
|
1132
|
+
se.value = void 0;
|
|
1133
|
+
}), je(() => [
|
|
1134
|
+
M.value,
|
|
1135
|
+
x.value?.record.id,
|
|
1136
|
+
be.value?.record.id
|
|
1137
|
+
], () => void we(at)), Ee(() => {
|
|
1138
|
+
typeof ResizeObserver < "u" && (Ae = new ResizeObserver(ot)), we(at);
|
|
1139
|
+
}), De(() => {
|
|
1140
|
+
ft(), We(), Ae?.disconnect();
|
|
1141
|
+
});
|
|
1142
|
+
function Me(e) {
|
|
1143
|
+
Ke(), e.target ? r("selectMenu", e.record, e.target) : r("invalidMenu", e.record);
|
|
1144
|
+
}
|
|
1145
|
+
function q(e, t) {
|
|
1146
|
+
if (d.value === e.record.id) {
|
|
1147
|
+
if (fe.consumeImmediateClick(e.record.id)) return;
|
|
1148
|
+
Xe();
|
|
1149
|
+
return;
|
|
1150
|
+
}
|
|
1151
|
+
fe.clear(), nt(e, t);
|
|
1152
|
+
}
|
|
1153
|
+
function Fe(e, t) {
|
|
1154
|
+
Ke(), r("selectMenu", e, t);
|
|
1155
|
+
}
|
|
1156
|
+
function J(e, t) {
|
|
1157
|
+
if (!Ie()) return;
|
|
1158
|
+
let n = t.currentTarget;
|
|
1159
|
+
if (Be(d.value, e.record.id, t, s.value)) {
|
|
1160
|
+
Ue(() => Le(e, n));
|
|
1161
|
+
return;
|
|
1162
|
+
}
|
|
1163
|
+
if (l.value === e.record.id) {
|
|
1164
|
+
We();
|
|
1165
|
+
return;
|
|
1166
|
+
}
|
|
1167
|
+
if (Be(l.value, e.record.id, t, o.value)) {
|
|
1168
|
+
Ue(() => Le(e, n));
|
|
1169
|
+
return;
|
|
1170
|
+
}
|
|
1171
|
+
Le(e, n);
|
|
1172
|
+
}
|
|
1173
|
+
function Ie() {
|
|
1174
|
+
return typeof window.matchMedia != "function" || window.matchMedia("(hover: hover)").matches;
|
|
1175
|
+
}
|
|
1176
|
+
function Le(e, t) {
|
|
1177
|
+
Re(e, t), l.value === e.record.id && fe.markHoverActivation(e.record.id);
|
|
1178
|
+
}
|
|
1179
|
+
function Re(e, t) {
|
|
1180
|
+
if (We(), !e.hasChildren) {
|
|
1181
|
+
Ke();
|
|
1182
|
+
return;
|
|
1183
|
+
}
|
|
1184
|
+
if (!N.value && n.expandedMenuDepth > 1) {
|
|
1185
|
+
Xe();
|
|
1186
|
+
return;
|
|
1187
|
+
}
|
|
1188
|
+
ft(), d.value = void 0, l.value = e.record.id, u.value = void 0, vt(t), we(yt);
|
|
1189
|
+
}
|
|
1190
|
+
function ze(e, t) {
|
|
1191
|
+
if (l.value === e.record.id) {
|
|
1192
|
+
if (fe.consumeImmediateClick(e.record.id)) return;
|
|
1193
|
+
Ke();
|
|
1194
|
+
return;
|
|
1195
|
+
}
|
|
1196
|
+
fe.clear(), Re(e, t.currentTarget instanceof HTMLElement ? t.currentTarget.closest(".root-menu-item") : null);
|
|
1197
|
+
}
|
|
1198
|
+
function Be(e, t, n, r) {
|
|
1199
|
+
let i = r?.getBoundingClientRect();
|
|
1200
|
+
if (!e || e === t || !i) return !1;
|
|
1201
|
+
let a = {
|
|
1202
|
+
x: n.clientX,
|
|
1203
|
+
y: n.clientY
|
|
1204
|
+
}, o = n.timeStamp - Ln, s = ke.at(-1);
|
|
1205
|
+
if (s && s.x > a.x) return !1;
|
|
1206
|
+
let c = He(a, o);
|
|
1207
|
+
return !!(c && Ye(a, c, {
|
|
1208
|
+
left: i.left,
|
|
1209
|
+
top: i.top,
|
|
1210
|
+
bottom: i.bottom
|
|
1211
|
+
}));
|
|
1212
|
+
}
|
|
1213
|
+
function He(e, t) {
|
|
1214
|
+
for (let n = ke.length - 1; n >= 0; --n) {
|
|
1215
|
+
let r = ke[n];
|
|
1216
|
+
if (r.at < t) break;
|
|
1217
|
+
if (r.x <= e.x - 4) return r;
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
function Ue(e) {
|
|
1221
|
+
We(), H = window.setTimeout(() => {
|
|
1222
|
+
H = void 0, e();
|
|
1223
|
+
}, In);
|
|
1224
|
+
}
|
|
1225
|
+
function We() {
|
|
1226
|
+
H !== void 0 && (window.clearTimeout(H), H = void 0);
|
|
1227
|
+
}
|
|
1228
|
+
function Ge(e) {
|
|
1229
|
+
let t = e.timeStamp - Ln;
|
|
1230
|
+
ke = ke.filter((e) => e.at >= t);
|
|
1231
|
+
let n = ke.at(-1);
|
|
1232
|
+
(!n || Math.hypot(e.clientX - n.x, e.clientY - n.y) >= 2) && ke.push({
|
|
1233
|
+
x: e.clientX,
|
|
1234
|
+
y: e.clientY,
|
|
1235
|
+
at: e.timeStamp
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1238
|
+
function Ke() {
|
|
1239
|
+
ft(), We(), ke = [], fe.clear(), l.value = void 0, u.value = void 0, Xe();
|
|
1240
|
+
}
|
|
1241
|
+
function Xe() {
|
|
1242
|
+
We(), d.value = void 0;
|
|
1243
|
+
}
|
|
1244
|
+
function Ze(e, t, n = t.currentTarget) {
|
|
1245
|
+
if (Ie()) {
|
|
1246
|
+
if (d.value === e.record.id) {
|
|
1247
|
+
We();
|
|
1248
|
+
return;
|
|
1249
|
+
}
|
|
1250
|
+
if (Be(d.value, e.record.id, t, s.value)) {
|
|
1251
|
+
Ue(() => Qe(e, n));
|
|
1252
|
+
return;
|
|
1253
|
+
}
|
|
1254
|
+
Qe(e, n);
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
function Qe(e, t) {
|
|
1258
|
+
nt(e, t), d.value === e.record.id && fe.markHoverActivation(e.record.id);
|
|
1259
|
+
}
|
|
1260
|
+
function nt(e, t) {
|
|
1261
|
+
if (We(), !e.hasChildren) {
|
|
1262
|
+
Xe();
|
|
1263
|
+
return;
|
|
1264
|
+
}
|
|
1265
|
+
ft(), l.value = void 0, u.value = void 0, d.value = e.record.id, rt(t), we(it);
|
|
1266
|
+
}
|
|
1267
|
+
function rt(e) {
|
|
1268
|
+
if (!(e instanceof HTMLElement)) return;
|
|
1269
|
+
let t = e.getBoundingClientRect(), n = i.value?.getBoundingClientRect(), r = n?.top ?? 0, a = n?.left ?? 0, o = Math.min(window.innerHeight - 16, Nn);
|
|
1270
|
+
ce.value = $e(t.top, o, window.innerHeight, r), le.value = Math.round(t.right - a), ue.value = Math.round(t.left - a), de.value = Math.round(t.top - r), v.value = Math.round(t.height);
|
|
1271
|
+
}
|
|
1272
|
+
function it() {
|
|
1273
|
+
let e = s.value;
|
|
1274
|
+
if (!e) return;
|
|
1275
|
+
let t = i.value?.getBoundingClientRect().top ?? 0, n = e.offsetHeight;
|
|
1276
|
+
g.value = e.offsetWidth, _.value = n, ce.value = $e(t + de.value, n, window.innerHeight, t);
|
|
1277
|
+
}
|
|
1278
|
+
function X() {
|
|
1279
|
+
let e = a.value, t = i.value?.getBoundingClientRect();
|
|
1280
|
+
if (!e || !t || !n.compactAnchor) {
|
|
1281
|
+
se.value = void 0;
|
|
1282
|
+
return;
|
|
1283
|
+
}
|
|
1284
|
+
let r = e.getBoundingClientRect();
|
|
1285
|
+
se.value = {
|
|
1286
|
+
left: Math.round(r.left - t.left),
|
|
1287
|
+
top: Math.round(r.top - t.top),
|
|
1288
|
+
right: Math.round(r.right - t.left),
|
|
1289
|
+
bottom: Math.round(r.bottom - t.top)
|
|
1290
|
+
};
|
|
1291
|
+
}
|
|
1292
|
+
function at() {
|
|
1293
|
+
Ae?.disconnect();
|
|
1294
|
+
for (let e of [
|
|
1295
|
+
a.value,
|
|
1296
|
+
o.value,
|
|
1297
|
+
s.value
|
|
1298
|
+
]) e && Ae?.observe(e);
|
|
1299
|
+
ot();
|
|
1300
|
+
}
|
|
1301
|
+
function ot() {
|
|
1302
|
+
N.value && n.compactOpen && X(), x.value && yt(), be.value && it();
|
|
1303
|
+
}
|
|
1304
|
+
function st() {
|
|
1305
|
+
ft(), We(), N.value && r("compactMenuEnter");
|
|
1306
|
+
}
|
|
1307
|
+
function ct(e) {
|
|
1308
|
+
if (N.value) {
|
|
1309
|
+
r("compactMenuLeave");
|
|
1310
|
+
return;
|
|
1311
|
+
}
|
|
1312
|
+
Z(e) || lt();
|
|
1313
|
+
}
|
|
1314
|
+
function lt() {
|
|
1315
|
+
Ke(), N.value && r("compactMenuLeave");
|
|
1316
|
+
}
|
|
1317
|
+
function Z(e) {
|
|
1318
|
+
let t = o.value?.getBoundingClientRect();
|
|
1319
|
+
return !x.value || !t || e.clientX > t.left + 8 ? !1 : (I = {
|
|
1320
|
+
x: e.clientX,
|
|
1321
|
+
y: e.clientY
|
|
1322
|
+
}, z = {
|
|
1323
|
+
left: t.left,
|
|
1324
|
+
top: t.top,
|
|
1325
|
+
bottom: t.bottom
|
|
1326
|
+
}, Oe = 0, window.addEventListener("pointermove", ut), dt(), !0);
|
|
1327
|
+
}
|
|
1328
|
+
function ut(e) {
|
|
1329
|
+
if (!(!I || !z) && !(e.pointerType && e.pointerType !== "mouse")) {
|
|
1330
|
+
if (Ye({
|
|
1331
|
+
x: e.clientX,
|
|
1332
|
+
y: e.clientY
|
|
1333
|
+
}, I, z)) {
|
|
1334
|
+
Oe = 0, dt();
|
|
1335
|
+
return;
|
|
1336
|
+
}
|
|
1337
|
+
Oe += 1, Oe >= Fn && lt();
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
function dt() {
|
|
1341
|
+
F !== void 0 && window.clearTimeout(F), F = window.setTimeout(lt, Pn);
|
|
1342
|
+
}
|
|
1343
|
+
function ft() {
|
|
1344
|
+
F !== void 0 && (window.clearTimeout(F), F = void 0), window.removeEventListener("pointermove", ut), I = void 0, z = void 0, Oe = 0;
|
|
1345
|
+
}
|
|
1346
|
+
function pt() {
|
|
1347
|
+
N.value && r("compactMenuEnter");
|
|
1348
|
+
}
|
|
1349
|
+
function mt(e) {
|
|
1350
|
+
let t = e.currentTarget;
|
|
1351
|
+
t instanceof HTMLElement && t.contains(e.relatedTarget) || N.value && r("compactMenuLeave");
|
|
1352
|
+
}
|
|
1353
|
+
function ht(e) {
|
|
1354
|
+
r("changePresentation", e);
|
|
1355
|
+
}
|
|
1356
|
+
function gt(e) {
|
|
1357
|
+
r("changeExpandedMenuDepth", e);
|
|
1358
|
+
}
|
|
1359
|
+
function _t(e) {
|
|
1360
|
+
if (e.key === "Escape") {
|
|
1361
|
+
if (u.value) {
|
|
1362
|
+
Tt(), e.stopPropagation();
|
|
1363
|
+
return;
|
|
1364
|
+
}
|
|
1365
|
+
Ke(), N.value && r("compactMenuClose");
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
function vt(e) {
|
|
1369
|
+
if (!(e instanceof HTMLElement)) return;
|
|
1370
|
+
let t = e.getBoundingClientRect(), n = i.value?.getBoundingClientRect(), r = n?.top ?? 0, a = Math.min(window.innerHeight - 16, Nn), o = n?.left ?? 0;
|
|
1371
|
+
f.value = N.value ? bt() ?? $e(t.top, a, window.innerHeight, r) : $e(t.top, a, window.innerHeight, r), ee.value = Math.round(t.right - o), m.value = Math.round(t.left - o), re.value = Math.round(t.top - r), h.value = Math.round(t.height), xt();
|
|
1372
|
+
}
|
|
1373
|
+
function yt() {
|
|
1374
|
+
let e = o.value;
|
|
1375
|
+
if (!e) return;
|
|
1376
|
+
let t = i.value?.getBoundingClientRect().top ?? 0;
|
|
1377
|
+
f.value = $e(N.value ? t + (bt() ?? re.value) : t + re.value, e.offsetHeight, window.innerHeight, t), te.value = e.offsetWidth, ne.value = e.offsetHeight;
|
|
1378
|
+
}
|
|
1379
|
+
function bt() {
|
|
1380
|
+
let e = a.value, t = i.value?.getBoundingClientRect();
|
|
1381
|
+
if (!(!e || !t)) return Math.round(e.getBoundingClientRect().top - t.top);
|
|
1382
|
+
}
|
|
1383
|
+
function xt() {
|
|
1384
|
+
let e = St(), t = Math.max(0, Math.min(e, jn)), n = x.value?.children.length ?? 0, r = Math.max(1, Math.min(4, n || 1, Math.floor((t - An + kn) / 186) || 1)), i = r * On + Math.max(0, r - 1) * kn + An, a = Math.min(e, jn, i);
|
|
1385
|
+
ae.value = r, ie.value = Math.max(280, a);
|
|
1386
|
+
}
|
|
1387
|
+
function St() {
|
|
1388
|
+
let e = (i.value?.getBoundingClientRect().left ?? 0) + ee.value;
|
|
1389
|
+
return Math.max(280, window.innerWidth - e - Mn);
|
|
1390
|
+
}
|
|
1391
|
+
function Ct(e) {
|
|
1392
|
+
e.hasChildren && (u.value = u.value === e.record.id ? void 0 : e.record.id, we(yt));
|
|
1393
|
+
}
|
|
1394
|
+
function wt(e) {
|
|
1395
|
+
e.navigable ? Me(e) : Ct(e);
|
|
1396
|
+
}
|
|
1397
|
+
function Tt() {
|
|
1398
|
+
u.value = void 0, we(yt);
|
|
1399
|
+
}
|
|
1400
|
+
function Et(e, t) {
|
|
1401
|
+
e.hasChildren && (t.key === "ArrowRight" && u.value !== e.record.id ? (t.preventDefault(), u.value = e.record.id, we(yt)) : t.key === "ArrowLeft" && u.value === e.record.id && (t.preventDefault(), u.value = void 0, we(yt)));
|
|
1402
|
+
}
|
|
1403
|
+
function Dt(e) {
|
|
1404
|
+
return he.value === e.record.id;
|
|
1405
|
+
}
|
|
1406
|
+
function Ot(e) {
|
|
1407
|
+
return n.selectedMenuId === e.record.id;
|
|
1408
|
+
}
|
|
1409
|
+
function kt(e) {
|
|
1410
|
+
return !Ot(e) && ge.value.includes(e.record.id);
|
|
1411
|
+
}
|
|
1412
|
+
return (t, n) => (R(), D("div", {
|
|
1413
|
+
ref_key: "menuShell",
|
|
1414
|
+
ref: i,
|
|
1415
|
+
class: L(["workbench-menu", {
|
|
1416
|
+
"mega-open": x.value,
|
|
1417
|
+
"workbench-menu--compact": N.value,
|
|
1418
|
+
"workbench-menu--expanded": !N.value,
|
|
1419
|
+
"workbench-menu--compact-open": N.value && e.compactOpen,
|
|
1420
|
+
"compact-mega-open": N.value && A.value
|
|
1421
|
+
}]),
|
|
1422
|
+
style: Te(N.value ? { "--compact-menu-top": `${e.compactTop}px` } : void 0),
|
|
1423
|
+
onMouseenter: st,
|
|
1424
|
+
onMouseleave: ct,
|
|
1425
|
+
onPointermove: Ge,
|
|
1426
|
+
onFocusin: pt,
|
|
1427
|
+
onFocusout: mt,
|
|
1428
|
+
onKeydown: _t
|
|
1429
|
+
}, [
|
|
1430
|
+
j(xe, {
|
|
1431
|
+
name: "workbench-menu-panel",
|
|
1432
|
+
onAfterEnter: X
|
|
1433
|
+
}, {
|
|
1434
|
+
default: K(() => [M.value ? (R(), D("aside", {
|
|
1435
|
+
key: 0,
|
|
1436
|
+
id: N.value ? "workbench-compact-menu" : void 0,
|
|
1437
|
+
ref_key: "menuSidebar",
|
|
1438
|
+
ref: a,
|
|
1439
|
+
class: "menu-sidebar"
|
|
1440
|
+
}, [
|
|
1441
|
+
j(xe, { name: "workbench-sidebar-brand" }, {
|
|
1442
|
+
default: K(() => [N.value ? E("v-if", !0) : (R(), T(Ve, {
|
|
1443
|
+
key: 0,
|
|
1444
|
+
presentation: "expanded",
|
|
1445
|
+
"tenant-label": e.tenantLabel,
|
|
1446
|
+
"logo-src": e.logoSrc,
|
|
1447
|
+
"show-title-area": e.showTitleArea,
|
|
1448
|
+
"brand-title": e.brandTitle,
|
|
1449
|
+
"brand-subtitle": e.brandSubtitle,
|
|
1450
|
+
"expanded-menu-depth": e.expandedMenuDepth,
|
|
1451
|
+
onChangePresentation: ht,
|
|
1452
|
+
onChangeExpandedMenuDepth: gt
|
|
1453
|
+
}, null, 8, [
|
|
1454
|
+
"tenant-label",
|
|
1455
|
+
"logo-src",
|
|
1456
|
+
"show-title-area",
|
|
1457
|
+
"brand-title",
|
|
1458
|
+
"brand-subtitle",
|
|
1459
|
+
"expanded-menu-depth"
|
|
1460
|
+
]))]),
|
|
1461
|
+
_: 1
|
|
1462
|
+
}),
|
|
1463
|
+
N.value ? E("v-if", !0) : (R(), D("div", Kt, [j(G(p), { name: "search" }), j(G(y), {
|
|
1464
|
+
value: c.value,
|
|
1465
|
+
"onUpdate:value": n[0] ||= (e) => c.value = e,
|
|
1466
|
+
type: "search",
|
|
1467
|
+
"allow-clear": "",
|
|
1468
|
+
placeholder: e.searchPlaceholder,
|
|
1469
|
+
"aria-label": "搜索菜单"
|
|
1470
|
+
}, null, 8, ["value", "placeholder"])])),
|
|
1471
|
+
O("nav", qt, [me.value.length > 0 ? (R(), D("div", Jt, [(R(!0), D(C, null, V(me.value, (t) => (R(), D(C, { key: t.record.id }, [t.navigable && t.hasChildren && P.value ? (R(), D("div", {
|
|
1472
|
+
key: 0,
|
|
1473
|
+
class: L(["root-menu-item root-menu-item--split navigable branch", {
|
|
1474
|
+
active: x.value?.record.id === t.record.id,
|
|
1475
|
+
selected: Ot(t),
|
|
1476
|
+
"selected-path": Dt(t) && !Ot(t)
|
|
1477
|
+
}]),
|
|
1478
|
+
onMouseenter: (e) => J(t, e)
|
|
1479
|
+
}, [O("button", {
|
|
1480
|
+
class: "root-menu-item-main navigable",
|
|
1481
|
+
type: "button",
|
|
1482
|
+
"aria-current": Dt(t) ? "page" : void 0,
|
|
1483
|
+
onClick: (e) => Me(t)
|
|
1484
|
+
}, [O("span", null, W(t.record.title), 1)], 8, Xt), O("button", {
|
|
1485
|
+
class: "root-menu-item-trigger",
|
|
1486
|
+
type: "button",
|
|
1487
|
+
"aria-label": `${x.value?.record.id === t.record.id ? "收起" : "展开"}${t.record.title}下级菜单`,
|
|
1488
|
+
"aria-expanded": x.value?.record.id === t.record.id,
|
|
1489
|
+
"aria-controls": "workbench-mega-panel",
|
|
1490
|
+
onClick: Pe((e) => ze(t, e), ["stop"])
|
|
1491
|
+
}, [...n[2] ||= [O("i", {
|
|
1492
|
+
class: "root-menu-branch-indicator",
|
|
1493
|
+
"aria-hidden": "true"
|
|
1494
|
+
}, null, -1)]], 8, Zt)], 42, Yt)) : (R(), T(U(t.navigable || P.value ? "button" : "div"), {
|
|
1495
|
+
key: 1,
|
|
1496
|
+
class: L(["root-menu-item", {
|
|
1497
|
+
active: x.value?.record.id === t.record.id,
|
|
1498
|
+
selected: Ot(t),
|
|
1499
|
+
"selected-path": Dt(t) && !Ot(t),
|
|
1500
|
+
navigable: t.navigable,
|
|
1501
|
+
branch: t.hasChildren
|
|
1502
|
+
}]),
|
|
1503
|
+
type: t.navigable || P.value ? "button" : void 0,
|
|
1504
|
+
"aria-expanded": t.hasChildren && P.value ? x.value?.record.id === t.record.id : void 0,
|
|
1505
|
+
"aria-controls": t.hasChildren && P.value && x.value?.record.id === t.record.id ? "workbench-mega-panel" : void 0,
|
|
1506
|
+
onMouseenter: (e) => P.value && J(t, e),
|
|
1507
|
+
onClick: (e) => t.navigable ? Me(t) : P.value && ze(t, e)
|
|
1508
|
+
}, {
|
|
1509
|
+
default: K(() => [O("span", null, W(t.record.title), 1), t.hasChildren && P.value ? (R(), D("i", Qt)) : E("v-if", !0)]),
|
|
1510
|
+
_: 2
|
|
1511
|
+
}, 1064, [
|
|
1512
|
+
"class",
|
|
1513
|
+
"type",
|
|
1514
|
+
"aria-expanded",
|
|
1515
|
+
"aria-controls",
|
|
1516
|
+
"onMouseenter",
|
|
1517
|
+
"onClick"
|
|
1518
|
+
])), !N.value && e.expandedMenuDepth >= 2 ? (R(), D("div", $t, [(R(!0), D(C, null, V(t.children, (t) => (R(), D(C, { key: t.record.id }, [j(qe, {
|
|
1519
|
+
node: t,
|
|
1520
|
+
mode: e.expandedMenuDepth === 2 ? "flyout" : "inline",
|
|
1521
|
+
selected: Ot(t),
|
|
1522
|
+
"selected-path": kt(t),
|
|
1523
|
+
active: be.value?.record.id === t.record.id,
|
|
1524
|
+
onSelect: Me,
|
|
1525
|
+
onOpenChildren: Ze,
|
|
1526
|
+
onToggleChildren: q
|
|
1527
|
+
}, null, 8, [
|
|
1528
|
+
"node",
|
|
1529
|
+
"mode",
|
|
1530
|
+
"selected",
|
|
1531
|
+
"selected-path",
|
|
1532
|
+
"active"
|
|
1533
|
+
]), e.expandedMenuDepth >= 3 ? (R(), D("div", en, [(R(!0), D(C, null, V(t.children, (e) => (R(), T(qe, {
|
|
1534
|
+
key: e.record.id,
|
|
1535
|
+
node: e,
|
|
1536
|
+
mode: "flyout",
|
|
1537
|
+
selected: Ot(e),
|
|
1538
|
+
"selected-path": kt(e),
|
|
1539
|
+
active: be.value?.record.id === e.record.id,
|
|
1540
|
+
onSelect: Me,
|
|
1541
|
+
onOpenChildren: Ze,
|
|
1542
|
+
onToggleChildren: q
|
|
1543
|
+
}, null, 8, [
|
|
1544
|
+
"node",
|
|
1545
|
+
"selected",
|
|
1546
|
+
"selected-path",
|
|
1547
|
+
"active"
|
|
1548
|
+
]))), 128))])) : E("v-if", !0)], 64))), 128))])) : E("v-if", !0)], 64))), 128))])) : (R(), T(G(oe), {
|
|
1549
|
+
key: 1,
|
|
1550
|
+
description: "暂无菜单"
|
|
1551
|
+
}))]),
|
|
1552
|
+
N.value ? (R(), D("div", tn, [O("div", nn, [j(G(p), { name: "search" }), j(G(y), {
|
|
1553
|
+
value: c.value,
|
|
1554
|
+
"onUpdate:value": n[1] ||= (e) => c.value = e,
|
|
1555
|
+
type: "search",
|
|
1556
|
+
"allow-clear": "",
|
|
1557
|
+
placeholder: e.searchPlaceholder,
|
|
1558
|
+
"aria-label": "搜索菜单"
|
|
1559
|
+
}, null, 8, ["value", "placeholder"])])])) : E("v-if", !0),
|
|
1560
|
+
!N.value && _e.value ? (R(), D("div", {
|
|
1561
|
+
key: 2,
|
|
1562
|
+
class: L(["sidebar-footer", `realtime-${_e.value.tone}`]),
|
|
1563
|
+
title: _e.value.title,
|
|
1564
|
+
role: "status"
|
|
1565
|
+
}, [n[3] ||= O("div", { class: "status-dot" }, null, -1), O("span", null, W(_e.value.label), 1)], 10, rn)) : E("v-if", !0)
|
|
1566
|
+
], 8, Gt)) : E("v-if", !0)]),
|
|
1567
|
+
_: 1
|
|
1568
|
+
}),
|
|
1569
|
+
n[5] ||= k("<svg class=\"menu-outline-definitions\" aria-hidden=\"true\" data-v-6c81bf39><defs data-v-6c81bf39><filter id=\"workbench-menu-outline-shadow\" x=\"-20%\" y=\"-20%\" width=\"160%\" height=\"160%\" data-v-6c81bf39><feGaussianBlur in=\"SourceAlpha\" stdDeviation=\"12\" result=\"blur\" data-v-6c81bf39></feGaussianBlur><feOffset in=\"blur\" dx=\"6\" dy=\"10\" result=\"offset-blur\" data-v-6c81bf39></feOffset><feFlood flood-color=\"#0f172a\" flood-opacity=\"0.08\" result=\"shadow-color\" data-v-6c81bf39></feFlood><feComposite in=\"shadow-color\" in2=\"offset-blur\" operator=\"in\" result=\"shadow\" data-v-6c81bf39></feComposite><feComposite in=\"shadow\" in2=\"SourceAlpha\" operator=\"out\" data-v-6c81bf39></feComposite></filter></defs></svg>", 1),
|
|
1570
|
+
A.value ? (R(), D(C, { key: 0 }, [(R(), D("svg", an, [O("path", {
|
|
1571
|
+
d: A.value,
|
|
1572
|
+
filter: "url(#workbench-menu-outline-shadow)"
|
|
1573
|
+
}, null, 8, on)])), (R(), D("svg", sn, [O("path", { d: A.value }, null, 8, cn)]))], 64)) : E("v-if", !0),
|
|
1574
|
+
be.value ? (R(), D("svg", ln, [O("path", {
|
|
1575
|
+
d: Se.value,
|
|
1576
|
+
filter: "url(#workbench-menu-outline-shadow)"
|
|
1577
|
+
}, null, 8, un)])) : E("v-if", !0),
|
|
1578
|
+
be.value ? (R(), D("svg", dn, [O("path", { d: Se.value }, null, 8, fn)])) : E("v-if", !0),
|
|
1579
|
+
x.value && !N.value ? (R(), D("svg", pn, [O("path", {
|
|
1580
|
+
d: ye.value,
|
|
1581
|
+
filter: "url(#workbench-menu-outline-shadow)"
|
|
1582
|
+
}, null, 8, mn)])) : E("v-if", !0),
|
|
1583
|
+
x.value && !N.value ? (R(), D("svg", hn, [O("path", { d: ye.value }, null, 8, gn)])) : E("v-if", !0),
|
|
1584
|
+
j(xe, { name: "workbench-mega-panel" }, {
|
|
1585
|
+
default: K(() => [x.value ? (R(), D("section", {
|
|
1586
|
+
key: 0,
|
|
1587
|
+
id: "workbench-mega-panel",
|
|
1588
|
+
ref_key: "megaPanel",
|
|
1589
|
+
ref: o,
|
|
1590
|
+
class: "mega-panel",
|
|
1591
|
+
style: Te({
|
|
1592
|
+
"--mega-panel-top": `${f.value}px`,
|
|
1593
|
+
"--mega-panel-left": `${ee.value}px`,
|
|
1594
|
+
"--mega-panel-width": `${ie.value}px`,
|
|
1595
|
+
"--mega-column-count": Ce.value
|
|
1596
|
+
}),
|
|
1597
|
+
onMouseenter: st
|
|
1598
|
+
}, [O("div", _n, [O("div", vn, [(R(!0), D(C, null, V(ve.value?.columns ?? [], (e, t) => (R(), D("div", {
|
|
1599
|
+
key: `mega-column-${t}`,
|
|
1600
|
+
class: "mega-column"
|
|
1601
|
+
}, [(R(!0), D(C, null, V(e, (e) => (R(), D("section", {
|
|
1602
|
+
key: e.record.id,
|
|
1603
|
+
class: "mega-group"
|
|
1604
|
+
}, [O("button", {
|
|
1605
|
+
class: L(["mega-group-title", {
|
|
1606
|
+
navigable: e.navigable,
|
|
1607
|
+
selected: Ot(e),
|
|
1608
|
+
"selected-path": kt(e)
|
|
1609
|
+
}]),
|
|
1610
|
+
type: "button",
|
|
1611
|
+
disabled: !e.navigable,
|
|
1612
|
+
"aria-current": Ot(e) ? "page" : void 0,
|
|
1613
|
+
onClick: (t) => Me(e)
|
|
1614
|
+
}, [O("span", null, W(e.record.title), 1)], 10, yn), O("div", bn, [(R(!0), D(C, null, V(e.children, (e) => (R(), D("div", {
|
|
1615
|
+
key: e.record.id,
|
|
1616
|
+
class: L(["mega-entry", {
|
|
1617
|
+
navigable: e.navigable,
|
|
1618
|
+
active: S.value?.record.id === e.record.id,
|
|
1619
|
+
selected: Ot(e),
|
|
1620
|
+
"selected-path": kt(e)
|
|
1621
|
+
}]),
|
|
1622
|
+
onKeydown: (t) => Et(e, t)
|
|
1623
|
+
}, [O("button", {
|
|
1624
|
+
class: "mega-entry-main",
|
|
1625
|
+
type: "button",
|
|
1626
|
+
disabled: !e.navigable && !e.hasChildren,
|
|
1627
|
+
"aria-current": Ot(e) ? "page" : void 0,
|
|
1628
|
+
"aria-label": !e.navigable && e.hasChildren ? `${S.value?.record.id === e.record.id ? "收起" : "展开"}${e.record.title}下级菜单` : void 0,
|
|
1629
|
+
"aria-expanded": !e.navigable && e.hasChildren ? S.value?.record.id === e.record.id : void 0,
|
|
1630
|
+
"aria-controls": !e.navigable && e.hasChildren ? "workbench-mega-deep-panel" : void 0,
|
|
1631
|
+
onClick: (t) => wt(e)
|
|
1632
|
+
}, [O("span", null, W(e.record.title), 1), e.hasChildren && !e.navigable ? (R(), D("i", Cn)) : E("v-if", !0)], 8, Sn), e.hasChildren && e.navigable ? (R(), D("button", {
|
|
1633
|
+
key: 0,
|
|
1634
|
+
class: "mega-entry-trigger",
|
|
1635
|
+
type: "button",
|
|
1636
|
+
"aria-label": `${S.value?.record.id === e.record.id ? "收起" : "展开"}${e.record.title}下级菜单`,
|
|
1637
|
+
"aria-expanded": S.value?.record.id === e.record.id,
|
|
1638
|
+
"aria-controls": "workbench-mega-deep-panel",
|
|
1639
|
+
onClick: Pe((t) => Ct(e), ["stop"]),
|
|
1640
|
+
onKeydown: Ne(Pe(Tt, ["stop"]), ["esc"])
|
|
1641
|
+
}, [...n[4] ||= [O("i", {
|
|
1642
|
+
class: "mega-entry-indicator",
|
|
1643
|
+
"aria-hidden": "true"
|
|
1644
|
+
}, null, -1)]], 40, wn)) : E("v-if", !0)], 42, xn))), 128))])]))), 128))]))), 128))]), j(xe, {
|
|
1645
|
+
name: "mega-deep-dock",
|
|
1646
|
+
duration: {
|
|
1647
|
+
enter: 160,
|
|
1648
|
+
leave: 0
|
|
1649
|
+
},
|
|
1650
|
+
onAfterEnter: yt,
|
|
1651
|
+
onAfterLeave: yt
|
|
1652
|
+
}, {
|
|
1653
|
+
default: K(() => [S.value ? (R(), D("aside", {
|
|
1654
|
+
key: 0,
|
|
1655
|
+
id: "workbench-mega-deep-panel",
|
|
1656
|
+
class: "mega-deep-panel",
|
|
1657
|
+
onMouseenter: st,
|
|
1658
|
+
onKeydown: Ne(Pe(Tt, ["stop"]), ["esc"])
|
|
1659
|
+
}, [O("ul", {
|
|
1660
|
+
class: "mega-deep-tree",
|
|
1661
|
+
"aria-label": `${S.value.record.title}下级菜单`
|
|
1662
|
+
}, [(R(!0), D(C, null, V(S.value.children, (t) => (R(), T(Y, {
|
|
1663
|
+
key: t.record.id,
|
|
1664
|
+
node: t,
|
|
1665
|
+
"selected-menu-id": e.selectedMenuId,
|
|
1666
|
+
"selected-path-ids": ge.value,
|
|
1667
|
+
onSelectMenu: Fe
|
|
1668
|
+
}, null, 8, [
|
|
1669
|
+
"node",
|
|
1670
|
+
"selected-menu-id",
|
|
1671
|
+
"selected-path-ids"
|
|
1672
|
+
]))), 128))], 8, En)], 40, Tn)) : E("v-if", !0)]),
|
|
1673
|
+
_: 1
|
|
1674
|
+
})])], 36)) : E("v-if", !0)]),
|
|
1675
|
+
_: 1
|
|
1676
|
+
}),
|
|
1677
|
+
j(xe, { name: "workbench-mega-panel" }, {
|
|
1678
|
+
default: K(() => [be.value ? (R(), D("aside", {
|
|
1679
|
+
key: 0,
|
|
1680
|
+
id: "workbench-sidebar-submenu-panel",
|
|
1681
|
+
ref_key: "sidebarSubmenuPanel",
|
|
1682
|
+
ref: s,
|
|
1683
|
+
class: "sidebar-submenu-panel",
|
|
1684
|
+
"aria-label": "下级菜单",
|
|
1685
|
+
style: Te({
|
|
1686
|
+
"--sidebar-submenu-top": `${ce.value}px`,
|
|
1687
|
+
"--sidebar-submenu-left": `${le.value}px`
|
|
1688
|
+
}),
|
|
1689
|
+
onMouseenter: st
|
|
1690
|
+
}, [O("ul", Dn, [(R(!0), D(C, null, V(be.value.children, (t) => (R(), T(Y, {
|
|
1691
|
+
key: t.record.id,
|
|
1692
|
+
node: t,
|
|
1693
|
+
"selected-menu-id": e.selectedMenuId,
|
|
1694
|
+
"selected-path-ids": ge.value,
|
|
1695
|
+
onSelectMenu: Fe
|
|
1696
|
+
}, null, 8, [
|
|
1697
|
+
"node",
|
|
1698
|
+
"selected-menu-id",
|
|
1699
|
+
"selected-path-ids"
|
|
1700
|
+
]))), 128))])], 36)) : E("v-if", !0)]),
|
|
1701
|
+
_: 1
|
|
1702
|
+
})
|
|
1703
|
+
], 38));
|
|
1704
|
+
}
|
|
1705
|
+
}), [["__scopeId", "data-v-6c81bf39"]]), Bn = { class: "app-main" }, Vn = { class: "topbar-identity" }, Hn = {
|
|
1706
|
+
key: 0,
|
|
1707
|
+
class: "header-title-divider",
|
|
1708
|
+
"aria-hidden": "true"
|
|
1709
|
+
}, Un = { class: "topbar-title" }, Wn = { class: "topbar-title-heading" }, Gn = {
|
|
1710
|
+
class: "topbar-actions",
|
|
1711
|
+
"aria-label": "全局工具"
|
|
1712
|
+
}, Kn = ["onClick"], qn = { class: "avatar" }, Jn = { class: "user-meta" }, Yn = { class: "workbench-mega-surface" }, Xn = { class: "tab-strip" }, Zn = {
|
|
1713
|
+
key: 1,
|
|
1714
|
+
class: "empty-tabs"
|
|
1715
|
+
}, Qn = { class: "app-content" }, $n = 220, er = "(max-width: 980px)", tr = /*#__PURE__*/ o(/* @__PURE__ */ M({
|
|
1716
|
+
name: "Workbench",
|
|
1717
|
+
__name: "Workbench",
|
|
1718
|
+
props: {
|
|
1719
|
+
startup: { default: void 0 },
|
|
1720
|
+
loading: {
|
|
1721
|
+
type: Boolean,
|
|
1722
|
+
default: !1
|
|
1723
|
+
},
|
|
1724
|
+
error: { default: void 0 },
|
|
1725
|
+
activeTabKey: { default: void 0 },
|
|
1726
|
+
lockedTabKeys: { default: () => [] },
|
|
1727
|
+
realtimeStatus: { default: "unavailable" },
|
|
1728
|
+
themeAppearance: { default: "light" }
|
|
1729
|
+
},
|
|
1730
|
+
emits: [
|
|
1731
|
+
"selectMenu",
|
|
1732
|
+
"invalidMenu",
|
|
1733
|
+
"changeTab",
|
|
1734
|
+
"closeTab",
|
|
1735
|
+
"closeTabs",
|
|
1736
|
+
"toggleTabLock",
|
|
1737
|
+
"reorderTabs",
|
|
1738
|
+
"update:activeTabKey",
|
|
1739
|
+
"userCommand"
|
|
1740
|
+
],
|
|
1741
|
+
setup(t, { emit: n }) {
|
|
1742
|
+
let r = t, i = n, a = w(() => r.startup?.tabs ?? []), o = w(() => a.value.map(A)), s = w(() => r.activeTabKey ?? r.startup?.activeTabKey ?? o.value[0]?.key ?? ""), c = w(() => a.value.find((e) => e.key === s.value)), l = w(() => Se(c.value)), u = B(0), f = w(() => r.startup?.session.currentUser), ee = w(() => f.value?.username ?? f.value?.userId ?? "未登录"), te = w(() => ee.value.trim().slice(0, 1).toUpperCase() || "M"), ne = w(() => f.value?.tenantId ?? "系统工作区"), m = w(() => {
|
|
1743
|
+
let e = r.startup?.session.tenantBranding;
|
|
1744
|
+
return r.themeAppearance === "dark" && e?.darkLogo || e?.lightLogo;
|
|
1745
|
+
}), re = w(() => r.startup?.session.tenantBranding?.mode !== "logoOnly"), h = w(() => r.startup?.session.tenantBranding?.title?.trim() || "MuYun"), ie = w(() => r.startup?.session.tenantBranding?.subtitle?.trim() || ne.value), ae = w(() => Ie(l.value?.pageType)), oe = w(() => Le(l.value)), ce = [
|
|
1746
|
+
{
|
|
1747
|
+
key: "changePassword",
|
|
1748
|
+
title: "修改密码"
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
key: "profile",
|
|
1752
|
+
title: "个人信息"
|
|
1753
|
+
},
|
|
1754
|
+
{
|
|
1755
|
+
key: "logout",
|
|
1756
|
+
title: "退出登录",
|
|
1757
|
+
danger: !0
|
|
1758
|
+
}
|
|
1759
|
+
], le = B(Fe(e.get("workbench.menu-presentation", "compact"))), ue = B(!1), de = w(() => nt(le.value, ue.value)), fe = B(q(e.get("workbench.expanded-menu-depth", 1))), pe = B(!1), y = B(!1), me = B(), b = B(!1), he = B(), ge = B(), _e = B(54), ve, ye, S, be;
|
|
1760
|
+
function Se(e) {
|
|
1761
|
+
if (e) return e?.pageDescriptor ?? (e?.target ? Z(e.target, { title: e.title }) : void 0);
|
|
1762
|
+
}
|
|
1763
|
+
function k(e) {
|
|
1764
|
+
return e.key === s.value || Se(e)?.tabPolicy.cacheable !== !1;
|
|
1765
|
+
}
|
|
1766
|
+
function A(e) {
|
|
1767
|
+
return {
|
|
1768
|
+
key: e.key,
|
|
1769
|
+
title: e.title,
|
|
1770
|
+
closable: e.closable,
|
|
1771
|
+
pinned: r.lockedTabKeys.includes(e.key)
|
|
1772
|
+
};
|
|
1773
|
+
}
|
|
1774
|
+
function Ce(e) {
|
|
1775
|
+
i("update:activeTabKey", e), i("changeTab", e);
|
|
1776
|
+
}
|
|
1777
|
+
function M() {
|
|
1778
|
+
c.value && (u.value += 1);
|
|
1779
|
+
}
|
|
1780
|
+
function N(e) {
|
|
1781
|
+
return e.key === s.value ? `${e.key}:refresh:${u.value}` : e.key;
|
|
1782
|
+
}
|
|
1783
|
+
function P(e) {
|
|
1784
|
+
i("userCommand", e);
|
|
1785
|
+
}
|
|
1786
|
+
function F(e, t) {
|
|
1787
|
+
i("selectMenu", e, t), z();
|
|
1788
|
+
}
|
|
1789
|
+
function I(e = "pointer", t) {
|
|
1790
|
+
if (e === "click") {
|
|
1791
|
+
if (pe.value && y.value) {
|
|
1792
|
+
z();
|
|
1793
|
+
return;
|
|
1794
|
+
}
|
|
1795
|
+
y.value = !0;
|
|
1796
|
+
}
|
|
1797
|
+
e === "pointer" && b.value || (t && (me.value = t), H(), pe.value = !0);
|
|
1798
|
+
}
|
|
1799
|
+
function Te() {
|
|
1800
|
+
y.value || (H(), ve = window.setTimeout(() => {
|
|
1801
|
+
pe.value = !1, ve = void 0;
|
|
1802
|
+
}, $n));
|
|
1803
|
+
}
|
|
1804
|
+
function z() {
|
|
1805
|
+
H(), pe.value = !1, y.value = !1, me.value = void 0;
|
|
1806
|
+
}
|
|
1807
|
+
function H() {
|
|
1808
|
+
ve !== void 0 && (window.clearTimeout(ve), ve = void 0);
|
|
1809
|
+
}
|
|
1810
|
+
function U(e) {
|
|
1811
|
+
!pe.value || !y.value || e.composedPath().some((e) => e instanceof Element && (e.matches(".workbench-brand-identity") || e.matches(".workbench-menu"))) || z();
|
|
1812
|
+
}
|
|
1813
|
+
function ke(t) {
|
|
1814
|
+
ye !== void 0 && (window.cancelAnimationFrame(ye), ye = void 0), b.value = t === "compact", le.value = t, e.set("workbench.menu-presentation", t), z(), t === "compact" && (ye = window.requestAnimationFrame(() => {
|
|
1815
|
+
b.value = !1, ye = void 0;
|
|
1816
|
+
}));
|
|
1817
|
+
}
|
|
1818
|
+
function je(e) {
|
|
1819
|
+
ue.value = e.matches, z();
|
|
1820
|
+
}
|
|
1821
|
+
function Ne(t) {
|
|
1822
|
+
fe.value = t, e.set("workbench.expanded-menu-depth", t);
|
|
1823
|
+
}
|
|
1824
|
+
function q(e) {
|
|
1825
|
+
return e === 2 || e === 3 ? e : 1;
|
|
1826
|
+
}
|
|
1827
|
+
function Fe(e) {
|
|
1828
|
+
return e === "expanded" ? e : "compact";
|
|
1829
|
+
}
|
|
1830
|
+
function J() {
|
|
1831
|
+
if (!ge.value || !he.value) return;
|
|
1832
|
+
let e = ge.value.getBoundingClientRect(), t = he.value.getBoundingClientRect();
|
|
1833
|
+
_e.value = Qe(e.bottom, t.top);
|
|
1834
|
+
}
|
|
1835
|
+
Ee(() => {
|
|
1836
|
+
document.addEventListener("pointerdown", U), document.addEventListener("focusin", U), typeof window.matchMedia == "function" && (be = window.matchMedia(er), ue.value = be.matches, be.addEventListener("change", je)), we(() => {
|
|
1837
|
+
J(), !(typeof ResizeObserver > "u" || !ge.value) && (S = new ResizeObserver(J), S.observe(ge.value));
|
|
1838
|
+
});
|
|
1839
|
+
}), De(() => {
|
|
1840
|
+
document.removeEventListener("pointerdown", U), document.removeEventListener("focusin", U), H(), ye !== void 0 && window.cancelAnimationFrame(ye), S?.disconnect(), be?.removeEventListener("change", je);
|
|
1841
|
+
});
|
|
1842
|
+
function Ie(e) {
|
|
1843
|
+
return e === "dynamic-module" ? "动态模块" : e === "business-route" ? "业务页面" : e === "platform-route" ? "平台页面" : e === "remote-url" ? "在线页面" : e === "external-link" ? "外部链接" : "工作区";
|
|
1844
|
+
}
|
|
1845
|
+
function Le(e) {
|
|
1846
|
+
return e ? e.pageType === "dynamic-module" ? e.target.moduleAlias : e.pageType === "platform-route" || e.pageType === "business-route" ? e.target.route ?? e.target.routeName ?? e.target.pageKey ?? "workspace" : e.target.url : "未选择入口";
|
|
1847
|
+
}
|
|
1848
|
+
return (e, n) => (R(), D("main", {
|
|
1849
|
+
ref_key: "workbenchRoot",
|
|
1850
|
+
ref: he,
|
|
1851
|
+
class: L(["workbench", {
|
|
1852
|
+
"workbench--menu-expanded": de.value === "expanded",
|
|
1853
|
+
"workbench--compact-menu-open": de.value === "compact" && pe.value
|
|
1854
|
+
}])
|
|
1855
|
+
}, [j(zn, {
|
|
1856
|
+
menus: t.startup?.menus ?? [],
|
|
1857
|
+
"selected-menu-id": c.value?.target?.menuId,
|
|
1858
|
+
"tenant-label": ne.value,
|
|
1859
|
+
"logo-src": m.value,
|
|
1860
|
+
"show-title-area": re.value,
|
|
1861
|
+
"brand-title": h.value,
|
|
1862
|
+
"brand-subtitle": ie.value,
|
|
1863
|
+
"realtime-status": t.realtimeStatus,
|
|
1864
|
+
presentation: de.value,
|
|
1865
|
+
"expanded-menu-depth": fe.value,
|
|
1866
|
+
"compact-open": pe.value,
|
|
1867
|
+
"compact-top": _e.value,
|
|
1868
|
+
"compact-anchor": me.value,
|
|
1869
|
+
onSelectMenu: F,
|
|
1870
|
+
onInvalidMenu: n[0] ||= (e) => i("invalidMenu", e),
|
|
1871
|
+
onCompactMenuEnter: I,
|
|
1872
|
+
onCompactMenuLeave: Te,
|
|
1873
|
+
onCompactMenuClose: z,
|
|
1874
|
+
onChangePresentation: ke,
|
|
1875
|
+
onChangeExpandedMenuDepth: Ne
|
|
1876
|
+
}, null, 8, [
|
|
1877
|
+
"menus",
|
|
1878
|
+
"selected-menu-id",
|
|
1879
|
+
"tenant-label",
|
|
1880
|
+
"logo-src",
|
|
1881
|
+
"show-title-area",
|
|
1882
|
+
"brand-title",
|
|
1883
|
+
"brand-subtitle",
|
|
1884
|
+
"realtime-status",
|
|
1885
|
+
"presentation",
|
|
1886
|
+
"expanded-menu-depth",
|
|
1887
|
+
"compact-open",
|
|
1888
|
+
"compact-top",
|
|
1889
|
+
"compact-anchor"
|
|
1890
|
+
]), O("section", Bn, [O("header", {
|
|
1891
|
+
ref_key: "appTopbar",
|
|
1892
|
+
ref: ge,
|
|
1893
|
+
class: "app-topbar"
|
|
1894
|
+
}, [
|
|
1895
|
+
O("div", Vn, [
|
|
1896
|
+
j(xe, { name: "workbench-brand" }, {
|
|
1897
|
+
default: K(() => [de.value === "compact" ? (R(), T(Ve, {
|
|
1898
|
+
key: 0,
|
|
1899
|
+
presentation: "compact",
|
|
1900
|
+
"compact-open": pe.value,
|
|
1901
|
+
"tenant-label": ne.value,
|
|
1902
|
+
"logo-src": m.value,
|
|
1903
|
+
"show-title-area": re.value,
|
|
1904
|
+
"brand-title": h.value,
|
|
1905
|
+
"brand-subtitle": ie.value,
|
|
1906
|
+
"presentation-toggle-visible": !ue.value,
|
|
1907
|
+
onOpenCompactMenu: I,
|
|
1908
|
+
onScheduleCompactMenuClose: Te,
|
|
1909
|
+
onCloseCompactMenu: z,
|
|
1910
|
+
onChangePresentation: ke
|
|
1911
|
+
}, null, 8, [
|
|
1912
|
+
"compact-open",
|
|
1913
|
+
"tenant-label",
|
|
1914
|
+
"logo-src",
|
|
1915
|
+
"show-title-area",
|
|
1916
|
+
"brand-title",
|
|
1917
|
+
"brand-subtitle",
|
|
1918
|
+
"presentation-toggle-visible"
|
|
1919
|
+
])) : E("v-if", !0)]),
|
|
1920
|
+
_: 1
|
|
1921
|
+
}),
|
|
1922
|
+
j(xe, { name: "workbench-divider" }, {
|
|
1923
|
+
default: K(() => [de.value === "compact" ? (R(), D("span", Hn)) : E("v-if", !0)]),
|
|
1924
|
+
_: 1
|
|
1925
|
+
}),
|
|
1926
|
+
O("div", Un, [O("div", Wn, [O("h1", null, W(c.value?.title ?? "控制台"), 1), j(G(d), {
|
|
1927
|
+
class: "title-refresh-action",
|
|
1928
|
+
"aria-label": "刷新当前页",
|
|
1929
|
+
"icon-name": "reload",
|
|
1930
|
+
type: "text",
|
|
1931
|
+
title: `刷新${c.value?.title ?? "当前页"}`,
|
|
1932
|
+
disabled: !c.value,
|
|
1933
|
+
onClick: M
|
|
1934
|
+
}, null, 8, ["title", "disabled"])]), O("span", null, W(ae.value) + " / " + W(oe.value), 1)])
|
|
1935
|
+
]),
|
|
1936
|
+
O("div", Gn, [O("button", {
|
|
1937
|
+
class: "icon-button skin-button",
|
|
1938
|
+
type: "button",
|
|
1939
|
+
"aria-label": "皮肤切换",
|
|
1940
|
+
title: "切换皮肤",
|
|
1941
|
+
onClick: n[1] ||= (e) => i("userCommand", "themeSkin")
|
|
1942
|
+
}, [j(G(p), { name: "skin" })])]),
|
|
1943
|
+
j(G(v), {
|
|
1944
|
+
items: ce,
|
|
1945
|
+
onSelect: P
|
|
1946
|
+
}, {
|
|
1947
|
+
default: K(({ toggle: e }) => [O("button", {
|
|
1948
|
+
class: "user-button",
|
|
1949
|
+
type: "button",
|
|
1950
|
+
onClick: Pe(e, ["stop"])
|
|
1951
|
+
}, [
|
|
1952
|
+
O("span", qn, W(te.value), 1),
|
|
1953
|
+
O("span", Jn, [O("strong", null, W(ee.value), 1), O("small", null, W(f.value?.system ? "系统管理员" : "业务用户"), 1)]),
|
|
1954
|
+
j(G(p), {
|
|
1955
|
+
class: "user-caret",
|
|
1956
|
+
name: "down"
|
|
1957
|
+
})
|
|
1958
|
+
], 8, Kn)]),
|
|
1959
|
+
_: 1
|
|
1960
|
+
})
|
|
1961
|
+
], 512), O("section", Yn, [O("div", Xn, [o.value.length > 0 ? (R(), T(G(se), {
|
|
1962
|
+
key: 0,
|
|
1963
|
+
tabs: o.value,
|
|
1964
|
+
"active-key": s.value,
|
|
1965
|
+
onTogglePin: n[2] ||= (e) => i("toggleTabLock", e),
|
|
1966
|
+
"onUpdate:activeKey": Ce,
|
|
1967
|
+
onClose: n[3] ||= (e) => i("closeTab", e),
|
|
1968
|
+
onCloseTabs: n[4] ||= (e) => i("closeTabs", e),
|
|
1969
|
+
onReorder: n[5] ||= (e) => i("reorderTabs", e)
|
|
1970
|
+
}, null, 8, ["tabs", "active-key"])) : (R(), D("div", Zn, "暂无打开页面"))]), O("section", Qn, [t.loading ? (R(), T(G(g), { key: 0 })) : t.error ? (R(), T(G(x), {
|
|
1971
|
+
key: 1,
|
|
1972
|
+
message: t.error
|
|
1973
|
+
}, null, 8, ["message"])) : (R(!0), D(C, { key: 2 }, V(a.value, (t) => (R(), D(C, { key: t.key }, [k(t) ? Me((R(), T(G(_), {
|
|
1974
|
+
key: N(t),
|
|
1975
|
+
class: "tab-panel-host"
|
|
1976
|
+
}, {
|
|
1977
|
+
default: K(() => [O("div", { class: L(["tab-page", { "tab-page--workspace": Se(t)?.layout === "workspace" }]) }, [Oe(e.$slots, "default", {
|
|
1978
|
+
activeTab: t,
|
|
1979
|
+
target: t.target,
|
|
1980
|
+
pageDescriptor: Se(t)
|
|
1981
|
+
}, void 0, !0)], 2)]),
|
|
1982
|
+
_: 2
|
|
1983
|
+
}, 1024)), [[Ae, t.key === s.value]]) : E("v-if", !0)], 64))), 128))])])])], 2));
|
|
1984
|
+
}
|
|
1985
|
+
}), [["__scopeId", "data-v-a6dbe7fe"]]), nr = Symbol("muyun.current-user");
|
|
1986
|
+
function rr(e) {
|
|
1987
|
+
z(nr, e);
|
|
1988
|
+
}
|
|
1989
|
+
function ir() {
|
|
1990
|
+
return F(nr, void 0);
|
|
1991
|
+
}
|
|
1992
|
+
//#endregion
|
|
1993
|
+
//#region src/dynamic-page-runtime/dynamicModuleDetailStateModel.ts
|
|
1994
|
+
function ar(e) {
|
|
1995
|
+
return e.activeRequestSequence === e.requestSequence;
|
|
1996
|
+
}
|
|
1997
|
+
function or(e) {
|
|
1998
|
+
return e.hasRecord && !e.saving && !e.loading && !e.loadFailed;
|
|
1999
|
+
}
|
|
2000
|
+
//#endregion
|
|
2001
|
+
//#region src/dynamic-page-runtime/modulePageEnhancements.ts
|
|
2002
|
+
function sr(e) {
|
|
2003
|
+
let t = /* @__PURE__ */ new Map(), n = [], r = /* @__PURE__ */ new Set();
|
|
2004
|
+
for (let i of e) {
|
|
2005
|
+
if (r.has(i.id)) throw Error(`重复的模块页面增强:${i.id}`);
|
|
2006
|
+
r.add(i.id);
|
|
2007
|
+
let e = fr(i.target.moduleAlias, i.target.viewCode);
|
|
2008
|
+
if (t.has(e)) throw Error(`模块页面增强目标重复:${e}`);
|
|
2009
|
+
pr(i);
|
|
2010
|
+
for (let e of i.workspaceViews ?? []) {
|
|
2011
|
+
if (e.moduleAlias !== i.target.moduleAlias) throw Error(`模块页面增强 ${i.id} 的工作视图模块不一致:${e.type}`);
|
|
2012
|
+
n.push(e);
|
|
2013
|
+
}
|
|
2014
|
+
t.set(e, i);
|
|
2015
|
+
}
|
|
2016
|
+
return {
|
|
2017
|
+
resolve(e, n) {
|
|
2018
|
+
return (n ? t.get(fr(e, n)) : void 0) ?? t.get(fr(e));
|
|
2019
|
+
},
|
|
2020
|
+
workspaceViews() {
|
|
2021
|
+
return n;
|
|
2022
|
+
}
|
|
2023
|
+
};
|
|
2024
|
+
}
|
|
2025
|
+
var cr = sr([]);
|
|
2026
|
+
function lr(e) {
|
|
2027
|
+
cr = sr(e);
|
|
2028
|
+
}
|
|
2029
|
+
function ur(e, t) {
|
|
2030
|
+
return cr.resolve(e, t);
|
|
2031
|
+
}
|
|
2032
|
+
function dr() {
|
|
2033
|
+
return cr.workspaceViews();
|
|
2034
|
+
}
|
|
2035
|
+
function fr(e, t) {
|
|
2036
|
+
return `${e}#${t ?? "*"}`;
|
|
2037
|
+
}
|
|
2038
|
+
function pr(e) {
|
|
2039
|
+
if ([
|
|
2040
|
+
e.list?.actions ?? [],
|
|
2041
|
+
e.list?.columns ?? [],
|
|
2042
|
+
e.list?.cellComponents ?? [],
|
|
2043
|
+
e.list?.rowActions ?? [],
|
|
2044
|
+
e.list?.batchActions ?? [],
|
|
2045
|
+
e.detail?.actions ?? [],
|
|
2046
|
+
e.detail?.sections ?? []
|
|
2047
|
+
].some((e) => new Set(e.map((e) => e.key)).size !== e.length)) throw Error(`模块页面增强 ${e.id} 在同一列表区域存在重复的贡献 key`);
|
|
2048
|
+
mr(e.id, e.list?.actions ?? [], ["create"]), mr(e.id, e.list?.rowActions ?? [], [
|
|
2049
|
+
"view",
|
|
2050
|
+
"edit",
|
|
2051
|
+
"delete"
|
|
2052
|
+
]), mr(e.id, e.list?.batchActions ?? [], ["create"]), mr(e.id, e.detail?.actions ?? [], [
|
|
2053
|
+
"create",
|
|
2054
|
+
"update",
|
|
2055
|
+
"delete"
|
|
2056
|
+
]);
|
|
2057
|
+
}
|
|
2058
|
+
function mr(e, t, n) {
|
|
2059
|
+
let r = t.find((e) => n.includes(e.key));
|
|
2060
|
+
if (r) throw Error(`模块页面增强 ${e} 不能覆盖平台标准动作:${r.key}`);
|
|
2061
|
+
}
|
|
2062
|
+
//#endregion
|
|
2063
|
+
//#region src/dynamic-page-runtime/modulePageNavigation.ts
|
|
2064
|
+
var hr = Symbol("module-page-navigation");
|
|
2065
|
+
function gr(e) {
|
|
2066
|
+
z(hr, e);
|
|
2067
|
+
}
|
|
2068
|
+
function _r() {
|
|
2069
|
+
return F(hr, void 0);
|
|
2070
|
+
}
|
|
2071
|
+
//#endregion
|
|
2072
|
+
//#region src/dynamic-page-runtime/modulePageListRefresh.ts
|
|
2073
|
+
function vr() {
|
|
2074
|
+
let e = /* @__PURE__ */ new Map();
|
|
2075
|
+
function t(t, n) {
|
|
2076
|
+
let r = xr(t), i = e.get(r) ?? /* @__PURE__ */ new Set();
|
|
2077
|
+
return i.add(n), e.set(r, i), () => {
|
|
2078
|
+
i.delete(n), i.size === 0 && e.delete(r);
|
|
2079
|
+
};
|
|
2080
|
+
}
|
|
2081
|
+
function n(t) {
|
|
2082
|
+
let n = e.get(xr(t));
|
|
2083
|
+
if (!n || n.size === 0) return !1;
|
|
2084
|
+
for (let e of [...n]) e();
|
|
2085
|
+
return !0;
|
|
2086
|
+
}
|
|
2087
|
+
return {
|
|
2088
|
+
register: t,
|
|
2089
|
+
refresh: n
|
|
2090
|
+
};
|
|
2091
|
+
}
|
|
2092
|
+
var yr = vr();
|
|
2093
|
+
function br(e) {
|
|
2094
|
+
return yr.refresh(e);
|
|
2095
|
+
}
|
|
2096
|
+
function xr(e) {
|
|
2097
|
+
let t = e?.trim();
|
|
2098
|
+
if (!t) throw Error("Module page list refresh requires a moduleAlias");
|
|
2099
|
+
return t;
|
|
2100
|
+
}
|
|
2101
|
+
//#endregion
|
|
2102
|
+
//#region src/dynamic-page-runtime/detailSurfacePreference.ts
|
|
2103
|
+
function Sr(e) {
|
|
2104
|
+
return `module-page.detail-surface.${e}`;
|
|
2105
|
+
}
|
|
2106
|
+
function Cr(e) {
|
|
2107
|
+
return e === "drawer" || e === "pinned" ? e : void 0;
|
|
2108
|
+
}
|
|
2109
|
+
async function wr(e, t) {
|
|
2110
|
+
let n = Sr(t), r = Cr(e.get(n, void 0)), i = Cr(await e.restore(n, r, { persistence: "backend" }));
|
|
2111
|
+
return i && await e.set(n, i, { persistence: "local" }), i;
|
|
2112
|
+
}
|
|
2113
|
+
async function Tr(e, t, n) {
|
|
2114
|
+
let r = Sr(t);
|
|
2115
|
+
await e.set(r, n, { persistence: "local" }), await e.set(r, n, { persistence: "backend" });
|
|
2116
|
+
}
|
|
2117
|
+
//#endregion
|
|
2118
|
+
//#region src/dynamic-page-runtime/DynamicRecordDetailActions.vue
|
|
2119
|
+
var Er = /* @__PURE__ */ M({
|
|
2120
|
+
name: "DynamicRecordDetailActions",
|
|
2121
|
+
__name: "DynamicRecordDetailActions",
|
|
2122
|
+
props: {
|
|
2123
|
+
context: {},
|
|
2124
|
+
record: { default: void 0 },
|
|
2125
|
+
mode: {},
|
|
2126
|
+
saving: {
|
|
2127
|
+
type: Boolean,
|
|
2128
|
+
default: !1
|
|
2129
|
+
},
|
|
2130
|
+
detailLoading: {
|
|
2131
|
+
type: Boolean,
|
|
2132
|
+
default: !1
|
|
2133
|
+
},
|
|
2134
|
+
detailLoadFailed: {
|
|
2135
|
+
type: Boolean,
|
|
2136
|
+
default: !1
|
|
2137
|
+
},
|
|
2138
|
+
recycleBinActive: {
|
|
2139
|
+
type: Boolean,
|
|
2140
|
+
default: !1
|
|
2141
|
+
},
|
|
2142
|
+
actions: { default: () => [] },
|
|
2143
|
+
showStandardViewActions: {
|
|
2144
|
+
type: Boolean,
|
|
2145
|
+
default: !0
|
|
2146
|
+
}
|
|
2147
|
+
},
|
|
2148
|
+
emits: [
|
|
2149
|
+
"cancel",
|
|
2150
|
+
"save",
|
|
2151
|
+
"edit",
|
|
2152
|
+
"delete",
|
|
2153
|
+
"detailAction"
|
|
2154
|
+
],
|
|
2155
|
+
setup(e, { emit: t }) {
|
|
2156
|
+
let n = e, r = t, i = w(() => n.mode === "create" || n.mode === "edit"), a = w(() => n.record?.id == null ? void 0 : String(n.record.id)), o = w(() => !i.value || n.recycleBinActive || n.detailLoading || n.detailLoadFailed ? !1 : n.context.can(n.mode === "create" ? "create" : "update") === !0), c = w(() => n.mode === "view" && !n.recycleBinActive && n.showStandardViewActions);
|
|
2157
|
+
return (t, n) => i.value ? (R(), D(C, { key: 0 }, [j(G(f), {
|
|
2158
|
+
disabled: e.saving,
|
|
2159
|
+
onClick: n[0] ||= (e) => r("cancel")
|
|
2160
|
+
}, {
|
|
2161
|
+
default: K(() => [...n[6] ||= [A("取消", -1)]]),
|
|
2162
|
+
_: 1
|
|
2163
|
+
}, 8, ["disabled"]), j(G(f), {
|
|
2164
|
+
type: "primary",
|
|
2165
|
+
loading: e.saving,
|
|
2166
|
+
disabled: !o.value,
|
|
2167
|
+
onClick: n[1] ||= (e) => r("save")
|
|
2168
|
+
}, {
|
|
2169
|
+
default: K(() => [A(W(e.saving ? "保存中" : "保存"), 1)]),
|
|
2170
|
+
_: 1
|
|
2171
|
+
}, 8, ["loading", "disabled"])], 64)) : c.value ? (R(), D(C, { key: 1 }, [
|
|
2172
|
+
a.value && e.actions.length > 0 ? (R(), T(G(s), {
|
|
2173
|
+
key: 0,
|
|
2174
|
+
context: e.context,
|
|
2175
|
+
"record-id": a.value,
|
|
2176
|
+
actions: e.actions,
|
|
2177
|
+
onAction: n[2] ||= (e) => r("detailAction", e)
|
|
2178
|
+
}, null, 8, [
|
|
2179
|
+
"context",
|
|
2180
|
+
"record-id",
|
|
2181
|
+
"actions"
|
|
2182
|
+
])) : E("v-if", !0),
|
|
2183
|
+
j(G(m), {
|
|
2184
|
+
context: e.context,
|
|
2185
|
+
"action-code": "update",
|
|
2186
|
+
disabled: !e.record,
|
|
2187
|
+
onClick: n[3] ||= (e) => r("edit")
|
|
2188
|
+
}, {
|
|
2189
|
+
default: K(() => [...n[7] ||= [A(" 编辑 ", -1)]]),
|
|
2190
|
+
_: 1
|
|
2191
|
+
}, 8, ["context", "disabled"]),
|
|
2192
|
+
j(G(m), {
|
|
2193
|
+
context: e.context,
|
|
2194
|
+
"action-code": "delete",
|
|
2195
|
+
loading: e.saving,
|
|
2196
|
+
danger: "",
|
|
2197
|
+
disabled: !e.record,
|
|
2198
|
+
onClick: n[4] ||= (e) => r("delete")
|
|
2199
|
+
}, {
|
|
2200
|
+
default: K(() => [...n[8] ||= [A(" 删除 ", -1)]]),
|
|
2201
|
+
_: 1
|
|
2202
|
+
}, 8, [
|
|
2203
|
+
"context",
|
|
2204
|
+
"loading",
|
|
2205
|
+
"disabled"
|
|
2206
|
+
])
|
|
2207
|
+
], 64)) : e.mode === "view" && !e.recycleBinActive && a.value && e.actions.length > 0 ? (R(), T(G(s), {
|
|
2208
|
+
key: 2,
|
|
2209
|
+
context: e.context,
|
|
2210
|
+
"record-id": a.value,
|
|
2211
|
+
actions: e.actions,
|
|
2212
|
+
onAction: n[5] ||= (e) => r("detailAction", e)
|
|
2213
|
+
}, null, 8, [
|
|
2214
|
+
"context",
|
|
2215
|
+
"record-id",
|
|
2216
|
+
"actions"
|
|
2217
|
+
])) : E("v-if", !0);
|
|
2218
|
+
}
|
|
2219
|
+
}), Dr = {
|
|
2220
|
+
key: 0,
|
|
2221
|
+
class: "navigator-management-panel"
|
|
2222
|
+
}, Or = { class: "navigator-management-header" }, kr = { class: "navigator-management-actions" }, Ar = /* @__PURE__ */ M({
|
|
2223
|
+
name: "NavigatorManagementEditor",
|
|
2224
|
+
__name: "NavigatorManagementEditor",
|
|
2225
|
+
props: {
|
|
2226
|
+
open: { type: Boolean },
|
|
2227
|
+
title: {},
|
|
2228
|
+
saving: { type: Boolean },
|
|
2229
|
+
loading: { type: Boolean },
|
|
2230
|
+
loadFailed: { type: Boolean },
|
|
2231
|
+
draft: {},
|
|
2232
|
+
fields: {},
|
|
2233
|
+
formSessionKey: {},
|
|
2234
|
+
context: {},
|
|
2235
|
+
pickerConfigs: {}
|
|
2236
|
+
},
|
|
2237
|
+
emits: [
|
|
2238
|
+
"close",
|
|
2239
|
+
"save",
|
|
2240
|
+
"updateField"
|
|
2241
|
+
],
|
|
2242
|
+
setup(e, { emit: t }) {
|
|
2243
|
+
let n = t;
|
|
2244
|
+
return (t, r) => (R(), T(xe, { name: "navigator-management-drawer" }, {
|
|
2245
|
+
default: K(() => [e.open ? (R(), D("section", Dr, [O("header", Or, [O("h3", null, W(e.title), 1), O("div", kr, [j(G(f), {
|
|
2246
|
+
disabled: e.saving,
|
|
2247
|
+
onClick: r[0] ||= (e) => n("close")
|
|
2248
|
+
}, {
|
|
2249
|
+
default: K(() => [...r[3] ||= [A("取消", -1)]]),
|
|
2250
|
+
_: 1
|
|
2251
|
+
}, 8, ["disabled"]), j(G(f), {
|
|
2252
|
+
type: "primary",
|
|
2253
|
+
loading: e.saving,
|
|
2254
|
+
onClick: r[1] ||= (e) => n("save")
|
|
2255
|
+
}, {
|
|
2256
|
+
default: K(() => [...r[4] ||= [A("保存", -1)]]),
|
|
2257
|
+
_: 1
|
|
2258
|
+
}, 8, ["loading"])])]), e.loading ? (R(), T(G(i), {
|
|
2259
|
+
key: 0,
|
|
2260
|
+
loading: "",
|
|
2261
|
+
"loading-tip": "加载记录详情",
|
|
2262
|
+
description: ""
|
|
2263
|
+
})) : e.loadFailed ? (R(), T(G(i), {
|
|
2264
|
+
key: 1,
|
|
2265
|
+
description: "详情加载失败"
|
|
2266
|
+
})) : e.draft ? (R(), T(G(S), {
|
|
2267
|
+
key: 2,
|
|
2268
|
+
record: e.draft,
|
|
2269
|
+
fields: e.fields,
|
|
2270
|
+
"form-session-key": e.formSessionKey,
|
|
2271
|
+
"option-context": e.context,
|
|
2272
|
+
"picker-configs": e.pickerConfigs,
|
|
2273
|
+
"exclude-field-names": ["enabled"],
|
|
2274
|
+
"onUpdate:field": r[2] ||= (e, t) => n("updateField", e, t)
|
|
2275
|
+
}, null, 8, [
|
|
2276
|
+
"record",
|
|
2277
|
+
"fields",
|
|
2278
|
+
"form-session-key",
|
|
2279
|
+
"option-context",
|
|
2280
|
+
"picker-configs"
|
|
2281
|
+
])) : E("v-if", !0)])) : E("v-if", !0)]),
|
|
2282
|
+
_: 1
|
|
2283
|
+
}));
|
|
2284
|
+
}
|
|
2285
|
+
}), jr = /* @__PURE__ */ M({
|
|
2286
|
+
name: "PageNavigatorExplorer",
|
|
2287
|
+
__name: "PageNavigatorExplorer",
|
|
2288
|
+
props: {
|
|
2289
|
+
level: {},
|
|
2290
|
+
selectedId: {},
|
|
2291
|
+
reloadKey: {},
|
|
2292
|
+
keyword: {},
|
|
2293
|
+
externalQueryValues: {},
|
|
2294
|
+
actionsOf: { type: Function }
|
|
2295
|
+
},
|
|
2296
|
+
emits: [
|
|
2297
|
+
"update:keyword",
|
|
2298
|
+
"refresh",
|
|
2299
|
+
"create",
|
|
2300
|
+
"select",
|
|
2301
|
+
"loaded",
|
|
2302
|
+
"action"
|
|
2303
|
+
],
|
|
2304
|
+
setup(e, { emit: t }) {
|
|
2305
|
+
let n = t;
|
|
2306
|
+
return (t, r) => (R(), T(G(ye), {
|
|
2307
|
+
title: e.level.descriptor.title,
|
|
2308
|
+
"refresh-title": `刷新${e.level.descriptor.title}${e.level.tree ? "树" : "列表"}`,
|
|
2309
|
+
"search-keyword": e.keyword,
|
|
2310
|
+
"search-placeholder": e.level.descriptor.searchPlaceholder,
|
|
2311
|
+
"onUpdate:searchKeyword": r[7] ||= (e) => n("update:keyword", e),
|
|
2312
|
+
onRefresh: r[8] ||= (e) => n("refresh")
|
|
2313
|
+
}, Se({
|
|
2314
|
+
editor: K(() => [Oe(t.$slots, "editor")]),
|
|
2315
|
+
default: K(() => [e.level.tree ? (R(), T(G(_e), {
|
|
2316
|
+
key: 0,
|
|
2317
|
+
context: e.level.context,
|
|
2318
|
+
"selected-id": e.selectedId,
|
|
2319
|
+
"reload-key": e.reloadKey,
|
|
2320
|
+
keyword: e.keyword,
|
|
2321
|
+
"external-query-values": e.externalQueryValues,
|
|
2322
|
+
"search-mode": "none",
|
|
2323
|
+
"empty-description": `暂无${e.level.descriptor.title}`,
|
|
2324
|
+
"actions-of": e.actionsOf,
|
|
2325
|
+
onLoaded: r[1] ||= (e) => n("loaded", e),
|
|
2326
|
+
onSelect: r[2] ||= (e) => n("select", e),
|
|
2327
|
+
onAction: r[3] ||= (e, t) => n("action", e, t)
|
|
2328
|
+
}, null, 8, [
|
|
2329
|
+
"context",
|
|
2330
|
+
"selected-id",
|
|
2331
|
+
"reload-key",
|
|
2332
|
+
"keyword",
|
|
2333
|
+
"external-query-values",
|
|
2334
|
+
"empty-description",
|
|
2335
|
+
"actions-of"
|
|
2336
|
+
])) : (R(), T(G(h), {
|
|
2337
|
+
key: 1,
|
|
2338
|
+
context: e.level.context,
|
|
2339
|
+
"selected-id": e.selectedId,
|
|
2340
|
+
"reload-key": e.reloadKey,
|
|
2341
|
+
keyword: e.keyword,
|
|
2342
|
+
"external-query-values": e.externalQueryValues,
|
|
2343
|
+
"empty-description": `暂无${e.level.descriptor.title}`,
|
|
2344
|
+
"actions-of": e.actionsOf,
|
|
2345
|
+
onLoaded: r[4] ||= (e) => n("loaded", e),
|
|
2346
|
+
onSelect: r[5] ||= (e) => n("select", e),
|
|
2347
|
+
onAction: r[6] ||= (e, t) => n("action", e, t)
|
|
2348
|
+
}, null, 8, [
|
|
2349
|
+
"context",
|
|
2350
|
+
"selected-id",
|
|
2351
|
+
"reload-key",
|
|
2352
|
+
"keyword",
|
|
2353
|
+
"external-query-values",
|
|
2354
|
+
"empty-description",
|
|
2355
|
+
"actions-of"
|
|
2356
|
+
]))]),
|
|
2357
|
+
_: 2
|
|
2358
|
+
}, [e.level.descriptor.management ? {
|
|
2359
|
+
name: "actions",
|
|
2360
|
+
fn: K(() => [j(G(m), {
|
|
2361
|
+
context: e.level.context,
|
|
2362
|
+
"action-code": "create",
|
|
2363
|
+
"icon-only": "",
|
|
2364
|
+
title: `新建${e.level.descriptor.title}`,
|
|
2365
|
+
onClick: r[0] ||= (e) => n("create")
|
|
2366
|
+
}, null, 8, ["context", "title"])]),
|
|
2367
|
+
key: "0"
|
|
2368
|
+
} : void 0]), 1032, [
|
|
2369
|
+
"title",
|
|
2370
|
+
"refresh-title",
|
|
2371
|
+
"search-keyword",
|
|
2372
|
+
"search-placeholder"
|
|
2373
|
+
]));
|
|
2374
|
+
}
|
|
2375
|
+
});
|
|
2376
|
+
//#endregion
|
|
2377
|
+
//#region src/dynamic-page-runtime/recordDetailController.ts
|
|
2378
|
+
function Mr() {
|
|
2379
|
+
let e = B(), t = B(), n = B("view"), r = B(!1), i = B(!1), a = B(!1), o = B(!1), s = B(!1), c = B(0);
|
|
2380
|
+
function l(o, s) {
|
|
2381
|
+
c.value += 1, e.value = o, t.value = void 0, n.value = s, r.value = !0, i.value = !0, a.value = !1;
|
|
2382
|
+
}
|
|
2383
|
+
function u(n) {
|
|
2384
|
+
e.value = n, t.value = { ...n }, a.value = !1;
|
|
2385
|
+
}
|
|
2386
|
+
function d() {
|
|
2387
|
+
t.value = void 0, a.value = !0;
|
|
2388
|
+
}
|
|
2389
|
+
function f() {
|
|
2390
|
+
i.value = !1;
|
|
2391
|
+
}
|
|
2392
|
+
function p(o) {
|
|
2393
|
+
c.value += 1, e.value = void 0, t.value = { ...o }, n.value = "create", r.value = !0, i.value = !1, a.value = !1;
|
|
2394
|
+
}
|
|
2395
|
+
function ee() {
|
|
2396
|
+
return e.value ? (t.value = { ...e.value }, n.value = "edit", c.value += 1, !0) : !1;
|
|
2397
|
+
}
|
|
2398
|
+
function te() {
|
|
2399
|
+
if (n.value === "create") {
|
|
2400
|
+
r.value = !1, e.value = void 0, t.value = void 0, n.value = "view", i.value = !1, a.value = !1, c.value += 1;
|
|
2401
|
+
return;
|
|
2402
|
+
}
|
|
2403
|
+
t.value = e.value ? { ...e.value } : void 0, n.value = "view", i.value = !1, a.value = !1, c.value += 1;
|
|
2404
|
+
}
|
|
2405
|
+
function ne(r) {
|
|
2406
|
+
e.value = r, t.value = { ...r }, n.value = "view", c.value += 1;
|
|
2407
|
+
}
|
|
2408
|
+
function m() {
|
|
2409
|
+
e.value = void 0, t.value = void 0, n.value = "view", i.value = !1, a.value = !1;
|
|
2410
|
+
}
|
|
2411
|
+
function re() {
|
|
2412
|
+
r.value = !1, n.value === "create" ? (e.value = void 0, t.value = void 0) : t.value = e.value ? { ...e.value } : void 0, n.value = "view", i.value = !1, a.value = !1, c.value += 1;
|
|
2413
|
+
}
|
|
2414
|
+
return {
|
|
2415
|
+
record: e,
|
|
2416
|
+
draft: t,
|
|
2417
|
+
mode: n,
|
|
2418
|
+
open: r,
|
|
2419
|
+
loading: i,
|
|
2420
|
+
loadFailed: a,
|
|
2421
|
+
saving: o,
|
|
2422
|
+
togglingEnabled: s,
|
|
2423
|
+
formSessionKey: c,
|
|
2424
|
+
beginLoad: l,
|
|
2425
|
+
resolveLoad: u,
|
|
2426
|
+
failLoad: d,
|
|
2427
|
+
finishLoad: f,
|
|
2428
|
+
beginCreate: p,
|
|
2429
|
+
beginEdit: ee,
|
|
2430
|
+
cancelEdit: te,
|
|
2431
|
+
applySaved: ne,
|
|
2432
|
+
clearDeleted: m,
|
|
2433
|
+
close: re
|
|
2434
|
+
};
|
|
2435
|
+
}
|
|
2436
|
+
//#endregion
|
|
2437
|
+
//#region src/dynamic-page-runtime/pageContextRuntime.ts
|
|
2438
|
+
function Nr(e, t) {
|
|
2439
|
+
return e.filter((e) => e.target === t && e.source !== "SESSION").map((e) => e.targetKey);
|
|
2440
|
+
}
|
|
2441
|
+
function Pr(e, t, n, r) {
|
|
2442
|
+
let i = {};
|
|
2443
|
+
for (let a of e) {
|
|
2444
|
+
if (a.target !== t || t === "NAVIGATOR_QUERY" && a.targetNavigatorLevelKey !== r) continue;
|
|
2445
|
+
let e = n[a.source]?.[a.sourceKey];
|
|
2446
|
+
e != null && (i[a.targetKey] = e);
|
|
2447
|
+
}
|
|
2448
|
+
return Object.keys(i).length === 0 ? void 0 : i;
|
|
2449
|
+
}
|
|
2450
|
+
//#endregion
|
|
2451
|
+
//#region src/dynamic-page-runtime/DynamicModuleHost.vue?vue&type=script&setup=true&lang.ts
|
|
2452
|
+
var Fr = {
|
|
2453
|
+
key: 0,
|
|
2454
|
+
class: "dynamic-module-unsupported"
|
|
2455
|
+
}, Ir = {
|
|
2456
|
+
key: 1,
|
|
2457
|
+
class: "dynamic-module-unsupported"
|
|
2458
|
+
}, Lr = {
|
|
2459
|
+
key: 0,
|
|
2460
|
+
class: "navigator-management-panel"
|
|
2461
|
+
}, Rr = { class: "navigator-management-header" }, zr = { class: "navigator-management-actions" }, Br = {
|
|
2462
|
+
key: 1,
|
|
2463
|
+
class: "dynamic-form"
|
|
2464
|
+
}, Vr = {
|
|
2465
|
+
key: 0,
|
|
2466
|
+
class: "navigator-management-panel"
|
|
2467
|
+
}, Hr = { class: "navigator-management-header" }, Ur = { class: "navigator-management-actions" }, Wr = {
|
|
2468
|
+
key: 1,
|
|
2469
|
+
class: "dynamic-form"
|
|
2470
|
+
}, Gr = {
|
|
2471
|
+
key: 1,
|
|
2472
|
+
class: "dynamic-form"
|
|
2473
|
+
}, Kr = {
|
|
2474
|
+
key: 0,
|
|
2475
|
+
class: "dynamic-form"
|
|
2476
|
+
}, qr = {
|
|
2477
|
+
key: 3,
|
|
2478
|
+
class: "dynamic-module-unsupported"
|
|
2479
|
+
}, Jr = /*#__PURE__*/ o(/* @__PURE__ */ M({
|
|
2480
|
+
name: "DynamicModuleHost",
|
|
2481
|
+
__name: "DynamicModuleHost",
|
|
2482
|
+
props: { descriptor: {} },
|
|
2483
|
+
setup(o, { expose: c }) {
|
|
2484
|
+
let d = o, p = re({ moduleAlias: d.descriptor.target.moduleAlias }), oe = ir(), se = _r(), g = Mr(), { record: _, draft: v, mode: y, open: x, saving: k, formSessionKey: Ce, togglingEnabled: M, loading: N, loadFailed: P } = g, F = B(u(void 0)), I = B(), Te = B("normal"), z = B(0), Oe = B(0), H = B(), ke = B(""), Ae = B(""), je = B(0), Me = B(!1), Ne = B([]), Pe = B([]), q = B({}), Fe = B([]), J = Mr(), Ie = B(), Le = B(""), Re = B(0), ze = B(!1), Be = B(Cr(e.get(`module-page.detail-surface.${p.moduleAlias}`, void 0))), Ve = B(), He = B(), Y = 0, Ue, We, Ge, Ke = 0, qe = Promise.resolve(), Je = w(() => {
|
|
2485
|
+
let e = Ie.value;
|
|
2486
|
+
return e ? u(e.context.runtime.snapshot()?.uiDescriptor, void 0, e.descriptor.management?.editorSurface) : u(void 0);
|
|
2487
|
+
}), Ye = w(() => {
|
|
2488
|
+
let e = Ie.value;
|
|
2489
|
+
if (!e) return {};
|
|
2490
|
+
let t = {};
|
|
2491
|
+
for (let e of Je.value.values()) {
|
|
2492
|
+
let n = e.reference;
|
|
2493
|
+
n && (t[e.fieldRef.fieldName] = {
|
|
2494
|
+
context: te({
|
|
2495
|
+
http: p.http,
|
|
2496
|
+
moduleAlias: n.targetModuleAlias
|
|
2497
|
+
}),
|
|
2498
|
+
mode: "tree",
|
|
2499
|
+
allowClear: !e.required?.constant
|
|
2500
|
+
});
|
|
2501
|
+
}
|
|
2502
|
+
return e.tree && Je.value.has("parentId") && (t.parentId = {
|
|
2503
|
+
context: e.context,
|
|
2504
|
+
mode: "tree",
|
|
2505
|
+
placeholder: "根目录留空",
|
|
2506
|
+
allowClear: !0,
|
|
2507
|
+
constraints: ne(J.draft.value?.id == null ? void 0 : String(J.draft.value.id))
|
|
2508
|
+
}), t;
|
|
2509
|
+
}), Xe = w(() => {
|
|
2510
|
+
let e = Ie.value;
|
|
2511
|
+
return e ? J.mode.value === "create" ? `新建${e.descriptor.title}` : `编辑${e.descriptor.title}` : "管理范围";
|
|
2512
|
+
}), Ze = w(() => d.descriptor.title ?? p.runtime.snapshot()?.title ?? p.moduleAlias), Qe = w(() => y.value === "create" ? st.value ? dt.value?.createTitle ?? `新建${Ze.value}` : `新建${Ze.value}` : rr(v.value ?? _.value) ?? "记录详情"), $e = B(), et = B(), tt = w(() => d.descriptor.target.pageMode ?? "LIST"), nt = w(() => $e.value?.entry.pageMode ?? tt.value), rt = w(() => nt.value === "LIST"), it = w(() => rt.value ? d.descriptor.target.defaultUiConfigId : void 0), X = w(() => $e.value?.entry.defaultUiConfigId ?? it.value), at = w(() => $e.value?.entry.defaultQueryTemplateId ?? d.descriptor.target.defaultQueryTemplateId), ot = w(() => I.value?.list?.fields), st = w(() => I.value?.template === "FLAT_MANAGEMENT"), ct = w(() => I.value?.template === "TREE_MANAGEMENT"), lt = w(() => n(Ne.value.length)), Z = w(() => Ne.value.filter((e) => !(e.descriptor.singleResultPolicy === "AUTO_SELECT_AND_HIDE" && Fe.value.includes(e.descriptor.key)))), ut = w(() => ze.value || Be.value === "drawer"), dt = w(() => {
|
|
2513
|
+
let e = I.value?.explorer, t = I.value?.detail;
|
|
2514
|
+
return e == null || t == null ? void 0 : {
|
|
2515
|
+
explorerTitle: e.title,
|
|
2516
|
+
explorerSearchPlaceholder: e.searchPlaceholder,
|
|
2517
|
+
emptyDescription: e.emptyDescription,
|
|
2518
|
+
detailEmptyDescription: t.emptyDescription,
|
|
2519
|
+
createTitle: t.createTitle,
|
|
2520
|
+
recordLabel: e.recordLabel,
|
|
2521
|
+
fallbackTitle: e.fallbackTitle
|
|
2522
|
+
};
|
|
2523
|
+
}), ft = w(() => st.value ? dt.value?.recordLabel ?? "记录" : "记录"), pt = w(() => ur(p.moduleAlias, ot.value?.viewCode)), mt = w(() => pt.value?.list?.actions ?? []), ht = w(() => mt.value.map(({ state: e, authorization: t, ...n }) => {
|
|
2524
|
+
let r = Yn(), i = r.scope?.record?.id;
|
|
2525
|
+
return {
|
|
2526
|
+
...n,
|
|
2527
|
+
...e?.(r),
|
|
2528
|
+
...t === "scope-record" && jt.value ? {
|
|
2529
|
+
authorizationContext: jt.value,
|
|
2530
|
+
authorizationRecordId: i == null ? void 0 : String(i)
|
|
2531
|
+
} : {}
|
|
2532
|
+
};
|
|
2533
|
+
})), gt = w(() => pt.value?.list?.columns ?? []), _t = w(() => [...gt.value.map((e) => ({
|
|
2534
|
+
key: e.key,
|
|
2535
|
+
component: e.cell
|
|
2536
|
+
})), ...(pt.value?.list?.cellComponents ?? []).map((e) => ({
|
|
2537
|
+
key: e.key,
|
|
2538
|
+
component: e.cell
|
|
2539
|
+
}))]), vt = w(() => pt.value?.list?.rowActions ?? []);
|
|
2540
|
+
function yt(e) {
|
|
2541
|
+
return vt.value.map(({ state: t, ...n }) => ({
|
|
2542
|
+
...n,
|
|
2543
|
+
...t?.(e)
|
|
2544
|
+
}));
|
|
2545
|
+
}
|
|
2546
|
+
let bt = w(() => pt.value?.list?.batchActions ?? []), xt = w(() => pt.value?.detail?.actions ?? []), St = w(() => pt.value?.detail?.sections ?? []), Ct = w(() => pt.value?.recordView?.drawer), wt = w(() => {
|
|
2547
|
+
let e = I.value?.detail.workspaceView?.type;
|
|
2548
|
+
if (e) return pt.value?.workspaceViews?.find((t) => t.type === e);
|
|
2549
|
+
}), Tt = w(() => !!(se && wt.value && _.value?.id != null && y.value === "view" && !N.value && !P.value && !Ut.value)), Et = w(() => I.value?.template === "LIST_DETAIL_CARD" && !Ct.value), Dt = w(() => st.value || Et.value || ct.value || Me.value), Ot = w(() => Ct.value ? ["view"] : [
|
|
2550
|
+
"view",
|
|
2551
|
+
"edit",
|
|
2552
|
+
"delete"
|
|
2553
|
+
]), kt = w(() => !!d.descriptor.menuId), Q = w(() => !kt.value || $e.value !== void 0), At = w(() => `动态${nt.value}入口暂未接入运行器`);
|
|
2554
|
+
be(w(() => Dt.value || Ne.value.length > 0 ? "workspace" : d.descriptor.layout));
|
|
2555
|
+
let jt = w(() => Ne.value[0]?.context), Mt = w(() => ({
|
|
2556
|
+
NAVIGATOR: Object.fromEntries(Ne.value.flatMap((e) => {
|
|
2557
|
+
let t = q.value[e.descriptor.key]?.id;
|
|
2558
|
+
return t == null ? [] : [[e.descriptor.key, t]];
|
|
2559
|
+
})),
|
|
2560
|
+
SESSION: {
|
|
2561
|
+
userId: oe?.value?.userId,
|
|
2562
|
+
tenantId: oe?.value?.tenantId,
|
|
2563
|
+
organizationId: oe?.value?.organizationId
|
|
2564
|
+
}
|
|
2565
|
+
})), Nt = w(() => Pr(Pe.value, "LIST_QUERY", { NAVIGATOR: Mt.value.NAVIGATOR })), Pt = w(() => Nr(Pe.value, "LIST_QUERY")), Ft = w(() => Pt.value.every((e) => Nt.value?.[e] != null)), It = w(() => Pr(Pe.value, "FORM_DEFAULT", Mt.value) ?? {}), Lt = w(() => {
|
|
2566
|
+
let e = {}, t = Mt.value;
|
|
2567
|
+
for (let n of Pe.value) {
|
|
2568
|
+
if (n.target !== "PICKER_QUERY" || !n.targetPickerFieldKey) continue;
|
|
2569
|
+
let r = t[n.source]?.[n.sourceKey];
|
|
2570
|
+
r == null || typeof r != "string" && typeof r != "number" && typeof r != "boolean" || ((e[n.targetPickerFieldKey] ??= {})[n.targetKey] = r);
|
|
2571
|
+
}
|
|
2572
|
+
return e;
|
|
2573
|
+
}), Rt = w(() => new Set(Pe.value.filter((e) => e.target === "PICKER_QUERY" && e.targetPickerFieldKey).map((e) => e.targetPickerFieldKey))), zt = w(() => {
|
|
2574
|
+
let e = _.value;
|
|
2575
|
+
return Ut.value || !e?.id || y.value !== "view" || N.value || P.value || M.value ? !1 : Vt(e.enabled === !1 ? "enable" : "disable");
|
|
2576
|
+
}), Bt = w(() => {
|
|
2577
|
+
let e = _.value;
|
|
2578
|
+
if (!e?.id || zt.value) return;
|
|
2579
|
+
let t = e.enabled === !1 ? "enable" : "disable";
|
|
2580
|
+
return p.recordActionsSnapshot(String(e.id))?.actions.find((e) => e.actionCode === t)?.reason;
|
|
2581
|
+
});
|
|
2582
|
+
function Vt(e) {
|
|
2583
|
+
let t = _.value?.id;
|
|
2584
|
+
if (t == null) return !1;
|
|
2585
|
+
let n = p.recordActionsSnapshot(String(t))?.actions.find((t) => t.actionCode === e);
|
|
2586
|
+
return n ? n.available : p.can(e) === !0;
|
|
2587
|
+
}
|
|
2588
|
+
let $ = me({
|
|
2589
|
+
context: p,
|
|
2590
|
+
listReloadKey: je,
|
|
2591
|
+
searchKeyword: Ae,
|
|
2592
|
+
canChange: () => !k.value,
|
|
2593
|
+
resetSelection: tn
|
|
2594
|
+
}), Ht = w(() => $.active.value ? [] : y.value === "view" ? [{
|
|
2595
|
+
key: "edit",
|
|
2596
|
+
actionCode: "update",
|
|
2597
|
+
title: "编辑",
|
|
2598
|
+
disabled: !_.value
|
|
2599
|
+
}, {
|
|
2600
|
+
key: "delete",
|
|
2601
|
+
actionCode: "delete",
|
|
2602
|
+
title: "删除",
|
|
2603
|
+
disabled: !_.value,
|
|
2604
|
+
loading: k.value,
|
|
2605
|
+
danger: !0
|
|
2606
|
+
}] : [{
|
|
2607
|
+
key: "cancel",
|
|
2608
|
+
title: "取消",
|
|
2609
|
+
disabled: k.value
|
|
2610
|
+
}, {
|
|
2611
|
+
key: "save",
|
|
2612
|
+
actionCode: y.value === "create" ? "create" : "update",
|
|
2613
|
+
title: k.value ? "保存中" : "保存",
|
|
2614
|
+
loading: k.value,
|
|
2615
|
+
primary: !0
|
|
2616
|
+
}]), Ut = w(() => $.active.value || Te.value === "recycleBin"), Wt = w(() => !Me.value || !F.value.has("parentId") ? {} : { parentId: {
|
|
2617
|
+
context: Rt.value.has("parentId") ? ge(p, {
|
|
2618
|
+
queryValues: () => Lt.value.parentId,
|
|
2619
|
+
treePath: `/${p.moduleAlias}/tree`
|
|
2620
|
+
}) : p,
|
|
2621
|
+
mode: "tree",
|
|
2622
|
+
placeholder: "根标签留空",
|
|
2623
|
+
allowClear: !0,
|
|
2624
|
+
constraints: ne(v.value?.id == null ? void 0 : String(v.value.id))
|
|
2625
|
+
} }), Gt = w(() => {
|
|
2626
|
+
let e = { ...Wt.value };
|
|
2627
|
+
for (let t of F.value.values()) {
|
|
2628
|
+
let n = t.reference;
|
|
2629
|
+
if (!n) continue;
|
|
2630
|
+
let r = t.fieldRef.fieldName;
|
|
2631
|
+
if (e[r]) continue;
|
|
2632
|
+
let i = te({
|
|
2633
|
+
http: p.http,
|
|
2634
|
+
moduleAlias: n.targetModuleAlias
|
|
2635
|
+
});
|
|
2636
|
+
e[r] = {
|
|
2637
|
+
context: Rt.value.has(r) ? ge(i, {
|
|
2638
|
+
queryValues: () => Lt.value[r],
|
|
2639
|
+
treePath: `/${n.targetModuleAlias}/tree`
|
|
2640
|
+
}) : i,
|
|
2641
|
+
mode: "tree",
|
|
2642
|
+
allowClear: !t.required?.constant
|
|
2643
|
+
};
|
|
2644
|
+
}
|
|
2645
|
+
return e;
|
|
2646
|
+
});
|
|
2647
|
+
Ee(async () => {
|
|
2648
|
+
Kt(), await Qt();
|
|
2649
|
+
try {
|
|
2650
|
+
await $t();
|
|
2651
|
+
} catch (e) {
|
|
2652
|
+
et.value = e instanceof Error ? e.message : "页面运行时加载失败";
|
|
2653
|
+
}
|
|
2654
|
+
await we(), Xt(), Zt(), rt.value && !et.value && (Ue = yr.register(p.moduleAlias, Qn));
|
|
2655
|
+
});
|
|
2656
|
+
async function Kt() {
|
|
2657
|
+
let t = ++Ke;
|
|
2658
|
+
try {
|
|
2659
|
+
let n = await wr(e, p.moduleAlias);
|
|
2660
|
+
t === Ke && (Be.value = n);
|
|
2661
|
+
} catch {}
|
|
2662
|
+
}
|
|
2663
|
+
function qt() {
|
|
2664
|
+
Yt("drawer");
|
|
2665
|
+
}
|
|
2666
|
+
function Jt() {
|
|
2667
|
+
Yt("pinned");
|
|
2668
|
+
}
|
|
2669
|
+
function Yt(t) {
|
|
2670
|
+
Be.value = t, qe = qe.catch(() => void 0).then(() => Tr(e, p.moduleAlias, t)), qe.catch(() => void 0);
|
|
2671
|
+
}
|
|
2672
|
+
De(() => {
|
|
2673
|
+
We?.disconnect(), Ge?.(), Ue?.(), Ue = void 0;
|
|
2674
|
+
});
|
|
2675
|
+
function Xt() {
|
|
2676
|
+
if (typeof ResizeObserver < "u" && Ve.value) {
|
|
2677
|
+
We = new ResizeObserver(() => Zt()), We.observe(Ve.value), Zt();
|
|
2678
|
+
return;
|
|
2679
|
+
}
|
|
2680
|
+
if (typeof window > "u") return;
|
|
2681
|
+
let e = () => Zt();
|
|
2682
|
+
window.addEventListener("resize", e), Ge = () => window.removeEventListener("resize", e), e();
|
|
2683
|
+
}
|
|
2684
|
+
function Zt() {
|
|
2685
|
+
let e = Ve.value?.getBoundingClientRect().width;
|
|
2686
|
+
e == null || e <= 0 || (ze.value = e < lt.value);
|
|
2687
|
+
}
|
|
2688
|
+
async function Qt() {
|
|
2689
|
+
let e = d.descriptor.menuId;
|
|
2690
|
+
if (e) try {
|
|
2691
|
+
let t = await he(p.http).byMenu(e);
|
|
2692
|
+
if (t.entry.moduleAlias !== p.moduleAlias) throw Error(`Menu ${e} resolves ${t.entry.moduleAlias}, expected ${p.moduleAlias}`);
|
|
2693
|
+
$e.value = t, et.value = void 0;
|
|
2694
|
+
} catch (e) {
|
|
2695
|
+
et.value = e instanceof Error ? e.message : "页面入口加载失败";
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2698
|
+
async function $t() {
|
|
2699
|
+
if (!rt.value) return;
|
|
2700
|
+
let e = await p.runtime.ready;
|
|
2701
|
+
I.value = e.uiDescriptor?.page, Me.value = p.abilities.hasTree() === !0;
|
|
2702
|
+
let t = pt.value;
|
|
2703
|
+
if (Me.value && t?.recordView) {
|
|
2704
|
+
et.value = `模块页面增强 ${t.id} 的业务查看呈现仅支持普通列表模块,不支持树模块`;
|
|
2705
|
+
return;
|
|
2706
|
+
}
|
|
2707
|
+
let n = I.value?.navigator?.levels ?? [];
|
|
2708
|
+
Pe.value = I.value?.navigator?.contextBindings ?? [], q.value = {}, Fe.value = [], Ne.value = await Promise.all(n.map(async (e) => {
|
|
2709
|
+
let t = te({
|
|
2710
|
+
http: p.http,
|
|
2711
|
+
moduleAlias: e.sourceModuleAlias,
|
|
2712
|
+
runtimeAccess: "REFERENCE"
|
|
2713
|
+
});
|
|
2714
|
+
await t.runtime.ready;
|
|
2715
|
+
let n = e.kind === "TREE" ? "REFERENCE_TREE" : "REFERENCE_QUERY", r = t.runtime.snapshot()?.navigatorSourceCapabilities;
|
|
2716
|
+
if (r !== void 0 && !r.includes(n)) throw Error(`导航源能力不可用:层级 ${e.key} 引用模块 ${e.sourceModuleAlias},缺少 ${n}`);
|
|
2717
|
+
return {
|
|
2718
|
+
descriptor: e,
|
|
2719
|
+
context: t,
|
|
2720
|
+
tree: e.kind === "TREE" && (r?.includes("REFERENCE_TREE") ?? t.abilities.hasTree() === !0)
|
|
2721
|
+
};
|
|
2722
|
+
})), F.value = u(e.uiDescriptor);
|
|
2723
|
+
}
|
|
2724
|
+
function en(e) {
|
|
2725
|
+
_.value &&= e.find((e) => e.id === _.value?.id) ?? _.value;
|
|
2726
|
+
}
|
|
2727
|
+
function tn() {
|
|
2728
|
+
Y += 1, N.value = !1, P.value = !1, x.value = !1, y.value = "view", _.value = void 0, v.value = void 0;
|
|
2729
|
+
}
|
|
2730
|
+
function nn(e) {
|
|
2731
|
+
$.active.value || en(e);
|
|
2732
|
+
}
|
|
2733
|
+
function rn(e) {
|
|
2734
|
+
return {
|
|
2735
|
+
title: e.title ?? e.alias ?? e.code ?? e.id ?? dt.value?.fallbackTitle ?? "未命名记录",
|
|
2736
|
+
secondary: e.alias ?? e.code ?? e.id,
|
|
2737
|
+
muted: e.enabled === !1
|
|
2738
|
+
};
|
|
2739
|
+
}
|
|
2740
|
+
function an(e) {
|
|
2741
|
+
if ($.active.value) {
|
|
2742
|
+
kn(e);
|
|
2743
|
+
return;
|
|
2744
|
+
}
|
|
2745
|
+
Vn(e);
|
|
2746
|
+
}
|
|
2747
|
+
function on(e) {
|
|
2748
|
+
if (e.key === "cancel") {
|
|
2749
|
+
tr();
|
|
2750
|
+
return;
|
|
2751
|
+
}
|
|
2752
|
+
if (e.key === "save") {
|
|
2753
|
+
Fn();
|
|
2754
|
+
return;
|
|
2755
|
+
}
|
|
2756
|
+
if (e.key === "edit" && _.value) {
|
|
2757
|
+
Pn(_.value);
|
|
2758
|
+
return;
|
|
2759
|
+
}
|
|
2760
|
+
e.key === "delete" && _.value && In(_.value);
|
|
2761
|
+
}
|
|
2762
|
+
function sn(e) {
|
|
2763
|
+
k.value || Te.value === e || (Te.value = e, Y += 1, N.value = !1, P.value = !1, x.value = !1, y.value = "view", _.value = void 0, v.value = void 0, H.value = void 0);
|
|
2764
|
+
}
|
|
2765
|
+
function cn() {
|
|
2766
|
+
z.value += 1;
|
|
2767
|
+
}
|
|
2768
|
+
function ln(e) {
|
|
2769
|
+
_.value = e;
|
|
2770
|
+
}
|
|
2771
|
+
function un(e) {
|
|
2772
|
+
if (ln(e), !ut.value) {
|
|
2773
|
+
if (Te.value === "recycleBin") {
|
|
2774
|
+
kn(e);
|
|
2775
|
+
return;
|
|
2776
|
+
}
|
|
2777
|
+
Vn(e);
|
|
2778
|
+
}
|
|
2779
|
+
}
|
|
2780
|
+
function dn(e) {
|
|
2781
|
+
ln(e), Te.value === "recycleBin" && kn(e);
|
|
2782
|
+
}
|
|
2783
|
+
function fn(e) {
|
|
2784
|
+
if (Te.value === "recycleBin") {
|
|
2785
|
+
kn(e);
|
|
2786
|
+
return;
|
|
2787
|
+
}
|
|
2788
|
+
Vn(e);
|
|
2789
|
+
}
|
|
2790
|
+
function pn(e, t) {
|
|
2791
|
+
if (!Ne.value.some((t) => t.descriptor.key === e)) return;
|
|
2792
|
+
let n = q.value[e], r = { ...q.value };
|
|
2793
|
+
r[e] = n?.id === t.id ? void 0 : t;
|
|
2794
|
+
for (let t of hn(e)) r[t] = void 0;
|
|
2795
|
+
q.value = r, Tn();
|
|
2796
|
+
}
|
|
2797
|
+
function mn(e, t) {
|
|
2798
|
+
let n = e.descriptor.key, r = t.length === 1 && t[0]?.id != null;
|
|
2799
|
+
r !== Fe.value.includes(n) && (Fe.value = r ? [...Fe.value, n] : Fe.value.filter((e) => e !== n)), r && e.descriptor.singleResultPolicy !== void 0 && e.descriptor.singleResultPolicy !== "NONE" && q.value[n]?.id == null && pn(n, t[0]);
|
|
2800
|
+
}
|
|
2801
|
+
function hn(e) {
|
|
2802
|
+
let t = /* @__PURE__ */ new Set(), n = [e];
|
|
2803
|
+
for (; n.length > 0;) {
|
|
2804
|
+
let e = n.pop(), r = Ne.value.find((t) => t.descriptor.key === e);
|
|
2805
|
+
for (let e of Pe.value) e.source === "NAVIGATOR" && e.sourceKey === r?.descriptor.key && e.target === "NAVIGATOR_QUERY" && e.targetNavigatorLevelKey != null && !t.has(e.targetNavigatorLevelKey) && (t.add(e.targetNavigatorLevelKey), n.push(e.targetNavigatorLevelKey));
|
|
2806
|
+
}
|
|
2807
|
+
return t;
|
|
2808
|
+
}
|
|
2809
|
+
function gn(e) {
|
|
2810
|
+
return Pr(Pe.value, "NAVIGATOR_QUERY", Mt.value, e);
|
|
2811
|
+
}
|
|
2812
|
+
function _n(e) {
|
|
2813
|
+
return e.descriptor.management !== void 0;
|
|
2814
|
+
}
|
|
2815
|
+
function vn(e) {
|
|
2816
|
+
if (!_n(e)) return [];
|
|
2817
|
+
let t = [];
|
|
2818
|
+
return e.tree && e.context.can("create") === !0 && t.push({
|
|
2819
|
+
key: "create-child",
|
|
2820
|
+
title: "新建子项",
|
|
2821
|
+
iconName: "plus"
|
|
2822
|
+
}), e.context.can("update") === !0 && t.push({
|
|
2823
|
+
key: "edit",
|
|
2824
|
+
title: `编辑${e.descriptor.title}`,
|
|
2825
|
+
iconName: "edit"
|
|
2826
|
+
}), e.context.can("delete") === !0 && t.push({
|
|
2827
|
+
key: "delete",
|
|
2828
|
+
title: `删除${e.descriptor.title}`,
|
|
2829
|
+
iconName: "delete",
|
|
2830
|
+
danger: !0
|
|
2831
|
+
}), t;
|
|
2832
|
+
}
|
|
2833
|
+
function yn(e, t) {
|
|
2834
|
+
!_n(e) || e.context.can("create") !== !0 || (Ie.value = e, J.beginCreate({
|
|
2835
|
+
...gn(e.descriptor.key) ?? {},
|
|
2836
|
+
...t ? { parentId: t } : {}
|
|
2837
|
+
}));
|
|
2838
|
+
}
|
|
2839
|
+
function bn(e, t) {
|
|
2840
|
+
let n = J.draft.value;
|
|
2841
|
+
n && (J.draft.value = {
|
|
2842
|
+
...n,
|
|
2843
|
+
[e]: t
|
|
2844
|
+
});
|
|
2845
|
+
}
|
|
2846
|
+
async function xn(e, t) {
|
|
2847
|
+
let n = t.id == null ? void 0 : String(t.id);
|
|
2848
|
+
if (!(!_n(e) || !n || e.context.can("update") !== !0)) {
|
|
2849
|
+
Ie.value = e, J.beginLoad(t, "edit");
|
|
2850
|
+
try {
|
|
2851
|
+
let t = await e.context.crud.view(n);
|
|
2852
|
+
J.resolveLoad(t);
|
|
2853
|
+
} catch {
|
|
2854
|
+
J.failLoad();
|
|
2855
|
+
} finally {
|
|
2856
|
+
J.finishLoad();
|
|
2857
|
+
}
|
|
2858
|
+
}
|
|
2859
|
+
}
|
|
2860
|
+
async function Sn(e, t, n) {
|
|
2861
|
+
t.key === "create-child" ? yn(e, n.id == null ? void 0 : String(n.id)) : t.key === "edit" ? await xn(e, n) : t.key === "delete" && await wn(e, n);
|
|
2862
|
+
}
|
|
2863
|
+
async function Cn() {
|
|
2864
|
+
let e = Ie.value, t = J.draft.value;
|
|
2865
|
+
if (!e || !t || J.saving.value) return;
|
|
2866
|
+
let n = J.mode.value === "create";
|
|
2867
|
+
if (e.context.can(n ? "create" : "update") === !0) {
|
|
2868
|
+
J.saving.value = !0;
|
|
2869
|
+
try {
|
|
2870
|
+
let r = t.id == null ? void 0 : String(t.id), i = !n && r ? await e.context.crud.update(r, t) : await e.context.crud.insert(t);
|
|
2871
|
+
J.applySaved(i.record), Re.value += 1, await Rn(i, "保存成功"), J.close(), Ie.value = void 0;
|
|
2872
|
+
} catch (e) {
|
|
2873
|
+
b(e, {
|
|
2874
|
+
source: "navigator-management",
|
|
2875
|
+
phase: "action"
|
|
2876
|
+
});
|
|
2877
|
+
} finally {
|
|
2878
|
+
J.saving.value = !1;
|
|
2879
|
+
}
|
|
2880
|
+
}
|
|
2881
|
+
}
|
|
2882
|
+
async function wn(e, t) {
|
|
2883
|
+
let n = t.id == null ? void 0 : String(t.id), r = typeof t.version == "number" ? t.version : void 0;
|
|
2884
|
+
if (!(!n || r === void 0 || e.context.can("delete") !== !0)) try {
|
|
2885
|
+
if (!await ce({
|
|
2886
|
+
title: `删除${e.descriptor.title}`,
|
|
2887
|
+
content: `确认删除该${e.descriptor.title}?`,
|
|
2888
|
+
okText: "删除",
|
|
2889
|
+
danger: !0
|
|
2890
|
+
})) return;
|
|
2891
|
+
let t = await e.context.crud.delete(n, { version: r });
|
|
2892
|
+
q.value[e.descriptor.key]?.id === n && pn(e.descriptor.key, { id: n }), Re.value += 1, await Rn(t, "删除成功");
|
|
2893
|
+
} catch (e) {
|
|
2894
|
+
b(e, {
|
|
2895
|
+
source: "navigator-management",
|
|
2896
|
+
phase: "action"
|
|
2897
|
+
});
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
function Tn() {
|
|
2901
|
+
Y += 1, N.value = !1, P.value = !1, x.value = !1, y.value = "view", _.value = void 0, v.value = void 0, H.value = void 0;
|
|
2902
|
+
}
|
|
2903
|
+
function En(e) {
|
|
2904
|
+
H.value = e, On(H.value, "view");
|
|
2905
|
+
}
|
|
2906
|
+
function Dn(e) {
|
|
2907
|
+
if (H.value || y.value !== "view") return;
|
|
2908
|
+
let t = e.at(0);
|
|
2909
|
+
t && En(t);
|
|
2910
|
+
}
|
|
2911
|
+
async function On(e, t) {
|
|
2912
|
+
let n = e.id == null ? void 0 : String(e.id);
|
|
2913
|
+
if (!n) return;
|
|
2914
|
+
let r = ++Y;
|
|
2915
|
+
if (g.beginLoad(e, t), t === "view" && Ct.value?.loadRecord === !1) {
|
|
2916
|
+
g.resolveLoad(e), g.finishLoad();
|
|
2917
|
+
return;
|
|
2918
|
+
}
|
|
2919
|
+
try {
|
|
2920
|
+
let e = await p.crud.view(n);
|
|
2921
|
+
if (!ar({
|
|
2922
|
+
activeRequestSequence: Y,
|
|
2923
|
+
requestSequence: r
|
|
2924
|
+
})) return;
|
|
2925
|
+
g.resolveLoad(e);
|
|
2926
|
+
} catch {
|
|
2927
|
+
if (!ar({
|
|
2928
|
+
activeRequestSequence: Y,
|
|
2929
|
+
requestSequence: r
|
|
2930
|
+
})) return;
|
|
2931
|
+
g.failLoad();
|
|
2932
|
+
} finally {
|
|
2933
|
+
ar({
|
|
2934
|
+
activeRequestSequence: Y,
|
|
2935
|
+
requestSequence: r
|
|
2936
|
+
}) && g.finishLoad();
|
|
2937
|
+
}
|
|
2938
|
+
}
|
|
2939
|
+
async function kn(e) {
|
|
2940
|
+
let t = e.id == null ? void 0 : String(e.id);
|
|
2941
|
+
if (!t) return;
|
|
2942
|
+
let n = ++Y;
|
|
2943
|
+
g.beginLoad(e, "view");
|
|
2944
|
+
try {
|
|
2945
|
+
let e = await p.http.request({
|
|
2946
|
+
method: "GET",
|
|
2947
|
+
path: `/${p.moduleAlias}/recycle-bin/view/${encodeURIComponent(t)}`
|
|
2948
|
+
});
|
|
2949
|
+
if (!ar({
|
|
2950
|
+
activeRequestSequence: Y,
|
|
2951
|
+
requestSequence: n
|
|
2952
|
+
})) return;
|
|
2953
|
+
g.resolveLoad(e);
|
|
2954
|
+
} catch {
|
|
2955
|
+
if (!ar({
|
|
2956
|
+
activeRequestSequence: Y,
|
|
2957
|
+
requestSequence: n
|
|
2958
|
+
})) return;
|
|
2959
|
+
g.failLoad();
|
|
2960
|
+
} finally {
|
|
2961
|
+
ar({
|
|
2962
|
+
activeRequestSequence: Y,
|
|
2963
|
+
requestSequence: n
|
|
2964
|
+
}) && g.finishLoad();
|
|
2965
|
+
}
|
|
2966
|
+
}
|
|
2967
|
+
function An(e, t) {
|
|
2968
|
+
v.value &&= {
|
|
2969
|
+
...v.value,
|
|
2970
|
+
[e]: t
|
|
2971
|
+
};
|
|
2972
|
+
}
|
|
2973
|
+
function jn(e) {
|
|
2974
|
+
p.can("create") === !0 && (Y += 1, g.beginCreate({
|
|
2975
|
+
...It.value,
|
|
2976
|
+
...e ? { parentId: e } : {}
|
|
2977
|
+
}));
|
|
2978
|
+
}
|
|
2979
|
+
function Mn() {
|
|
2980
|
+
jn();
|
|
2981
|
+
}
|
|
2982
|
+
function Nn() {
|
|
2983
|
+
let e = _.value?.id == null ? void 0 : String(_.value.id);
|
|
2984
|
+
e && jn(e);
|
|
2985
|
+
}
|
|
2986
|
+
async function Pn(e) {
|
|
2987
|
+
p.can("update") === !0 && (_.value?.id === e.id && g.beginEdit() || await On(e, "edit"));
|
|
2988
|
+
}
|
|
2989
|
+
async function Fn() {
|
|
2990
|
+
let e = v.value;
|
|
2991
|
+
if (e && !(y.value === "create" ? p.can("create") !== !0 : p.can("update") !== !0) && or({
|
|
2992
|
+
hasRecord: !0,
|
|
2993
|
+
saving: k.value,
|
|
2994
|
+
loading: N.value,
|
|
2995
|
+
loadFailed: P.value
|
|
2996
|
+
})) {
|
|
2997
|
+
k.value = !0;
|
|
2998
|
+
try {
|
|
2999
|
+
let t = e.id == null ? void 0 : String(e.id), n = y.value === "edit" && t ? await p.crud.update(t, e) : await p.crud.insert(e);
|
|
3000
|
+
_.value = n.record, Me.value && (H.value = n.record), g.applySaved(n.record), Qn(), Ce.value += 1, await Rn(n, "保存成功");
|
|
3001
|
+
} catch (e) {
|
|
3002
|
+
b(e, {
|
|
3003
|
+
source: "dynamic-module-action",
|
|
3004
|
+
phase: "action"
|
|
3005
|
+
});
|
|
3006
|
+
} finally {
|
|
3007
|
+
k.value = !1;
|
|
3008
|
+
}
|
|
3009
|
+
}
|
|
3010
|
+
}
|
|
3011
|
+
async function In(e) {
|
|
3012
|
+
let t = e.id == null ? void 0 : String(e.id), n = typeof e.version == "number" ? e.version : void 0;
|
|
3013
|
+
if (!(!t || n === void 0)) try {
|
|
3014
|
+
if (!await ce({
|
|
3015
|
+
title: `删除${ft.value}`,
|
|
3016
|
+
content: `确认删除「${rr(e) ?? t}」?`,
|
|
3017
|
+
okText: "删除",
|
|
3018
|
+
danger: !0
|
|
3019
|
+
})) return;
|
|
3020
|
+
let r = await p.crud.delete(t, { version: n });
|
|
3021
|
+
_.value?.id === t && (g.clearDeleted(), H.value = void 0), Qn(), await Rn(r, "删除成功");
|
|
3022
|
+
} catch (e) {
|
|
3023
|
+
b(e, {
|
|
3024
|
+
source: "dynamic-module-action",
|
|
3025
|
+
phase: "action"
|
|
3026
|
+
});
|
|
3027
|
+
}
|
|
3028
|
+
}
|
|
3029
|
+
async function Ln() {
|
|
3030
|
+
let e = _.value, t = e?.id == null ? void 0 : String(e.id), n = typeof e?.version == "number" ? e.version : void 0;
|
|
3031
|
+
if (!(!e || !t || n === void 0 || !zt.value)) {
|
|
3032
|
+
M.value = !0;
|
|
3033
|
+
try {
|
|
3034
|
+
let r = e.enabled === !1, i = r ? await p.crud.enable(t, { version: n }) : await p.crud.disable(t, { version: n }), a = await p.crud.view(t);
|
|
3035
|
+
g.resolveLoad(a), Qn(), await Rn(i, r ? "已启用" : "已停用");
|
|
3036
|
+
} catch (e) {
|
|
3037
|
+
b(e, {
|
|
3038
|
+
source: "dynamic-module-action",
|
|
3039
|
+
phase: "action"
|
|
3040
|
+
});
|
|
3041
|
+
} finally {
|
|
3042
|
+
M.value = !1;
|
|
3043
|
+
}
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
3046
|
+
function Rn(e, t, n = "dynamic-module-action") {
|
|
3047
|
+
return ie(e, {
|
|
3048
|
+
source: n,
|
|
3049
|
+
phase: "action",
|
|
3050
|
+
fallbackMessage: t
|
|
3051
|
+
});
|
|
3052
|
+
}
|
|
3053
|
+
function zn(e) {
|
|
3054
|
+
if (e.key === "create") {
|
|
3055
|
+
jn();
|
|
3056
|
+
return;
|
|
3057
|
+
}
|
|
3058
|
+
let t = mt.value.find((t) => t.key === e.key);
|
|
3059
|
+
t && Wn(t, Jn());
|
|
3060
|
+
}
|
|
3061
|
+
function Bn(e, t) {
|
|
3062
|
+
if (e.key === "view") {
|
|
3063
|
+
Vn(t);
|
|
3064
|
+
return;
|
|
3065
|
+
}
|
|
3066
|
+
if (e.key === "edit") {
|
|
3067
|
+
Pn(t);
|
|
3068
|
+
return;
|
|
3069
|
+
}
|
|
3070
|
+
if (e.key === "delete") {
|
|
3071
|
+
In(t);
|
|
3072
|
+
return;
|
|
3073
|
+
}
|
|
3074
|
+
let n = vt.value.find((t) => t.key === e.key);
|
|
3075
|
+
n && Wn(n, {
|
|
3076
|
+
...Jn(t),
|
|
3077
|
+
record: t
|
|
3078
|
+
});
|
|
3079
|
+
}
|
|
3080
|
+
async function Vn(e) {
|
|
3081
|
+
let t = pt.value?.recordView?.authorizationActionCode, n = e.id == null ? void 0 : String(e.id);
|
|
3082
|
+
if (t && n) try {
|
|
3083
|
+
if (!(await p.recordActions(n)).actions.some((e) => e.actionCode === t && e.available)) return;
|
|
3084
|
+
} catch (e) {
|
|
3085
|
+
b(e, {
|
|
3086
|
+
source: "module-page-view",
|
|
3087
|
+
phase: "authorization"
|
|
3088
|
+
});
|
|
3089
|
+
return;
|
|
3090
|
+
}
|
|
3091
|
+
await On(e, "view");
|
|
3092
|
+
}
|
|
3093
|
+
function Hn(e) {
|
|
3094
|
+
let t = _.value, n = xt.value.find((t) => t.key === e.key);
|
|
3095
|
+
t && n && Wn(n, {
|
|
3096
|
+
...Jn(t),
|
|
3097
|
+
record: t
|
|
3098
|
+
});
|
|
3099
|
+
}
|
|
3100
|
+
function Un(e, t, n) {
|
|
3101
|
+
let r = bt.value.find((t) => t.key === e.key);
|
|
3102
|
+
r && Wn(r, {
|
|
3103
|
+
...Jn(),
|
|
3104
|
+
records: t,
|
|
3105
|
+
clearSelection: n
|
|
3106
|
+
});
|
|
3107
|
+
}
|
|
3108
|
+
async function Wn(e, t) {
|
|
3109
|
+
try {
|
|
3110
|
+
await e.run(t);
|
|
3111
|
+
} catch (t) {
|
|
3112
|
+
b(t, {
|
|
3113
|
+
source: `module-page-enhancement:${e.key}`,
|
|
3114
|
+
phase: "action"
|
|
3115
|
+
});
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
3118
|
+
function Gn(e) {
|
|
3119
|
+
return {
|
|
3120
|
+
module: p,
|
|
3121
|
+
record: e,
|
|
3122
|
+
refreshList: Qn,
|
|
3123
|
+
reload: Zn
|
|
3124
|
+
};
|
|
3125
|
+
}
|
|
3126
|
+
function Kn(e) {
|
|
3127
|
+
return {
|
|
3128
|
+
module: p,
|
|
3129
|
+
record: e,
|
|
3130
|
+
scope: Yn().scope,
|
|
3131
|
+
refreshList: Qn,
|
|
3132
|
+
close: $n,
|
|
3133
|
+
reload: Zn
|
|
3134
|
+
};
|
|
3135
|
+
}
|
|
3136
|
+
function qn() {
|
|
3137
|
+
let e = wt.value, t = _.value, n = t?.id == null ? void 0 : String(t.id);
|
|
3138
|
+
!e || !n || !Tt.value || !se || se.openWorkspaceTab(e, { recordId: n }, rr(t) ?? void 0);
|
|
3139
|
+
}
|
|
3140
|
+
function Jn(e) {
|
|
3141
|
+
return {
|
|
3142
|
+
module: p,
|
|
3143
|
+
scope: Yn().scope,
|
|
3144
|
+
refreshList: Qn,
|
|
3145
|
+
reload: Zn,
|
|
3146
|
+
openDrawer: (t) => {
|
|
3147
|
+
He.value = {
|
|
3148
|
+
definition: t,
|
|
3149
|
+
context: {
|
|
3150
|
+
module: p,
|
|
3151
|
+
record: e,
|
|
3152
|
+
scope: Yn().scope,
|
|
3153
|
+
refreshList: Qn,
|
|
3154
|
+
close: Xn,
|
|
3155
|
+
reload: Zn
|
|
3156
|
+
}
|
|
3157
|
+
};
|
|
3158
|
+
},
|
|
3159
|
+
openWorkspaceTab: (e, t) => {
|
|
3160
|
+
if (!se) throw Error("模块页面工作视图需要 Workbench 导航承载");
|
|
3161
|
+
se.openWorkspaceTab(e, t);
|
|
3162
|
+
}
|
|
3163
|
+
};
|
|
3164
|
+
}
|
|
3165
|
+
function Yn() {
|
|
3166
|
+
let e = Ne.value[0];
|
|
3167
|
+
return e ? {
|
|
3168
|
+
module: p,
|
|
3169
|
+
scope: {
|
|
3170
|
+
moduleAlias: e.descriptor.sourceModuleAlias,
|
|
3171
|
+
record: q.value[e.descriptor.key]
|
|
3172
|
+
}
|
|
3173
|
+
} : { module: p };
|
|
3174
|
+
}
|
|
3175
|
+
function Xn() {
|
|
3176
|
+
He.value = void 0;
|
|
3177
|
+
}
|
|
3178
|
+
function Zn() {
|
|
3179
|
+
Qn(), Me.value || (Oe.value += 1);
|
|
3180
|
+
}
|
|
3181
|
+
function Qn() {
|
|
3182
|
+
if (Me.value) {
|
|
3183
|
+
Oe.value += 1;
|
|
3184
|
+
return;
|
|
3185
|
+
}
|
|
3186
|
+
if (st.value) {
|
|
3187
|
+
$.refresh();
|
|
3188
|
+
return;
|
|
3189
|
+
}
|
|
3190
|
+
z.value += 1;
|
|
3191
|
+
}
|
|
3192
|
+
c({ refreshList: Qn });
|
|
3193
|
+
function $n() {
|
|
3194
|
+
k.value || (Y += 1, g.close());
|
|
3195
|
+
}
|
|
3196
|
+
function er() {
|
|
3197
|
+
k.value || (Y += 1, g.cancelEdit());
|
|
3198
|
+
}
|
|
3199
|
+
function tr() {
|
|
3200
|
+
k.value || (Y += 1, N.value = !1, P.value = !1, Ce.value += 1, x.value = !1, y.value = "view", v.value = _.value);
|
|
3201
|
+
}
|
|
3202
|
+
function nr() {
|
|
3203
|
+
let e = _.value;
|
|
3204
|
+
if (!(!e || y.value === "create")) {
|
|
3205
|
+
if ($.active.value || Te.value === "recycleBin") {
|
|
3206
|
+
kn(e);
|
|
3207
|
+
return;
|
|
3208
|
+
}
|
|
3209
|
+
On(e, y.value);
|
|
3210
|
+
}
|
|
3211
|
+
}
|
|
3212
|
+
function rr(e) {
|
|
3213
|
+
let t = e?.title ?? e?.name ?? e?.code ?? e?.id;
|
|
3214
|
+
return t == null ? void 0 : String(t);
|
|
3215
|
+
}
|
|
3216
|
+
return (e, n) => et.value ? (R(), D("section", Fr, [j(G(i), {
|
|
3217
|
+
class: "dynamic-module-bootstrap-error",
|
|
3218
|
+
description: et.value
|
|
3219
|
+
}, null, 8, ["description"])])) : Q.value ? rt.value ? (R(), D("section", {
|
|
3220
|
+
key: 2,
|
|
3221
|
+
ref_key: "workspaceElement",
|
|
3222
|
+
ref: Ve,
|
|
3223
|
+
class: L(["dynamic-module-workspace", { "dynamic-module-workspace--management": Dt.value }])
|
|
3224
|
+
}, [
|
|
3225
|
+
st.value ? (R(), T(G(le), {
|
|
3226
|
+
key: 0,
|
|
3227
|
+
class: "dynamic-flat-management-workspace",
|
|
3228
|
+
"explorer-title": G($).active.value ? "回收站" : dt.value?.explorerTitle ?? Ze.value,
|
|
3229
|
+
"refresh-title": `刷新${G($).active.value ? "回收站" : dt.value?.explorerTitle ?? Ze.value}`,
|
|
3230
|
+
"explorer-search-keyword": Ae.value,
|
|
3231
|
+
"explorer-search-placeholder": dt.value?.explorerSearchPlaceholder,
|
|
3232
|
+
"explorer-searchable": !G($).active.value,
|
|
3233
|
+
mode: G(y),
|
|
3234
|
+
"detail-title": Qe.value,
|
|
3235
|
+
"navigator-count": Z.value.length,
|
|
3236
|
+
"onUpdate:explorerSearchKeyword": n[6] ||= (e) => Ae.value = e,
|
|
3237
|
+
onRefresh: G($).refresh
|
|
3238
|
+
}, Se({
|
|
3239
|
+
navigator: K(({ index: e }) => [Z.value[e] ? (R(), T(G(ye), {
|
|
3240
|
+
key: 0,
|
|
3241
|
+
title: Z.value[e].descriptor.title,
|
|
3242
|
+
"refresh-title": `刷新${Z.value[e].descriptor.title}${Z.value[e].tree ? "树" : "列表"}`,
|
|
3243
|
+
"search-keyword": Le.value,
|
|
3244
|
+
"search-placeholder": Z.value[e].descriptor.searchPlaceholder,
|
|
3245
|
+
"onUpdate:searchKeyword": n[1] ||= (e) => Le.value = e,
|
|
3246
|
+
onRefresh: n[2] ||= (e) => Re.value += 1
|
|
3247
|
+
}, Se({
|
|
3248
|
+
editor: K(() => [j(xe, { name: "navigator-management-drawer" }, {
|
|
3249
|
+
default: K(() => [Ie.value?.descriptor.key === Z.value[e].descriptor.key && G(J).open.value ? (R(), D("section", Lr, [O("header", Rr, [O("h3", null, W(Xe.value), 1), O("div", zr, [j(G(f), {
|
|
3250
|
+
disabled: G(J).saving.value,
|
|
3251
|
+
onClick: n[0] ||= (e) => G(J).close()
|
|
3252
|
+
}, {
|
|
3253
|
+
default: K(() => [...n[23] ||= [A(" 取消 ", -1)]]),
|
|
3254
|
+
_: 1
|
|
3255
|
+
}, 8, ["disabled"]), j(G(f), {
|
|
3256
|
+
type: "primary",
|
|
3257
|
+
loading: G(J).saving.value,
|
|
3258
|
+
onClick: Cn
|
|
3259
|
+
}, {
|
|
3260
|
+
default: K(() => [...n[24] ||= [A(" 保存 ", -1)]]),
|
|
3261
|
+
_: 1
|
|
3262
|
+
}, 8, ["loading"])])]), G(J).loading.value ? (R(), T(G(i), {
|
|
3263
|
+
key: 0,
|
|
3264
|
+
loading: "",
|
|
3265
|
+
"loading-tip": "加载记录详情",
|
|
3266
|
+
description: ""
|
|
3267
|
+
})) : G(J).loadFailed.value ? (R(), T(G(i), {
|
|
3268
|
+
key: 1,
|
|
3269
|
+
description: "详情加载失败"
|
|
3270
|
+
})) : G(J).draft.value ? (R(), T(G(S), {
|
|
3271
|
+
key: 2,
|
|
3272
|
+
record: G(J).draft.value,
|
|
3273
|
+
fields: Je.value,
|
|
3274
|
+
"form-session-key": G(J).formSessionKey.value,
|
|
3275
|
+
"option-context": Z.value[e].context,
|
|
3276
|
+
"picker-configs": Ye.value,
|
|
3277
|
+
"exclude-field-names": ["enabled"],
|
|
3278
|
+
"onUpdate:field": bn
|
|
3279
|
+
}, null, 8, [
|
|
3280
|
+
"record",
|
|
3281
|
+
"fields",
|
|
3282
|
+
"form-session-key",
|
|
3283
|
+
"option-context",
|
|
3284
|
+
"picker-configs"
|
|
3285
|
+
])) : E("v-if", !0)])) : E("v-if", !0)]),
|
|
3286
|
+
_: 2
|
|
3287
|
+
}, 1024)]),
|
|
3288
|
+
default: K(() => [Z.value[e].tree ? (R(), T(G(_e), {
|
|
3289
|
+
key: 0,
|
|
3290
|
+
context: Z.value[e].context,
|
|
3291
|
+
"selected-id": q.value[Z.value[e].descriptor.key]?.id == null ? void 0 : String(q.value[Z.value[e].descriptor.key]?.id),
|
|
3292
|
+
"reload-key": Re.value,
|
|
3293
|
+
keyword: Le.value,
|
|
3294
|
+
"external-query-values": gn(Z.value[e].descriptor.key),
|
|
3295
|
+
"search-mode": "none",
|
|
3296
|
+
"empty-description": `暂无${Z.value[e].descriptor.title}`,
|
|
3297
|
+
"actions-of": () => vn(Z.value[e]),
|
|
3298
|
+
onLoaded: (t) => mn(Z.value[e], t),
|
|
3299
|
+
onSelect: (t) => pn(Z.value[e].descriptor.key, t),
|
|
3300
|
+
onAction: (t, n) => Sn(Z.value[e], t, n)
|
|
3301
|
+
}, null, 8, [
|
|
3302
|
+
"context",
|
|
3303
|
+
"selected-id",
|
|
3304
|
+
"reload-key",
|
|
3305
|
+
"keyword",
|
|
3306
|
+
"external-query-values",
|
|
3307
|
+
"empty-description",
|
|
3308
|
+
"actions-of",
|
|
3309
|
+
"onLoaded",
|
|
3310
|
+
"onSelect",
|
|
3311
|
+
"onAction"
|
|
3312
|
+
])) : (R(), T(G(h), {
|
|
3313
|
+
key: 1,
|
|
3314
|
+
context: Z.value[e].context,
|
|
3315
|
+
"selected-id": q.value[Z.value[e].descriptor.key]?.id == null ? void 0 : String(q.value[Z.value[e].descriptor.key]?.id),
|
|
3316
|
+
"reload-key": Re.value,
|
|
3317
|
+
keyword: Le.value,
|
|
3318
|
+
"external-query-values": gn(Z.value[e].descriptor.key),
|
|
3319
|
+
"empty-description": `暂无${Z.value[e].descriptor.title}`,
|
|
3320
|
+
"actions-of": () => vn(Z.value[e]),
|
|
3321
|
+
onLoaded: (t) => mn(Z.value[e], t),
|
|
3322
|
+
onSelect: (t) => pn(Z.value[e].descriptor.key, t),
|
|
3323
|
+
onAction: (t, n) => Sn(Z.value[e], t, n)
|
|
3324
|
+
}, null, 8, [
|
|
3325
|
+
"context",
|
|
3326
|
+
"selected-id",
|
|
3327
|
+
"reload-key",
|
|
3328
|
+
"keyword",
|
|
3329
|
+
"external-query-values",
|
|
3330
|
+
"empty-description",
|
|
3331
|
+
"actions-of",
|
|
3332
|
+
"onLoaded",
|
|
3333
|
+
"onSelect",
|
|
3334
|
+
"onAction"
|
|
3335
|
+
]))]),
|
|
3336
|
+
_: 2
|
|
3337
|
+
}, [_n(Z.value[e]) ? {
|
|
3338
|
+
name: "actions",
|
|
3339
|
+
fn: K(() => [j(G(m), {
|
|
3340
|
+
context: Z.value[e].context,
|
|
3341
|
+
"action-code": "create",
|
|
3342
|
+
"icon-only": "",
|
|
3343
|
+
title: `新建${Z.value[e].descriptor.title}`,
|
|
3344
|
+
onClick: (t) => yn(Z.value[e])
|
|
3345
|
+
}, null, 8, [
|
|
3346
|
+
"context",
|
|
3347
|
+
"title",
|
|
3348
|
+
"onClick"
|
|
3349
|
+
])]),
|
|
3350
|
+
key: "0"
|
|
3351
|
+
} : void 0]), 1032, [
|
|
3352
|
+
"title",
|
|
3353
|
+
"refresh-title",
|
|
3354
|
+
"search-keyword",
|
|
3355
|
+
"search-placeholder"
|
|
3356
|
+
])) : E("v-if", !0)]),
|
|
3357
|
+
explorer: K(() => [j(G(h), {
|
|
3358
|
+
context: G(p),
|
|
3359
|
+
"selected-id": G(_)?.id == null ? void 0 : String(G(_).id),
|
|
3360
|
+
"reload-key": G($).reloadKey.value,
|
|
3361
|
+
mode: G($).mode.value,
|
|
3362
|
+
keyword: Ae.value,
|
|
3363
|
+
"empty-description": G($).active.value ? "回收站为空" : dt.value?.emptyDescription,
|
|
3364
|
+
"fallback-title": dt.value?.fallbackTitle,
|
|
3365
|
+
"item-of": rn,
|
|
3366
|
+
onRecycleBinSummary: G($).updateSummary,
|
|
3367
|
+
onLoaded: n[3] ||= (e) => nn(e),
|
|
3368
|
+
onRestored: Qn,
|
|
3369
|
+
onSelect: n[4] ||= (e) => an(e)
|
|
3370
|
+
}, null, 8, [
|
|
3371
|
+
"context",
|
|
3372
|
+
"selected-id",
|
|
3373
|
+
"reload-key",
|
|
3374
|
+
"mode",
|
|
3375
|
+
"keyword",
|
|
3376
|
+
"empty-description",
|
|
3377
|
+
"fallback-title",
|
|
3378
|
+
"onRecycleBinSummary"
|
|
3379
|
+
])]),
|
|
3380
|
+
"detail-actions": K(() => [Tt.value ? (R(), T(G(f), {
|
|
3381
|
+
key: 0,
|
|
3382
|
+
type: "text",
|
|
3383
|
+
"icon-name": "open-in-new",
|
|
3384
|
+
title: "在新标签页打开",
|
|
3385
|
+
"aria-label": "在新标签页打开",
|
|
3386
|
+
onClick: qn
|
|
3387
|
+
})) : E("v-if", !0), j(G(s), {
|
|
3388
|
+
context: G(p),
|
|
3389
|
+
"record-id": G(y) === "create" || G(_)?.id == null ? void 0 : String(G(_).id),
|
|
3390
|
+
actions: Ht.value,
|
|
3391
|
+
onAction: on
|
|
3392
|
+
}, null, 8, [
|
|
3393
|
+
"context",
|
|
3394
|
+
"record-id",
|
|
3395
|
+
"actions"
|
|
3396
|
+
])]),
|
|
3397
|
+
"detail-status": K(() => [!G($).active.value && G(y) !== "view" && G(v) ? (R(), T(G(r), {
|
|
3398
|
+
key: 0,
|
|
3399
|
+
enabled: G(v).enabled !== !1,
|
|
3400
|
+
disabled: G(k),
|
|
3401
|
+
"show-label": !1,
|
|
3402
|
+
onChange: n[5] ||= (e) => An("enabled", e)
|
|
3403
|
+
}, null, 8, ["enabled", "disabled"])) : !G($).active.value && G(_) ? (R(), T(G(r), {
|
|
3404
|
+
key: 1,
|
|
3405
|
+
enabled: G(_).enabled !== !1,
|
|
3406
|
+
disabled: !zt.value,
|
|
3407
|
+
"disabled-reason": Bt.value,
|
|
3408
|
+
loading: G(M),
|
|
3409
|
+
"show-label": !1,
|
|
3410
|
+
onChange: Ln
|
|
3411
|
+
}, null, 8, [
|
|
3412
|
+
"enabled",
|
|
3413
|
+
"disabled",
|
|
3414
|
+
"disabled-reason",
|
|
3415
|
+
"loading"
|
|
3416
|
+
])) : E("v-if", !0)]),
|
|
3417
|
+
default: K(() => [!G(_) && G(y) === "view" ? (R(), T(G(i), {
|
|
3418
|
+
key: 0,
|
|
3419
|
+
description: dt.value?.detailEmptyDescription ?? "请选择记录,或新建记录"
|
|
3420
|
+
}, null, 8, ["description"])) : G(N) ? (R(), T(G(i), {
|
|
3421
|
+
key: 1,
|
|
3422
|
+
loading: "",
|
|
3423
|
+
"loading-tip": "加载记录详情",
|
|
3424
|
+
description: ""
|
|
3425
|
+
})) : G(P) ? (R(), T(G(i), {
|
|
3426
|
+
key: 2,
|
|
3427
|
+
description: "详情加载失败,请重新选择记录"
|
|
3428
|
+
})) : G(v) ? (R(), D(C, { key: 3 }, [
|
|
3429
|
+
G(y) === "view" ? (R(), T(G(fe), {
|
|
3430
|
+
key: 0,
|
|
3431
|
+
record: G(v),
|
|
3432
|
+
fields: F.value,
|
|
3433
|
+
"exclude-field-names": ["enabled"]
|
|
3434
|
+
}, null, 8, ["record", "fields"])) : (R(), D("div", Br, [j(G(S), {
|
|
3435
|
+
record: G(v),
|
|
3436
|
+
fields: F.value,
|
|
3437
|
+
"form-session-key": G(Ce),
|
|
3438
|
+
"option-context": G(p),
|
|
3439
|
+
"picker-configs": Gt.value,
|
|
3440
|
+
disabled: G(k),
|
|
3441
|
+
"exclude-field-names": ["enabled"],
|
|
3442
|
+
"onUpdate:field": An
|
|
3443
|
+
}, null, 8, [
|
|
3444
|
+
"record",
|
|
3445
|
+
"fields",
|
|
3446
|
+
"form-session-key",
|
|
3447
|
+
"option-context",
|
|
3448
|
+
"picker-configs",
|
|
3449
|
+
"disabled"
|
|
3450
|
+
])])),
|
|
3451
|
+
G(y) === "view" ? (R(!0), D(C, { key: 2 }, V(St.value, (e) => (R(), T(G(t), {
|
|
3452
|
+
key: e.key,
|
|
3453
|
+
title: e.title
|
|
3454
|
+
}, {
|
|
3455
|
+
default: K(() => [(R(), T(U(e.component), { context: Gn(G(v)) }, null, 8, ["context"]))]),
|
|
3456
|
+
_: 2
|
|
3457
|
+
}, 1032, ["title"]))), 128)) : E("v-if", !0),
|
|
3458
|
+
G(y) === "create" ? E("v-if", !0) : (R(), T(G(ve), {
|
|
3459
|
+
key: 3,
|
|
3460
|
+
record: G(v),
|
|
3461
|
+
"show-sort-order": ""
|
|
3462
|
+
}, null, 8, ["record"]))
|
|
3463
|
+
], 64)) : E("v-if", !0)]),
|
|
3464
|
+
_: 2
|
|
3465
|
+
}, [G($).active.value ? void 0 : {
|
|
3466
|
+
name: "explorer-actions",
|
|
3467
|
+
fn: K(() => [j(G(m), {
|
|
3468
|
+
class: "record-panel-create-button",
|
|
3469
|
+
context: G(p),
|
|
3470
|
+
"action-code": "create",
|
|
3471
|
+
"icon-only": "",
|
|
3472
|
+
title: dt.value?.createTitle,
|
|
3473
|
+
onClick: Mn
|
|
3474
|
+
}, null, 8, ["context", "title"])]),
|
|
3475
|
+
key: "0"
|
|
3476
|
+
}, G($).buttonVisible.value ? {
|
|
3477
|
+
name: "explorer-footer",
|
|
3478
|
+
fn: K(() => [j(G(ue), {
|
|
3479
|
+
active: G($).active.value,
|
|
3480
|
+
"has-records": G($).hasRecords.value,
|
|
3481
|
+
count: G($).total.value,
|
|
3482
|
+
onClick: G($).toggle
|
|
3483
|
+
}, null, 8, [
|
|
3484
|
+
"active",
|
|
3485
|
+
"has-records",
|
|
3486
|
+
"count",
|
|
3487
|
+
"onClick"
|
|
3488
|
+
])]),
|
|
3489
|
+
key: "1"
|
|
3490
|
+
} : void 0]), 1032, [
|
|
3491
|
+
"explorer-title",
|
|
3492
|
+
"refresh-title",
|
|
3493
|
+
"explorer-search-keyword",
|
|
3494
|
+
"explorer-search-placeholder",
|
|
3495
|
+
"explorer-searchable",
|
|
3496
|
+
"mode",
|
|
3497
|
+
"detail-title",
|
|
3498
|
+
"navigator-count",
|
|
3499
|
+
"onRefresh"
|
|
3500
|
+
])) : Et.value ? (R(), T(G(ee), {
|
|
3501
|
+
key: 1,
|
|
3502
|
+
class: "dynamic-list-detail-workspace",
|
|
3503
|
+
"explorer-count": Z.value.length,
|
|
3504
|
+
"detail-surface": !ut.value,
|
|
3505
|
+
"list-surface": ut.value
|
|
3506
|
+
}, {
|
|
3507
|
+
default: K(() => [
|
|
3508
|
+
(R(!0), D(C, null, V(Z.value, (e) => (R(), T(G(l), { key: e.descriptor.key }, {
|
|
3509
|
+
default: K(() => [j(G(ye), {
|
|
3510
|
+
title: e.descriptor.title,
|
|
3511
|
+
"refresh-title": `刷新${e.descriptor.title}${e.tree ? "树" : "列表"}`,
|
|
3512
|
+
"search-keyword": Le.value,
|
|
3513
|
+
"search-placeholder": e.descriptor.searchPlaceholder,
|
|
3514
|
+
"onUpdate:searchKeyword": n[8] ||= (e) => Le.value = e,
|
|
3515
|
+
onRefresh: n[9] ||= (e) => Re.value += 1
|
|
3516
|
+
}, Se({
|
|
3517
|
+
editor: K(() => [j(xe, { name: "navigator-management-drawer" }, {
|
|
3518
|
+
default: K(() => [Ie.value?.descriptor.key === e.descriptor.key && G(J).open.value ? (R(), D("section", Vr, [O("header", Hr, [O("h3", null, W(Xe.value), 1), O("div", Ur, [j(G(f), {
|
|
3519
|
+
disabled: G(J).saving.value,
|
|
3520
|
+
onClick: n[7] ||= (e) => G(J).close()
|
|
3521
|
+
}, {
|
|
3522
|
+
default: K(() => [...n[25] ||= [A(" 取消 ", -1)]]),
|
|
3523
|
+
_: 1
|
|
3524
|
+
}, 8, ["disabled"]), j(G(f), {
|
|
3525
|
+
type: "primary",
|
|
3526
|
+
loading: G(J).saving.value,
|
|
3527
|
+
onClick: Cn
|
|
3528
|
+
}, {
|
|
3529
|
+
default: K(() => [...n[26] ||= [A(" 保存 ", -1)]]),
|
|
3530
|
+
_: 1
|
|
3531
|
+
}, 8, ["loading"])])]), G(J).loading.value ? (R(), T(G(i), {
|
|
3532
|
+
key: 0,
|
|
3533
|
+
loading: "",
|
|
3534
|
+
"loading-tip": "加载记录详情",
|
|
3535
|
+
description: ""
|
|
3536
|
+
})) : G(J).loadFailed.value ? (R(), T(G(i), {
|
|
3537
|
+
key: 1,
|
|
3538
|
+
description: "详情加载失败"
|
|
3539
|
+
})) : G(J).draft.value ? (R(), T(G(S), {
|
|
3540
|
+
key: 2,
|
|
3541
|
+
record: G(J).draft.value,
|
|
3542
|
+
fields: Je.value,
|
|
3543
|
+
"form-session-key": G(J).formSessionKey.value,
|
|
3544
|
+
"option-context": e.context,
|
|
3545
|
+
"picker-configs": Ye.value,
|
|
3546
|
+
"exclude-field-names": ["enabled"],
|
|
3547
|
+
"onUpdate:field": bn
|
|
3548
|
+
}, null, 8, [
|
|
3549
|
+
"record",
|
|
3550
|
+
"fields",
|
|
3551
|
+
"form-session-key",
|
|
3552
|
+
"option-context",
|
|
3553
|
+
"picker-configs"
|
|
3554
|
+
])) : E("v-if", !0)])) : E("v-if", !0)]),
|
|
3555
|
+
_: 2
|
|
3556
|
+
}, 1024)]),
|
|
3557
|
+
default: K(() => [e.tree ? (R(), T(G(_e), {
|
|
3558
|
+
key: 0,
|
|
3559
|
+
context: e.context,
|
|
3560
|
+
"selected-id": q.value[e.descriptor.key]?.id == null ? void 0 : String(q.value[e.descriptor.key]?.id),
|
|
3561
|
+
"reload-key": Re.value,
|
|
3562
|
+
keyword: Le.value,
|
|
3563
|
+
"external-query-values": gn(e.descriptor.key),
|
|
3564
|
+
"search-mode": "none",
|
|
3565
|
+
"empty-description": `暂无${e.descriptor.title}`,
|
|
3566
|
+
"actions-of": () => vn(e),
|
|
3567
|
+
onLoaded: (t) => mn(e, t),
|
|
3568
|
+
onSelect: (t) => pn(e.descriptor.key, t),
|
|
3569
|
+
onAction: (t, n) => Sn(e, t, n)
|
|
3570
|
+
}, null, 8, [
|
|
3571
|
+
"context",
|
|
3572
|
+
"selected-id",
|
|
3573
|
+
"reload-key",
|
|
3574
|
+
"keyword",
|
|
3575
|
+
"external-query-values",
|
|
3576
|
+
"empty-description",
|
|
3577
|
+
"actions-of",
|
|
3578
|
+
"onLoaded",
|
|
3579
|
+
"onSelect",
|
|
3580
|
+
"onAction"
|
|
3581
|
+
])) : (R(), T(G(h), {
|
|
3582
|
+
key: 1,
|
|
3583
|
+
context: e.context,
|
|
3584
|
+
"selected-id": q.value[e.descriptor.key]?.id == null ? void 0 : String(q.value[e.descriptor.key]?.id),
|
|
3585
|
+
"reload-key": Re.value,
|
|
3586
|
+
keyword: Le.value,
|
|
3587
|
+
"external-query-values": gn(e.descriptor.key),
|
|
3588
|
+
"empty-description": `暂无${e.descriptor.title}`,
|
|
3589
|
+
"actions-of": () => vn(e),
|
|
3590
|
+
onLoaded: (t) => mn(e, t),
|
|
3591
|
+
onSelect: (t) => pn(e.descriptor.key, t),
|
|
3592
|
+
onAction: (t, n) => Sn(e, t, n)
|
|
3593
|
+
}, null, 8, [
|
|
3594
|
+
"context",
|
|
3595
|
+
"selected-id",
|
|
3596
|
+
"reload-key",
|
|
3597
|
+
"keyword",
|
|
3598
|
+
"external-query-values",
|
|
3599
|
+
"empty-description",
|
|
3600
|
+
"actions-of",
|
|
3601
|
+
"onLoaded",
|
|
3602
|
+
"onSelect",
|
|
3603
|
+
"onAction"
|
|
3604
|
+
]))]),
|
|
3605
|
+
_: 2
|
|
3606
|
+
}, [_n(e) ? {
|
|
3607
|
+
name: "actions",
|
|
3608
|
+
fn: K(() => [j(G(m), {
|
|
3609
|
+
context: e.context,
|
|
3610
|
+
"action-code": "create",
|
|
3611
|
+
"icon-only": "",
|
|
3612
|
+
title: `新建${e.descriptor.title}`,
|
|
3613
|
+
onClick: (t) => yn(e)
|
|
3614
|
+
}, null, 8, [
|
|
3615
|
+
"context",
|
|
3616
|
+
"title",
|
|
3617
|
+
"onClick"
|
|
3618
|
+
])]),
|
|
3619
|
+
key: "0"
|
|
3620
|
+
} : void 0]), 1032, [
|
|
3621
|
+
"title",
|
|
3622
|
+
"refresh-title",
|
|
3623
|
+
"search-keyword",
|
|
3624
|
+
"search-placeholder"
|
|
3625
|
+
])]),
|
|
3626
|
+
_: 2
|
|
3627
|
+
}, 1024))), 128)),
|
|
3628
|
+
j(G(de), {
|
|
3629
|
+
class: "dynamic-list",
|
|
3630
|
+
context: G(p),
|
|
3631
|
+
title: Ze.value,
|
|
3632
|
+
"selected-key": G(_)?.id,
|
|
3633
|
+
"reload-key": z.value,
|
|
3634
|
+
"standard-crud-actions": !0,
|
|
3635
|
+
"standard-crud-row-actions": !0,
|
|
3636
|
+
"standard-crud-row-action-keys": Ot.value,
|
|
3637
|
+
"extra-actions": ht.value,
|
|
3638
|
+
"additional-columns": gt.value,
|
|
3639
|
+
"cell-components": _t.value,
|
|
3640
|
+
"extra-row-actions-of": yt,
|
|
3641
|
+
"action-column-width": pt.value?.list?.actionColumnWidth,
|
|
3642
|
+
"batch-actions": bt.value,
|
|
3643
|
+
"ui-config-id": X.value,
|
|
3644
|
+
"query-template-id": at.value,
|
|
3645
|
+
ready: Q.value,
|
|
3646
|
+
"external-query-values": Nt.value,
|
|
3647
|
+
"required-external-criteria-keys": Pt.value,
|
|
3648
|
+
mode: Te.value,
|
|
3649
|
+
"quick-search-placeholder": "搜索动态记录",
|
|
3650
|
+
"empty-description": "暂无动态记录",
|
|
3651
|
+
onLoaded: en,
|
|
3652
|
+
onModeChange: sn,
|
|
3653
|
+
onRestored: cn,
|
|
3654
|
+
onSelect: un,
|
|
3655
|
+
onRowDblclick: fn,
|
|
3656
|
+
onAction: zn,
|
|
3657
|
+
onRowAction: Bn,
|
|
3658
|
+
onBatchAction: n[10] ||= (e, t, n, r) => Un(e, t, r)
|
|
3659
|
+
}, null, 8, [
|
|
3660
|
+
"context",
|
|
3661
|
+
"title",
|
|
3662
|
+
"selected-key",
|
|
3663
|
+
"reload-key",
|
|
3664
|
+
"standard-crud-row-action-keys",
|
|
3665
|
+
"extra-actions",
|
|
3666
|
+
"additional-columns",
|
|
3667
|
+
"cell-components",
|
|
3668
|
+
"action-column-width",
|
|
3669
|
+
"batch-actions",
|
|
3670
|
+
"ui-config-id",
|
|
3671
|
+
"query-template-id",
|
|
3672
|
+
"ready",
|
|
3673
|
+
"external-query-values",
|
|
3674
|
+
"required-external-criteria-keys",
|
|
3675
|
+
"mode"
|
|
3676
|
+
]),
|
|
3677
|
+
ut.value ? E("v-if", !0) : (R(), T(G(pe), {
|
|
3678
|
+
key: 0,
|
|
3679
|
+
class: "dynamic-list-detail-card",
|
|
3680
|
+
title: Qe.value
|
|
3681
|
+
}, {
|
|
3682
|
+
"title-prefix": K(() => [j(G(f), {
|
|
3683
|
+
class: "detail-surface-mode-button",
|
|
3684
|
+
type: "text",
|
|
3685
|
+
"icon-name": "pin-off",
|
|
3686
|
+
title: "改为抽屉展示",
|
|
3687
|
+
"aria-label": "改为抽屉展示",
|
|
3688
|
+
onClick: qt
|
|
3689
|
+
})]),
|
|
3690
|
+
actions: K(() => [Tt.value ? (R(), T(G(f), {
|
|
3691
|
+
key: 0,
|
|
3692
|
+
type: "text",
|
|
3693
|
+
"icon-name": "open-in-new",
|
|
3694
|
+
title: "在新标签页打开",
|
|
3695
|
+
"aria-label": "在新标签页打开",
|
|
3696
|
+
onClick: qn
|
|
3697
|
+
})) : E("v-if", !0), j(Er, {
|
|
3698
|
+
context: G(p),
|
|
3699
|
+
record: G(_),
|
|
3700
|
+
mode: G(y),
|
|
3701
|
+
saving: G(k),
|
|
3702
|
+
"detail-loading": G(N),
|
|
3703
|
+
"detail-load-failed": G(P),
|
|
3704
|
+
"recycle-bin-active": Ut.value,
|
|
3705
|
+
actions: xt.value,
|
|
3706
|
+
onCancel: er,
|
|
3707
|
+
onSave: Fn,
|
|
3708
|
+
onEdit: n[11] ||= (e) => G(_) && Pn(G(_)),
|
|
3709
|
+
onDelete: n[12] ||= (e) => G(_) && In(G(_)),
|
|
3710
|
+
onDetailAction: Hn
|
|
3711
|
+
}, null, 8, [
|
|
3712
|
+
"context",
|
|
3713
|
+
"record",
|
|
3714
|
+
"mode",
|
|
3715
|
+
"saving",
|
|
3716
|
+
"detail-loading",
|
|
3717
|
+
"detail-load-failed",
|
|
3718
|
+
"recycle-bin-active",
|
|
3719
|
+
"actions"
|
|
3720
|
+
])]),
|
|
3721
|
+
status: K(() => [!Ut.value && G(y) === "view" && G(_) ? (R(), T(G(r), {
|
|
3722
|
+
key: 0,
|
|
3723
|
+
enabled: G(_).enabled !== !1,
|
|
3724
|
+
disabled: !zt.value,
|
|
3725
|
+
"disabled-reason": Bt.value,
|
|
3726
|
+
loading: G(M),
|
|
3727
|
+
"show-label": !1,
|
|
3728
|
+
onChange: Ln
|
|
3729
|
+
}, null, 8, [
|
|
3730
|
+
"enabled",
|
|
3731
|
+
"disabled",
|
|
3732
|
+
"disabled-reason",
|
|
3733
|
+
"loading"
|
|
3734
|
+
])) : E("v-if", !0)]),
|
|
3735
|
+
default: K(() => [!G(_) && G(y) === "view" ? (R(), T(G(i), {
|
|
3736
|
+
key: 0,
|
|
3737
|
+
description: I.value?.detail?.emptyDescription ?? "请选择记录,或新建记录"
|
|
3738
|
+
}, null, 8, ["description"])) : G(N) ? (R(), T(G(i), {
|
|
3739
|
+
key: 1,
|
|
3740
|
+
loading: "",
|
|
3741
|
+
"loading-tip": "加载记录详情",
|
|
3742
|
+
description: ""
|
|
3743
|
+
})) : G(P) ? (R(), T(G(i), {
|
|
3744
|
+
key: 2,
|
|
3745
|
+
description: "详情加载失败,请重新选择记录"
|
|
3746
|
+
})) : G(v) ? (R(), D(C, { key: 3 }, [G(y) === "view" ? (R(), D(C, { key: 0 }, [j(G(fe), {
|
|
3747
|
+
record: G(v),
|
|
3748
|
+
fields: F.value,
|
|
3749
|
+
"exclude-field-names": ["enabled"]
|
|
3750
|
+
}, null, 8, ["record", "fields"]), (R(!0), D(C, null, V(St.value, (e) => (R(), T(G(t), {
|
|
3751
|
+
key: e.key,
|
|
3752
|
+
title: e.title
|
|
3753
|
+
}, {
|
|
3754
|
+
default: K(() => [(R(), T(U(e.component), { context: Gn(G(v)) }, null, 8, ["context"]))]),
|
|
3755
|
+
_: 2
|
|
3756
|
+
}, 1032, ["title"]))), 128))], 64)) : (R(), D("div", Wr, [j(G(S), {
|
|
3757
|
+
record: G(v),
|
|
3758
|
+
fields: F.value,
|
|
3759
|
+
"form-session-key": G(Ce),
|
|
3760
|
+
"option-context": G(p),
|
|
3761
|
+
"picker-configs": Gt.value,
|
|
3762
|
+
disabled: G(k),
|
|
3763
|
+
"exclude-field-names": ["enabled"],
|
|
3764
|
+
"onUpdate:field": An
|
|
3765
|
+
}, null, 8, [
|
|
3766
|
+
"record",
|
|
3767
|
+
"fields",
|
|
3768
|
+
"form-session-key",
|
|
3769
|
+
"option-context",
|
|
3770
|
+
"picker-configs",
|
|
3771
|
+
"disabled"
|
|
3772
|
+
])])), G(y) === "create" ? E("v-if", !0) : (R(), T(G(ve), {
|
|
3773
|
+
key: 2,
|
|
3774
|
+
record: G(v),
|
|
3775
|
+
"show-sort-order": ""
|
|
3776
|
+
}, null, 8, ["record"]))], 64)) : E("v-if", !0)]),
|
|
3777
|
+
_: 1
|
|
3778
|
+
}, 8, ["title"]))
|
|
3779
|
+
]),
|
|
3780
|
+
_: 1
|
|
3781
|
+
}, 8, [
|
|
3782
|
+
"explorer-count",
|
|
3783
|
+
"detail-surface",
|
|
3784
|
+
"list-surface"
|
|
3785
|
+
])) : ct.value || Me.value ? (R(), T(G(ee), {
|
|
3786
|
+
key: 2,
|
|
3787
|
+
class: "dynamic-tree-workspace",
|
|
3788
|
+
"explorer-count": Z.value.length + 1
|
|
3789
|
+
}, {
|
|
3790
|
+
default: K(() => [
|
|
3791
|
+
(R(!0), D(C, null, V(Z.value, (e) => (R(), T(G(l), { key: e.descriptor.key }, {
|
|
3792
|
+
default: K(() => [j(jr, {
|
|
3793
|
+
level: e,
|
|
3794
|
+
"selected-id": q.value[e.descriptor.key]?.id == null ? void 0 : String(q.value[e.descriptor.key]?.id),
|
|
3795
|
+
"reload-key": Re.value,
|
|
3796
|
+
keyword: Le.value,
|
|
3797
|
+
"external-query-values": gn(e.descriptor.key),
|
|
3798
|
+
"actions-of": () => vn(e),
|
|
3799
|
+
"onUpdate:keyword": n[14] ||= (e) => Le.value = e,
|
|
3800
|
+
onRefresh: n[15] ||= (e) => Re.value += 1,
|
|
3801
|
+
onCreate: (t) => yn(e),
|
|
3802
|
+
onLoaded: (t) => mn(e, t),
|
|
3803
|
+
onSelect: (t) => pn(e.descriptor.key, t),
|
|
3804
|
+
onAction: (t, n) => Sn(e, t, n)
|
|
3805
|
+
}, {
|
|
3806
|
+
editor: K(() => [j(Ar, {
|
|
3807
|
+
open: Ie.value?.descriptor.key === e.descriptor.key && G(J).open.value,
|
|
3808
|
+
title: Xe.value,
|
|
3809
|
+
saving: G(J).saving.value,
|
|
3810
|
+
loading: G(J).loading.value,
|
|
3811
|
+
"load-failed": G(J).loadFailed.value,
|
|
3812
|
+
draft: G(J).draft.value,
|
|
3813
|
+
fields: Je.value,
|
|
3814
|
+
"form-session-key": G(J).formSessionKey.value,
|
|
3815
|
+
context: e.context,
|
|
3816
|
+
"picker-configs": Ye.value,
|
|
3817
|
+
onClose: n[13] ||= (e) => G(J).close(),
|
|
3818
|
+
onSave: Cn,
|
|
3819
|
+
onUpdateField: bn
|
|
3820
|
+
}, null, 8, [
|
|
3821
|
+
"open",
|
|
3822
|
+
"title",
|
|
3823
|
+
"saving",
|
|
3824
|
+
"loading",
|
|
3825
|
+
"load-failed",
|
|
3826
|
+
"draft",
|
|
3827
|
+
"fields",
|
|
3828
|
+
"form-session-key",
|
|
3829
|
+
"context",
|
|
3830
|
+
"picker-configs"
|
|
3831
|
+
])]),
|
|
3832
|
+
_: 2
|
|
3833
|
+
}, 1032, [
|
|
3834
|
+
"level",
|
|
3835
|
+
"selected-id",
|
|
3836
|
+
"reload-key",
|
|
3837
|
+
"keyword",
|
|
3838
|
+
"external-query-values",
|
|
3839
|
+
"actions-of",
|
|
3840
|
+
"onCreate",
|
|
3841
|
+
"onLoaded",
|
|
3842
|
+
"onSelect",
|
|
3843
|
+
"onAction"
|
|
3844
|
+
])]),
|
|
3845
|
+
_: 2
|
|
3846
|
+
}, 1024))), 128)),
|
|
3847
|
+
j(G(l), null, {
|
|
3848
|
+
default: K(() => [j(G(ye), {
|
|
3849
|
+
title: `${Ze.value}树`,
|
|
3850
|
+
"refresh-title": `刷新${Ze.value}树`,
|
|
3851
|
+
"search-keyword": ke.value,
|
|
3852
|
+
"search-placeholder": "搜索树节点",
|
|
3853
|
+
"onUpdate:searchKeyword": n[16] ||= (e) => ke.value = e,
|
|
3854
|
+
onRefresh: n[17] ||= (e) => Oe.value += 1
|
|
3855
|
+
}, {
|
|
3856
|
+
actions: K(() => [Ft.value ? (R(), T(G(m), {
|
|
3857
|
+
key: 0,
|
|
3858
|
+
class: "record-panel-create-button",
|
|
3859
|
+
context: G(p),
|
|
3860
|
+
"action-code": "create",
|
|
3861
|
+
"icon-only": "",
|
|
3862
|
+
title: "新建根节点",
|
|
3863
|
+
onClick: Mn
|
|
3864
|
+
}, null, 8, ["context"])) : E("v-if", !0)]),
|
|
3865
|
+
default: K(() => [Ft.value ? (R(), T(G(_e), {
|
|
3866
|
+
key: 0,
|
|
3867
|
+
context: G(p),
|
|
3868
|
+
"selected-id": H.value?.id == null ? void 0 : String(H.value.id),
|
|
3869
|
+
"reload-key": Oe.value,
|
|
3870
|
+
keyword: ke.value,
|
|
3871
|
+
"external-query-values": Nt.value,
|
|
3872
|
+
"search-mode": "none",
|
|
3873
|
+
"search-trigger": "external",
|
|
3874
|
+
"empty-description": "暂无记录",
|
|
3875
|
+
onSelect: En,
|
|
3876
|
+
onLoaded: Dn
|
|
3877
|
+
}, null, 8, [
|
|
3878
|
+
"context",
|
|
3879
|
+
"selected-id",
|
|
3880
|
+
"reload-key",
|
|
3881
|
+
"keyword",
|
|
3882
|
+
"external-query-values"
|
|
3883
|
+
])) : (R(), T(G(i), {
|
|
3884
|
+
key: 1,
|
|
3885
|
+
description: "请先选择导航范围"
|
|
3886
|
+
}))]),
|
|
3887
|
+
_: 1
|
|
3888
|
+
}, 8, [
|
|
3889
|
+
"title",
|
|
3890
|
+
"refresh-title",
|
|
3891
|
+
"search-keyword"
|
|
3892
|
+
])]),
|
|
3893
|
+
_: 1
|
|
3894
|
+
}),
|
|
3895
|
+
j(G(pe), {
|
|
3896
|
+
class: "dynamic-tree-card",
|
|
3897
|
+
title: Qe.value
|
|
3898
|
+
}, {
|
|
3899
|
+
actions: K(() => [G(y) === "view" ? (R(), D(C, { key: 1 }, [
|
|
3900
|
+
Tt.value ? (R(), T(G(f), {
|
|
3901
|
+
key: 0,
|
|
3902
|
+
type: "text",
|
|
3903
|
+
"icon-name": "open-in-new",
|
|
3904
|
+
title: "在新标签页打开",
|
|
3905
|
+
"aria-label": "在新标签页打开",
|
|
3906
|
+
onClick: qn
|
|
3907
|
+
})) : E("v-if", !0),
|
|
3908
|
+
G(_)?.id != null && xt.value.length > 0 ? (R(), T(G(s), {
|
|
3909
|
+
key: 1,
|
|
3910
|
+
context: G(p),
|
|
3911
|
+
"record-id": String(G(_).id),
|
|
3912
|
+
actions: xt.value,
|
|
3913
|
+
onAction: Hn
|
|
3914
|
+
}, null, 8, [
|
|
3915
|
+
"context",
|
|
3916
|
+
"record-id",
|
|
3917
|
+
"actions"
|
|
3918
|
+
])) : E("v-if", !0),
|
|
3919
|
+
j(G(m), {
|
|
3920
|
+
context: G(p),
|
|
3921
|
+
"action-code": "create",
|
|
3922
|
+
disabled: !G(_),
|
|
3923
|
+
onClick: Nn
|
|
3924
|
+
}, {
|
|
3925
|
+
default: K(() => [...n[28] ||= [A(" 新建子项 ", -1)]]),
|
|
3926
|
+
_: 1
|
|
3927
|
+
}, 8, ["context", "disabled"]),
|
|
3928
|
+
j(G(m), {
|
|
3929
|
+
context: G(p),
|
|
3930
|
+
"action-code": "update",
|
|
3931
|
+
disabled: !G(_),
|
|
3932
|
+
onClick: n[18] ||= (e) => G(_) && Pn(G(_))
|
|
3933
|
+
}, {
|
|
3934
|
+
default: K(() => [...n[29] ||= [A(" 编辑 ", -1)]]),
|
|
3935
|
+
_: 1
|
|
3936
|
+
}, 8, ["context", "disabled"]),
|
|
3937
|
+
j(G(m), {
|
|
3938
|
+
context: G(p),
|
|
3939
|
+
"action-code": "delete",
|
|
3940
|
+
loading: G(k),
|
|
3941
|
+
danger: "",
|
|
3942
|
+
disabled: !G(_),
|
|
3943
|
+
onClick: n[19] ||= (e) => G(_) && In(G(_))
|
|
3944
|
+
}, {
|
|
3945
|
+
default: K(() => [...n[30] ||= [A(" 删除 ", -1)]]),
|
|
3946
|
+
_: 1
|
|
3947
|
+
}, 8, [
|
|
3948
|
+
"context",
|
|
3949
|
+
"loading",
|
|
3950
|
+
"disabled"
|
|
3951
|
+
])
|
|
3952
|
+
], 64)) : (R(), D(C, { key: 0 }, [j(G(f), {
|
|
3953
|
+
disabled: G(k),
|
|
3954
|
+
onClick: tr
|
|
3955
|
+
}, {
|
|
3956
|
+
default: K(() => [...n[27] ||= [A("取消", -1)]]),
|
|
3957
|
+
_: 1
|
|
3958
|
+
}, 8, ["disabled"]), j(G(f), {
|
|
3959
|
+
type: "primary",
|
|
3960
|
+
loading: G(k),
|
|
3961
|
+
disabled: G(N) || G(P) || G(p).can(G(y) === "create" ? "create" : "update") !== !0,
|
|
3962
|
+
onClick: Fn
|
|
3963
|
+
}, {
|
|
3964
|
+
default: K(() => [A(W(G(k) ? "保存中" : "保存"), 1)]),
|
|
3965
|
+
_: 1
|
|
3966
|
+
}, 8, ["loading", "disabled"])], 64))]),
|
|
3967
|
+
status: K(() => [G(y) === "view" && G(_) ? (R(), T(G(r), {
|
|
3968
|
+
key: 0,
|
|
3969
|
+
enabled: G(_).enabled !== !1,
|
|
3970
|
+
disabled: !zt.value,
|
|
3971
|
+
"disabled-reason": Bt.value,
|
|
3972
|
+
loading: G(M),
|
|
3973
|
+
"show-label": !1,
|
|
3974
|
+
onChange: Ln
|
|
3975
|
+
}, null, 8, [
|
|
3976
|
+
"enabled",
|
|
3977
|
+
"disabled",
|
|
3978
|
+
"disabled-reason",
|
|
3979
|
+
"loading"
|
|
3980
|
+
])) : E("v-if", !0)]),
|
|
3981
|
+
default: K(() => [!G(_) && G(y) === "view" ? (R(), T(G(i), {
|
|
3982
|
+
key: 0,
|
|
3983
|
+
description: "请选择标签,或新建根标签"
|
|
3984
|
+
})) : G(N) ? (R(), T(G(i), {
|
|
3985
|
+
key: 1,
|
|
3986
|
+
loading: "",
|
|
3987
|
+
"loading-tip": "加载记录详情",
|
|
3988
|
+
description: ""
|
|
3989
|
+
})) : G(P) ? (R(), T(G(i), {
|
|
3990
|
+
key: 2,
|
|
3991
|
+
description: "详情加载失败,请重新选择标签"
|
|
3992
|
+
})) : G(v) ? (R(), D(C, { key: 3 }, [G(y) === "view" ? (R(), D(C, { key: 0 }, [j(G(fe), {
|
|
3993
|
+
record: G(v),
|
|
3994
|
+
fields: F.value,
|
|
3995
|
+
"exclude-field-names": ["enabled"]
|
|
3996
|
+
}, null, 8, ["record", "fields"]), (R(!0), D(C, null, V(St.value, (e) => (R(), T(G(t), {
|
|
3997
|
+
key: e.key,
|
|
3998
|
+
title: e.title
|
|
3999
|
+
}, {
|
|
4000
|
+
default: K(() => [(R(), T(U(e.component), { context: Gn(G(v)) }, null, 8, ["context"]))]),
|
|
4001
|
+
_: 2
|
|
4002
|
+
}, 1032, ["title"]))), 128))], 64)) : (R(), D("div", Gr, [j(G(S), {
|
|
4003
|
+
record: G(v),
|
|
4004
|
+
fields: F.value,
|
|
4005
|
+
"form-session-key": G(Ce),
|
|
4006
|
+
"option-context": G(p),
|
|
4007
|
+
"picker-configs": Gt.value,
|
|
4008
|
+
"exclude-field-names": ["enabled"],
|
|
4009
|
+
"onUpdate:field": An
|
|
4010
|
+
}, null, 8, [
|
|
4011
|
+
"record",
|
|
4012
|
+
"fields",
|
|
4013
|
+
"form-session-key",
|
|
4014
|
+
"option-context",
|
|
4015
|
+
"picker-configs"
|
|
4016
|
+
])])), G(y) === "create" ? E("v-if", !0) : (R(), T(G(ve), {
|
|
4017
|
+
key: 2,
|
|
4018
|
+
record: G(v),
|
|
4019
|
+
"show-sort-order": ""
|
|
4020
|
+
}, null, 8, ["record"]))], 64)) : E("v-if", !0)]),
|
|
4021
|
+
_: 1
|
|
4022
|
+
}, 8, ["title"])
|
|
4023
|
+
]),
|
|
4024
|
+
_: 1
|
|
4025
|
+
}, 8, ["explorer-count"])) : (R(), T(G(de), {
|
|
4026
|
+
key: 3,
|
|
4027
|
+
class: "dynamic-list",
|
|
4028
|
+
context: G(p),
|
|
4029
|
+
title: Ze.value,
|
|
4030
|
+
"selected-key": G(_)?.id,
|
|
4031
|
+
"reload-key": z.value,
|
|
4032
|
+
"standard-crud-actions": !0,
|
|
4033
|
+
"standard-crud-row-actions": !0,
|
|
4034
|
+
"standard-crud-row-action-keys": Ot.value,
|
|
4035
|
+
"extra-actions": ht.value,
|
|
4036
|
+
"additional-columns": gt.value,
|
|
4037
|
+
"cell-components": _t.value,
|
|
4038
|
+
"extra-row-actions-of": yt,
|
|
4039
|
+
"action-column-width": pt.value?.list?.actionColumnWidth,
|
|
4040
|
+
"batch-actions": bt.value,
|
|
4041
|
+
"ui-config-id": X.value,
|
|
4042
|
+
"query-template-id": at.value,
|
|
4043
|
+
ready: Q.value,
|
|
4044
|
+
mode: Te.value,
|
|
4045
|
+
"quick-search-placeholder": "搜索动态记录",
|
|
4046
|
+
"empty-description": "暂无动态记录",
|
|
4047
|
+
onLoaded: en,
|
|
4048
|
+
onModeChange: sn,
|
|
4049
|
+
onRestored: cn,
|
|
4050
|
+
onSelect: dn,
|
|
4051
|
+
onRowDblclick: fn,
|
|
4052
|
+
onAction: zn,
|
|
4053
|
+
onRowAction: Bn,
|
|
4054
|
+
onBatchAction: n[20] ||= (e, t, n, r) => Un(e, t, r)
|
|
4055
|
+
}, null, 8, [
|
|
4056
|
+
"context",
|
|
4057
|
+
"title",
|
|
4058
|
+
"selected-key",
|
|
4059
|
+
"reload-key",
|
|
4060
|
+
"standard-crud-row-action-keys",
|
|
4061
|
+
"extra-actions",
|
|
4062
|
+
"additional-columns",
|
|
4063
|
+
"cell-components",
|
|
4064
|
+
"action-column-width",
|
|
4065
|
+
"batch-actions",
|
|
4066
|
+
"ui-config-id",
|
|
4067
|
+
"query-template-id",
|
|
4068
|
+
"ready",
|
|
4069
|
+
"mode"
|
|
4070
|
+
])),
|
|
4071
|
+
!Me.value && !st.value && (!Et.value || ut.value) ? (R(), T(G(ae), {
|
|
4072
|
+
key: 4,
|
|
4073
|
+
open: G(x),
|
|
4074
|
+
title: Qe.value,
|
|
4075
|
+
width: Ct.value?.width,
|
|
4076
|
+
mode: G(y),
|
|
4077
|
+
loading: G(N),
|
|
4078
|
+
"load-failed": G(P),
|
|
4079
|
+
onClose: $n,
|
|
4080
|
+
onRetry: nr
|
|
4081
|
+
}, Se({
|
|
4082
|
+
status: K(() => [!Ut.value && !Ct.value && G(y) === "view" && G(_) ? (R(), T(G(r), {
|
|
4083
|
+
key: 0,
|
|
4084
|
+
enabled: G(_).enabled !== !1,
|
|
4085
|
+
disabled: !zt.value,
|
|
4086
|
+
"disabled-reason": Bt.value,
|
|
4087
|
+
loading: G(M),
|
|
4088
|
+
"show-label": !1,
|
|
4089
|
+
onChange: Ln
|
|
4090
|
+
}, null, 8, [
|
|
4091
|
+
"enabled",
|
|
4092
|
+
"disabled",
|
|
4093
|
+
"disabled-reason",
|
|
4094
|
+
"loading"
|
|
4095
|
+
])) : E("v-if", !0)]),
|
|
4096
|
+
operation: K(() => [j(Er, {
|
|
4097
|
+
context: G(p),
|
|
4098
|
+
record: G(_),
|
|
4099
|
+
mode: G(y),
|
|
4100
|
+
saving: G(k),
|
|
4101
|
+
"detail-loading": G(N),
|
|
4102
|
+
"detail-load-failed": G(P),
|
|
4103
|
+
"recycle-bin-active": Ut.value,
|
|
4104
|
+
actions: xt.value,
|
|
4105
|
+
"show-standard-view-actions": !Ct.value,
|
|
4106
|
+
onCancel: er,
|
|
4107
|
+
onSave: Fn,
|
|
4108
|
+
onEdit: n[21] ||= (e) => G(_) && Pn(G(_)),
|
|
4109
|
+
onDelete: n[22] ||= (e) => G(_) && In(G(_)),
|
|
4110
|
+
onDetailAction: Hn
|
|
4111
|
+
}, null, 8, [
|
|
4112
|
+
"context",
|
|
4113
|
+
"record",
|
|
4114
|
+
"mode",
|
|
4115
|
+
"saving",
|
|
4116
|
+
"detail-loading",
|
|
4117
|
+
"detail-load-failed",
|
|
4118
|
+
"recycle-bin-active",
|
|
4119
|
+
"actions",
|
|
4120
|
+
"show-standard-view-actions"
|
|
4121
|
+
])]),
|
|
4122
|
+
view: K(() => [G(v) ? (R(), D(C, { key: 0 }, [Ct.value ? (R(), T(U(Ct.value.component), {
|
|
4123
|
+
key: 0,
|
|
4124
|
+
context: Kn(G(v))
|
|
4125
|
+
}, null, 8, ["context"])) : (R(), D(C, { key: 1 }, [j(G(fe), {
|
|
4126
|
+
record: G(v),
|
|
4127
|
+
fields: F.value,
|
|
4128
|
+
"exclude-field-names": ["enabled"]
|
|
4129
|
+
}, null, 8, ["record", "fields"]), (R(!0), D(C, null, V(St.value, (e) => (R(), T(G(t), {
|
|
4130
|
+
key: e.key,
|
|
4131
|
+
title: e.title
|
|
4132
|
+
}, {
|
|
4133
|
+
default: K(() => [(R(), T(U(e.component), { context: Gn(G(v)) }, null, 8, ["context"]))]),
|
|
4134
|
+
_: 2
|
|
4135
|
+
}, 1032, ["title"]))), 128))], 64))], 64)) : E("v-if", !0)]),
|
|
4136
|
+
form: K(() => [G(v) ? (R(), D("div", Kr, [j(G(S), {
|
|
4137
|
+
record: G(v),
|
|
4138
|
+
fields: F.value,
|
|
4139
|
+
"form-session-key": G(Ce),
|
|
4140
|
+
"option-context": G(p),
|
|
4141
|
+
"picker-configs": Gt.value,
|
|
4142
|
+
"exclude-field-names": ["enabled"],
|
|
4143
|
+
"onUpdate:field": An
|
|
4144
|
+
}, null, 8, [
|
|
4145
|
+
"record",
|
|
4146
|
+
"fields",
|
|
4147
|
+
"form-session-key",
|
|
4148
|
+
"option-context",
|
|
4149
|
+
"picker-configs"
|
|
4150
|
+
])])) : E("v-if", !0)]),
|
|
4151
|
+
_: 2
|
|
4152
|
+
}, [Tt.value ? {
|
|
4153
|
+
name: "header-actions",
|
|
4154
|
+
fn: K(() => [j(G(f), {
|
|
4155
|
+
type: "text",
|
|
4156
|
+
"icon-name": "open-in-new",
|
|
4157
|
+
title: "在新标签页打开",
|
|
4158
|
+
"aria-label": "在新标签页打开",
|
|
4159
|
+
onClick: qn
|
|
4160
|
+
})]),
|
|
4161
|
+
key: "0"
|
|
4162
|
+
} : void 0, Et.value && !ze.value ? {
|
|
4163
|
+
name: "title-prefix",
|
|
4164
|
+
fn: K(() => [j(G(f), {
|
|
4165
|
+
class: "detail-surface-mode-button",
|
|
4166
|
+
type: "text",
|
|
4167
|
+
"icon-name": "pin",
|
|
4168
|
+
title: "固定到右侧展示",
|
|
4169
|
+
"aria-label": "固定到右侧展示",
|
|
4170
|
+
onClick: Jt
|
|
4171
|
+
})]),
|
|
4172
|
+
key: "1"
|
|
4173
|
+
} : void 0]), 1032, [
|
|
4174
|
+
"open",
|
|
4175
|
+
"title",
|
|
4176
|
+
"width",
|
|
4177
|
+
"mode",
|
|
4178
|
+
"loading",
|
|
4179
|
+
"load-failed"
|
|
4180
|
+
])) : E("v-if", !0),
|
|
4181
|
+
He.value ? (R(), T(G(a), {
|
|
4182
|
+
key: 5,
|
|
4183
|
+
open: !0,
|
|
4184
|
+
title: He.value.definition.title,
|
|
4185
|
+
width: He.value.definition.width,
|
|
4186
|
+
onClose: Xn
|
|
4187
|
+
}, {
|
|
4188
|
+
default: K(() => [(R(), T(U(He.value.definition.component), { context: He.value.context }, null, 8, ["context"]))]),
|
|
4189
|
+
_: 1
|
|
4190
|
+
}, 8, ["title", "width"])) : E("v-if", !0)
|
|
4191
|
+
], 2)) : (R(), D("section", qr, [O("h2", null, W(Ze.value), 1), O("p", null, W(At.value), 1)])) : (R(), D("section", Ir, [j(G(i), {
|
|
4192
|
+
loading: "",
|
|
4193
|
+
"loading-tip": "加载页面入口",
|
|
4194
|
+
description: ""
|
|
4195
|
+
})]));
|
|
4196
|
+
}
|
|
4197
|
+
}), [["__scopeId", "data-v-cb154087"]]), Yr = {
|
|
4198
|
+
key: 1,
|
|
4199
|
+
class: "dynamic-module-workspace-detail__form"
|
|
4200
|
+
}, Xr = /*#__PURE__*/ o(/* @__PURE__ */ M({
|
|
4201
|
+
name: "DynamicModuleWorkspaceDetailView",
|
|
4202
|
+
__name: "DynamicModuleWorkspaceDetailView",
|
|
4203
|
+
props: { recordId: {} },
|
|
4204
|
+
emits: ["close-workspace"],
|
|
4205
|
+
setup(e, { emit: n }) {
|
|
4206
|
+
let a = e, o = n, s = re(), c = _r(), l = Mr(), { record: d, draft: f, mode: p, formSessionKey: ee, loading: ne, loadFailed: m, saving: h, togglingEnabled: oe } = l, se = B(u(void 0)), le = B(), g = 0, _ = w(() => {
|
|
4207
|
+
let e = d.value;
|
|
4208
|
+
return String(e?.title ?? e?.code ?? a.recordId);
|
|
4209
|
+
}), ue = w(() => ur(s.moduleAlias)), de = w(() => ue.value?.detail?.sections ?? []), v = w(() => ue.value?.detail?.actions ?? []), y = w(() => {
|
|
4210
|
+
let e = {};
|
|
4211
|
+
for (let t of se.value.values()) t.reference && (e[t.fieldRef.fieldName] = {
|
|
4212
|
+
context: te({
|
|
4213
|
+
http: s.http,
|
|
4214
|
+
moduleAlias: t.reference.targetModuleAlias
|
|
4215
|
+
}),
|
|
4216
|
+
mode: "tree",
|
|
4217
|
+
allowClear: !t.required?.constant
|
|
4218
|
+
});
|
|
4219
|
+
return e;
|
|
4220
|
+
}), me = w(() => {
|
|
4221
|
+
let e = d.value;
|
|
4222
|
+
if (!e?.id || p.value !== "view" || ne.value || m.value || oe.value) return !1;
|
|
4223
|
+
let t = e.enabled === !1 ? "enable" : "disable", n = s.recordActionsSnapshot(String(e.id))?.actions.find((e) => e.actionCode === t);
|
|
4224
|
+
return n ? n.available : s.can(t) === !0;
|
|
4225
|
+
}), he = w(() => {
|
|
4226
|
+
let e = d.value;
|
|
4227
|
+
if (!e?.id || me.value) return;
|
|
4228
|
+
let t = e.enabled === !1 ? "enable" : "disable";
|
|
4229
|
+
return s.recordActionsSnapshot(String(e.id))?.actions.find((e) => e.actionCode === t)?.reason;
|
|
4230
|
+
});
|
|
4231
|
+
je(() => a.recordId, () => void ge(), { immediate: !0 });
|
|
4232
|
+
async function ge() {
|
|
4233
|
+
let e = ++g;
|
|
4234
|
+
l.beginLoad({ id: a.recordId }, "view");
|
|
4235
|
+
try {
|
|
4236
|
+
let t = await s.runtime.ready, n = await s.crud.view(a.recordId);
|
|
4237
|
+
if (e !== g) return;
|
|
4238
|
+
se.value = u(t.uiDescriptor), l.resolveLoad(n);
|
|
4239
|
+
} catch (t) {
|
|
4240
|
+
if (e !== g) return;
|
|
4241
|
+
l.failLoad(), b(t, {
|
|
4242
|
+
source: "module-workspace-detail",
|
|
4243
|
+
phase: "load"
|
|
4244
|
+
});
|
|
4245
|
+
} finally {
|
|
4246
|
+
e === g && l.finishLoad();
|
|
4247
|
+
}
|
|
4248
|
+
}
|
|
4249
|
+
function _e() {
|
|
4250
|
+
s.can("update") === !0 && l.beginEdit();
|
|
4251
|
+
}
|
|
4252
|
+
function x() {
|
|
4253
|
+
h.value || l.cancelEdit();
|
|
4254
|
+
}
|
|
4255
|
+
function ye(e, t) {
|
|
4256
|
+
f.value &&= {
|
|
4257
|
+
...f.value,
|
|
4258
|
+
[e]: t
|
|
4259
|
+
};
|
|
4260
|
+
}
|
|
4261
|
+
async function be() {
|
|
4262
|
+
let e = d.value, t = f.value, n = e?.id == null ? void 0 : String(e.id);
|
|
4263
|
+
if (!(!e || !t || !n || h.value || s.can("update") !== !0)) {
|
|
4264
|
+
h.value = !0;
|
|
4265
|
+
try {
|
|
4266
|
+
let e = await s.crud.update(n, t);
|
|
4267
|
+
l.applySaved(e.record), br(s.moduleAlias), await ie(e, {
|
|
4268
|
+
source: "module-workspace-detail",
|
|
4269
|
+
phase: "action",
|
|
4270
|
+
fallbackMessage: "保存成功"
|
|
4271
|
+
});
|
|
4272
|
+
} catch (e) {
|
|
4273
|
+
b(e, {
|
|
4274
|
+
source: "module-workspace-detail",
|
|
4275
|
+
phase: "action"
|
|
4276
|
+
});
|
|
4277
|
+
} finally {
|
|
4278
|
+
h.value = !1;
|
|
4279
|
+
}
|
|
4280
|
+
}
|
|
4281
|
+
}
|
|
4282
|
+
async function xe() {
|
|
4283
|
+
let e = d.value, t = e?.id == null ? void 0 : String(e.id), n = typeof e?.version == "number" ? e.version : void 0;
|
|
4284
|
+
if (!(!e || !t || n === void 0 || h.value)) try {
|
|
4285
|
+
if (!await ce({
|
|
4286
|
+
title: "删除记录",
|
|
4287
|
+
content: `确认删除「${_.value}」?`,
|
|
4288
|
+
okText: "删除",
|
|
4289
|
+
danger: !0
|
|
4290
|
+
})) return;
|
|
4291
|
+
h.value = !0;
|
|
4292
|
+
let e = await s.crud.delete(t, { version: n });
|
|
4293
|
+
l.clearDeleted(), br(s.moduleAlias), await ie(e, {
|
|
4294
|
+
source: "module-workspace-detail",
|
|
4295
|
+
phase: "action",
|
|
4296
|
+
fallbackMessage: "删除成功"
|
|
4297
|
+
}), o("close-workspace");
|
|
4298
|
+
} catch (e) {
|
|
4299
|
+
b(e, {
|
|
4300
|
+
source: "module-workspace-detail",
|
|
4301
|
+
phase: "action"
|
|
4302
|
+
});
|
|
4303
|
+
} finally {
|
|
4304
|
+
h.value = !1;
|
|
4305
|
+
}
|
|
4306
|
+
}
|
|
4307
|
+
function O(e) {
|
|
4308
|
+
let t = d.value, n = v.value.find((t) => t.key === e.key);
|
|
4309
|
+
!t || !n || Se(n, {
|
|
4310
|
+
...k(t),
|
|
4311
|
+
record: t
|
|
4312
|
+
});
|
|
4313
|
+
}
|
|
4314
|
+
async function Se(e, t) {
|
|
4315
|
+
try {
|
|
4316
|
+
await e.run(t);
|
|
4317
|
+
} catch (t) {
|
|
4318
|
+
b(t, {
|
|
4319
|
+
source: `module-workspace-detail:${e.key}`,
|
|
4320
|
+
phase: "action"
|
|
4321
|
+
});
|
|
4322
|
+
}
|
|
4323
|
+
}
|
|
4324
|
+
function k(e) {
|
|
4325
|
+
return {
|
|
4326
|
+
module: s,
|
|
4327
|
+
refreshList: () => br(s.moduleAlias),
|
|
4328
|
+
reload: ge,
|
|
4329
|
+
openDrawer: (t) => {
|
|
4330
|
+
le.value = {
|
|
4331
|
+
definition: t,
|
|
4332
|
+
context: {
|
|
4333
|
+
module: s,
|
|
4334
|
+
record: e,
|
|
4335
|
+
refreshList: () => br(s.moduleAlias),
|
|
4336
|
+
reload: ge,
|
|
4337
|
+
close: () => {
|
|
4338
|
+
le.value = void 0;
|
|
4339
|
+
}
|
|
4340
|
+
}
|
|
4341
|
+
};
|
|
4342
|
+
},
|
|
4343
|
+
openWorkspaceTab: (e, t) => {
|
|
4344
|
+
if (!c) throw Error("模块页面工作视图需要 Workbench 导航承载");
|
|
4345
|
+
c.openWorkspaceTab(e, t);
|
|
4346
|
+
}
|
|
4347
|
+
};
|
|
4348
|
+
}
|
|
4349
|
+
async function A() {
|
|
4350
|
+
let e = d.value, t = e?.id == null ? void 0 : String(e.id), n = typeof e?.version == "number" ? e.version : void 0;
|
|
4351
|
+
if (!(!e || !t || n === void 0 || !me.value)) {
|
|
4352
|
+
oe.value = !0;
|
|
4353
|
+
try {
|
|
4354
|
+
let r = e.enabled === !1, i = r ? await s.crud.enable(t, { version: n }) : await s.crud.disable(t, { version: n });
|
|
4355
|
+
await ge(), br(s.moduleAlias), await ie(i, {
|
|
4356
|
+
source: "module-workspace-detail",
|
|
4357
|
+
phase: "action",
|
|
4358
|
+
fallbackMessage: r ? "已启用" : "已停用"
|
|
4359
|
+
});
|
|
4360
|
+
} catch (e) {
|
|
4361
|
+
b(e, {
|
|
4362
|
+
source: "module-workspace-detail",
|
|
4363
|
+
phase: "action"
|
|
4364
|
+
});
|
|
4365
|
+
} finally {
|
|
4366
|
+
oe.value = !1;
|
|
4367
|
+
}
|
|
4368
|
+
}
|
|
4369
|
+
}
|
|
4370
|
+
return (e, n) => (R(), D(C, null, [j(G(pe), {
|
|
4371
|
+
class: "dynamic-module-workspace-detail",
|
|
4372
|
+
title: _.value
|
|
4373
|
+
}, {
|
|
4374
|
+
actions: K(() => [j(Er, {
|
|
4375
|
+
context: G(s),
|
|
4376
|
+
record: G(d),
|
|
4377
|
+
mode: G(p),
|
|
4378
|
+
saving: G(h),
|
|
4379
|
+
"detail-loading": G(ne),
|
|
4380
|
+
"detail-load-failed": G(m),
|
|
4381
|
+
actions: v.value,
|
|
4382
|
+
onCancel: x,
|
|
4383
|
+
onSave: be,
|
|
4384
|
+
onEdit: _e,
|
|
4385
|
+
onDelete: xe,
|
|
4386
|
+
onDetailAction: O
|
|
4387
|
+
}, null, 8, [
|
|
4388
|
+
"context",
|
|
4389
|
+
"record",
|
|
4390
|
+
"mode",
|
|
4391
|
+
"saving",
|
|
4392
|
+
"detail-loading",
|
|
4393
|
+
"detail-load-failed",
|
|
4394
|
+
"actions"
|
|
4395
|
+
])]),
|
|
4396
|
+
status: K(() => [G(p) === "view" && G(d) ? (R(), T(G(r), {
|
|
4397
|
+
key: 0,
|
|
4398
|
+
enabled: G(d).enabled !== !1,
|
|
4399
|
+
disabled: !me.value,
|
|
4400
|
+
"disabled-reason": he.value,
|
|
4401
|
+
loading: G(oe),
|
|
4402
|
+
"show-label": !1,
|
|
4403
|
+
onChange: A
|
|
4404
|
+
}, null, 8, [
|
|
4405
|
+
"enabled",
|
|
4406
|
+
"disabled",
|
|
4407
|
+
"disabled-reason",
|
|
4408
|
+
"loading"
|
|
4409
|
+
])) : E("v-if", !0)]),
|
|
4410
|
+
default: K(() => [G(ne) ? (R(), T(G(i), {
|
|
4411
|
+
key: 0,
|
|
4412
|
+
loading: "",
|
|
4413
|
+
"loading-tip": "加载记录详情",
|
|
4414
|
+
description: ""
|
|
4415
|
+
})) : G(m) ? (R(), T(G(i), {
|
|
4416
|
+
key: 1,
|
|
4417
|
+
description: "记录已不存在,或你已无权查看。"
|
|
4418
|
+
})) : G(d) ? G(f) ? (R(), D(C, { key: 3 }, [
|
|
4419
|
+
G(p) === "view" ? (R(), T(G(fe), {
|
|
4420
|
+
key: 0,
|
|
4421
|
+
record: G(f),
|
|
4422
|
+
fields: se.value,
|
|
4423
|
+
"exclude-field-names": ["enabled"]
|
|
4424
|
+
}, null, 8, ["record", "fields"])) : (R(), D("div", Yr, [j(G(S), {
|
|
4425
|
+
record: G(f),
|
|
4426
|
+
fields: se.value,
|
|
4427
|
+
"form-session-key": G(ee),
|
|
4428
|
+
"option-context": G(s),
|
|
4429
|
+
"picker-configs": y.value,
|
|
4430
|
+
disabled: G(h),
|
|
4431
|
+
"exclude-field-names": ["enabled"],
|
|
4432
|
+
"onUpdate:field": ye
|
|
4433
|
+
}, null, 8, [
|
|
4434
|
+
"record",
|
|
4435
|
+
"fields",
|
|
4436
|
+
"form-session-key",
|
|
4437
|
+
"option-context",
|
|
4438
|
+
"picker-configs",
|
|
4439
|
+
"disabled"
|
|
4440
|
+
])])),
|
|
4441
|
+
G(p) === "view" ? (R(!0), D(C, { key: 2 }, V(de.value, (e) => (R(), T(G(t), {
|
|
4442
|
+
key: e.key,
|
|
4443
|
+
title: e.title
|
|
4444
|
+
}, {
|
|
4445
|
+
default: K(() => [(R(), T(U(e.component), { context: {
|
|
4446
|
+
module: G(s),
|
|
4447
|
+
record: G(d),
|
|
4448
|
+
refreshList: () => G(br)(G(s).moduleAlias),
|
|
4449
|
+
reload: ge
|
|
4450
|
+
} }, null, 8, ["context"]))]),
|
|
4451
|
+
_: 2
|
|
4452
|
+
}, 1032, ["title"]))), 128)) : E("v-if", !0),
|
|
4453
|
+
j(G(ve), {
|
|
4454
|
+
record: G(f),
|
|
4455
|
+
"show-sort-order": ""
|
|
4456
|
+
}, null, 8, ["record"])
|
|
4457
|
+
], 64)) : E("v-if", !0) : (R(), T(G(i), {
|
|
4458
|
+
key: 2,
|
|
4459
|
+
description: "记录已删除。"
|
|
4460
|
+
}))]),
|
|
4461
|
+
_: 1
|
|
4462
|
+
}, 8, ["title"]), le.value ? (R(), T(G(ae), {
|
|
4463
|
+
key: 0,
|
|
4464
|
+
open: !0,
|
|
4465
|
+
title: le.value.definition.title,
|
|
4466
|
+
width: le.value.definition.width,
|
|
4467
|
+
mode: "view",
|
|
4468
|
+
onClose: n[0] ||= (e) => le.value = void 0
|
|
4469
|
+
}, {
|
|
4470
|
+
default: K(() => [(R(), T(U(le.value.definition.component), { context: le.value.context }, null, 8, ["context"]))]),
|
|
4471
|
+
_: 1
|
|
4472
|
+
}, 8, ["title", "width"])) : E("v-if", !0)], 64));
|
|
4473
|
+
}
|
|
4474
|
+
}), [["__scopeId", "data-v-e0c5dff9"]]), Zr = Symbol("workbench-navigation");
|
|
4475
|
+
function Qr(e) {
|
|
4476
|
+
z(Zr, e);
|
|
4477
|
+
}
|
|
4478
|
+
function $r() {
|
|
4479
|
+
return F(Zr);
|
|
4480
|
+
}
|
|
4481
|
+
//#endregion
|
|
4482
|
+
//#region src/platform-workbench/workspaceViewHost.ts
|
|
4483
|
+
var ei = Symbol("workspace-view-host");
|
|
4484
|
+
function ti(e) {
|
|
4485
|
+
z(ei, e);
|
|
4486
|
+
}
|
|
4487
|
+
function ni() {
|
|
4488
|
+
return F(ei, void 0);
|
|
4489
|
+
}
|
|
4490
|
+
//#endregion
|
|
4491
|
+
//#region src/platform-workbench/workspaceViewContract.ts
|
|
4492
|
+
function ri(e) {
|
|
4493
|
+
return e;
|
|
4494
|
+
}
|
|
4495
|
+
//#endregion
|
|
4496
|
+
//#region src/platform-workbench/workspaceViews.ts
|
|
4497
|
+
var ii = /* @__PURE__ */ new Map(), ai = si([]);
|
|
4498
|
+
function oi(e, t) {
|
|
4499
|
+
ii.set(e, t), ai = si([...ii.values()].flat());
|
|
4500
|
+
}
|
|
4501
|
+
function si(e) {
|
|
4502
|
+
let t = /* @__PURE__ */ new Map();
|
|
4503
|
+
for (let n of e) {
|
|
4504
|
+
if (t.has(n.type)) throw Error(`重复的工作视图类型:${n.type}`);
|
|
4505
|
+
t.set(n.type, n);
|
|
4506
|
+
}
|
|
4507
|
+
return {
|
|
4508
|
+
definitions: [...t.values()],
|
|
4509
|
+
resolve(e) {
|
|
4510
|
+
let n = e.target.query ?? {}, r = String(n.workspaceView ?? ""), i = n.workspacePresentation;
|
|
4511
|
+
if (i !== "drawer" && i !== "tab") return;
|
|
4512
|
+
let a = t.get(r), o = a?.parse(n);
|
|
4513
|
+
return a && o && a.presentations.includes(i) ? {
|
|
4514
|
+
view: a,
|
|
4515
|
+
input: o,
|
|
4516
|
+
presentation: i
|
|
4517
|
+
} : void 0;
|
|
4518
|
+
}
|
|
4519
|
+
};
|
|
4520
|
+
}
|
|
4521
|
+
function ci(e, t, n = "tab", r = e.titleOf(t)) {
|
|
4522
|
+
if (!e.presentations.includes(n)) throw Error(`工作视图 ${e.type} 不支持 ${n} 承载`);
|
|
4523
|
+
let i = {
|
|
4524
|
+
workspaceView: e.type,
|
|
4525
|
+
workspacePresentation: n,
|
|
4526
|
+
...t
|
|
4527
|
+
};
|
|
4528
|
+
return {
|
|
4529
|
+
pageType: "business-route",
|
|
4530
|
+
openMode: "workbench-route",
|
|
4531
|
+
hostType: "business-route-host",
|
|
4532
|
+
title: r,
|
|
4533
|
+
layout: e.layout,
|
|
4534
|
+
target: {
|
|
4535
|
+
route: e.route,
|
|
4536
|
+
moduleAlias: e.moduleAlias,
|
|
4537
|
+
query: i
|
|
4538
|
+
},
|
|
4539
|
+
params: i,
|
|
4540
|
+
tabPolicy: { identity: "by-params" }
|
|
4541
|
+
};
|
|
4542
|
+
}
|
|
4543
|
+
function li(e, t) {
|
|
4544
|
+
let n = t.parse(e.target.query ?? {}), r = new Set([
|
|
4545
|
+
"workspaceView",
|
|
4546
|
+
"workspacePresentation",
|
|
4547
|
+
...Object.keys(n ?? {})
|
|
4548
|
+
]), i = n ? t.parentRouteQueryOf?.(n) ?? {} : {}, a = (e) => Object.fromEntries(Object.entries(e).filter(([e]) => !r.has(e))), o = {
|
|
4549
|
+
...a(e.target.query ?? {}),
|
|
4550
|
+
...i
|
|
4551
|
+
};
|
|
4552
|
+
return {
|
|
4553
|
+
...e,
|
|
4554
|
+
title: t.routeTitle ?? e.title,
|
|
4555
|
+
target: {
|
|
4556
|
+
...e.target,
|
|
4557
|
+
query: o
|
|
4558
|
+
},
|
|
4559
|
+
params: {
|
|
4560
|
+
...a(e.params ?? {}),
|
|
4561
|
+
...i
|
|
4562
|
+
},
|
|
4563
|
+
tabPolicy: { identity: "by-params" }
|
|
4564
|
+
};
|
|
4565
|
+
}
|
|
4566
|
+
function ui(e) {
|
|
4567
|
+
return ai.resolve(e);
|
|
4568
|
+
}
|
|
4569
|
+
//#endregion
|
|
4570
|
+
//#region src/platform-workbench/WorkspaceViewOutlet.vue
|
|
4571
|
+
var di = /* @__PURE__ */ M({
|
|
4572
|
+
__name: "WorkspaceViewOutlet",
|
|
4573
|
+
props: { descriptor: {} },
|
|
4574
|
+
setup(e) {
|
|
4575
|
+
let t = e, n = w(() => ui(t.descriptor)), r = w(() => ft(t.descriptor)), i = $r();
|
|
4576
|
+
return ti({
|
|
4577
|
+
get presentation() {
|
|
4578
|
+
return n.value?.presentation ?? "tab";
|
|
4579
|
+
},
|
|
4580
|
+
setTitle(e) {
|
|
4581
|
+
let n = e.trim();
|
|
4582
|
+
!n || !i || t.descriptor.title === n || i.replacePage(r.value, {
|
|
4583
|
+
...t.descriptor,
|
|
4584
|
+
title: n
|
|
4585
|
+
});
|
|
4586
|
+
},
|
|
4587
|
+
dismiss() {
|
|
4588
|
+
let e = n.value;
|
|
4589
|
+
e && i && i.replacePage(r.value, li(t.descriptor, e.view));
|
|
4590
|
+
},
|
|
4591
|
+
close() {
|
|
4592
|
+
i?.closePage(r.value);
|
|
4593
|
+
}
|
|
4594
|
+
}), (t, a) => n.value ? (R(), T(U(n.value.view.component), I({ key: 0 }, n.value.input, {
|
|
4595
|
+
title: e.descriptor.title ?? n.value.view.titleOf(n.value.input),
|
|
4596
|
+
onCloseWorkspace: a[0] ||= (e) => G(i)?.closePage(r.value)
|
|
4597
|
+
}), null, 16, ["title"])) : (R(), T(G(oe), {
|
|
4598
|
+
key: 1,
|
|
4599
|
+
description: "无法恢复该工作视图"
|
|
4600
|
+
}));
|
|
4601
|
+
}
|
|
4602
|
+
}), fi = {
|
|
4603
|
+
key: 1,
|
|
4604
|
+
class: "page-host"
|
|
4605
|
+
}, pi = /*#__PURE__*/ o(/* @__PURE__ */ M({
|
|
4606
|
+
name: "BusinessRouteHost",
|
|
4607
|
+
__name: "BusinessRouteHost",
|
|
4608
|
+
props: { descriptor: {} },
|
|
4609
|
+
setup(e) {
|
|
4610
|
+
let t = e, n = w(() => t.descriptor.title ?? t.descriptor.target.route ?? t.descriptor.target.routeName ?? t.descriptor.target.pageKey), r = w(() => ui(t.descriptor));
|
|
4611
|
+
return (t, i) => r.value ? (R(), T(G(c), {
|
|
4612
|
+
key: 0,
|
|
4613
|
+
"module-alias": r.value.view.moduleAlias
|
|
4614
|
+
}, {
|
|
4615
|
+
default: K(() => [j(di, { descriptor: e.descriptor }, null, 8, ["descriptor"])]),
|
|
4616
|
+
_: 1
|
|
4617
|
+
}, 8, ["module-alias"])) : (R(), D("section", fi, [O("header", null, [i[0] ||= O("span", { class: "host-badge" }, "业务页面", -1), O("h2", null, W(n.value), 1)]), O("p", null, W(e.descriptor.target.route ?? e.descriptor.target.routeName ?? e.descriptor.target.pageKey), 1)]));
|
|
4618
|
+
}
|
|
4619
|
+
}), [["__scopeId", "data-v-663290d5"]]), mi = ["src", "title"], hi = {
|
|
4620
|
+
key: 1,
|
|
4621
|
+
class: "page-host"
|
|
4622
|
+
}, gi = { class: "host-badge" }, _i = ["href"], vi = /*#__PURE__*/ o(/* @__PURE__ */ M({
|
|
4623
|
+
name: "ExternalPageHost",
|
|
4624
|
+
__name: "ExternalPageHost",
|
|
4625
|
+
props: { descriptor: {} },
|
|
4626
|
+
setup(e) {
|
|
4627
|
+
let t = e, n = w(() => t.descriptor.title ?? t.descriptor.target.url);
|
|
4628
|
+
return (t, r) => e.descriptor.openMode === "iframe" ? (R(), D("iframe", {
|
|
4629
|
+
key: 0,
|
|
4630
|
+
class: "external-frame",
|
|
4631
|
+
src: e.descriptor.target.url,
|
|
4632
|
+
title: n.value
|
|
4633
|
+
}, null, 8, mi)) : (R(), D("section", hi, [
|
|
4634
|
+
O("span", gi, W(e.descriptor.openMode), 1),
|
|
4635
|
+
O("h2", null, W(n.value), 1),
|
|
4636
|
+
O("a", {
|
|
4637
|
+
class: "external-link",
|
|
4638
|
+
href: e.descriptor.target.url,
|
|
4639
|
+
target: "_blank",
|
|
4640
|
+
rel: "noopener noreferrer"
|
|
4641
|
+
}, " 打开页面 ", 8, _i)
|
|
4642
|
+
]));
|
|
4643
|
+
}
|
|
4644
|
+
}), [["__scopeId", "data-v-c45ef7f8"]]), yi = typeof document < "u", bi = Object.assign, xi = Array.isArray;
|
|
4645
|
+
Symbol(process.env.NODE_ENV === "production" ? "" : "navigation failure");
|
|
4646
|
+
var Si = Symbol(process.env.NODE_ENV === "production" ? "" : "router view location matched"), Ci = Symbol(process.env.NODE_ENV === "production" ? "" : "router view depth");
|
|
4647
|
+
Symbol(process.env.NODE_ENV === "production" ? "" : "router"), Symbol(process.env.NODE_ENV === "production" ? "" : "route location");
|
|
4648
|
+
var wi = Symbol(process.env.NODE_ENV === "production" ? "" : "router view location");
|
|
4649
|
+
//#endregion
|
|
4650
|
+
//#region node_modules/vue-router/dist/devtools-DCoWQoU_.js
|
|
4651
|
+
function Ti(e) {
|
|
4652
|
+
let t = Array.from(arguments).slice(1);
|
|
4653
|
+
console.warn.apply(console, ["[Vue Router warn]: " + e].concat(t));
|
|
4654
|
+
}
|
|
4655
|
+
function Ei(e, t) {
|
|
4656
|
+
return (e.aliasOf || e) === (t.aliasOf || t);
|
|
4657
|
+
}
|
|
4658
|
+
//#endregion
|
|
4659
|
+
//#region node_modules/vue-router/dist/vue-router.js
|
|
4660
|
+
var Di = /* @__PURE__ */ M({
|
|
4661
|
+
name: "RouterView",
|
|
4662
|
+
inheritAttrs: !1,
|
|
4663
|
+
props: {
|
|
4664
|
+
name: {
|
|
4665
|
+
type: String,
|
|
4666
|
+
default: "default"
|
|
4667
|
+
},
|
|
4668
|
+
route: Object
|
|
4669
|
+
},
|
|
4670
|
+
compatConfig: { MODE: 3 },
|
|
4671
|
+
setup(e, { attrs: t, slots: n }) {
|
|
4672
|
+
process.env.NODE_ENV !== "production" && Ai();
|
|
4673
|
+
let r = F(wi), i = w(() => e.route || r.value), a = F(Ci, 0), o = w(() => {
|
|
4674
|
+
let e = G(a), { matched: t } = i.value, n;
|
|
4675
|
+
for (; (n = t[e]) && !n.components;) e++;
|
|
4676
|
+
return e;
|
|
4677
|
+
}), s = w(() => i.value.matched[o.value]);
|
|
4678
|
+
z(Ci, w(() => o.value + 1)), z(Si, s), z(wi, i);
|
|
4679
|
+
let c = B();
|
|
4680
|
+
return je(() => [
|
|
4681
|
+
c.value,
|
|
4682
|
+
s.value,
|
|
4683
|
+
e.name
|
|
4684
|
+
], ([e, t, n], [r, i, a]) => {
|
|
4685
|
+
t && (t.instances[n] = e, i && i !== t && e && e === r && (t.leaveGuards.size || (t.leaveGuards = i.leaveGuards), t.updateGuards.size || (t.updateGuards = i.updateGuards))), e && t && (!i || !Ei(t, i) || !r) && (t.enterCallbacks[n] || []).forEach((t) => t(e));
|
|
4686
|
+
}, { flush: "post" }), () => {
|
|
4687
|
+
let r = i.value, a = e.name, l = s.value, u = l && l.components[a];
|
|
4688
|
+
if (!u) return Oi(n.default, {
|
|
4689
|
+
Component: u,
|
|
4690
|
+
route: r
|
|
4691
|
+
});
|
|
4692
|
+
let d = l.props[a], f = P(u, bi({}, d ? d === !0 ? r.params : typeof d == "function" ? d(r) : d : null, t, {
|
|
4693
|
+
onVnodeUnmounted: (e) => {
|
|
4694
|
+
e.component.isUnmounted && (l.instances[a] = null);
|
|
4695
|
+
},
|
|
4696
|
+
ref: c
|
|
4697
|
+
}));
|
|
4698
|
+
if (process.env.NODE_ENV !== "production" && yi && f.ref) {
|
|
4699
|
+
let e = {
|
|
4700
|
+
depth: o.value,
|
|
4701
|
+
name: l.name,
|
|
4702
|
+
path: l.path,
|
|
4703
|
+
meta: l.meta
|
|
4704
|
+
};
|
|
4705
|
+
(xi(f.ref) ? f.ref.map((e) => e.i) : [f.ref.i]).forEach((t) => {
|
|
4706
|
+
t.__vrv_devtools = e;
|
|
4707
|
+
});
|
|
4708
|
+
}
|
|
4709
|
+
return Oi(n.default, {
|
|
4710
|
+
Component: f,
|
|
4711
|
+
route: r
|
|
4712
|
+
}) || f;
|
|
4713
|
+
};
|
|
4714
|
+
}
|
|
4715
|
+
});
|
|
4716
|
+
function Oi(e, t) {
|
|
4717
|
+
if (!e) return null;
|
|
4718
|
+
let n = e(t);
|
|
4719
|
+
return n.length === 1 ? n[0] : n;
|
|
4720
|
+
}
|
|
4721
|
+
var ki = Di;
|
|
4722
|
+
function Ai() {
|
|
4723
|
+
let e = N(), t = e.parent && e.parent.type.name, n = e.parent && e.parent.subTree && e.parent.subTree.type;
|
|
4724
|
+
if (t && (t === "KeepAlive" || t.includes("Transition")) && typeof n == "object" && n.name === "RouterView") {
|
|
4725
|
+
let e = t === "KeepAlive" ? "keep-alive" : "transition";
|
|
4726
|
+
Ti(`<router-view> can no longer be used directly inside <${e}>.\nUse slot props instead:\n\n<router-view v-slot="{ Component }">\n <${e}>\n <component :is="Component" />\n </${e}>\n</router-view>`);
|
|
4727
|
+
}
|
|
4728
|
+
}
|
|
4729
|
+
//#endregion
|
|
4730
|
+
//#region src/platform-workbench/hosts/PlatformRouteHost.vue?vue&type=script&setup=true&lang.ts
|
|
4731
|
+
var ji = {
|
|
4732
|
+
key: 1,
|
|
4733
|
+
class: "page-host"
|
|
4734
|
+
}, Mi = /*#__PURE__*/ o(/* @__PURE__ */ M({
|
|
4735
|
+
name: "PlatformRouteHost",
|
|
4736
|
+
__name: "PlatformRouteHost",
|
|
4737
|
+
props: { descriptor: {} },
|
|
4738
|
+
setup(e) {
|
|
4739
|
+
let t = e, n = w(() => t.descriptor.title ?? t.descriptor.target.route ?? t.descriptor.target.routeName ?? t.descriptor.target.pageKey);
|
|
4740
|
+
return (e, r) => t.descriptor.target.route === "/" ? (R(), T(G(ki), { key: 0 })) : (R(), D("section", ji, [O("header", null, [r[0] ||= O("span", { class: "host-badge" }, "平台页面", -1), O("h2", null, W(n.value), 1)]), O("p", null, W(t.descriptor.target.route ?? t.descriptor.target.routeName ?? t.descriptor.target.pageKey), 1)]));
|
|
4741
|
+
}
|
|
4742
|
+
}), [["__scopeId", "data-v-5d6a0366"]]);
|
|
4743
|
+
//#endregion
|
|
4744
|
+
//#region src/platform-workbench/pageHostRegistry.ts
|
|
4745
|
+
function Ni(e) {
|
|
4746
|
+
switch (e) {
|
|
4747
|
+
case "platform-route-host": return "PlatformRouteHost";
|
|
4748
|
+
case "business-route-host": return "BusinessRouteHost";
|
|
4749
|
+
case "dynamic-module-host": return "DynamicModuleHost";
|
|
4750
|
+
case "external-page-host": return "ExternalPageHost";
|
|
4751
|
+
default: return Pi(e);
|
|
4752
|
+
}
|
|
4753
|
+
}
|
|
4754
|
+
function Pi(e) {
|
|
4755
|
+
throw Error(`Unsupported page host type: ${e}`);
|
|
4756
|
+
}
|
|
4757
|
+
//#endregion
|
|
4758
|
+
//#region src/platform-workbench/modulePageWorkspaceViews.ts
|
|
4759
|
+
function Fi() {
|
|
4760
|
+
oi("module-page-enhancements", dr().map(Ii));
|
|
4761
|
+
}
|
|
4762
|
+
function Ii(e) {
|
|
4763
|
+
return {
|
|
4764
|
+
...e,
|
|
4765
|
+
route: e.route ?? `/_workspace/${encodeURIComponent(e.type)}`,
|
|
4766
|
+
presentations: ["tab"]
|
|
4767
|
+
};
|
|
4768
|
+
}
|
|
4769
|
+
//#endregion
|
|
4770
|
+
//#region src/platform-workbench/WorkbenchOutlet.vue
|
|
4771
|
+
var Li = /* @__PURE__ */ M({
|
|
4772
|
+
name: "WorkbenchOutlet",
|
|
4773
|
+
__name: "WorkbenchOutlet",
|
|
4774
|
+
props: { descriptor: {} },
|
|
4775
|
+
setup(e) {
|
|
4776
|
+
let t = e, n = $r();
|
|
4777
|
+
Fi(), gr(n && {
|
|
4778
|
+
openPage: n.openPage,
|
|
4779
|
+
openWorkspaceTab(e, t, i) {
|
|
4780
|
+
n.openPage(ci(r(e), t, "tab", i));
|
|
4781
|
+
}
|
|
4782
|
+
});
|
|
4783
|
+
function r(e) {
|
|
4784
|
+
return {
|
|
4785
|
+
...e,
|
|
4786
|
+
route: e.route ?? `/_workspace/${encodeURIComponent(e.type)}`,
|
|
4787
|
+
presentations: ["tab"]
|
|
4788
|
+
};
|
|
4789
|
+
}
|
|
4790
|
+
let i = w(() => t.descriptor ? Ni(t.descriptor.hostType) : void 0), a = w(() => i.value === "PlatformRouteHost" ? t.descriptor : void 0), o = w(() => i.value === "BusinessRouteHost" ? t.descriptor : void 0), s = w(() => i.value === "DynamicModuleHost" ? t.descriptor : void 0), c = w(() => i.value === "ExternalPageHost" ? t.descriptor : void 0);
|
|
4791
|
+
return (e, t) => a.value ? (R(), T(Mi, {
|
|
4792
|
+
key: 0,
|
|
4793
|
+
descriptor: a.value
|
|
4794
|
+
}, null, 8, ["descriptor"])) : o.value ? (R(), T(pi, {
|
|
4795
|
+
key: 1,
|
|
4796
|
+
descriptor: o.value
|
|
4797
|
+
}, null, 8, ["descriptor"])) : s.value ? (R(), T(G(Jr), {
|
|
4798
|
+
key: 2,
|
|
4799
|
+
descriptor: s.value
|
|
4800
|
+
}, null, 8, ["descriptor"])) : c.value ? (R(), T(vi, {
|
|
4801
|
+
key: 3,
|
|
4802
|
+
descriptor: c.value
|
|
4803
|
+
}, null, 8, ["descriptor"])) : (R(), T(G(oe), {
|
|
4804
|
+
key: 4,
|
|
4805
|
+
description: "暂无页面"
|
|
4806
|
+
}));
|
|
4807
|
+
}
|
|
4808
|
+
}), Ri = ri({
|
|
4809
|
+
type: "iam.user.detail",
|
|
4810
|
+
route: "/iam/users",
|
|
4811
|
+
moduleAlias: "iam.user",
|
|
4812
|
+
component: Ce(() => import("./UserDetailWorkspaceView-BCST01d2.js")),
|
|
4813
|
+
layout: "workspace",
|
|
4814
|
+
routeTitle: "用户管理",
|
|
4815
|
+
presentations: ["drawer", "tab"],
|
|
4816
|
+
titleOf: () => "用户详情",
|
|
4817
|
+
parse(e) {
|
|
4818
|
+
let t = e.recordId;
|
|
4819
|
+
if (!(typeof t != "string" || !t)) return { recordId: t };
|
|
4820
|
+
}
|
|
4821
|
+
}), zi = ri({
|
|
4822
|
+
type: "iam.employee.detail",
|
|
4823
|
+
route: "/iam/employees",
|
|
4824
|
+
moduleAlias: "iam.employee",
|
|
4825
|
+
component: Ce(() => import("./EmployeeDetailWorkspaceView-DswEDSxH.js")),
|
|
4826
|
+
layout: "workspace",
|
|
4827
|
+
routeTitle: "职员管理",
|
|
4828
|
+
presentations: ["drawer", "tab"],
|
|
4829
|
+
titleOf: () => "职员详情",
|
|
4830
|
+
parse(e) {
|
|
4831
|
+
let t = e.recordId;
|
|
4832
|
+
if (!(typeof t != "string" || !t)) return { recordId: t };
|
|
4833
|
+
}
|
|
4834
|
+
}), Bi = new Set([
|
|
4835
|
+
"platform",
|
|
4836
|
+
"tenant",
|
|
4837
|
+
"organization"
|
|
4838
|
+
]), Vi = ri({
|
|
4839
|
+
type: "iam.role.detail",
|
|
4840
|
+
route: "/iam/roles",
|
|
4841
|
+
moduleAlias: "iam.role",
|
|
4842
|
+
component: Ce(() => import("./RoleDetailWorkspaceView-dqHxKVfd.js")),
|
|
4843
|
+
layout: "workspace",
|
|
4844
|
+
routeTitle: "角色管理",
|
|
4845
|
+
presentations: ["drawer", "tab"],
|
|
4846
|
+
titleOf: () => "角色详情",
|
|
4847
|
+
parentRouteQueryOf(e) {
|
|
4848
|
+
return e.scopeKind === "platform" ? { scopeKind: e.scopeKind } : {
|
|
4849
|
+
scopeKind: e.scopeKind,
|
|
4850
|
+
scopeId: e.scopeId
|
|
4851
|
+
};
|
|
4852
|
+
},
|
|
4853
|
+
parse(e) {
|
|
4854
|
+
let t = e.recordId, n = e.scopeKind, r = e.scopeId;
|
|
4855
|
+
if (!(typeof t != "string" || !t || typeof n != "string" || !Bi.has(n) || (n === "platform" ? r !== void 0 : typeof r != "string" || !r))) return {
|
|
4856
|
+
recordId: t,
|
|
4857
|
+
scopeKind: n,
|
|
4858
|
+
...typeof r == "string" ? { scopeId: r } : {}
|
|
4859
|
+
};
|
|
4860
|
+
}
|
|
4861
|
+
}), Hi = ri({
|
|
4862
|
+
type: "iam.system-user.detail",
|
|
4863
|
+
route: "/iam/system-users",
|
|
4864
|
+
moduleAlias: "iam.system_user",
|
|
4865
|
+
component: Ce(() => import("./SystemUserDetailWorkspaceView-CQ9WeLrR.js")),
|
|
4866
|
+
layout: "workspace",
|
|
4867
|
+
routeTitle: "系统账号管理",
|
|
4868
|
+
presentations: ["drawer", "tab"],
|
|
4869
|
+
titleOf: () => "系统账号详情",
|
|
4870
|
+
parse(e) {
|
|
4871
|
+
let t = e.recordId;
|
|
4872
|
+
return typeof t == "string" && t ? { recordId: t } : void 0;
|
|
4873
|
+
}
|
|
4874
|
+
}), Ui = ri({
|
|
4875
|
+
type: "iam.role.authorization",
|
|
4876
|
+
route: "/iam/role-authorization",
|
|
4877
|
+
moduleAlias: "iam.role",
|
|
4878
|
+
component: Ce(() => import("./RoleAuthorizationView-C0s4Bog7.js").then((e) => e.n)),
|
|
4879
|
+
layout: "workspace",
|
|
4880
|
+
routeTitle: "角色授权",
|
|
4881
|
+
drawerProfile: "wide-work",
|
|
4882
|
+
presentations: ["drawer", "tab"],
|
|
4883
|
+
titleOf: () => "角色授权",
|
|
4884
|
+
parse(e) {
|
|
4885
|
+
let t = e.roleId;
|
|
4886
|
+
return typeof t == "string" && t ? { roleId: t } : void 0;
|
|
4887
|
+
}
|
|
4888
|
+
}), Wi = ri({
|
|
4889
|
+
type: "platform.module.actions",
|
|
4890
|
+
route: "/config/modules",
|
|
4891
|
+
moduleAlias: "platform.module",
|
|
4892
|
+
component: Ce(() => import("./ModuleActionManagementView-DiVzuPdu.js")),
|
|
4893
|
+
layout: "workspace",
|
|
4894
|
+
routeTitle: "模块管理",
|
|
4895
|
+
presentations: ["tab"],
|
|
4896
|
+
titleOf: (e) => `动作:${e.moduleTitle ?? e.moduleAlias}`,
|
|
4897
|
+
parentRouteQueryOf: () => ({}),
|
|
4898
|
+
parse(e) {
|
|
4899
|
+
let t = e.moduleAlias, n = e.moduleTitle;
|
|
4900
|
+
if (!(typeof t != "string" || !t)) return {
|
|
4901
|
+
moduleAlias: t,
|
|
4902
|
+
...typeof n == "string" && n ? { moduleTitle: n } : {},
|
|
4903
|
+
...e.moduleKind === "static" || e.moduleKind === "dynamic" ? { moduleKind: e.moduleKind } : {}
|
|
4904
|
+
};
|
|
4905
|
+
}
|
|
4906
|
+
}), Gi = ri({
|
|
4907
|
+
type: "platform.module.metadata-orchestration",
|
|
4908
|
+
route: "/config/modules",
|
|
4909
|
+
moduleAlias: "platform.module",
|
|
4910
|
+
component: Ce(() => import("./MetadataOrchestrationView-DKYVGMzy.js")),
|
|
4911
|
+
layout: "workspace",
|
|
4912
|
+
routeTitle: "模块管理",
|
|
4913
|
+
presentations: ["tab"],
|
|
4914
|
+
titleOf: (e) => `元数据:${e.moduleTitle ?? e.moduleAlias}`,
|
|
4915
|
+
parentRouteQueryOf: () => ({}),
|
|
4916
|
+
parse(e) {
|
|
4917
|
+
let t = e.moduleAlias, n = e.moduleTitle;
|
|
4918
|
+
if (!(typeof t != "string" || !t)) return {
|
|
4919
|
+
moduleAlias: t,
|
|
4920
|
+
...typeof n == "string" && n ? { moduleTitle: n } : {}
|
|
4921
|
+
};
|
|
4922
|
+
}
|
|
4923
|
+
});
|
|
4924
|
+
//#endregion
|
|
4925
|
+
//#region src/platform-admin-runtime/workspaceViews.ts
|
|
4926
|
+
oi("platform-admin-runtime", [
|
|
4927
|
+
Ri,
|
|
4928
|
+
zi,
|
|
4929
|
+
Vi,
|
|
4930
|
+
Hi,
|
|
4931
|
+
Ui,
|
|
4932
|
+
Wi,
|
|
4933
|
+
Gi
|
|
4934
|
+
]);
|
|
4935
|
+
//#endregion
|
|
4936
|
+
//#region src/platform-admin-runtime/useWorkspaceViewPromotion.ts
|
|
4937
|
+
function Ki(e) {
|
|
4938
|
+
return e.hasStableIdentity && e.busy !== !0 && e.canChangeHost !== !1;
|
|
4939
|
+
}
|
|
4940
|
+
function qi(e) {
|
|
4941
|
+
let t = $r();
|
|
4942
|
+
return w(() => {
|
|
4943
|
+
let n = ke(e.input);
|
|
4944
|
+
if (!(!n || !Ki(ke(e.eligibility)) || !t)) return {
|
|
4945
|
+
title: "固定为页签",
|
|
4946
|
+
promote: async () => {
|
|
4947
|
+
if (await e.beforePromote?.(n) === !1) {
|
|
4948
|
+
e.onPromotionRejected?.();
|
|
4949
|
+
return;
|
|
4950
|
+
}
|
|
4951
|
+
let r = t.openPage(ci(e.view, n, "tab", ke(e.title)));
|
|
4952
|
+
e.onPromoted?.(r);
|
|
4953
|
+
}
|
|
4954
|
+
};
|
|
4955
|
+
});
|
|
4956
|
+
}
|
|
4957
|
+
//#endregion
|
|
4958
|
+
//#region src/platform-admin-runtime/workspaceViewSessions.ts
|
|
4959
|
+
var Ji = /* @__PURE__ */ new Map(), Yi = /* @__PURE__ */ new Map();
|
|
4960
|
+
function Xi(e, t) {
|
|
4961
|
+
return `${e.type}:${ea(t)}`;
|
|
4962
|
+
}
|
|
4963
|
+
async function Zi(e, t, n) {
|
|
4964
|
+
let r = Xi(e, t), i = Yi.get(r), a = i && [...i].at(-1);
|
|
4965
|
+
return a ? await a(ta(n)) ? "accepted" : "rejected" : (Ji.set(r, ta(n)), "accepted");
|
|
4966
|
+
}
|
|
4967
|
+
function Qi(e, t, n) {
|
|
4968
|
+
let r = Xi(e, t), i = Yi.get(r) ?? /* @__PURE__ */ new Set();
|
|
4969
|
+
return i.add(n), Yi.set(r, i), () => {
|
|
4970
|
+
i.delete(n), i.size === 0 && Yi.delete(r);
|
|
4971
|
+
};
|
|
4972
|
+
}
|
|
4973
|
+
function $i(e, t) {
|
|
4974
|
+
let n = Xi(e, t), r = Ji.get(n);
|
|
4975
|
+
return Ji.delete(n), r;
|
|
4976
|
+
}
|
|
4977
|
+
function ea(e) {
|
|
4978
|
+
return Array.isArray(e) ? `[${e.map(ea).join(",")}]` : e && typeof e == "object" ? `{${Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => `${JSON.stringify(e)}:${ea(t)}`).join(",")}}` : JSON.stringify(e);
|
|
4979
|
+
}
|
|
4980
|
+
function ta(e) {
|
|
4981
|
+
return JSON.parse(JSON.stringify(e));
|
|
4982
|
+
}
|
|
4983
|
+
//#endregion
|
|
4984
|
+
export { rr as A, Rt as B, Qr as C, lr as D, br as E, zt as F, lt as G, dt as H, Nt as I, Z as J, mt as K, Pt as L, tr as M, zn as N, sr as O, Wt as P, Lt as R, ni as S, Xr as T, st as U, ut as V, ct as W, ht as X, ft as Y, si as _, Gi as a, ri as b, Hi as c, Ri as d, Li as f, ci as g, oi as h, qi as i, ir as j, dr as k, Vi as l, di as m, Qi as n, Wi as o, Fi as p, pt as q, $i as r, Ui as s, Zi as t, zi as u, li as v, $r as w, ti as x, ui as y, It as z };
|