@ximatai/muyun-web-app 0.26.6 → 0.26.7

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