@ximatai/muyun-web-app 0.26.9 → 0.26.10

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.
Files changed (70) hide show
  1. package/dist/{MetadataOrchestrationView-CzhAgEdX.js → MetadataOrchestrationView-BhtVwJII.js} +182 -182
  2. package/dist/{ModuleActionManagementView-CM2d8jPO.js → ModuleActionManagementView-DpZS-xAD.js} +70 -70
  3. package/dist/RoleAuthorizationView-8lilhtMB.js +646 -0
  4. package/dist/{RoleDetailWorkspaceView-CzaQ3Dz1.js → RoleDetailWorkspaceView-CFha6JHn.js} +1 -1
  5. package/dist/{RoleManagementView-nY7qu4GF.js → RoleManagementView-0_KDrzgh.js} +511 -514
  6. package/dist/index.css +1 -1
  7. package/dist/index.js +282 -302
  8. package/dist/{platform-components-CIi6GdC9.js → platform-components-oRIsIoxu.js} +2060 -1893
  9. package/dist/types/app/StaticRoutePageHost.vue.d.ts +2 -0
  10. package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +4 -2
  11. package/dist/types/consumer/index.d.ts +1 -1
  12. package/dist/types/dynamic-page-runtime/ManagedDetailRelationInlineSurface.vue.d.ts +3 -1
  13. package/dist/types/dynamic-page-runtime/ManagedDetailRelationSurface.vue.d.ts +2 -1
  14. package/dist/types/dynamic-page-runtime/ModulePageDetailRelations.vue.d.ts +3 -1
  15. package/dist/types/dynamic-page-runtime/ModulePageListExpansionSurface.vue.d.ts +2 -1
  16. package/dist/types/dynamic-page-runtime/ModulePageListRelationExpansion.vue.d.ts +2 -1
  17. package/dist/types/dynamic-page-runtime/ModulePageListRelationExpansions.vue.d.ts +2 -1
  18. package/dist/types/dynamic-page-runtime/ModulePageRecordContent.vue.d.ts +3 -1
  19. package/dist/types/dynamic-page-runtime/PageNavigatorExplorer.vue.d.ts +7 -2
  20. package/dist/types/dynamic-page-runtime/composables/useModulePageDetailExtensionRuntime.d.ts +2 -0
  21. package/dist/types/dynamic-page-runtime/composables/useNavigatorRuntime.d.ts +69 -15
  22. package/dist/types/dynamic-page-runtime/composables/useRecordEditingSession.d.ts +3 -2
  23. package/dist/types/dynamic-page-runtime/index.d.ts +2 -1
  24. package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +35 -3
  25. package/dist/types/dynamic-page-runtime/navigatorEntrySelection.d.ts +18 -0
  26. package/dist/types/dynamic-page-runtime/pageContextRuntime.d.ts +8 -0
  27. package/dist/types/dynamic-page-runtime/pageNavigatorItemModel.d.ts +13 -0
  28. package/dist/types/dynamic-page-runtime/recordDetailController.d.ts +9 -8
  29. package/dist/types/platform-admin-runtime/platformModulePageEnhancement.d.ts +6 -0
  30. package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +4 -0
  31. package/dist/types/platform-components/ManagementPanelHeader.vue.d.ts +2 -0
  32. package/dist/types/platform-components/RecordDetailDrawer.vue.d.ts +5 -3
  33. package/dist/types/platform-components/RecordExplorerPanel.vue.d.ts +2 -0
  34. package/dist/types/platform-components/RecordFormFields.vue.d.ts +2 -2
  35. package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +2 -0
  36. package/dist/types/platform-components/RecordPanelButton.vue.d.ts +2 -0
  37. package/dist/types/platform-components/RecordPicker.vue.d.ts +2 -0
  38. package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +7 -1
  39. package/dist/types/platform-components/RecordStatusSwitch.vue.d.ts +2 -0
  40. package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +4 -0
  41. package/dist/types/platform-components/index.d.ts +0 -2
  42. package/dist/types/platform-components/recordFormFieldModel.d.ts +16 -2
  43. package/dist/types/platform-components/recordPickerConstraints.d.ts +2 -0
  44. package/dist/types/platform-workbench/Workbench.vue.d.ts +4 -2
  45. package/dist/types/vue-ui-antdv/components/UiSidePanel.vue.d.ts +4 -2
  46. package/dist/types/vue-ui-antdv/components/UiSwitch.vue.d.ts +2 -0
  47. package/dist/types/web-contracts/index.d.ts +72 -2
  48. package/dist/types/web-core/http.d.ts +6 -0
  49. package/dist/types/web-core/module/index.d.ts +1 -1
  50. package/dist/types/web-core/module/moduleContext.d.ts +2 -1
  51. package/dist/types/web-core/module/staticModuleClient.d.ts +6 -0
  52. package/dist/types/web-core/realtime.d.ts +8 -0
  53. package/dist/{workspaceViews-CkERhK0K.js → workspaceViews-D-RiJ64o.js} +3341 -3011
  54. package/package.json +1 -1
  55. package/dist/DictionaryManagementView-CtIQpqVA.js +0 -1035
  56. package/dist/MenuManagementView-DJhkN2sG.js +0 -837
  57. package/dist/RoleAuthorizationView-jn_WUCeg.js +0 -599
  58. package/dist/SystemUserDetailWorkspaceView-CBvqmWvP.js +0 -17
  59. package/dist/SystemUserManagementView-AEomKvK7.js +0 -887
  60. package/dist/currentUserContext-B1lj1WgF.js +0 -11
  61. package/dist/types/platform-components/scopedResourceTreeModuleContext.d.ts +0 -6
  62. package/dist/types/views/DictionaryManagementView.vue.d.ts +0 -3
  63. package/dist/types/views/MenuManagementView.vue.d.ts +0 -3
  64. package/dist/types/views/SystemUserDetailWorkspaceView.vue.d.ts +0 -7
  65. package/dist/types/views/SystemUserManagementView.vue.d.ts +0 -7
  66. package/dist/types/views/dictionaryManagementState.d.ts +0 -215
  67. package/dist/types/views/menuManagementState.d.ts +0 -180
  68. package/dist/types/views/systemUserDetailWorkspaceSession.d.ts +0 -12
  69. package/dist/types/views/systemUserDetailWorkspaceView.d.ts +0 -5
  70. package/dist/workspaceViewSessions-B5g4M0rT.js +0 -51
