@ximatai/muyun-web-app 0.26.7 → 0.26.9

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 (198) hide show
  1. package/dist/DictionaryManagementView-CtIQpqVA.js +1035 -0
  2. package/dist/MenuManagementView-DJhkN2sG.js +837 -0
  3. package/dist/{MetadataOrchestrationView-B-CPudJl.js → MetadataOrchestrationView-CzhAgEdX.js} +210 -204
  4. package/dist/{ModuleActionManagementView-CmVj0e0C.js → ModuleActionManagementView-CM2d8jPO.js} +69 -69
  5. package/dist/RoleAuthorizationView-jn_WUCeg.js +599 -0
  6. package/dist/{RoleDetailWorkspaceView-DmJlJgAj.js → RoleDetailWorkspaceView-CzaQ3Dz1.js} +1 -1
  7. package/dist/RoleManagementView-nY7qu4GF.js +1951 -0
  8. package/dist/{SystemUserDetailWorkspaceView-U6Ij0US1.js → SystemUserDetailWorkspaceView-CBvqmWvP.js} +1 -1
  9. package/dist/SystemUserManagementView-AEomKvK7.js +887 -0
  10. package/dist/index.css +1 -1
  11. package/dist/index.js +651 -6970
  12. package/dist/{platform-components-DKKWbNrz.js → platform-components-CIi6GdC9.js} +5292 -3634
  13. package/dist/types/App.vue.d.ts +1 -0
  14. package/dist/types/app/StaticRoutePageHost.vue.d.ts +11 -0
  15. package/dist/types/app/loginTenant.d.ts +1 -1
  16. package/dist/types/app/menuRouteCompiler.d.ts +45 -0
  17. package/dist/types/app/menuRouteRuntime.d.ts +24 -0
  18. package/dist/types/app/pageRouteContext.d.ts +24 -0
  19. package/dist/types/app/routeDiagnosticsStore.d.ts +10 -0
  20. package/dist/types/app/router.d.ts +15 -0
  21. package/dist/types/app/staticRouteDefinitions.d.ts +25 -0
  22. package/dist/types/app/workbenchRouteSync.d.ts +1 -1
  23. package/dist/types/app/workbenchStartup.d.ts +9 -5
  24. package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +2 -2
  25. package/dist/types/consumer/index.d.ts +7 -4
  26. package/dist/types/dynamic-page-runtime/DynamicModuleHost.vue.d.ts +3 -10
  27. package/dist/types/{views/EmployeeEmploymentDrawer.vue.d.ts → dynamic-page-runtime/DynamicModuleWorkspaceDetailView.vue.d.ts} +3 -7
  28. package/dist/types/dynamic-page-runtime/DynamicRecordDetailActions.vue.d.ts +39 -0
  29. package/dist/types/dynamic-page-runtime/ManagedDetailRelationInlineSurface.vue.d.ts +40 -0
  30. package/dist/types/dynamic-page-runtime/ManagedDetailRelationSurface.vue.d.ts +14 -0
  31. package/dist/types/dynamic-page-runtime/ModulePageDetailRelations.vue.d.ts +26 -0
  32. package/dist/types/dynamic-page-runtime/ModulePageFormContributionRenderer.vue.d.ts +12 -0
  33. package/dist/types/dynamic-page-runtime/ModulePageHost.vue.d.ts +14 -0
  34. package/dist/types/dynamic-page-runtime/ModulePageListExpansionSurface.vue.d.ts +19 -0
  35. package/dist/types/dynamic-page-runtime/ModulePageListRelationExpansion.vue.d.ts +13 -0
  36. package/dist/types/dynamic-page-runtime/ModulePageListRelationExpansions.vue.d.ts +16 -0
  37. package/dist/types/dynamic-page-runtime/ModulePageRecordContent.vue.d.ts +42 -0
  38. package/dist/types/dynamic-page-runtime/ModuleRecordDetailActions.vue.d.ts +41 -0
  39. package/dist/types/dynamic-page-runtime/NavigatorManagementEditor.vue.d.ts +44 -0
  40. package/dist/types/dynamic-page-runtime/PageNavigatorExplorer.vue.d.ts +50 -0
  41. package/dist/types/dynamic-page-runtime/RecordFormSurface.vue.d.ts +31 -0
  42. package/dist/types/dynamic-page-runtime/composables/useManagedDetailRelationRuntime.d.ts +30 -0
  43. package/dist/types/dynamic-page-runtime/composables/useModulePageActions.d.ts +13 -0
  44. package/dist/types/dynamic-page-runtime/composables/useModulePageBootstrap.d.ts +17 -0
  45. package/dist/types/dynamic-page-runtime/composables/useModulePageDetailActionRuntime.d.ts +48 -0
  46. package/dist/types/dynamic-page-runtime/composables/useModulePageDetailExtensionRuntime.d.ts +26 -0
  47. package/dist/types/dynamic-page-runtime/composables/useModulePageFormContributionRuntime.d.ts +22 -0
  48. package/dist/types/dynamic-page-runtime/composables/useModulePageListSession.d.ts +41 -0
  49. package/dist/types/dynamic-page-runtime/composables/useNavigatorRuntime.d.ts +1324 -0
  50. package/dist/types/dynamic-page-runtime/composables/useRecordEditingSession.d.ts +22 -0
  51. package/dist/types/dynamic-page-runtime/detailSurfacePreference.d.ts +10 -0
  52. package/dist/types/dynamic-page-runtime/dynamicModuleDetailStateModel.d.ts +5 -12
  53. package/dist/types/dynamic-page-runtime/formComputeCoordinator.d.ts +18 -0
  54. package/dist/types/dynamic-page-runtime/index.d.ts +4 -2
  55. package/dist/types/dynamic-page-runtime/listPageSizePreference.d.ts +10 -0
  56. package/dist/types/dynamic-page-runtime/moduleDetailStateModel.d.ts +12 -0
  57. package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +218 -6
  58. package/dist/types/dynamic-page-runtime/modulePageNavigation.d.ts +1 -1
  59. package/dist/types/dynamic-page-runtime/navigatorVisibility.d.ts +6 -0
  60. package/dist/types/dynamic-page-runtime/pageContextRuntime.d.ts +6 -0
  61. package/dist/types/dynamic-page-runtime/recordDetailController.d.ts +35 -0
  62. package/dist/types/dynamic-page-runtime/relationFormComputeCoordinator.d.ts +9 -0
  63. package/dist/types/formula/FormulaRuntime.d.ts +29 -0
  64. package/dist/types/platform-admin-runtime/WorkspaceViewDrawer.vue.d.ts +1 -0
  65. package/dist/types/{views/EmployeeDetailWorkspaceView.vue.d.ts → platform-admin-runtime/employee/EmployeeAccountDrawer.vue.d.ts} +2 -1
  66. package/dist/types/platform-admin-runtime/employeeModulePageEnhancement.d.ts +3 -0
  67. package/dist/types/platform-admin-runtime/moduleOpenApi.d.ts +2 -0
  68. package/dist/types/platform-admin-runtime/passwordPolicyPageEnhancement.d.ts +6 -0
  69. package/dist/types/platform-admin-runtime/platformAdminRoutes.d.ts +1 -1
  70. package/dist/types/platform-admin-runtime/platformModulePageEnhancement.d.ts +9 -0
  71. package/dist/types/platform-admin-runtime/realtime.d.ts +2 -1
  72. package/dist/types/platform-admin-runtime/tenant/TenantApplicationConfigurationDrawer.vue.d.ts +7 -0
  73. package/dist/types/platform-admin-runtime/tenant/TenantApplicationsDetailSection.vue.d.ts +7 -0
  74. package/dist/types/platform-admin-runtime/tenantModulePageEnhancement.d.ts +7 -0
  75. package/dist/types/platform-admin-runtime/user/UserOnlineStatusCell.vue.d.ts +8 -0
  76. package/dist/types/platform-admin-runtime/user/UserPasswordDrawer.vue.d.ts +7 -0
  77. package/dist/types/platform-admin-runtime/user/UserSessionListExpansion.vue.d.ts +7 -0
  78. package/dist/types/platform-admin-runtime/user/useUserSessionRows.d.ts +23 -0
  79. package/dist/types/platform-admin-runtime/user/userOnlineStatusStore.d.ts +11 -0
  80. package/dist/types/platform-admin-runtime/userModulePageEnhancement.d.ts +7 -0
  81. package/dist/types/platform-components/BusinessNotificationPanel.vue.d.ts +12 -0
  82. package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +10 -2
  83. package/dist/types/platform-components/DetailRelationListPanel.vue.d.ts +13 -0
  84. package/dist/types/{views/EmployeeManagementView.vue.d.ts → platform-components/DrawerTitleActions.vue.d.ts} +2 -2
  85. package/dist/types/platform-components/FileTransferUploader.vue.d.ts +7 -0
  86. package/dist/types/platform-components/ManagementPanelHeader.vue.d.ts +5 -3
  87. package/dist/types/platform-components/ManagementWorkspace.vue.d.ts +8 -2
  88. package/dist/types/platform-components/ModuleActionButton.vue.d.ts +5 -2
  89. package/dist/types/platform-components/RecordActionBar.vue.d.ts +1 -1
  90. package/dist/types/platform-components/RecordContentSectionHeading.vue.d.ts +17 -0
  91. package/dist/types/platform-components/RecordDetailDrawer.vue.d.ts +7 -1
  92. package/dist/types/platform-components/RecordDetailExtensionSection.vue.d.ts +8 -3
  93. package/dist/types/platform-components/RecordDetailFields.vue.d.ts +5 -0
  94. package/dist/types/platform-components/RecordDetailLayout.vue.d.ts +17 -7
  95. package/dist/types/platform-components/RecordDetailPanel.vue.d.ts +15 -5
  96. package/dist/types/platform-components/RecordExpandedSubtable.vue.d.ts +3 -0
  97. package/dist/types/platform-components/RecordFileReferenceTransfer.vue.d.ts +4 -0
  98. package/dist/types/platform-components/RecordFormFields.vue.d.ts +29 -1
  99. package/dist/types/platform-components/RecordImageFileReferencePreview.vue.d.ts +11 -0
  100. package/dist/types/platform-components/RecordListExpansionSurface.vue.d.ts +13 -0
  101. package/dist/types/platform-components/RecordListExplorer.vue.d.ts +4 -2
  102. package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +6 -2
  103. package/dist/types/platform-components/RecordMultiPicker.vue.d.ts +12 -2
  104. package/dist/types/platform-components/RecordPanelButton.vue.d.ts +2 -0
  105. package/dist/types/platform-components/RecordPicker.vue.d.ts +10 -2
  106. package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +42 -7
  107. package/dist/types/platform-components/RecordRelationTabs.vue.d.ts +14 -0
  108. package/dist/types/platform-components/RecordSelectionCheckbox.vue.d.ts +13 -0
  109. package/dist/types/platform-components/RecordStatusSwitch.vue.d.ts +3 -0
  110. package/dist/types/platform-components/StaticManagementLayout.vue.d.ts +21 -7
  111. package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +7 -2
  112. package/dist/types/platform-components/UserSessionExpandedSubtable.vue.d.ts +2 -0
  113. package/dist/types/platform-components/drawerTitleActions.d.ts +11 -0
  114. package/dist/types/platform-components/index.d.ts +15 -5
  115. package/dist/types/platform-components/managementWorkspaceLayout.d.ts +14 -0
  116. package/dist/types/platform-components/optionFieldOptionCache.d.ts +3 -0
  117. package/dist/types/platform-components/recordDetailFieldModel.d.ts +2 -0
  118. package/dist/types/platform-components/recordFormFieldModel.d.ts +69 -6
  119. package/dist/types/platform-components/recordPickerConstraints.d.ts +2 -0
  120. package/dist/types/platform-components/recordPickerModel.d.ts +6 -2
  121. package/dist/types/platform-components/recycleBinState.d.ts +2 -0
  122. package/dist/types/platform-components/scopedTreeModuleContext.d.ts +11 -0
  123. package/dist/types/platform-workbench/Workbench.vue.d.ts +2 -2
  124. package/dist/types/platform-workbench/index.d.ts +4 -2
  125. package/dist/types/platform-workbench/legacyPageHostTypeCompatibility.d.ts +6 -0
  126. package/dist/types/platform-workbench/menuNavigation.d.ts +26 -1
  127. package/dist/types/platform-workbench/modulePageWorkspaceViews.d.ts +7 -0
  128. package/dist/types/platform-workbench/pageCacheKey.d.ts +2 -0
  129. package/dist/types/platform-workbench/pageHostRegistry.d.ts +1 -1
  130. package/dist/types/platform-workbench/workbenchLayout.d.ts +36 -0
  131. package/dist/types/platform-workbench/workbenchNavigation.d.ts +16 -1
  132. package/dist/types/platform-workbench/workspaceViewHost.d.ts +2 -0
  133. package/dist/types/views/PasswordPolicyPreview.vue.d.ts +7 -0
  134. package/dist/types/views/RoleAccountGrantDrawer.vue.d.ts +1 -0
  135. package/dist/types/views/RoleAuthorizationView.vue.d.ts +2 -0
  136. package/dist/types/views/RoleEmploymentGrantDrawer.vue.d.ts +1 -0
  137. package/dist/types/views/{UserDetailWorkspaceView.vue.d.ts → UserDetailRouteView.vue.d.ts} +3 -2
  138. package/dist/types/views/UserManagementView.vue.d.ts +1 -6
  139. package/dist/types/views/menuManagementState.d.ts +2 -0
  140. package/dist/types/views/userDetailStateModel.d.ts +1 -3
  141. package/dist/types/views/userManagementRouteState.d.ts +11 -0
  142. package/dist/types/vue-ui-antdv/components/UiButton.vue.d.ts +4 -1
  143. package/dist/types/vue-ui-antdv/components/UiDataTable.vue.d.ts +1 -1
  144. package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +1 -1
  145. package/dist/types/vue-ui-antdv/components/UiInput.vue.d.ts +2 -1
  146. package/dist/types/vue-ui-antdv/components/UiModal.vue.d.ts +1 -1
  147. package/dist/types/vue-ui-antdv/components/UiRadioGroup.vue.d.ts +18 -0
  148. package/dist/types/vue-ui-antdv/components/UiRecordExplorerItem.vue.d.ts +2 -2
  149. package/dist/types/vue-ui-antdv/components/UiSelect.vue.d.ts +1 -1
  150. package/dist/types/vue-ui-antdv/components/UiTree.vue.d.ts +4 -2
  151. package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +7 -1
  152. package/dist/types/vue-ui-antdv/index.d.ts +5 -2
  153. package/dist/types/web-contracts/index.d.ts +408 -24
  154. package/dist/types/web-core/businessNotifications.d.ts +4 -0
  155. package/dist/types/web-core/index.d.ts +2 -0
  156. package/dist/types/web-core/module/abilities.d.ts +7 -7
  157. package/dist/types/web-core/module/moduleContext.d.ts +6 -3
  158. package/dist/types/web-core/module/runtimeContext.d.ts +5 -1
  159. package/dist/types/web-core/module/staticModuleClient.d.ts +42 -9
  160. package/dist/types/web-core/realtime.d.ts +5 -1
  161. package/dist/types/web-core/referenceResolveClient.d.ts +11 -0
  162. package/dist/workspaceViewSessions-B5g4M0rT.js +51 -0
  163. package/dist/workspaceViews-CkERhK0K.js +8748 -0
  164. package/package.json +1 -1
  165. package/dist/EmployeeDetailWorkspaceView-DYJLlkSz.js +0 -14
  166. package/dist/EmployeeManagementView-taxWUa7g.js +0 -1778
  167. package/dist/RoleAuthorizationView-q_6CsBYq.js +0 -592
  168. package/dist/RoleManagementView-HCa9rH0f.js +0 -1927
  169. package/dist/SystemUserManagementView-C1CkKivH.js +0 -758
  170. package/dist/UserDetailWorkspaceView-OPYvD6mH.js +0 -17
  171. package/dist/UserManagementView-gbCL9SnC.js +0 -965
  172. package/dist/pageRealtime-CzJlr9hs.js +0 -225
  173. package/dist/types/views/EmployeeDetailContent.vue.d.ts +0 -64
  174. package/dist/types/views/PositionManagementView.vue.d.ts +0 -3
  175. package/dist/types/views/TenantManagementView.vue.d.ts +0 -3
  176. package/dist/types/views/applicationManagementState.d.ts +0 -64
  177. package/dist/types/views/departmentManagementState.d.ts +0 -137
  178. package/dist/types/views/employeeDetailStateModel.d.ts +0 -39
  179. package/dist/types/views/employeeDetailWorkspaceSession.d.ts +0 -16
  180. package/dist/types/views/employeeDetailWorkspaceView.d.ts +0 -4
  181. package/dist/types/views/fieldSpecManagementState.d.ts +0 -80
  182. package/dist/types/views/fieldUiControlManagementState.d.ts +0 -76
  183. package/dist/types/views/moduleManagementState.d.ts +0 -76
  184. package/dist/types/views/organizationManagementState.d.ts +0 -64
  185. package/dist/types/views/positionManagementState.d.ts +0 -218
  186. package/dist/types/views/tenantManagementState.d.ts +0 -74
  187. package/dist/types/views/useEmployeeEmploymentRows.d.ts +0 -20
  188. package/dist/types/views/userDetailWorkspaceSession.d.ts +0 -14
  189. package/dist/types/views/userDetailWorkspaceView.d.ts +0 -4
  190. package/dist/useUserSessionRows-CBHEzRFQ.js +0 -128
  191. package/dist/workspaceViewSessions-DkB9myrq.js +0 -3252
  192. /package/dist/types/views/{ApplicationManagementView.vue.d.ts → DynamicModuleRouteView.vue.d.ts} +0 -0
  193. /package/dist/types/views/{DepartmentManagementView.vue.d.ts → ExternalRouteView.vue.d.ts} +0 -0
  194. /package/dist/types/views/{FieldSpecManagementView.vue.d.ts → ModuleOpenApiRouteView.vue.d.ts} +0 -0
  195. /package/dist/types/views/{FieldUiControlManagementView.vue.d.ts → OpenApiCatalogRouteView.vue.d.ts} +0 -0
  196. /package/dist/types/views/{ModuleManagementView.vue.d.ts → RouteDiagnosticsView.vue.d.ts} +0 -0
  197. /package/dist/types/views/{OrganizationManagementView.vue.d.ts → UserManagementListView.vue.d.ts} +0 -0
  198. /package/dist/types/views/{PasswordManagementView.vue.d.ts → WorkspaceRouteView.vue.d.ts} +0 -0
@@ -0,0 +1,599 @@
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,4 +1,4 @@
1
- import { t as e } from "./RoleManagementView-HCa9rH0f.js";
1
+ import { t as e } from "./RoleManagementView-nY7qu4GF.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