@ximatai/muyun-web-app 0.26.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EmployeeDetailWorkspaceView-mtdcsqgF.js +14 -0
- package/dist/EmployeeManagementView-CKKvQZaC.js +1706 -0
- package/dist/MetadataOrchestrationView-CprWBocy.js +655 -0
- package/dist/ModuleActionManagementView-DNuAQUPE.js +597 -0
- package/dist/RoleAuthorizationView-CQtSAJoJ.js +592 -0
- package/dist/RoleDetailWorkspaceView-Dh8DXpyS.js +26 -0
- package/dist/RoleManagementView-BrqaFV7y.js +1927 -0
- package/dist/SystemUserDetailWorkspaceView-N-kvycAu.js +17 -0
- package/dist/SystemUserManagementView-BVS5moV5.js +761 -0
- package/dist/UserDetailWorkspaceView-Iek6xwix.js +17 -0
- package/dist/UserManagementView-BR_Jz8O-.js +965 -0
- package/dist/currentUserContext-B1lj1WgF.js +11 -0
- package/dist/index.css +2 -0
- package/dist/index.js +7127 -0
- package/dist/pageRealtime-sRtDYlQP.js +140 -0
- package/dist/platform-components-bC1gwhic.js +8412 -0
- package/dist/types/App.vue.d.ts +3 -0
- package/dist/types/app/ChangeOwnPasswordDialog.vue.d.ts +27 -0
- package/dist/types/app/LoginView.vue.d.ts +14 -0
- package/dist/types/app/appWorkbenchStartup.d.ts +3 -0
- package/dist/types/app/devWorkbenchStartup.d.ts +1 -0
- package/dist/types/app/loginTenant.d.ts +6 -0
- package/dist/types/app/platformMessage.d.ts +6 -0
- package/dist/types/app/query.d.ts +3 -0
- package/dist/types/app/router.d.ts +1 -0
- package/dist/types/app/workbenchStartup.d.ts +24 -0
- package/dist/types/consumer/PlatformAdminOutlet.vue.d.ts +7 -0
- package/dist/types/consumer/index.d.ts +15 -0
- package/dist/types/dynamic-page-runtime/DynamicModuleHost.vue.d.ts +7 -0
- package/dist/types/dynamic-page-runtime/DynamicModulePage.vue.d.ts +7 -0
- package/dist/types/dynamic-page-runtime/actionReactions.d.ts +16 -0
- package/dist/types/dynamic-page-runtime/index.d.ts +3 -0
- package/dist/types/dynamic-page-runtime/mockDescriptor.d.ts +2 -0
- package/dist/types/main.d.ts +2 -0
- package/dist/types/platform-admin-runtime/PlatformAdminOutlet.vue.d.ts +7 -0
- package/dist/types/platform-admin-runtime/WorkspaceViewDrawer.vue.d.ts +32 -0
- package/dist/types/platform-admin-runtime/WorkspaceViewOutlet.vue.d.ts +7 -0
- package/dist/types/platform-admin-runtime/authSession.d.ts +8 -0
- package/dist/types/platform-admin-runtime/backendHttp.d.ts +3 -0
- package/dist/types/platform-admin-runtime/currentUserContext.d.ts +4 -0
- package/dist/types/platform-admin-runtime/index.d.ts +12 -0
- package/dist/types/platform-admin-runtime/moduleOpenApi.d.ts +36 -0
- package/dist/types/platform-admin-runtime/pageRealtime.d.ts +61 -0
- package/dist/types/platform-admin-runtime/platformAdminRoutes.d.ts +21 -0
- package/dist/types/platform-admin-runtime/realtime.d.ts +20 -0
- package/dist/types/platform-admin-runtime/sessionRecovery.d.ts +3 -0
- package/dist/types/platform-admin-runtime/useWorkspaceViewPromotion.d.ts +24 -0
- package/dist/types/platform-admin-runtime/workspaceViewContract.d.ts +36 -0
- package/dist/types/platform-admin-runtime/workspaceViewContributions.d.ts +3 -0
- package/dist/types/platform-admin-runtime/workspaceViewHost.d.ts +10 -0
- package/dist/types/platform-admin-runtime/workspaceViewSessions.d.ts +18 -0
- package/dist/types/platform-admin-runtime/workspaceViews.d.ts +18 -0
- package/dist/types/platform-components/ApplicationScopeSwitcher.vue.d.ts +18 -0
- package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +52 -0
- package/dist/types/platform-components/DateTimeText.vue.d.ts +15 -0
- package/dist/types/platform-components/DrawerOperationBar.vue.d.ts +18 -0
- package/dist/types/platform-components/EnabledSelect.vue.d.ts +14 -0
- package/dist/types/platform-components/ManagementExplorerColumn.vue.d.ts +13 -0
- package/dist/types/platform-components/ManagementWorkspace.vue.d.ts +19 -0
- package/dist/types/platform-components/ModuleActionButton.vue.d.ts +40 -0
- package/dist/types/platform-components/RecordActionBar.vue.d.ts +20 -0
- package/dist/types/platform-components/RecordDetailDrawer.vue.d.ts +37 -0
- package/dist/types/platform-components/RecordDetailFields.vue.d.ts +23 -0
- package/dist/types/platform-components/RecordDetailLayout.vue.d.ts +37 -0
- package/dist/types/platform-components/RecordDetailPanel.vue.d.ts +25 -0
- package/dist/types/platform-components/RecordExpandedSubtable.vue.d.ts +29 -0
- package/dist/types/platform-components/RecordExplorerPanel.vue.d.ts +39 -0
- package/dist/types/platform-components/RecordExternalChangeNotice.vue.d.ts +20 -0
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +31 -0
- package/dist/types/platform-components/RecordListExplorer.vue.d.ts +42 -0
- package/dist/types/platform-components/RecordMetaSection.vue.d.ts +8 -0
- package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +74 -0
- package/dist/types/platform-components/RecordPicker.vue.d.ts +35 -0
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +103 -0
- package/dist/types/platform-components/RecordStatusSwitch.vue.d.ts +18 -0
- package/dist/types/platform-components/RecordStatusTag.vue.d.ts +6 -0
- package/dist/types/platform-components/RecordTreeSelector.vue.d.ts +22 -0
- package/dist/types/platform-components/RecycleBinModeButton.vue.d.ts +16 -0
- package/dist/types/platform-components/StaticManagementLayout.vue.d.ts +44 -0
- package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +57 -0
- package/dist/types/platform-components/UserSessionExpandedSubtable.vue.d.ts +26 -0
- package/dist/types/platform-components/actionConfirmation.d.ts +3 -0
- package/dist/types/platform-components/crudRecordListModel.d.ts +10 -0
- package/dist/types/platform-components/drawerPromotion.d.ts +4 -0
- package/dist/types/platform-components/index.d.ts +76 -0
- package/dist/types/platform-components/optionFieldOptions.d.ts +10 -0
- package/dist/types/platform-components/pageLayoutContext.d.ts +6 -0
- package/dist/types/platform-components/platformActionResultFeedback.d.ts +12 -0
- package/dist/types/platform-components/platformActionResultReactions.d.ts +53 -0
- package/dist/types/platform-components/platformDateTime.d.ts +16 -0
- package/dist/types/platform-components/platformErrorFeedback.d.ts +15 -0
- package/dist/types/platform-components/platformTimeZoneContext.d.ts +3 -0
- package/dist/types/platform-components/recordActionBarModel.d.ts +27 -0
- package/dist/types/platform-components/recordDetailFieldModel.d.ts +7 -0
- package/dist/types/platform-components/recordDraftNormalizer.d.ts +1 -0
- package/dist/types/platform-components/recordEditorSessionState.d.ts +38 -0
- package/dist/types/platform-components/recordExplorerItemModel.d.ts +8 -0
- package/dist/types/platform-components/recordFormFieldModel.d.ts +57 -0
- package/dist/types/platform-components/recordPickerConstraints.d.ts +20 -0
- package/dist/types/platform-components/recordPickerModel.d.ts +2 -0
- package/dist/types/platform-components/recycleBinState.d.ts +39 -0
- package/dist/types/platform-components/scopedResourceTreeModuleContext.d.ts +6 -0
- package/dist/types/platform-components/scopedTreeModuleContext.d.ts +10 -0
- package/dist/types/platform-components/softDeletedConflictHandler.d.ts +75 -0
- package/dist/types/platform-components/staticCrudManagementState.d.ts +66 -0
- package/dist/types/platform-components/staticFormActionFlow.d.ts +39 -0
- package/dist/types/platform-components/staticTreeResourceModuleContext.d.ts +7 -0
- package/dist/types/platform-components/treeRecordModel.d.ts +17 -0
- package/dist/types/platform-components/useRecycleBinExplorerMode.d.ts +26 -0
- package/dist/types/platform-components/userSessionPresentation.d.ts +12 -0
- package/dist/types/platform-workbench/Workbench.vue.d.ts +46 -0
- package/dist/types/platform-workbench/WorkbenchMenu.vue.d.ts +23 -0
- package/dist/types/platform-workbench/WorkbenchMenuTree.vue.d.ts +13 -0
- package/dist/types/platform-workbench/WorkbenchOutlet.vue.d.ts +7 -0
- package/dist/types/platform-workbench/hosts/BusinessRouteHost.vue.d.ts +7 -0
- package/dist/types/platform-workbench/hosts/ExternalPageHost.vue.d.ts +7 -0
- package/dist/types/platform-workbench/hosts/PlatformRouteHost.vue.d.ts +7 -0
- package/dist/types/platform-workbench/index.d.ts +11 -0
- package/dist/types/platform-workbench/menuNavigation.d.ts +28 -0
- package/dist/types/platform-workbench/menuTreeModel.d.ts +20 -0
- package/dist/types/platform-workbench/pageHostRegistry.d.ts +3 -0
- package/dist/types/platform-workbench/realtimeStatus.d.ts +7 -0
- package/dist/types/platform-workbench/workbenchNavigation.d.ts +12 -0
- package/dist/types/views/ApplicationManagementView.vue.d.ts +3 -0
- package/dist/types/views/DepartmentManagementView.vue.d.ts +3 -0
- package/dist/types/views/DictionaryManagementView.vue.d.ts +3 -0
- package/dist/types/views/EmployeeDetailContent.vue.d.ts +64 -0
- package/dist/types/views/EmployeeDetailWorkspaceView.vue.d.ts +6 -0
- package/dist/types/views/EmployeeEmploymentDrawer.vue.d.ts +14 -0
- package/dist/types/views/EmployeeEmploymentTable.vue.d.ts +18 -0
- package/dist/types/views/EmployeeManagementView.vue.d.ts +7 -0
- package/dist/types/views/FieldSpecManagementView.vue.d.ts +3 -0
- package/dist/types/views/FieldUiControlManagementView.vue.d.ts +3 -0
- package/dist/types/views/HomeView.vue.d.ts +3 -0
- package/dist/types/views/MenuManagementView.vue.d.ts +3 -0
- package/dist/types/views/MetadataOrchestrationView.vue.d.ts +8 -0
- package/dist/types/views/ModuleActionManagementView.vue.d.ts +9 -0
- package/dist/types/views/ModuleManagementView.vue.d.ts +3 -0
- package/dist/types/views/ModuleOpenApiView.vue.d.ts +10 -0
- package/dist/types/views/OpenApiCatalogView.vue.d.ts +9 -0
- package/dist/types/views/OrganizationManagementView.vue.d.ts +3 -0
- package/dist/types/views/PasswordManagementView.vue.d.ts +3 -0
- package/dist/types/views/PositionManagementView.vue.d.ts +3 -0
- package/dist/types/views/RoleAccountGrantDrawer.vue.d.ts +16 -0
- package/dist/types/views/RoleAuthorizationView.vue.d.ts +12 -0
- package/dist/types/views/RoleDetailWorkspaceView.vue.d.ts +9 -0
- package/dist/types/views/RoleEmploymentGrantDrawer.vue.d.ts +16 -0
- package/dist/types/views/RoleGroupMemberSelector.vue.d.ts +18 -0
- package/dist/types/views/RoleManagementView.vue.d.ts +9 -0
- package/dist/types/views/SystemUserDetailWorkspaceView.vue.d.ts +7 -0
- package/dist/types/views/SystemUserManagementView.vue.d.ts +7 -0
- package/dist/types/views/TenantManagementView.vue.d.ts +3 -0
- package/dist/types/views/UserDetailContent.vue.d.ts +32 -0
- package/dist/types/views/UserDetailWorkspaceView.vue.d.ts +7 -0
- package/dist/types/views/UserManagementView.vue.d.ts +8 -0
- package/dist/types/views/applicationManagementState.d.ts +64 -0
- package/dist/types/views/departmentManagementState.d.ts +137 -0
- package/dist/types/views/dictionaryManagementState.d.ts +215 -0
- package/dist/types/views/employeeDetailStateModel.d.ts +39 -0
- package/dist/types/views/employeeDetailWorkspaceSession.d.ts +16 -0
- package/dist/types/views/employeeDetailWorkspaceView.d.ts +4 -0
- package/dist/types/views/fieldSpecManagementState.d.ts +80 -0
- package/dist/types/views/fieldUiControlManagementState.d.ts +76 -0
- package/dist/types/views/menuManagementState.d.ts +178 -0
- package/dist/types/views/metadataOrchestrationState.d.ts +278 -0
- package/dist/types/views/metadataOrchestrationWorkspaceView.d.ts +6 -0
- package/dist/types/views/moduleActionManagementWorkspaceView.d.ts +7 -0
- package/dist/types/views/moduleManagementState.d.ts +76 -0
- package/dist/types/views/organizationManagementState.d.ts +64 -0
- package/dist/types/views/positionManagementState.d.ts +218 -0
- package/dist/types/views/roleAuthorizationWorkspaceSession.d.ts +17 -0
- package/dist/types/views/roleAuthorizationWorkspaceView.d.ts +5 -0
- package/dist/types/views/roleDetailWorkspaceSession.d.ts +19 -0
- package/dist/types/views/roleDetailWorkspaceView.d.ts +8 -0
- package/dist/types/views/roleGrantClient.d.ts +59 -0
- package/dist/types/views/systemUserDetailWorkspaceSession.d.ts +12 -0
- package/dist/types/views/systemUserDetailWorkspaceView.d.ts +5 -0
- package/dist/types/views/tenantManagementState.d.ts +64 -0
- package/dist/types/views/useEmployeeEmploymentRows.d.ts +20 -0
- package/dist/types/views/useUserSessionRows.d.ts +28 -0
- package/dist/types/views/userDetailStateModel.d.ts +11 -0
- package/dist/types/views/userDetailWorkspaceSession.d.ts +14 -0
- package/dist/types/views/userDetailWorkspaceView.d.ts +4 -0
- package/dist/types/vue-ui-antdv/components/ActionBar.vue.d.ts +11 -0
- package/dist/types/vue-ui-antdv/components/DictionarySelect.vue.d.ts +14 -0
- package/dist/types/vue-ui-antdv/components/ReferenceSelect.vue.d.ts +16 -0
- package/dist/types/vue-ui-antdv/components/UiActionButton.vue.d.ts +37 -0
- package/dist/types/vue-ui-antdv/components/UiBadge.vue.d.ts +20 -0
- package/dist/types/vue-ui-antdv/components/UiButton.vue.d.ts +41 -0
- package/dist/types/vue-ui-antdv/components/UiCheckbox.vue.d.ts +30 -0
- package/dist/types/vue-ui-antdv/components/UiDataTable.vue.d.ts +71 -0
- package/dist/types/vue-ui-antdv/components/UiDropdown.vue.d.ts +29 -0
- package/dist/types/vue-ui-antdv/components/UiEmpty.vue.d.ts +6 -0
- package/dist/types/vue-ui-antdv/components/UiError.vue.d.ts +7 -0
- package/dist/types/vue-ui-antdv/components/UiForm.vue.d.ts +15 -0
- package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +7 -0
- package/dist/types/vue-ui-antdv/components/UiInput.vue.d.ts +25 -0
- package/dist/types/vue-ui-antdv/components/UiMenu.vue.d.ts +19 -0
- package/dist/types/vue-ui-antdv/components/UiModal.vue.d.ts +36 -0
- package/dist/types/vue-ui-antdv/components/UiRecordExplorerItem.vue.d.ts +26 -0
- package/dist/types/vue-ui-antdv/components/UiSearchInput.vue.d.ts +22 -0
- package/dist/types/vue-ui-antdv/components/UiSelect.vue.d.ts +30 -0
- package/dist/types/vue-ui-antdv/components/UiSidePanel.vue.d.ts +28 -0
- package/dist/types/vue-ui-antdv/components/UiSidePanelHost.vue.d.ts +13 -0
- package/dist/types/vue-ui-antdv/components/UiSpin.vue.d.ts +22 -0
- package/dist/types/vue-ui-antdv/components/UiSwitch.vue.d.ts +22 -0
- package/dist/types/vue-ui-antdv/components/UiTable.vue.d.ts +13 -0
- package/dist/types/vue-ui-antdv/components/UiTabs.vue.d.ts +14 -0
- package/dist/types/vue-ui-antdv/components/UiTextArea.vue.d.ts +20 -0
- package/dist/types/vue-ui-antdv/components/UiTooltip.vue.d.ts +19 -0
- package/dist/types/vue-ui-antdv/components/UiTree.vue.d.ts +17 -0
- package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +30 -0
- package/dist/types/vue-ui-antdv/components/sidePanelHost.d.ts +3 -0
- package/dist/types/vue-ui-antdv/confirm.d.ts +5 -0
- package/dist/types/vue-ui-antdv/dataTableModel.d.ts +10 -0
- package/dist/types/vue-ui-antdv/dictionaries.d.ts +2 -0
- package/dist/types/vue-ui-antdv/feedback.d.ts +10 -0
- package/dist/types/vue-ui-antdv/index.d.ts +36 -0
- package/dist/types/vue-ui-antdv/references.d.ts +8 -0
- package/dist/types/vue-ui-antdv/registry.d.ts +3 -0
- package/dist/types/vue-ui-antdv/types.d.ts +65 -0
- package/dist/types/web-contracts/index.d.ts +862 -0
- package/dist/types/web-core/actionResult.d.ts +28 -0
- package/dist/types/web-core/clients.d.ts +23 -0
- package/dist/types/web-core/dataChanges.d.ts +15 -0
- package/dist/types/web-core/errors.d.ts +65 -0
- package/dist/types/web-core/http.d.ts +21 -0
- package/dist/types/web-core/index.d.ts +8 -0
- package/dist/types/web-core/mock.d.ts +6 -0
- package/dist/types/web-core/module/abilities.d.ts +21 -0
- package/dist/types/web-core/module/abilityCodes.d.ts +18 -0
- package/dist/types/web-core/module/index.d.ts +6 -0
- package/dist/types/web-core/module/moduleContext.d.ts +49 -0
- package/dist/types/web-core/module/recycleBin.d.ts +6 -0
- package/dist/types/web-core/module/runtimeContext.d.ts +65 -0
- package/dist/types/web-core/module/staticModuleClient.d.ts +45 -0
- package/dist/types/web-core/query.d.ts +16 -0
- package/dist/types/web-core/realtime.d.ts +104 -0
- package/dist/useUserSessionRows-CLM0ZvAF.js +128 -0
- package/dist/workspaceViewSessions-WsJU3OS7.js +1578 -0
- package/package.json +27 -0
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
import { Dt as e, Et as t, G as n, Gt as r, Ht as i, It as ee, Lt as te, Pt as ne, R as a, Vt as re, Xt as o, Zt as ie, _ as ae, _t as oe, cn as se, en as s, et as ce, fr as le, tn as c } from "./platform-components-bC1gwhic.js";
|
|
2
|
+
import { g as ue, i as de, n as fe, r as l, t as u, u as d } from "./workspaceViewSessions-WsJU3OS7.js";
|
|
3
|
+
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as v, createTextVNode as y, createVNode as b, defineComponent as x, guardReactiveProps as pe, normalizeClass as me, normalizeProps as he, onBeforeUnmount as ge, onMounted as _e, 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";
|
|
4
|
+
//#region src/views/roleGrantClient.ts
|
|
5
|
+
function be(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 xe = /* @__PURE__ */ x({
|
|
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: t }) {
|
|
119
|
+
let n = e, r = t, i = p(() => n.profile === "wide-work" ? "min(600px, 100vw)" : 520);
|
|
120
|
+
return (t, n) => (S(), m(E(ce), {
|
|
121
|
+
open: e.open,
|
|
122
|
+
title: e.title,
|
|
123
|
+
subtitle: e.subtitle,
|
|
124
|
+
width: i.value,
|
|
125
|
+
promotion: e.promotion,
|
|
126
|
+
onClose: n[0] ||= (e) => r("close")
|
|
127
|
+
}, v({
|
|
128
|
+
default: D(() => [w(t.$slots, "default")]),
|
|
129
|
+
_: 2
|
|
130
|
+
}, [t.$slots.operation ? {
|
|
131
|
+
name: "operation",
|
|
132
|
+
fn: D(() => [w(t.$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 Se(e, t) {
|
|
146
|
+
return u(d, e, t);
|
|
147
|
+
}
|
|
148
|
+
function Ce(e, t) {
|
|
149
|
+
return fe(d, e, t);
|
|
150
|
+
}
|
|
151
|
+
function we(e) {
|
|
152
|
+
return l(d, e);
|
|
153
|
+
}
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/views/RoleAuthorizationView.vue?vue&type=script&setup=true&lang.ts
|
|
156
|
+
var Te = { class: "panel-title" }, Ee = {
|
|
157
|
+
key: 4,
|
|
158
|
+
class: "authorization-layout"
|
|
159
|
+
}, De = {
|
|
160
|
+
key: 0,
|
|
161
|
+
class: "authorization-column-header"
|
|
162
|
+
}, Oe = {
|
|
163
|
+
key: 2,
|
|
164
|
+
class: "data-scope-editor"
|
|
165
|
+
}, ke = { key: 0 }, Ae = { key: 1 }, je = { key: 3 }, Me = {
|
|
166
|
+
key: 4,
|
|
167
|
+
class: "not-applicable"
|
|
168
|
+
}, O = /*@__PURE__*/ x({
|
|
169
|
+
name: "RoleAuthorizationView",
|
|
170
|
+
__name: "RoleAuthorizationView",
|
|
171
|
+
props: {
|
|
172
|
+
roleId: {},
|
|
173
|
+
drawer: { type: Boolean }
|
|
174
|
+
},
|
|
175
|
+
emits: ["close"],
|
|
176
|
+
setup(ce, { emit: le }) {
|
|
177
|
+
let c = ce, fe = le, l = se({ moduleAlias: "iam.role" }), u = be(l.http), x = c.roleId ?? new URLSearchParams(window.location.search).get("roleId") ?? "", w = ue(), O = c.roleId ? { roleId: c.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 ?? x ?? "角色"), 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) => ({
|
|
178
|
+
id: e.moduleAlias,
|
|
179
|
+
parentId: e.parentId,
|
|
180
|
+
title: e.title,
|
|
181
|
+
secondary: e.applicationAlias
|
|
182
|
+
}))), Le = p(() => (F.value?.options ?? []).map((e) => ({
|
|
183
|
+
value: e.code,
|
|
184
|
+
label: e.title
|
|
185
|
+
}))), Re = p(() => (F.value?.referenceDependencies ?? []).map((e) => ({
|
|
186
|
+
value: e.referenceFieldId,
|
|
187
|
+
label: `${e.title} → ${e.targetModuleTitle}`
|
|
188
|
+
}))), ze = p(() => new Map((F.value?.referenceDependencies ?? []).map((e) => [e.referenceFieldId, e]))), Be = [
|
|
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
|
+
], Ve = [
|
|
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
|
+
], He = p(() => N.value), Ue = p(() => P.value?.actions ?? []), Y = p(() => c.drawer === !0 || !!O && w?.presentation === "drawer"), X = p(() => !!O), We = p(() => Y.value ? xe : X.value ? n : "div"), Ge = p(() => Y.value ? {
|
|
223
|
+
open: !0,
|
|
224
|
+
title: J.value,
|
|
225
|
+
profile: d.drawerProfile,
|
|
226
|
+
promotion: Xe.value,
|
|
227
|
+
onClose: ut
|
|
228
|
+
} : X.value ? { title: J.value } : {}), Ke = p(() => {
|
|
229
|
+
let e = P.value;
|
|
230
|
+
return !e || B.value === void 0 ? !1 : JSON.stringify(e.actions) !== B.value;
|
|
231
|
+
}), 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({
|
|
232
|
+
view: d,
|
|
233
|
+
input: () => O,
|
|
234
|
+
title: J,
|
|
235
|
+
eligibility: () => ({
|
|
236
|
+
hasStableIdentity: !!(x && A.value),
|
|
237
|
+
busy: R.value
|
|
238
|
+
}),
|
|
239
|
+
beforePromote: (e) => Se(e, {
|
|
240
|
+
selectedModuleAlias: M.value,
|
|
241
|
+
dataGrantMatrix: P.value,
|
|
242
|
+
actionDrafts: [...V.entries()].map(([e, t]) => ({
|
|
243
|
+
moduleAlias: e,
|
|
244
|
+
actions: t
|
|
245
|
+
})),
|
|
246
|
+
actionSnapshots: [...H.entries()].map(([e, t]) => ({
|
|
247
|
+
moduleAlias: e,
|
|
248
|
+
snapshot: t
|
|
249
|
+
}))
|
|
250
|
+
}).then((e) => e === "accepted"),
|
|
251
|
+
onPromoted: dt,
|
|
252
|
+
onPromotionRejected: () => e("目标页签存在未确认的授权配置;请先确认或关闭该页签后再固定当前抽屉。", {
|
|
253
|
+
source: "role-authorization",
|
|
254
|
+
phase: "validation"
|
|
255
|
+
})
|
|
256
|
+
});
|
|
257
|
+
_e(() => {
|
|
258
|
+
O && !Y.value && (Ne = Ce(O, ft)), Q();
|
|
259
|
+
}), ye(J, (e) => {
|
|
260
|
+
X.value && w?.setTitle(e);
|
|
261
|
+
}, { immediate: !0 }), ye(M, () => void Ze()), _e(() => window.addEventListener("beforeunload", mt)), ge(() => {
|
|
262
|
+
Ne?.(), window.removeEventListener("beforeunload", mt);
|
|
263
|
+
});
|
|
264
|
+
async function Q() {
|
|
265
|
+
if (!x) {
|
|
266
|
+
z.value = "缺少角色标识,无法打开授权页。";
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
I.value = !0, z.value = void 0;
|
|
270
|
+
try {
|
|
271
|
+
if (A.value = await l.crud.view(x), A.value.roleKind === "group") return;
|
|
272
|
+
if (A.value.roleKind === "dataGrant") {
|
|
273
|
+
let [e, t] = await Promise.all([u.dataGrantActionMatrix(x), u.dataScopePolicyCatalog(x)]);
|
|
274
|
+
P.value = k?.dataGrantMatrix ?? e, F.value = t, B.value = JSON.stringify(e.actions);
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
j.value = (await u.authorizationModules(x)).records, M.value = k?.selectedModuleAlias ?? j.value[0]?.moduleAlias;
|
|
278
|
+
} catch (e) {
|
|
279
|
+
z.value = "授权信息加载失败,请重试。", t(e, {
|
|
280
|
+
source: "role-authorization",
|
|
281
|
+
phase: "load"
|
|
282
|
+
});
|
|
283
|
+
} finally {
|
|
284
|
+
I.value = !1;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
async function Ze() {
|
|
288
|
+
let e = M.value;
|
|
289
|
+
if (!(!e || G.value || W.value)) {
|
|
290
|
+
L.value = !0;
|
|
291
|
+
try {
|
|
292
|
+
let [t, n] = await Promise.all([u.permissionMatrix(x, [e]), u.dataScopePolicyCatalog(x, e)]), r = (t.modules[0]?.actions ?? []).map(st), i = k?.actionDrafts?.find((t) => t.moduleAlias === e)?.actions;
|
|
293
|
+
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;
|
|
294
|
+
} catch (e) {
|
|
295
|
+
t(e, {
|
|
296
|
+
source: "role-authorization",
|
|
297
|
+
phase: "load"
|
|
298
|
+
});
|
|
299
|
+
} finally {
|
|
300
|
+
L.value = !1;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
function Qe(e, t) {
|
|
305
|
+
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;
|
|
306
|
+
}
|
|
307
|
+
function $e(e) {
|
|
308
|
+
N.value.forEach((t) => Qe(t, e));
|
|
309
|
+
}
|
|
310
|
+
function et(e, t) {
|
|
311
|
+
if (e.dataScopePolicy = String(t || "none"), e.dataScopePolicy === "referenceDependency") {
|
|
312
|
+
e.referenceFieldId = void 0, e.referenceActionCode = void 0, U.value += 1;
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
e.referenceFieldId = void 0, e.referenceActionCode = void 0, U.value += 1;
|
|
316
|
+
}
|
|
317
|
+
function tt(e, t) {
|
|
318
|
+
let n = ze.value.get(String(t || ""));
|
|
319
|
+
e.referenceFieldId = n?.referenceFieldId, e.referenceActionCode = n?.referenceActionCode, U.value += 1;
|
|
320
|
+
}
|
|
321
|
+
function nt(e) {
|
|
322
|
+
return ze.value.get(String(e || ""));
|
|
323
|
+
}
|
|
324
|
+
function rt(e) {
|
|
325
|
+
return typeof e == "string" || typeof e == "number" ? e : void 0;
|
|
326
|
+
}
|
|
327
|
+
function it(e) {
|
|
328
|
+
return e.dataScopePolicy ?? "inheritDataGrant";
|
|
329
|
+
}
|
|
330
|
+
function at(e) {
|
|
331
|
+
return !!e.dataAuth && K.value;
|
|
332
|
+
}
|
|
333
|
+
function ot(e, t) {
|
|
334
|
+
return e.key === "dataScopePolicy" && at(t);
|
|
335
|
+
}
|
|
336
|
+
function st(e) {
|
|
337
|
+
return K.value && e.dataAuth && e.dataScopePolicy === "none" ? {
|
|
338
|
+
...e,
|
|
339
|
+
dataScopePolicy: "inheritDataGrant"
|
|
340
|
+
} : e;
|
|
341
|
+
}
|
|
342
|
+
async function ct() {
|
|
343
|
+
if (P.value) {
|
|
344
|
+
R.value = !0;
|
|
345
|
+
try {
|
|
346
|
+
await oe(await u.replaceDataGrantActions(x, P.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
|
+
}), B.value = JSON.stringify(P.value.actions);
|
|
355
|
+
} catch (e) {
|
|
356
|
+
t(e, {
|
|
357
|
+
source: "role-authorization",
|
|
358
|
+
phase: "action"
|
|
359
|
+
});
|
|
360
|
+
} finally {
|
|
361
|
+
R.value = !1;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
async function lt() {
|
|
366
|
+
let e = [...V.entries()].filter(([e, t]) => H.get(e) !== JSON.stringify(t));
|
|
367
|
+
if (e.length) {
|
|
368
|
+
R.value = !0;
|
|
369
|
+
try {
|
|
370
|
+
await oe(await u.replacePermissionMatrix(x, e.flatMap(([e, t]) => t.map((t) => ({
|
|
371
|
+
moduleAlias: e,
|
|
372
|
+
actionCode: t.actionCode,
|
|
373
|
+
granted: !!t.granted,
|
|
374
|
+
dataScopePolicy: t.granted && t.dataAuth && K.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]) => H.set(e, JSON.stringify(t))), U.value += 1;
|
|
382
|
+
} catch (e) {
|
|
383
|
+
t(e, {
|
|
384
|
+
source: "role-authorization",
|
|
385
|
+
phase: "action"
|
|
386
|
+
});
|
|
387
|
+
} finally {
|
|
388
|
+
R.value = !1;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
async function $() {
|
|
393
|
+
if (G.value) {
|
|
394
|
+
await ct();
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
await lt();
|
|
398
|
+
}
|
|
399
|
+
async function ut() {
|
|
400
|
+
Z.value && !await ne({
|
|
401
|
+
title: "放弃未确认的授权配置",
|
|
402
|
+
content: "当前修改尚未确认,关闭后将丢失这些修改。",
|
|
403
|
+
okText: "放弃修改",
|
|
404
|
+
danger: !0
|
|
405
|
+
}) || pt();
|
|
406
|
+
}
|
|
407
|
+
function dt() {
|
|
408
|
+
pt();
|
|
409
|
+
}
|
|
410
|
+
function ft(e) {
|
|
411
|
+
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);
|
|
412
|
+
}
|
|
413
|
+
function pt() {
|
|
414
|
+
if (c.drawer === !0) {
|
|
415
|
+
fe("close");
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
w?.dismiss();
|
|
419
|
+
}
|
|
420
|
+
function mt(e) {
|
|
421
|
+
Z.value && (e.preventDefault(), e.returnValue = "");
|
|
422
|
+
}
|
|
423
|
+
return (e, t) => (S(), m(ve(We.value), he(pe(Ge.value)), v({
|
|
424
|
+
default: D(() => [_("section", { class: me(["role-authorization-page", { "role-authorization-page--drawer": Y.value }]) }, [I.value ? (S(), m(E(te), {
|
|
425
|
+
key: 0,
|
|
426
|
+
tip: "加载授权信息"
|
|
427
|
+
})) : z.value ? (S(), m(E(ee), {
|
|
428
|
+
key: 1,
|
|
429
|
+
title: "授权页加载失败",
|
|
430
|
+
message: z.value
|
|
431
|
+
}, null, 8, ["message"])) : W.value ? (S(), m(E(i), {
|
|
432
|
+
key: 2,
|
|
433
|
+
title: "角色组不独立授权",
|
|
434
|
+
description: "角色组只组合成员角色;请到成员角色分别配置动作和数据权限。"
|
|
435
|
+
})) : G.value && P.value ? (S(), m(E(a), {
|
|
436
|
+
key: 3,
|
|
437
|
+
class: "data-grant-content",
|
|
438
|
+
title: X.value ? "数据权限模板" : `数据权限模板 - ${q.value}`,
|
|
439
|
+
searchable: !1,
|
|
440
|
+
onRefresh: Q
|
|
441
|
+
}, {
|
|
442
|
+
default: D(() => [_("header", Te, [t[3] ||= _("div", null, [_("h3", null, "标准动作的数据范围模板"), _("p", null, "模板只会在具体任职的普通角色动作选择“继承数据授权角色”时生效。")], -1), X.value ? h("v-if", !0) : (S(), m(E(s), {
|
|
443
|
+
key: 0,
|
|
444
|
+
type: "primary",
|
|
445
|
+
disabled: !Z.value,
|
|
446
|
+
loading: R.value,
|
|
447
|
+
onClick: $
|
|
448
|
+
}, {
|
|
449
|
+
default: D(() => [...t[2] ||= [y(" 确认 ", -1)]]),
|
|
450
|
+
_: 1
|
|
451
|
+
}, 8, ["disabled", "loading"]))]), b(E(re), {
|
|
452
|
+
columns: Ve,
|
|
453
|
+
rows: Ue.value,
|
|
454
|
+
"row-key": "actionCode",
|
|
455
|
+
"horizontal-scroll": ""
|
|
456
|
+
}, {
|
|
457
|
+
cell: D(({ column: e, record: t }) => [e.key === "title" ? (S(), g(f, { key: 0 }, [_("strong", null, T(t.title || t.actionCode), 1), _("small", null, T(t.actionCode), 1)], 64)) : e.key === "configured" ? (S(), m(E(r), {
|
|
458
|
+
key: 1,
|
|
459
|
+
checked: !!t.configured,
|
|
460
|
+
disabled: R.value,
|
|
461
|
+
onChange: (e) => t.configured = e
|
|
462
|
+
}, null, 8, [
|
|
463
|
+
"checked",
|
|
464
|
+
"disabled",
|
|
465
|
+
"onChange"
|
|
466
|
+
])) : (S(), m(E(o), {
|
|
467
|
+
key: 2,
|
|
468
|
+
value: t.dataScopePolicy,
|
|
469
|
+
options: Le.value,
|
|
470
|
+
disabled: !t.configured || R.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"])) : (S(), g("section", Ee, [b(E(a), {
|
|
484
|
+
class: "module-panel",
|
|
485
|
+
title: "模块树",
|
|
486
|
+
"refresh-title": "刷新模块目录",
|
|
487
|
+
searchable: !1,
|
|
488
|
+
onRefresh: Q
|
|
489
|
+
}, {
|
|
490
|
+
default: D(() => [b(E(ae), {
|
|
491
|
+
records: Ie.value,
|
|
492
|
+
"selected-id": M.value,
|
|
493
|
+
onSelect: t[0] ||= (e) => M.value = e.id
|
|
494
|
+
}, null, 8, ["records", "selected-id"])]),
|
|
495
|
+
_: 1
|
|
496
|
+
}), b(E(a), {
|
|
497
|
+
class: "action-panel",
|
|
498
|
+
title: Pe.value,
|
|
499
|
+
searchable: !1
|
|
500
|
+
}, v({
|
|
501
|
+
default: D(() => [L.value ? (S(), m(E(te), {
|
|
502
|
+
key: 0,
|
|
503
|
+
tip: "加载模块动作"
|
|
504
|
+
})) : M.value ? (S(), m(E(re), {
|
|
505
|
+
key: 2,
|
|
506
|
+
columns: Be,
|
|
507
|
+
rows: He.value,
|
|
508
|
+
"row-key": "actionCode",
|
|
509
|
+
"fill-height": "",
|
|
510
|
+
"horizontal-scroll": ""
|
|
511
|
+
}, {
|
|
512
|
+
header: D(({ column: e }) => [e.key === "granted" ? (S(), g("span", De, [b(E(ie), {
|
|
513
|
+
checked: Je.value,
|
|
514
|
+
indeterminate: Ye.value,
|
|
515
|
+
disabled: R.value || !N.value.length,
|
|
516
|
+
"aria-label": "全选当前模块动作授权",
|
|
517
|
+
onChange: $e
|
|
518
|
+
}, null, 8, [
|
|
519
|
+
"checked",
|
|
520
|
+
"indeterminate",
|
|
521
|
+
"disabled"
|
|
522
|
+
]), t[5] ||= y(" 授权 ", -1)])) : (S(), g(f, { key: 1 }, [y(T(e.title), 1)], 64))]),
|
|
523
|
+
cell: D(({ column: e, record: t }) => [e.key === "title" ? (S(), g(f, { key: 0 }, [_("strong", null, T(t.title || t.actionCode), 1), _("small", null, T(t.permissionActionCode || t.actionCode), 1)], 64)) : e.key === "granted" ? (S(), m(E(ie), {
|
|
524
|
+
key: 1,
|
|
525
|
+
checked: !!t.granted,
|
|
526
|
+
disabled: R.value,
|
|
527
|
+
onChange: (e) => Qe(t, e)
|
|
528
|
+
}, null, 8, [
|
|
529
|
+
"checked",
|
|
530
|
+
"disabled",
|
|
531
|
+
"onChange"
|
|
532
|
+
])) : t.dataAuth && K.value && t.granted ? (S(), g("div", Oe, [b(E(o), {
|
|
533
|
+
value: it(t),
|
|
534
|
+
options: Le.value,
|
|
535
|
+
disabled: R.value,
|
|
536
|
+
"allow-clear": !1,
|
|
537
|
+
"onUpdate:value": (e) => et(t, e)
|
|
538
|
+
}, null, 8, [
|
|
539
|
+
"value",
|
|
540
|
+
"options",
|
|
541
|
+
"disabled",
|
|
542
|
+
"onUpdate:value"
|
|
543
|
+
]), t.dataScopePolicy === "referenceDependency" ? (S(), g(f, { key: 0 }, [b(E(o), {
|
|
544
|
+
value: rt(t.referenceFieldId),
|
|
545
|
+
options: Re.value,
|
|
546
|
+
disabled: R.value,
|
|
547
|
+
placeholder: "请选择引用字段",
|
|
548
|
+
"allow-clear": !1,
|
|
549
|
+
"onUpdate:value": (e) => tt(t, e)
|
|
550
|
+
}, null, 8, [
|
|
551
|
+
"value",
|
|
552
|
+
"options",
|
|
553
|
+
"disabled",
|
|
554
|
+
"onUpdate:value"
|
|
555
|
+
]), t.referenceFieldId ? (S(), g("small", ke, " 依赖目标:" + T(nt(t.referenceFieldId)?.targetModuleTitle) + " · " + T(nt(t.referenceFieldId)?.referenceActionTitle), 1)) : (S(), g("small", Ae, "请先选择引用字段,再开启该动作授权。"))], 64)) : h("v-if", !0)])) : ot(e, t) ? (S(), g("span", je, "—")) : (S(), g("span", Me, "不适用"))]),
|
|
556
|
+
_: 1
|
|
557
|
+
}, 8, ["rows"])) : (S(), m(E(i), {
|
|
558
|
+
key: 1,
|
|
559
|
+
title: "请选择模块"
|
|
560
|
+
}))]),
|
|
561
|
+
_: 2
|
|
562
|
+
}, [X.value ? void 0 : {
|
|
563
|
+
name: "actions",
|
|
564
|
+
fn: D(() => [b(E(s), {
|
|
565
|
+
type: "primary",
|
|
566
|
+
disabled: !Z.value,
|
|
567
|
+
loading: R.value,
|
|
568
|
+
onClick: $
|
|
569
|
+
}, {
|
|
570
|
+
default: D(() => [...t[4] ||= [y(" 确认 ", -1)]]),
|
|
571
|
+
_: 1
|
|
572
|
+
}, 8, ["disabled", "loading"])]),
|
|
573
|
+
key: "0"
|
|
574
|
+
}]), 1032, ["title"])]))], 2)]),
|
|
575
|
+
_: 2
|
|
576
|
+
}, [X.value && !W.value ? {
|
|
577
|
+
name: "operation",
|
|
578
|
+
fn: D(() => [b(E(s), {
|
|
579
|
+
type: "primary",
|
|
580
|
+
disabled: !Z.value,
|
|
581
|
+
loading: R.value,
|
|
582
|
+
onClick: $
|
|
583
|
+
}, {
|
|
584
|
+
default: D(() => [...t[1] ||= [y(" 确认 ", -1)]]),
|
|
585
|
+
_: 1
|
|
586
|
+
}, 8, ["disabled", "loading"])]),
|
|
587
|
+
key: "0"
|
|
588
|
+
} : void 0]), 1040));
|
|
589
|
+
}
|
|
590
|
+
}), k = /* @__PURE__ */ le({ default: () => A }), A = /*#__PURE__*/ c(O, [["__scopeId", "data-v-3023b71d"]]);
|
|
591
|
+
//#endregion
|
|
592
|
+
export { k as n, be as r, A as t };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { t as e } from "./RoleManagementView-BrqaFV7y.js";
|
|
2
|
+
import { createBlock as t, defineComponent as n, openBlock as r } from "vue";
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region src/views/RoleDetailWorkspaceView.vue
|
|
5
|
+
var i = /* @__PURE__ */ n({
|
|
6
|
+
name: "RoleDetailWorkspaceView",
|
|
7
|
+
__name: "RoleDetailWorkspaceView",
|
|
8
|
+
props: {
|
|
9
|
+
recordId: {},
|
|
10
|
+
scopeKind: {},
|
|
11
|
+
scopeId: {}
|
|
12
|
+
},
|
|
13
|
+
setup(n) {
|
|
14
|
+
return (i, a) => (r(), t(e, {
|
|
15
|
+
"record-id": n.recordId,
|
|
16
|
+
"scope-kind": n.scopeKind,
|
|
17
|
+
"scope-id": n.scopeId
|
|
18
|
+
}, null, 8, [
|
|
19
|
+
"record-id",
|
|
20
|
+
"scope-kind",
|
|
21
|
+
"scope-id"
|
|
22
|
+
]));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
//#endregion
|
|
26
|
+
export { i as default };
|