@@ -1,599 +0,0 @@
1
- import { At as e, Bt as t, Et as n, Kt as r, O as i, Qt as ee, Tt as te, Vt as ne, W as re, Wt as a, bt as ie, f as ae, ft as o, mt as oe, st as se, vr as s, vt as ce, x as c, xt as le } from "./platform-components-CIi6GdC9.js";
2
- import { P as ue, x as l } from "./workspaceViews-CkERhK0K.js";
3
- import { i as de, n as fe, r as u, t as d } from "./workspaceViewSessions-B5g4M0rT.js";
4
- import { Fragment as f, computed as p, createBlock as m, createCommentVNode as pe, createElementBlock as h, createElementVNode as g, createSlots as _, createTextVNode as v, createVNode as y, defineComponent as b, guardReactiveProps as me, normalizeClass as he, normalizeProps as ge, onBeforeUnmount as _e, onMounted as x, openBlock as S, ref as C, renderSlot as w, resolveDynamicComponent as ve, toDisplayString as T, unref as E, watch as ye, withCtx as D } from "vue";
5
- //#endregion
6
- //#region src/platform-admin-runtime/WorkspaceViewDrawer.vue
7
- var be = /* @__PURE__ */ b({
8
- name: "WorkspaceViewDrawer",
9
- __name: "WorkspaceViewDrawer",
10
- props: {
11
- open: { type: Boolean },
12
- title: {},
13
- container: {},
14
- subtitle: { default: void 0 },
15
- profile: { default: "detail" },
16
- promotion: { default: void 0 }
17
- },
18
- emits: ["close"],
19
- setup(e, { emit: t }) {
20
- let n = e, r = t, i = p(() => n.profile === "wide-work" ? "min(600px, 100vw)" : 520);
21
- return (t, n) => (S(), m(E(re), {
22
- open: e.open,
23
- title: e.title,
24
- container: e.container,
25
- subtitle: e.subtitle,
26
- width: i.value,
27
- promotion: e.promotion,
28
- onClose: n[0] ||= (e) => r("close")
29
- }, _({
30
- default: D(() => [w(t.$slots, "default")]),
31
- _: 2
32
- }, [t.$slots.operation ? {
33
- name: "operation",
34
- fn: D(() => [w(t.$slots, "operation")]),
35
- key: "0"
36
- } : void 0]), 1032, [
37
- "open",
38
- "title",
39
- "container",
40
- "subtitle",
41
- "width",
42
- "promotion"
43
- ]));
44
- }
45
- });
46
- //#endregion
47
- //#region src/views/roleGrantClient.ts
48
- function xe(e) {
49
- return {
50
- accountRoleGrants(t) {
51
- return e.request({ path: `/iam.role/${encodeURIComponent(t)}/account-grants` });
52
- },
53
- grantAccountRole(t, n) {
54
- return e.request({
55
- method: "POST",
56
- path: `/iam.role/${encodeURIComponent(t)}/account-grants`,
57
- body: n
58
- });
59
- },
60
- deleteAccountRoleGrant(t, n) {
61
- return e.request({
62
- method: "POST",
63
- path: `/iam.role/${encodeURIComponent(t)}/account-grants/${encodeURIComponent(n)}/delete`
64
- });
65
- },
66
- userSelector(t) {
67
- return e.request({
68
- method: "POST",
69
- path: "/iam.user/selector/query",
70
- body: t
71
- });
72
- },
73
- employmentRoleGrants(t) {
74
- return e.request({ path: `/iam.role/${encodeURIComponent(t)}/employment-grants` });
75
- },
76
- grantEmploymentRole(t, n) {
77
- return e.request({
78
- method: "POST",
79
- path: `/iam.role/${encodeURIComponent(t)}/employment-grants`,
80
- body: { employeePositionId: n }
81
- });
82
- },
83
- deleteEmploymentRoleGrant(t, n) {
84
- return e.request({
85
- method: "POST",
86
- path: `/iam.role/${encodeURIComponent(t)}/employment-grants/${encodeURIComponent(n)}/delete`
87
- });
88
- },
89
- employmentSelector(t, n) {
90
- return e.request({
91
- method: "POST",
92
- path: `/iam.role/${encodeURIComponent(t)}/employment-selector/query`,
93
- body: n
94
- });
95
- },
96
- authorizationModules(t) {
97
- return e.request({ path: `/iam.role/authorizationModules/${encodeURIComponent(t)}` });
98
- },
99
- permissionMatrix(t, n) {
100
- return e.request({
101
- method: "POST",
102
- path: `/iam.role/permissionMatrix/${encodeURIComponent(t)}`,
103
- body: { moduleAliases: n }
104
- });
105
- },
106
- grantAction(t, n) {
107
- return e.request({
108
- method: "POST",
109
- path: `/iam.role/grant/${encodeURIComponent(t)}`,
110
- body: n
111
- });
112
- },
113
- revokeAction(t, n, r) {
114
- return e.request({
115
- method: "POST",
116
- path: `/iam.role/revoke/${encodeURIComponent(t)}`,
117
- body: {
118
- moduleAlias: n,
119
- actionCode: r
120
- }
121
- });
122
- },
123
- replacePermissionMatrix(t, n) {
124
- return e.request({
125
- method: "POST",
126
- path: `/iam.role/permissionMatrix/${encodeURIComponent(t)}/replace`,
127
- body: { actions: n }
128
- });
129
- },
130
- dataGrantActionMatrix(t) {
131
- return e.request({ path: `/iam.role/dataGrantActionMatrix/${encodeURIComponent(t)}` });
132
- },
133
- dataScopePolicyCatalog(t, n) {
134
- return e.request({
135
- path: `/iam.role/dataScopePolicyCatalog/${encodeURIComponent(t)}`,
136
- query: n ? { moduleAlias: n } : void 0
137
- });
138
- },
139
- replaceDataGrantActions(t, n) {
140
- return e.request({
141
- method: "POST",
142
- path: `/iam.role/dataGrantActions/${encodeURIComponent(t)}`,
143
- body: { actions: n }
144
- });
145
- }
146
- };
147
- }
148
- //#endregion
149
- //#region src/views/roleAuthorizationWorkspaceSession.ts
150
- function Se(e, t) {
151
- return d(l, e, t);
152
- }
153
- function Ce(e, t) {
154
- return fe(l, e, t);
155
- }
156
- function we(e) {
157
- return u(l, e);
158
- }
159
- //#endregion
160
- //#region src/views/RoleAuthorizationView.vue?vue&type=script&setup=true&lang.ts
161
- var Te = { class: "panel-title" }, Ee = {
162
- key: 4,
163
- class: "authorization-layout"
164
- }, De = {
165
- key: 0,
166
- class: "authorization-column-header"
167
- }, Oe = {
168
- key: 2,
169
- class: "data-scope-editor"
170
- }, ke = { key: 0 }, Ae = { key: 1 }, je = { key: 3 }, Me = {
171
- key: 4,
172
- class: "not-applicable"
173
- }, O = /*@__PURE__*/ b({
174
- name: "RoleAuthorizationView",
175
- __name: "RoleAuthorizationView",
176
- props: {
177
- roleId: {},
178
- container: {},
179
- drawer: { type: Boolean }
180
- },
181
- emits: ["close"],
182
- setup(r, { emit: re }) {
183
- let s = r, fe = re, u = ee({ moduleAlias: "iam.role" }), d = xe(u.http), b = s.roleId ?? new URLSearchParams(window.location.search).get("roleId") ?? "", w = ue(), O = s.roleId ? { roleId: s.roleId } : void 0, k = O ? we(O) : void 0, A = C(), j = C([]), M = C(), N = C([]), P = C(), F = C(), I = C(!1), L = C(!1), R = C(!1), z = C(), B = C(), V = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), U = C(0), Ne, W = p(() => A.value?.roleKind === "group"), G = p(() => A.value?.roleKind === "dataGrant"), K = p(() => A.value?.assignmentType === "employment"), q = p(() => A.value?.title ?? b ?? "角色"), J = p(() => `授权:${q.value}`), Pe = p(() => Fe.value ? `动作授权 - ${Fe.value.title}` : `动作授权 - ${q.value}`), Fe = p(() => j.value.find((e) => e.moduleAlias === M.value)), Ie = p(() => j.value.map((e) => ({
184
- id: e.moduleAlias,
185
- parentId: e.parentId,
186
- title: e.title,
187
- secondary: e.applicationAlias
188
- }))), Le = p(() => (F.value?.options ?? []).map((e) => ({
189
- value: e.code,
190
- label: e.title
191
- }))), Re = p(() => (F.value?.referenceDependencies ?? []).map((e) => ({
192
- value: e.referenceFieldId,
193
- label: `${e.title} → ${e.targetModuleTitle}`
194
- }))), ze = p(() => new Map((F.value?.referenceDependencies ?? []).map((e) => [e.referenceFieldId, e]))), Be = [
195
- {
196
- key: "title",
197
- title: "动作",
198
- width: 130
199
- },
200
- {
201
- key: "granted",
202
- title: "授权",
203
- width: 88,
204
- align: "center"
205
- },
206
- {
207
- key: "dataScopePolicy",
208
- title: "数据范围",
209
- width: 160
210
- }
211
- ], Ve = [
212
- {
213
- key: "title",
214
- title: "标准动作",
215
- width: 130
216
- },
217
- {
218
- key: "configured",
219
- title: "启用模板",
220
- width: 104,
221
- align: "center"
222
- },
223
- {
224
- key: "dataScopePolicy",
225
- title: "数据范围",
226
- width: 160
227
- }
228
- ], He = p(() => N.value), Ue = p(() => P.value?.actions ?? []), Y = p(() => s.drawer === !0 || !!O && w?.presentation === "drawer"), X = p(() => !!O), We = p(() => Y.value ? be : X.value ? i : "div"), Ge = p(() => Y.value ? {
229
- open: !0,
230
- title: J.value,
231
- container: s.container ?? null,
232
- profile: l.drawerProfile,
233
- promotion: Xe.value,
234
- onClose: ut
235
- } : X.value ? { title: J.value } : {}), Ke = p(() => {
236
- let e = P.value;
237
- return !e || B.value === void 0 ? !1 : JSON.stringify(e.actions) !== B.value;
238
- }), qe = p(() => U.value >= 0 && [...V.entries()].some(([e, t]) => H.get(e) !== JSON.stringify(t))), Z = p(() => Ke.value || qe.value), Je = p(() => N.value.length > 0 && N.value.every((e) => e.granted)), Ye = p(() => N.value.some((e) => e.granted) && !Je.value), Xe = de({
239
- view: l,
240
- input: () => O,
241
- title: J,
242
- eligibility: () => ({
243
- hasStableIdentity: !!(b && A.value),
244
- busy: R.value
245
- }),
246
- beforePromote: (e) => Se(e, {
247
- selectedModuleAlias: M.value,
248
- dataGrantMatrix: P.value,
249
- actionDrafts: [...V.entries()].map(([e, t]) => ({
250
- moduleAlias: e,
251
- actions: t
252
- })),
253
- actionSnapshots: [...H.entries()].map(([e, t]) => ({
254
- moduleAlias: e,
255
- snapshot: t
256
- }))
257
- }).then((e) => e === "accepted"),
258
- onPromoted: dt,
259
- onPromotionRejected: () => oe("目标页签存在未确认的授权配置;请先确认或关闭该页签后再固定当前抽屉。", {
260
- source: "role-authorization",
261
- phase: "validation"
262
- })
263
- });
264
- x(() => {
265
- O && !Y.value && (Ne = Ce(O, ft)), Q();
266
- }), ye(J, (e) => {
267
- X.value && w?.setTitle(e);
268
- }, { immediate: !0 }), ye(M, () => void Ze()), x(() => window.addEventListener("beforeunload", mt)), _e(() => {
269
- Ne?.(), window.removeEventListener("beforeunload", mt);
270
- });
271
- async function Q() {
272
- if (!b) {
273
- z.value = "缺少角色标识,无法打开授权页。";
274
- return;
275
- }
276
- I.value = !0, z.value = void 0;
277
- try {
278
- if (A.value = await u.crud.view(b), A.value.roleKind === "group") return;
279
- if (A.value.roleKind === "dataGrant") {
280
- let [e, t] = await Promise.all([d.dataGrantActionMatrix(b), d.dataScopePolicyCatalog(b)]);
281
- P.value = k?.dataGrantMatrix ?? e, F.value = t, B.value = JSON.stringify(e.actions);
282
- return;
283
- }
284
- j.value = (await d.authorizationModules(b)).records, M.value = k?.selectedModuleAlias ?? j.value[0]?.moduleAlias;
285
- } catch (e) {
286
- z.value = "授权信息加载失败,请重试。", o(e, {
287
- source: "role-authorization",
288
- phase: "load"
289
- });
290
- } finally {
291
- I.value = !1;
292
- }
293
- }
294
- async function Ze() {
295
- let e = M.value;
296
- if (!(!e || G.value || W.value)) {
297
- L.value = !0;
298
- try {
299
- let [t, n] = await Promise.all([d.permissionMatrix(b, [e]), d.dataScopePolicyCatalog(b, e)]), r = (t.modules[0]?.actions ?? []).map(st), i = k?.actionDrafts?.find((t) => t.moduleAlias === e)?.actions;
300
- N.value = V.get(e) ?? i ?? r, V.has(e) || (V.set(e, N.value), H.set(e, k?.actionSnapshots?.find((t) => t.moduleAlias === e)?.snapshot ?? JSON.stringify(r))), U.value += 1, F.value = n;
301
- } catch (e) {
302
- o(e, {
303
- source: "role-authorization",
304
- phase: "load"
305
- });
306
- } finally {
307
- L.value = !1;
308
- }
309
- }
310
- }
311
- function Qe(e, t) {
312
- t && e.dataAuth && K.value && !e.dataScopePolicy && (e.dataScopePolicy = "inheritDataGrant"), t && e.dataScopePolicy === "referenceDependency" && !e.referenceFieldId && (e.dataScopePolicy = "inheritDataGrant"), e.granted = t, U.value += 1;
313
- }
314
- function $e(e) {
315
- N.value.forEach((t) => Qe(t, e));
316
- }
317
- function et(e, t) {
318
- if (e.dataScopePolicy = String(t || "none"), e.dataScopePolicy === "referenceDependency") {
319
- e.referenceFieldId = void 0, e.referenceActionCode = void 0, U.value += 1;
320
- return;
321
- }
322
- e.referenceFieldId = void 0, e.referenceActionCode = void 0, U.value += 1;
323
- }
324
- function tt(e, t) {
325
- let n = ze.value.get(String(t || ""));
326
- e.referenceFieldId = n?.referenceFieldId, e.referenceActionCode = n?.referenceActionCode, U.value += 1;
327
- }
328
- function nt(e) {
329
- return ze.value.get(String(e || ""));
330
- }
331
- function rt(e) {
332
- return typeof e == "string" || typeof e == "number" ? e : void 0;
333
- }
334
- function it(e) {
335
- return e.dataScopePolicy ?? "inheritDataGrant";
336
- }
337
- function at(e) {
338
- return !!e.dataAuth && K.value;
339
- }
340
- function ot(e, t) {
341
- return e.key === "dataScopePolicy" && at(t);
342
- }
343
- function st(e) {
344
- return K.value && e.dataAuth && e.dataScopePolicy === "none" ? {
345
- ...e,
346
- dataScopePolicy: "inheritDataGrant"
347
- } : e;
348
- }
349
- async function ct() {
350
- if (P.value) {
351
- R.value = !0;
352
- try {
353
- await se(await d.replaceDataGrantActions(b, P.value.actions.map((e) => ({
354
- actionCode: e.actionCode,
355
- dataScopePolicy: e.dataScopePolicy,
356
- enabled: e.configured
357
- }))), {
358
- source: "role-authorization",
359
- phase: "action",
360
- fallbackMessage: "数据权限模板已保存"
361
- }), B.value = JSON.stringify(P.value.actions);
362
- } catch (e) {
363
- o(e, {
364
- source: "role-authorization",
365
- phase: "action"
366
- });
367
- } finally {
368
- R.value = !1;
369
- }
370
- }
371
- }
372
- async function lt() {
373
- let e = [...V.entries()].filter(([e, t]) => H.get(e) !== JSON.stringify(t));
374
- if (e.length) {
375
- R.value = !0;
376
- try {
377
- await se(await d.replacePermissionMatrix(b, e.flatMap(([e, t]) => t.map((t) => ({
378
- moduleAlias: e,
379
- actionCode: t.actionCode,
380
- granted: !!t.granted,
381
- dataScopePolicy: t.granted && t.dataAuth && K.value ? t.dataScopePolicy ?? "inheritDataGrant" : void 0,
382
- referenceFieldId: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceFieldId : void 0,
383
- referenceActionCode: t.granted && t.dataScopePolicy === "referenceDependency" ? t.referenceActionCode : void 0
384
- })))), {
385
- source: "role-authorization",
386
- phase: "action",
387
- fallbackMessage: "角色授权已保存"
388
- }), e.forEach(([e, t]) => H.set(e, JSON.stringify(t))), U.value += 1;
389
- } catch (e) {
390
- o(e, {
391
- source: "role-authorization",
392
- phase: "action"
393
- });
394
- } finally {
395
- R.value = !1;
396
- }
397
- }
398
- }
399
- async function $() {
400
- if (G.value) {
401
- await ct();
402
- return;
403
- }
404
- await lt();
405
- }
406
- async function ut() {
407
- Z.value && !await ce({
408
- title: "放弃未确认的授权配置",
409
- content: "当前修改尚未确认,关闭后将丢失这些修改。",
410
- okText: "放弃修改",
411
- danger: !0
412
- }) || pt();
413
- }
414
- function dt() {
415
- pt();
416
- }
417
- function ft(e) {
418
- return Z.value ? !1 : (M.value = e.selectedModuleAlias, P.value = e.dataGrantMatrix, V.clear(), H.clear(), e.actionDrafts?.forEach(({ moduleAlias: e, actions: t }) => V.set(e, t)), e.actionSnapshots?.forEach(({ moduleAlias: e, snapshot: t }) => H.set(e, t)), U.value += 1, !0);
419
- }
420
- function pt() {
421
- if (s.drawer === !0) {
422
- fe("close");
423
- return;
424
- }
425
- w?.dismiss();
426
- }
427
- function mt(e) {
428
- Z.value && (e.preventDefault(), e.returnValue = "");
429
- }
430
- return (r, i) => (S(), m(ve(We.value), ge(me(Ge.value)), _({
431
- default: D(() => [g("section", { class: he(["role-authorization-page", { "role-authorization-page--drawer": Y.value }]) }, [I.value ? (S(), m(E(le), {
432
- key: 0,
433
- tip: "加载授权信息"
434
- })) : z.value ? (S(), m(E(ie), {
435
- key: 1,
436
- title: "授权页加载失败",
437
- message: z.value
438
- }, null, 8, ["message"])) : W.value ? (S(), m(E(n), {
439
- key: 2,
440
- title: "角色组不独立授权",
441
- description: "角色组只组合成员角色;请到成员角色分别配置动作和数据权限。"
442
- })) : G.value && P.value ? (S(), m(E(c), {
443
- key: 3,
444
- class: "data-grant-content",
445
- title: X.value ? "数据权限模板" : `数据权限模板 - ${q.value}`,
446
- searchable: !1,
447
- onRefresh: Q
448
- }, {
449
- default: D(() => [g("header", Te, [i[3] ||= g("div", null, [g("h3", null, "标准动作的数据范围模板"), g("p", null, "模板只会在具体任职的普通角色动作选择“继承数据授权角色”时生效。")], -1), X.value ? pe("v-if", !0) : (S(), m(E(a), {
450
- key: 0,
451
- type: "primary",
452
- disabled: !Z.value,
453
- loading: R.value,
454
- onClick: $
455
- }, {
456
- default: D(() => [...i[2] ||= [v(" 确认 ", -1)]]),
457
- _: 1
458
- }, 8, ["disabled", "loading"]))]), y(E(te), {
459
- columns: Ve,
460
- rows: Ue.value,
461
- "row-key": "actionCode",
462
- "horizontal-scroll": ""
463
- }, {
464
- cell: D(({ column: n, record: r }) => [n.key === "title" ? (S(), h(f, { key: 0 }, [g("strong", null, T(r.title || r.actionCode), 1), g("small", null, T(r.actionCode), 1)], 64)) : n.key === "configured" ? (S(), m(E(e), {
465
- key: 1,
466
- checked: !!r.configured,
467
- disabled: R.value,
468
- onChange: (e) => r.configured = e
469
- }, null, 8, [
470
- "checked",
471
- "disabled",
472
- "onChange"
473
- ])) : (S(), m(E(t), {
474
- key: 2,
475
- value: r.dataScopePolicy,
476
- options: Le.value,
477
- disabled: !r.configured || R.value,
478
- placeholder: "请选择数据范围",
479
- "allow-clear": !1,
480
- "onUpdate:value": (e) => r.dataScopePolicy = String(e || "")
481
- }, null, 8, [
482
- "value",
483
- "options",
484
- "disabled",
485
- "onUpdate:value"
486
- ]))]),
487
- _: 1
488
- }, 8, ["rows"])]),
489
- _: 1
490
- }, 8, ["title"])) : (S(), h("section", Ee, [y(E(c), {
491
- class: "module-panel",
492
- title: "模块树",
493
- "refresh-title": "刷新模块目录",
494
- searchable: !1,
495
- onRefresh: Q
496
- }, {
497
- default: D(() => [y(E(ae), {
498
- records: Ie.value,
499
- "selected-id": M.value,
500
- onSelect: i[0] ||= (e) => M.value = e.id
501
- }, null, 8, ["records", "selected-id"])]),
502
- _: 1
503
- }), y(E(c), {
504
- class: "action-panel",
505
- title: Pe.value,
506
- searchable: !1
507
- }, _({
508
- default: D(() => [L.value ? (S(), m(E(le), {
509
- key: 0,
510
- tip: "加载模块动作"
511
- })) : M.value ? (S(), m(E(te), {
512
- key: 2,
513
- columns: Be,
514
- rows: He.value,
515
- "row-key": "actionCode",
516
- "fill-height": "",
517
- "horizontal-scroll": ""
518
- }, {
519
- header: D(({ column: e }) => [e.key === "granted" ? (S(), h("span", De, [y(E(ne), {
520
- checked: Je.value,
521
- indeterminate: Ye.value,
522
- disabled: R.value || !N.value.length,
523
- "aria-label": "全选当前模块动作授权",
524
- onChange: $e
525
- }, null, 8, [
526
- "checked",
527
- "indeterminate",
528
- "disabled"
529
- ]), i[5] ||= v(" 授权 ", -1)])) : (S(), h(f, { key: 1 }, [v(T(e.title), 1)], 64))]),
530
- cell: D(({ column: e, record: n }) => [e.key === "title" ? (S(), h(f, { key: 0 }, [g("strong", null, T(n.title || n.actionCode), 1), g("small", null, T(n.permissionActionCode || n.actionCode), 1)], 64)) : e.key === "granted" ? (S(), m(E(ne), {
531
- key: 1,
532
- checked: !!n.granted,
533
- disabled: R.value,
534
- onChange: (e) => Qe(n, e)
535
- }, null, 8, [
536
- "checked",
537
- "disabled",
538
- "onChange"
539
- ])) : n.dataAuth && K.value && n.granted ? (S(), h("div", Oe, [y(E(t), {
540
- value: it(n),
541
- options: Le.value,
542
- disabled: R.value,
543
- "allow-clear": !1,
544
- "onUpdate:value": (e) => et(n, e)
545
- }, null, 8, [
546
- "value",
547
- "options",
548
- "disabled",
549
- "onUpdate:value"
550
- ]), n.dataScopePolicy === "referenceDependency" ? (S(), h(f, { key: 0 }, [y(E(t), {
551
- value: rt(n.referenceFieldId),
552
- options: Re.value,
553
- disabled: R.value,
554
- placeholder: "请选择引用字段",
555
- "allow-clear": !1,
556
- "onUpdate:value": (e) => tt(n, e)
557
- }, null, 8, [
558
- "value",
559
- "options",
560
- "disabled",
561
- "onUpdate:value"
562
- ]), n.referenceFieldId ? (S(), h("small", ke, " 依赖目标:" + T(nt(n.referenceFieldId)?.targetModuleTitle) + " · " + T(nt(n.referenceFieldId)?.referenceActionTitle), 1)) : (S(), h("small", Ae, "请先选择引用字段,再开启该动作授权。"))], 64)) : pe("v-if", !0)])) : ot(e, n) ? (S(), h("span", je, "—")) : (S(), h("span", Me, "不适用"))]),
563
- _: 1
564
- }, 8, ["rows"])) : (S(), m(E(n), {
565
- key: 1,
566
- title: "请选择模块"
567
- }))]),
568
- _: 2
569
- }, [X.value ? void 0 : {
570
- name: "actions",
571
- fn: D(() => [y(E(a), {
572
- type: "primary",
573
- disabled: !Z.value,
574
- loading: R.value,
575
- onClick: $
576
- }, {
577
- default: D(() => [...i[4] ||= [v(" 确认 ", -1)]]),
578
- _: 1
579
- }, 8, ["disabled", "loading"])]),
580
- key: "0"
581
- }]), 1032, ["title"])]))], 2)]),
582
- _: 2
583
- }, [X.value && !W.value ? {
584
- name: "operation",
585
- fn: D(() => [y(E(a), {
586
- type: "primary",
587
- disabled: !Z.value,
588
- loading: R.value,
589
- onClick: $
590
- }, {
591
- default: D(() => [...i[1] ||= [v(" 确认 ", -1)]]),
592
- _: 1
593
- }, 8, ["disabled", "loading"])]),
594
- key: "0"
595
- } : void 0]), 1040));
596
- }
597
- }), k = /* @__PURE__ */ s({ default: () => A }), A = /*#__PURE__*/ r(O, [["__scopeId", "data-v-8b9dc5d9"]]);
598
- //#endregion
599
- export { k as n, xe as r, A as t };
@@ -1,17 +0,0 @@
1
- import { t as e } from "./SystemUserManagementView-AEomKvK7.js";
2
- import { createBlock as t, defineComponent as n, openBlock as r } from "vue";
3
- //#endregion
4
- //#region src/views/SystemUserDetailWorkspaceView.vue
5
- var i = /* @__PURE__ */ n({
6
- name: "SystemUserDetailWorkspaceView",
7
- __name: "SystemUserDetailWorkspaceView",
8
- props: {
9
- recordId: {},
10
- title: {}
11
- },
12
- setup(n) {
13
- return (i, a) => (r(), t(e, { "record-id": n.recordId }, null, 8, ["record-id"]));
14
- }
15
- });
16
- //#endregion
17
- export { i as default };