@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
@@ -1,592 +0,0 @@
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 };