@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,1927 @@
|
|
|
1
|
+
import { C as e, Dt as t, Et as n, Ft as r, G as i, Ht as a, It as ee, K as o, L as s, Lt as te, Pt as c, R as l, S as u, Ut as d, Vt as f, W as p, X as m, Xt as h, Yt as ne, Z as g, _t as re, a as _, cn as v, d as ie, en as y, et as ae, f as oe, ht as se, i as ce, tn as b, tt as le, u as ue, y as x } from "./platform-components-bC1gwhic.js";
|
|
2
|
+
import { f as de, g as fe, i as pe, n as S, r as C, t as w } from "./workspaceViewSessions-WsJU3OS7.js";
|
|
3
|
+
import { n as me } from "./currentUserContext-B1lj1WgF.js";
|
|
4
|
+
import { r as he, t as ge } from "./RoleAuthorizationView-CQtSAJoJ.js";
|
|
5
|
+
import { Fragment as _e, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createTextVNode as A, createVNode as j, defineComponent as M, normalizeClass as ve, onBeforeUnmount as ye, onMounted as be, openBlock as N, ref as P, renderList as F, toDisplayString as I, unref as L, watch as xe, withCtx as R, withKeys as z, withModifiers as Se } from "vue";
|
|
6
|
+
//#region src/views/RoleAccountGrantDrawer.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var B = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "role-account-grant-drawer-state"
|
|
10
|
+
}, V = {
|
|
11
|
+
key: 2,
|
|
12
|
+
class: "role-account-grant-drawer-body"
|
|
13
|
+
}, H = { class: "role-account-grant-search" }, U = { class: "role-account-grant-summary" }, W = { key: 0 }, G = { class: "role-account-grant-selected" }, K = { class: "role-account-grant-selected-title" }, Ce = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "role-account-grant-selected-list"
|
|
16
|
+
}, we = ["disabled", "onClick"], Te = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "role-account-grant-selected-empty"
|
|
19
|
+
}, Ee = { class: "role-account-grant-pagination" }, De = 20, Oe = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
20
|
+
name: "RoleAccountGrantDrawer",
|
|
21
|
+
__name: "RoleAccountGrantDrawer",
|
|
22
|
+
props: {
|
|
23
|
+
open: { type: Boolean },
|
|
24
|
+
context: {},
|
|
25
|
+
role: {}
|
|
26
|
+
},
|
|
27
|
+
emits: ["close", "saved"],
|
|
28
|
+
setup(e, { emit: t }) {
|
|
29
|
+
let i = e, a = t, o = P([]), s = P({}), c = P([]), l = P(/* @__PURE__ */ new Set()), u = P(/* @__PURE__ */ new Set()), d = P(""), f = P(""), p = P(0), m = P(0), h = P(!1), g = P(!1), _ = P(!1), v = P(!1), ie = T(() => he(i.context.http)), oe = T(() => i.role?.id), se = T(() => i.role ? `绑定用户 - ${X(i.role)}` : "绑定用户"), ce = T(() => i.role?.ownerScopeType === "platform" ? "platform" : i.role?.ownerScopeType === "organization" ? "organization" : "tenant"), b = T(() => ce.value === "platform" ? void 0 : i.role?.ownerScopeId), le = T(() => {
|
|
30
|
+
let e = /* @__PURE__ */ new Map();
|
|
31
|
+
for (let t of o.value) t.userId && e.set(t.userId, t);
|
|
32
|
+
return e;
|
|
33
|
+
}), ue = T(() => c.value.filter((e) => e.id).map((e) => ({
|
|
34
|
+
id: e.id,
|
|
35
|
+
username: J(e),
|
|
36
|
+
employeeNo: e.employeeNo ?? "",
|
|
37
|
+
employeeTitle: e.employeeTitle ?? "",
|
|
38
|
+
organizationTitle: e.organizationTitle ?? e.organizationId ?? "",
|
|
39
|
+
departmentTitle: e.departmentTitle ?? e.departmentId ?? "",
|
|
40
|
+
boundTitle: u.value.has(e.id) ? "已绑定" : "未绑定"
|
|
41
|
+
}))), x = T(() => [...l.value].map((e) => s.value[e] ?? q(e))), de = T(() => Math.max(1, Math.ceil(m.value / De))), fe = T(() => p.value > 0), pe = T(() => p.value + 1 < de.value), S = T(() => [...l.value].filter((e) => !u.value.has(e))), C = T(() => [...u.value].filter((e) => !l.value.has(e))), w = T(() => S.value.length > 0 || C.value.length > 0), me = {
|
|
42
|
+
rowKey: "id",
|
|
43
|
+
columns: [
|
|
44
|
+
{
|
|
45
|
+
title: "用户账号",
|
|
46
|
+
key: "username",
|
|
47
|
+
width: 140
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
title: "职员姓名",
|
|
51
|
+
key: "employeeTitle",
|
|
52
|
+
width: 120
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
title: "职员工号",
|
|
56
|
+
key: "employeeNo",
|
|
57
|
+
width: 120
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
title: "所属机构",
|
|
61
|
+
key: "organizationTitle",
|
|
62
|
+
width: 140
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
title: "所属部门",
|
|
66
|
+
key: "departmentTitle",
|
|
67
|
+
width: 140
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
title: "状态",
|
|
71
|
+
key: "boundTitle",
|
|
72
|
+
width: 90
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}, ge = T(() => ({
|
|
76
|
+
selectedRowKeys: [...l.value],
|
|
77
|
+
preserveSelectedRowKeys: !0,
|
|
78
|
+
disabledOf: () => _.value,
|
|
79
|
+
onChange: (e) => {
|
|
80
|
+
l.value = new Set(e.map((e) => String(e)));
|
|
81
|
+
}
|
|
82
|
+
}));
|
|
83
|
+
xe(() => [i.open, i.role?.id], ([e]) => {
|
|
84
|
+
e ? M() : ke();
|
|
85
|
+
}, { immediate: !0 });
|
|
86
|
+
async function M() {
|
|
87
|
+
let e = oe.value;
|
|
88
|
+
if (!e) {
|
|
89
|
+
ke();
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
h.value = !0, v.value = !1;
|
|
93
|
+
try {
|
|
94
|
+
let [t, n] = await Promise.all([ie.value.accountRoleGrants(e), ie.value.userSelector({
|
|
95
|
+
roleId: e,
|
|
96
|
+
enabledOnly: !1,
|
|
97
|
+
page: {
|
|
98
|
+
pageNum: 0,
|
|
99
|
+
pageSize: 500
|
|
100
|
+
}
|
|
101
|
+
})]);
|
|
102
|
+
o.value = t;
|
|
103
|
+
let r = new Set(t.map((e) => e.userId).filter((e) => !!e));
|
|
104
|
+
u.value = r, l.value = new Set(r), s.value = je([...t.map((e) => q(e.userId)).filter((e) => !!e), ...n.records]), await ve(0);
|
|
105
|
+
} catch (e) {
|
|
106
|
+
v.value = !0, n(e, {
|
|
107
|
+
source: "role-account-grants",
|
|
108
|
+
phase: "load"
|
|
109
|
+
});
|
|
110
|
+
} finally {
|
|
111
|
+
h.value = !1;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
async function ve(e) {
|
|
115
|
+
g.value = !0;
|
|
116
|
+
try {
|
|
117
|
+
let t = await ie.value.userSelector({
|
|
118
|
+
keyword: f.value,
|
|
119
|
+
enabledOnly: !0,
|
|
120
|
+
page: {
|
|
121
|
+
pageNum: Math.max(0, e),
|
|
122
|
+
pageSize: De
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
c.value = t.records, s.value = {
|
|
126
|
+
...s.value,
|
|
127
|
+
...je(t.records)
|
|
128
|
+
}, p.value = t.pageNum, m.value = t.total;
|
|
129
|
+
} catch (e) {
|
|
130
|
+
n(e, {
|
|
131
|
+
source: "role-account-grants",
|
|
132
|
+
phase: "load"
|
|
133
|
+
});
|
|
134
|
+
} finally {
|
|
135
|
+
g.value = !1;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function ye() {
|
|
139
|
+
f.value = d.value.trim(), ve(0);
|
|
140
|
+
}
|
|
141
|
+
function be(e, t) {
|
|
142
|
+
let n = new Set(l.value);
|
|
143
|
+
t ? n.add(e) : n.delete(e), l.value = n;
|
|
144
|
+
}
|
|
145
|
+
async function Se() {
|
|
146
|
+
let e = oe.value;
|
|
147
|
+
if (e) {
|
|
148
|
+
if (!w.value) {
|
|
149
|
+
a("close");
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
_.value = !0;
|
|
153
|
+
try {
|
|
154
|
+
for (let t of S.value) await ie.value.grantAccountRole(e, {
|
|
155
|
+
userId: t,
|
|
156
|
+
managementScopeType: ce.value,
|
|
157
|
+
managementScopeId: b.value
|
|
158
|
+
});
|
|
159
|
+
for (let t of C.value) {
|
|
160
|
+
let n = le.value.get(t)?.id;
|
|
161
|
+
n && await ie.value.deleteAccountRoleGrant(e, n);
|
|
162
|
+
}
|
|
163
|
+
await re({
|
|
164
|
+
success: !0,
|
|
165
|
+
message: "用户绑定已保存"
|
|
166
|
+
}, {
|
|
167
|
+
source: "role-account-grants",
|
|
168
|
+
phase: "action",
|
|
169
|
+
fallbackMessage: "用户绑定已保存"
|
|
170
|
+
}), a("saved"), a("close");
|
|
171
|
+
} catch (e) {
|
|
172
|
+
n(e, {
|
|
173
|
+
source: "role-account-grants",
|
|
174
|
+
phase: "action"
|
|
175
|
+
});
|
|
176
|
+
} finally {
|
|
177
|
+
_.value = !1;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
function Oe() {
|
|
182
|
+
_.value || a("close");
|
|
183
|
+
}
|
|
184
|
+
function ke() {
|
|
185
|
+
o.value = [], s.value = {}, c.value = [], l.value = /* @__PURE__ */ new Set(), u.value = /* @__PURE__ */ new Set(), d.value = "", f.value = "", p.value = 0, m.value = 0, h.value = !1, g.value = !1, _.value = !1, v.value = !1;
|
|
186
|
+
}
|
|
187
|
+
function Ae(e) {
|
|
188
|
+
be(e, !1);
|
|
189
|
+
}
|
|
190
|
+
function je(e) {
|
|
191
|
+
let t = {};
|
|
192
|
+
for (let n of e) n.id && (t[n.id] = n);
|
|
193
|
+
return t;
|
|
194
|
+
}
|
|
195
|
+
function q(e) {
|
|
196
|
+
return e ? {
|
|
197
|
+
id: e,
|
|
198
|
+
username: e
|
|
199
|
+
} : void 0;
|
|
200
|
+
}
|
|
201
|
+
function J(e) {
|
|
202
|
+
return String(e?.username ?? e?.id ?? "未知用户");
|
|
203
|
+
}
|
|
204
|
+
function Y(e) {
|
|
205
|
+
return e.employeeTitle && e.employeeNo ? `${e.employeeTitle} / ${e.employeeNo}` : e.employeeTitle ?? e.employeeNo ?? e.employeeId ?? e.id;
|
|
206
|
+
}
|
|
207
|
+
function X(e) {
|
|
208
|
+
return String(e.title ?? e.id ?? "角色");
|
|
209
|
+
}
|
|
210
|
+
return (t, n) => (N(), E(L(ae), {
|
|
211
|
+
open: e.open,
|
|
212
|
+
title: se.value,
|
|
213
|
+
"close-title": "关闭",
|
|
214
|
+
onClose: Oe
|
|
215
|
+
}, {
|
|
216
|
+
operation: R(() => [j(L(y), {
|
|
217
|
+
disabled: _.value || h.value,
|
|
218
|
+
onClick: Oe
|
|
219
|
+
}, {
|
|
220
|
+
default: R(() => [...n[3] ||= [A("取消", -1)]]),
|
|
221
|
+
_: 1
|
|
222
|
+
}, 8, ["disabled"]), j(L(y), {
|
|
223
|
+
type: "primary",
|
|
224
|
+
loading: _.value,
|
|
225
|
+
disabled: h.value || !w.value,
|
|
226
|
+
onClick: Se
|
|
227
|
+
}, {
|
|
228
|
+
default: R(() => [...n[4] ||= [A(" 确定 ", -1)]]),
|
|
229
|
+
_: 1
|
|
230
|
+
}, 8, ["loading", "disabled"])]),
|
|
231
|
+
default: R(() => [h.value ? (N(), E(L(te), {
|
|
232
|
+
key: 0,
|
|
233
|
+
class: "role-account-grant-drawer-state",
|
|
234
|
+
tip: "加载用户"
|
|
235
|
+
})) : v.value ? (N(), O("div", B, [j(L(ee), {
|
|
236
|
+
title: "用户加载失败",
|
|
237
|
+
message: "无法加载当前角色的用户绑定"
|
|
238
|
+
}), j(L(y), {
|
|
239
|
+
type: "primary",
|
|
240
|
+
"icon-name": "reload",
|
|
241
|
+
onClick: M
|
|
242
|
+
}, {
|
|
243
|
+
default: R(() => [...n[5] ||= [A("重试", -1)]]),
|
|
244
|
+
_: 1
|
|
245
|
+
})])) : (N(), O("section", V, [
|
|
246
|
+
k("div", H, [j(L(ne), {
|
|
247
|
+
value: d.value,
|
|
248
|
+
"allow-clear": "",
|
|
249
|
+
disabled: _.value,
|
|
250
|
+
placeholder: "搜索用户账号",
|
|
251
|
+
"onUpdate:value": n[0] ||= (e) => d.value = e,
|
|
252
|
+
onKeydown: z(ye, ["enter"])
|
|
253
|
+
}, null, 8, ["value", "disabled"]), j(L(y), {
|
|
254
|
+
"icon-name": "search",
|
|
255
|
+
disabled: _.value,
|
|
256
|
+
onClick: ye
|
|
257
|
+
}, {
|
|
258
|
+
default: R(() => [...n[6] ||= [A("查询", -1)]]),
|
|
259
|
+
_: 1
|
|
260
|
+
}, 8, ["disabled"])]),
|
|
261
|
+
k("div", U, [k("span", null, "已选 " + I(l.value.size) + " 个", 1), w.value ? (N(), O("span", W, "新增 " + I(S.value.length) + " 个,移除 " + I(C.value.length) + " 个", 1)) : D("v-if", !0)]),
|
|
262
|
+
k("section", G, [k("div", K, [n[7] ||= k("strong", null, "已选用户", -1), k("span", null, I(x.value.length) + " 个", 1)]), x.value.length > 0 ? (N(), O("div", Ce, [(N(!0), O(_e, null, F(x.value, (e) => (N(), O("button", {
|
|
263
|
+
key: e.id,
|
|
264
|
+
type: "button",
|
|
265
|
+
disabled: _.value,
|
|
266
|
+
onClick: (t) => Ae(e.id)
|
|
267
|
+
}, [k("span", null, I(J(e)), 1), k("small", null, I(Y(e)), 1)], 8, we))), 128))])) : (N(), O("span", Te, "暂无已选用户"))]),
|
|
268
|
+
j(L(r), {
|
|
269
|
+
class: "role-account-grant-table",
|
|
270
|
+
size: "middle",
|
|
271
|
+
contract: me,
|
|
272
|
+
rows: ue.value,
|
|
273
|
+
loading: g.value,
|
|
274
|
+
pagination: !1,
|
|
275
|
+
selection: ge.value
|
|
276
|
+
}, null, 8, [
|
|
277
|
+
"rows",
|
|
278
|
+
"loading",
|
|
279
|
+
"selection"
|
|
280
|
+
]),
|
|
281
|
+
k("div", Ee, [k("span", null, "共 " + I(m.value) + " 个用户,第 " + I(p.value + 1) + " / " + I(de.value) + " 页", 1), k("div", null, [j(L(y), {
|
|
282
|
+
disabled: _.value || g.value || !fe.value,
|
|
283
|
+
onClick: n[1] ||= (e) => ve(p.value - 1)
|
|
284
|
+
}, {
|
|
285
|
+
default: R(() => [...n[8] ||= [A(" 上一页 ", -1)]]),
|
|
286
|
+
_: 1
|
|
287
|
+
}, 8, ["disabled"]), j(L(y), {
|
|
288
|
+
disabled: _.value || g.value || !pe.value,
|
|
289
|
+
onClick: n[2] ||= (e) => ve(p.value + 1)
|
|
290
|
+
}, {
|
|
291
|
+
default: R(() => [...n[9] ||= [A(" 下一页 ", -1)]]),
|
|
292
|
+
_: 1
|
|
293
|
+
}, 8, ["disabled"])])])
|
|
294
|
+
]))]),
|
|
295
|
+
_: 1
|
|
296
|
+
}, 8, ["open", "title"]));
|
|
297
|
+
}
|
|
298
|
+
}), [["__scopeId", "data-v-edc71fb0"]]);
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region src/views/roleDetailWorkspaceSession.ts
|
|
301
|
+
function ke(e, t) {
|
|
302
|
+
return w(de, e, {
|
|
303
|
+
...t,
|
|
304
|
+
selectedRole: { ...t.selectedRole },
|
|
305
|
+
draft: { ...t.draft },
|
|
306
|
+
scope: {
|
|
307
|
+
...t.scope,
|
|
308
|
+
tenant: t.scope.tenant ? { ...t.scope.tenant } : void 0,
|
|
309
|
+
organization: t.scope.organization ? { ...t.scope.organization } : void 0
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
function Ae(e, t) {
|
|
314
|
+
return S(de, e, t);
|
|
315
|
+
}
|
|
316
|
+
function je(e) {
|
|
317
|
+
return C(de, e);
|
|
318
|
+
}
|
|
319
|
+
//#endregion
|
|
320
|
+
//#region src/views/EmployeeEmploymentTable.vue
|
|
321
|
+
var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
322
|
+
name: "EmployeeEmploymentTable",
|
|
323
|
+
__name: "EmployeeEmploymentTable",
|
|
324
|
+
props: {
|
|
325
|
+
rows: {},
|
|
326
|
+
selectedIds: { default: () => /* @__PURE__ */ new Set() },
|
|
327
|
+
selectable: {
|
|
328
|
+
type: Boolean,
|
|
329
|
+
default: !1
|
|
330
|
+
},
|
|
331
|
+
disabled: {
|
|
332
|
+
type: Boolean,
|
|
333
|
+
default: !1
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
emits: ["update:selectedIds"],
|
|
337
|
+
setup(e, { emit: t }) {
|
|
338
|
+
let n = e, r = t, i = P([]), a = [
|
|
339
|
+
{
|
|
340
|
+
key: "title",
|
|
341
|
+
title: "职员",
|
|
342
|
+
width: 160
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
key: "employeeNo",
|
|
346
|
+
title: "工号",
|
|
347
|
+
width: 140
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
key: "organizationTitle",
|
|
351
|
+
title: "所属机构",
|
|
352
|
+
width: 180
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
key: "employmentCount",
|
|
356
|
+
title: "任职",
|
|
357
|
+
width: 88,
|
|
358
|
+
align: "right"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
key: "selectedCount",
|
|
362
|
+
title: "已选",
|
|
363
|
+
width: 88,
|
|
364
|
+
align: "right"
|
|
365
|
+
}
|
|
366
|
+
], ee = [
|
|
367
|
+
{
|
|
368
|
+
key: "position",
|
|
369
|
+
title: "岗位",
|
|
370
|
+
width: 160
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
key: "organization",
|
|
374
|
+
title: "机构",
|
|
375
|
+
width: 160
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
key: "department",
|
|
379
|
+
title: "部门",
|
|
380
|
+
width: 160
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
key: "primaryPosition",
|
|
384
|
+
title: "主岗位",
|
|
385
|
+
width: 88
|
|
386
|
+
}
|
|
387
|
+
], o = T(() => {
|
|
388
|
+
let e = /* @__PURE__ */ new Map();
|
|
389
|
+
for (let t of n.rows) {
|
|
390
|
+
let n = t.employeeId ?? t.id, r = e.get(n) ?? {
|
|
391
|
+
employeeId: n,
|
|
392
|
+
title: t.employeeTitle ?? n,
|
|
393
|
+
employeeNo: t.employeeNo,
|
|
394
|
+
organizationTitle: t.organizationTitle,
|
|
395
|
+
positions: []
|
|
396
|
+
};
|
|
397
|
+
r.positions.push(t), e.set(n, r);
|
|
398
|
+
}
|
|
399
|
+
return [...e.values()];
|
|
400
|
+
}), s = T(() => o.value);
|
|
401
|
+
function te(e, t) {
|
|
402
|
+
let n = t;
|
|
403
|
+
return e.key === "title" ? n.title : e.key === "employeeNo" ? n.employeeNo ?? n.employeeId : e.key === "organizationTitle" ? n.organizationTitle ?? "-" : e.key === "employmentCount" ? `${n.positions.length} 项` : e.key === "selectedCount" ? `${l(n)} 项` : "";
|
|
404
|
+
}
|
|
405
|
+
function c(e, t) {
|
|
406
|
+
let n = t;
|
|
407
|
+
return e.key === "position" ? n.positionTitle ?? n.positionId : e.key === "organization" ? n.organizationTitle ?? n.organizationId : e.key === "department" ? n.departmentTitle ?? n.departmentId : e.key === "primaryPosition" ? n.primaryPosition ? "是" : "否" : "";
|
|
408
|
+
}
|
|
409
|
+
function l(e) {
|
|
410
|
+
return e.positions.filter((e) => n.selectedIds.has(e.id)).length;
|
|
411
|
+
}
|
|
412
|
+
function u(e) {
|
|
413
|
+
if (n.selectable) return {
|
|
414
|
+
selectedRowKeys: e.positions.filter((e) => n.selectedIds.has(e.id)).map((e) => e.id),
|
|
415
|
+
preserveSelectedRowKeys: !0,
|
|
416
|
+
disabledOf: () => n.disabled,
|
|
417
|
+
onChange: (t) => d(e, t)
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
function d(e, t) {
|
|
421
|
+
let i = new Set(n.selectedIds);
|
|
422
|
+
for (let t of e.positions) i.delete(t.id);
|
|
423
|
+
for (let e of t) i.add(String(e));
|
|
424
|
+
r("update:selectedIds", i);
|
|
425
|
+
}
|
|
426
|
+
function m(e, t) {
|
|
427
|
+
let n = e.employeeId;
|
|
428
|
+
i.value = t ? Array.from(new Set([...i.value, n])) : i.value.filter((e) => e !== n);
|
|
429
|
+
}
|
|
430
|
+
function h(e) {
|
|
431
|
+
let t = e.employeeId;
|
|
432
|
+
m(e, !i.value.includes(t));
|
|
433
|
+
}
|
|
434
|
+
return (e, t) => (N(), E(L(f), {
|
|
435
|
+
class: "employee-employment-table",
|
|
436
|
+
columns: a,
|
|
437
|
+
rows: s.value,
|
|
438
|
+
"row-key": "employeeId",
|
|
439
|
+
pagination: !1,
|
|
440
|
+
"expanded-row-keys": i.value,
|
|
441
|
+
"clickable-rows": "",
|
|
442
|
+
"horizontal-scroll": "",
|
|
443
|
+
onRowExpand: m,
|
|
444
|
+
onRowDblclick: h
|
|
445
|
+
}, {
|
|
446
|
+
cell: R(({ column: e, record: t }) => [A(I(te(e, t)), 1)]),
|
|
447
|
+
expandedRow: R(({ record: e }) => [j(L(p), { title: "任职信息" }, {
|
|
448
|
+
default: R(() => [j(L(f), {
|
|
449
|
+
columns: ee,
|
|
450
|
+
rows: e.positions,
|
|
451
|
+
"row-key": "id",
|
|
452
|
+
pagination: !1,
|
|
453
|
+
selection: u(e),
|
|
454
|
+
"horizontal-scroll": "",
|
|
455
|
+
"row-muted": (e) => e.enabled === !1
|
|
456
|
+
}, {
|
|
457
|
+
cell: R(({ column: e, record: t }) => [A(I(c(e, t)), 1)]),
|
|
458
|
+
_: 1
|
|
459
|
+
}, 8, [
|
|
460
|
+
"rows",
|
|
461
|
+
"selection",
|
|
462
|
+
"row-muted"
|
|
463
|
+
])]),
|
|
464
|
+
_: 2
|
|
465
|
+
}, 1024)]),
|
|
466
|
+
_: 1
|
|
467
|
+
}, 8, ["rows", "expanded-row-keys"]));
|
|
468
|
+
}
|
|
469
|
+
}), [["__scopeId", "data-v-e5fcebfa"]]), J = { key: 1 }, Y = {
|
|
470
|
+
key: 2,
|
|
471
|
+
class: "role-employment-grant-body"
|
|
472
|
+
}, X = { class: "role-employment-grant-selected" }, Z = { class: "role-employment-grant-selected-title" }, Q = {
|
|
473
|
+
key: 0,
|
|
474
|
+
class: "role-employment-grant-selected-list"
|
|
475
|
+
}, Me = ["disabled", "onClick"], Ne = {
|
|
476
|
+
key: 1,
|
|
477
|
+
class: "role-employment-grant-selected-empty"
|
|
478
|
+
}, Pe = { class: "role-employment-grant-pagination" }, Fe = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
479
|
+
name: "RoleEmploymentGrantDrawer",
|
|
480
|
+
__name: "RoleEmploymentGrantDrawer",
|
|
481
|
+
props: {
|
|
482
|
+
open: { type: Boolean },
|
|
483
|
+
context: {},
|
|
484
|
+
role: {}
|
|
485
|
+
},
|
|
486
|
+
emits: ["close", "saved"],
|
|
487
|
+
setup(e, { emit: t }) {
|
|
488
|
+
let r = e, i = t, a = P([]), o = P([]), s = P({}), c = P(/* @__PURE__ */ new Set()), l = P(/* @__PURE__ */ new Set()), u = P(!1), d = P(!1), f = P(!1), p = P(!1), m = P(0), h = P(0), g = P(""), _ = T(() => r.role?.id), v = T(() => he(r.context.http)), ie = T(() => `绑定任职 - ${r.role?.title ?? r.role?.id ?? ""}`), oe = T(() => [...c.value].filter((e) => !l.value.has(e))), se = T(() => [...l.value].filter((e) => !c.value.has(e))), ce = T(() => new Map(a.value.map((e) => [e.employeePositionId, e]))), b = T(() => o.value.filter((e) => !g.value.trim() || pe(e).includes(g.value.trim()))), le = T(() => new Set(b.value.filter((e) => c.value.has(e.id)).map((e) => e.employeeId)).size), ue = T(() => [...c.value].map((e) => s.value[e] ?? w(e)));
|
|
489
|
+
xe(() => [r.open, r.role?.id], ([e]) => {
|
|
490
|
+
e ? x() : fe();
|
|
491
|
+
}, { immediate: !0 });
|
|
492
|
+
async function x(e = 0) {
|
|
493
|
+
let t = _.value;
|
|
494
|
+
if (t) {
|
|
495
|
+
d.value = !0, p.value = !1;
|
|
496
|
+
try {
|
|
497
|
+
let [n, r] = await Promise.all([v.value.employmentRoleGrants(t), v.value.employmentSelector(t, {
|
|
498
|
+
enabledOnly: !0,
|
|
499
|
+
page: {
|
|
500
|
+
pageNum: e,
|
|
501
|
+
pageSize: 50
|
|
502
|
+
}
|
|
503
|
+
})]);
|
|
504
|
+
a.value = n, l.value = new Set(n.map((e) => e.employeePositionId).filter((e) => !!e)), s.value = {
|
|
505
|
+
...s.value,
|
|
506
|
+
...C(r.records)
|
|
507
|
+
}, u.value ||= (c.value = new Set(l.value), !0), o.value = r.records, m.value = r.pageNum, h.value = r.total;
|
|
508
|
+
} catch (e) {
|
|
509
|
+
p.value = !0, n(e, {
|
|
510
|
+
source: "role-employment-grants",
|
|
511
|
+
phase: "load"
|
|
512
|
+
});
|
|
513
|
+
} finally {
|
|
514
|
+
d.value = !1;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
async function de() {
|
|
519
|
+
let e = _.value;
|
|
520
|
+
if (e) {
|
|
521
|
+
f.value = !0;
|
|
522
|
+
try {
|
|
523
|
+
for (let t of oe.value) await v.value.grantEmploymentRole(e, t);
|
|
524
|
+
for (let t of se.value) {
|
|
525
|
+
let n = ce.value.get(t)?.id;
|
|
526
|
+
n && await v.value.deleteEmploymentRoleGrant(e, n);
|
|
527
|
+
}
|
|
528
|
+
await re({
|
|
529
|
+
success: !0,
|
|
530
|
+
message: "任职角色授权已保存"
|
|
531
|
+
}, {
|
|
532
|
+
source: "role-employment-grants",
|
|
533
|
+
phase: "action"
|
|
534
|
+
}), i("saved"), i("close");
|
|
535
|
+
} catch (e) {
|
|
536
|
+
n(e, {
|
|
537
|
+
source: "role-employment-grants",
|
|
538
|
+
phase: "action"
|
|
539
|
+
});
|
|
540
|
+
} finally {
|
|
541
|
+
f.value = !1;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
function fe() {
|
|
546
|
+
a.value = [], o.value = [], s.value = {}, c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), u.value = !1, g.value = "", m.value = 0, h.value = 0, p.value = !1;
|
|
547
|
+
}
|
|
548
|
+
function pe(e) {
|
|
549
|
+
return [
|
|
550
|
+
e.employeeTitle,
|
|
551
|
+
e.employeeNo,
|
|
552
|
+
e.organizationTitle,
|
|
553
|
+
e.departmentTitle,
|
|
554
|
+
e.positionTitle
|
|
555
|
+
].filter(Boolean).join(" ");
|
|
556
|
+
}
|
|
557
|
+
function S(e) {
|
|
558
|
+
let t = new Set(c.value);
|
|
559
|
+
t.delete(e), c.value = t;
|
|
560
|
+
}
|
|
561
|
+
function C(e) {
|
|
562
|
+
let t = {};
|
|
563
|
+
for (let n of e) n.id && (t[n.id] = n);
|
|
564
|
+
return t;
|
|
565
|
+
}
|
|
566
|
+
function w(e) {
|
|
567
|
+
return {
|
|
568
|
+
id: e,
|
|
569
|
+
positionId: e
|
|
570
|
+
};
|
|
571
|
+
}
|
|
572
|
+
function me(e) {
|
|
573
|
+
let t = e.positionTitle ?? e.positionId ?? e.id;
|
|
574
|
+
return e.employeeTitle ? `${e.employeeTitle} · ${t}` : t;
|
|
575
|
+
}
|
|
576
|
+
function ge(e) {
|
|
577
|
+
return [
|
|
578
|
+
e.employeeNo,
|
|
579
|
+
e.organizationTitle ?? e.organizationId,
|
|
580
|
+
e.departmentTitle ?? e.departmentId
|
|
581
|
+
].filter(Boolean).join(" / ") || e.id;
|
|
582
|
+
}
|
|
583
|
+
return (t, n) => (N(), E(L(ae), {
|
|
584
|
+
open: e.open,
|
|
585
|
+
title: ie.value,
|
|
586
|
+
"close-title": "关闭",
|
|
587
|
+
onClose: n[6] ||= (e) => !f.value && i("close")
|
|
588
|
+
}, {
|
|
589
|
+
operation: R(() => [j(L(y), {
|
|
590
|
+
disabled: f.value,
|
|
591
|
+
onClick: n[0] ||= (e) => i("close")
|
|
592
|
+
}, {
|
|
593
|
+
default: R(() => [...n[7] ||= [A("取消", -1)]]),
|
|
594
|
+
_: 1
|
|
595
|
+
}, 8, ["disabled"]), j(L(y), {
|
|
596
|
+
type: "primary",
|
|
597
|
+
loading: f.value,
|
|
598
|
+
disabled: d.value || oe.value.length === 0 && se.value.length === 0,
|
|
599
|
+
onClick: de
|
|
600
|
+
}, {
|
|
601
|
+
default: R(() => [...n[8] ||= [A(" 确定 ", -1)]]),
|
|
602
|
+
_: 1
|
|
603
|
+
}, 8, ["loading", "disabled"])]),
|
|
604
|
+
default: R(() => [d.value ? (N(), E(L(te), {
|
|
605
|
+
key: 0,
|
|
606
|
+
tip: "加载任职"
|
|
607
|
+
})) : p.value ? (N(), O("div", J, [j(L(ee), {
|
|
608
|
+
title: "任职加载失败",
|
|
609
|
+
message: "无法加载任职授权"
|
|
610
|
+
}), j(L(y), { onClick: n[1] ||= (e) => x() }, {
|
|
611
|
+
default: R(() => [...n[9] ||= [A("重试", -1)]]),
|
|
612
|
+
_: 1
|
|
613
|
+
})])) : (N(), O("section", Y, [
|
|
614
|
+
n[13] ||= k("p", null, "角色将在所选任职的机构、部门和岗位上下文中生效。展开职员后选择其具体任职。", -1),
|
|
615
|
+
j(L(ne), {
|
|
616
|
+
value: g.value,
|
|
617
|
+
"onUpdate:value": n[2] ||= (e) => g.value = e,
|
|
618
|
+
"allow-clear": "",
|
|
619
|
+
placeholder: "筛选职员、工号、机构、部门或岗位"
|
|
620
|
+
}, null, 8, ["value"]),
|
|
621
|
+
k("div", null, " 已选 " + I(c.value.size) + " 个任职;当前页涉及 " + I(le.value) + " 名职员;新增 " + I(oe.value.length) + " 个,移除 " + I(se.value.length) + " 个 ", 1),
|
|
622
|
+
k("section", X, [k("div", Z, [n[10] ||= k("strong", null, "已选任职", -1), k("span", null, I(ue.value.length) + " 个", 1)]), ue.value.length > 0 ? (N(), O("div", Q, [(N(!0), O(_e, null, F(ue.value, (e) => (N(), O("button", {
|
|
623
|
+
key: e.id,
|
|
624
|
+
type: "button",
|
|
625
|
+
disabled: f.value,
|
|
626
|
+
onClick: (t) => S(e.id)
|
|
627
|
+
}, [k("span", null, I(me(e)), 1), k("small", null, I(ge(e)), 1)], 8, Me))), 128))])) : (N(), O("span", Ne, "暂无已选任职"))]),
|
|
628
|
+
j(q, {
|
|
629
|
+
"selected-ids": c.value,
|
|
630
|
+
"onUpdate:selectedIds": n[3] ||= (e) => c.value = e,
|
|
631
|
+
rows: b.value,
|
|
632
|
+
selectable: "",
|
|
633
|
+
disabled: f.value
|
|
634
|
+
}, null, 8, [
|
|
635
|
+
"selected-ids",
|
|
636
|
+
"rows",
|
|
637
|
+
"disabled"
|
|
638
|
+
]),
|
|
639
|
+
k("div", Pe, [
|
|
640
|
+
k("span", null, "共 " + I(h.value) + " 个启用任职", 1),
|
|
641
|
+
j(L(y), {
|
|
642
|
+
disabled: d.value || m.value === 0,
|
|
643
|
+
onClick: n[4] ||= (e) => x(m.value - 1)
|
|
644
|
+
}, {
|
|
645
|
+
default: R(() => [...n[11] ||= [A("上一页", -1)]]),
|
|
646
|
+
_: 1
|
|
647
|
+
}, 8, ["disabled"]),
|
|
648
|
+
j(L(y), {
|
|
649
|
+
disabled: d.value || (m.value + 1) * 50 >= h.value,
|
|
650
|
+
onClick: n[5] ||= (e) => x(m.value + 1)
|
|
651
|
+
}, {
|
|
652
|
+
default: R(() => [...n[12] ||= [A(" 下一页 ", -1)]]),
|
|
653
|
+
_: 1
|
|
654
|
+
}, 8, ["disabled"])
|
|
655
|
+
])
|
|
656
|
+
]))]),
|
|
657
|
+
_: 1
|
|
658
|
+
}, 8, ["open", "title"]));
|
|
659
|
+
}
|
|
660
|
+
}), [["__scopeId", "data-v-06d7cca7"]]), Ie = { class: "role-group-member-selector" }, Le = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
661
|
+
name: "RoleGroupMemberSelector",
|
|
662
|
+
__name: "RoleGroupMemberSelector",
|
|
663
|
+
props: {
|
|
664
|
+
value: { default: void 0 },
|
|
665
|
+
candidates: {},
|
|
666
|
+
currentRoleId: { default: void 0 },
|
|
667
|
+
disabled: {
|
|
668
|
+
type: Boolean,
|
|
669
|
+
default: !1
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
emits: ["update:value"],
|
|
673
|
+
setup(e, { emit: t }) {
|
|
674
|
+
let n = e, r = t, i = T(() => s(n.value)), a = T(() => new Set(n.candidates.filter((e) => e.roleKind === "dataGrant" && e.id && i.value.includes(e.id)).map((e) => e.id))), ee = T(() => n.candidates.filter((e) => e.id && e.id !== n.currentRoleId).map((e) => ({
|
|
675
|
+
label: `${te(e)} / ${c(e.roleKind)}`,
|
|
676
|
+
value: e.id,
|
|
677
|
+
disabled: e.roleKind === "dataGrant" && a.value.size > 0 && !i.value.includes(e.id)
|
|
678
|
+
})));
|
|
679
|
+
function o(e) {
|
|
680
|
+
if (!Array.isArray(e)) {
|
|
681
|
+
r("update:value", void 0);
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
let t = e.map((e) => String(e).trim()).filter(Boolean);
|
|
685
|
+
r("update:value", t.length > 0 ? t.join(",") : void 0);
|
|
686
|
+
}
|
|
687
|
+
function s(e) {
|
|
688
|
+
return Array.isArray(e) ? e.map((e) => String(e).trim()).filter(Boolean) : typeof e == "string" ? e.split(",").map((e) => e.trim()).filter(Boolean) : [];
|
|
689
|
+
}
|
|
690
|
+
function te(e) {
|
|
691
|
+
return String(e?.title ?? e?.id ?? "角色");
|
|
692
|
+
}
|
|
693
|
+
function c(e) {
|
|
694
|
+
return e === "dataGrant" ? "数据授权角色" : "标准角色";
|
|
695
|
+
}
|
|
696
|
+
return (t, n) => (N(), O("label", Ie, [n[0] ||= k("span", { class: "role-group-member-selector-label" }, "成员角色", -1), j(L(h), {
|
|
697
|
+
mode: "multiple",
|
|
698
|
+
value: i.value,
|
|
699
|
+
options: ee.value,
|
|
700
|
+
placeholder: "请选择成员角色",
|
|
701
|
+
disabled: e.disabled,
|
|
702
|
+
"allow-clear": !0,
|
|
703
|
+
"onUpdate:value": o
|
|
704
|
+
}, null, 8, [
|
|
705
|
+
"value",
|
|
706
|
+
"options",
|
|
707
|
+
"disabled"
|
|
708
|
+
])]));
|
|
709
|
+
}
|
|
710
|
+
}), [["__scopeId", "data-v-91d9ae10"]]), Re = {
|
|
711
|
+
key: 1,
|
|
712
|
+
class: "role-detail-state"
|
|
713
|
+
}, ze = {
|
|
714
|
+
key: 1,
|
|
715
|
+
class: "role-detail-state"
|
|
716
|
+
}, Be = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
717
|
+
name: "RoleManagementView",
|
|
718
|
+
__name: "RoleManagementView",
|
|
719
|
+
props: {
|
|
720
|
+
recordId: {},
|
|
721
|
+
scopeKind: {},
|
|
722
|
+
scopeId: {}
|
|
723
|
+
},
|
|
724
|
+
setup(r) {
|
|
725
|
+
let f = r, p = fe(), h = v({ moduleAlias: "iam.tenant" }), re = v({ moduleAlias: "iam.organization" }), b = v({ moduleAlias: "iam.role" }), S = me(), C = P(""), w = P(""), he = P(0), M = P(0), F = P(0), I = P(), z = P(), B = P(), V = P(), H = P(!1), U = P("view"), W = P(!1), G = P(!1), K = P(!1), Ce = P(), we = P(!1), Te = P(!1), Ee = P(), De = P(!1), q = P(0), J = P(Gt(void 0)), Y = P(g(void 0)), X = P([]), Z = T(() => !!(f.recordId && f.scopeKind)), Q = T(() => Z.value && p?.presentation === "drawer"), Me = T(() => !Z.value || Q.value), Ne = T(() => h), Pe = T(() => I.value?.id), Ie = T(() => S?.value?.system === !0), Be = T(() => S?.value?.system === !0), Ve = T(() => {
|
|
726
|
+
let e = S?.value?.tenantId;
|
|
727
|
+
if (!(S?.value?.system === !0 || !e)) return {
|
|
728
|
+
id: e,
|
|
729
|
+
title: e,
|
|
730
|
+
alias: e,
|
|
731
|
+
enabled: !0
|
|
732
|
+
};
|
|
733
|
+
}), He = T(() => ue(re, {
|
|
734
|
+
scopeFieldName: "tenantId",
|
|
735
|
+
scopeValue: Pe.value,
|
|
736
|
+
treePath: "/iam.organization/tree"
|
|
737
|
+
})), Ue = T(() => z.value?.kind !== "platform"), We = T(() => ut(b, z.value)), Ge = T(() => [
|
|
738
|
+
{
|
|
739
|
+
key: "title",
|
|
740
|
+
title: "角色名称",
|
|
741
|
+
width: "22%"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
key: "assignmentType",
|
|
745
|
+
title: "授权层级",
|
|
746
|
+
width: "13%",
|
|
747
|
+
render: (e) => un(e, "assignmentType", on(e.assignmentType))
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
key: "roleKind",
|
|
751
|
+
title: "角色类型",
|
|
752
|
+
width: "13%",
|
|
753
|
+
render: (e) => un(e, "roleKind", sn(e.roleKind))
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
key: "sharePolicy",
|
|
757
|
+
title: "公开策略",
|
|
758
|
+
width: "15%",
|
|
759
|
+
render: (e) => un(e, "sharePolicy", cn(e.sharePolicy))
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
key: "systemManaged",
|
|
763
|
+
title: "系统托管",
|
|
764
|
+
width: "12%",
|
|
765
|
+
render: (e) => ln(e.systemManaged)
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
key: "enabled",
|
|
769
|
+
title: "状态",
|
|
770
|
+
type: "enabledStatus",
|
|
771
|
+
width: "10%"
|
|
772
|
+
}
|
|
773
|
+
]), Ke = T(() => !!z.value), qe = T(() => U.value === "create" ? "新建角色" : _n(V.value ?? J.value)), Je = T(() => z.value?.title ?? "角色详情"), Ye = T(() => K.value || W.value), Xe = T(() => W.value || !z.value ? !1 : U.value === "create" ? b.can("create") === !0 : !!V.value?.id && b.can("update") === !0 && !V.value?.systemManaged), Ze = T(() => {
|
|
774
|
+
let e = V.value;
|
|
775
|
+
return !!(e?.id && e.systemManaged !== !0 && b.can(hn(e)) === !0);
|
|
776
|
+
}), Qe = T(() => U.value === "view" ? V.value?.id ? [
|
|
777
|
+
{
|
|
778
|
+
key: "edit",
|
|
779
|
+
actionCode: "update",
|
|
780
|
+
title: "编辑",
|
|
781
|
+
iconName: "edit",
|
|
782
|
+
disabled: K.value || V.value.systemManaged === !0
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
key: "bind",
|
|
786
|
+
actionCode: pn(V.value),
|
|
787
|
+
title: mn(V.value),
|
|
788
|
+
iconName: "lock",
|
|
789
|
+
visible: dn(V.value),
|
|
790
|
+
disabled: K.value || V.value.systemManaged === !0
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
key: "delete",
|
|
794
|
+
actionCode: "delete",
|
|
795
|
+
title: "删除",
|
|
796
|
+
iconName: "delete",
|
|
797
|
+
danger: !0,
|
|
798
|
+
disabled: K.value || V.value.systemManaged === !0
|
|
799
|
+
}
|
|
800
|
+
] : [] : [{
|
|
801
|
+
key: "cancel",
|
|
802
|
+
title: "取消",
|
|
803
|
+
iconName: "close",
|
|
804
|
+
disabled: K.value
|
|
805
|
+
}, {
|
|
806
|
+
key: "save",
|
|
807
|
+
actionCode: U.value === "create" ? "create" : "update",
|
|
808
|
+
title: "保存",
|
|
809
|
+
iconName: "save",
|
|
810
|
+
primary: !0,
|
|
811
|
+
loading: K.value,
|
|
812
|
+
disabled: !Xe.value
|
|
813
|
+
}]), $e = T(() => Qe.value), et = T(() => Qe.value), tt = pe({
|
|
814
|
+
view: de,
|
|
815
|
+
input: T(() => {
|
|
816
|
+
let e = V.value?.id, t = z.value, n = U.value;
|
|
817
|
+
if (!(!e || !t || n !== "view" && n !== "edit")) return {
|
|
818
|
+
recordId: e,
|
|
819
|
+
scopeKind: t.kind,
|
|
820
|
+
...t.kind === "platform" ? {} : { scopeId: t.id }
|
|
821
|
+
};
|
|
822
|
+
}),
|
|
823
|
+
title: T(() => _n(V.value)),
|
|
824
|
+
eligibility: T(() => ({
|
|
825
|
+
hasStableIdentity: !!(V.value?.id && z.value) && !W.value,
|
|
826
|
+
busy: K.value
|
|
827
|
+
})),
|
|
828
|
+
beforePromote: async (e) => {
|
|
829
|
+
let t = V.value, n = z.value;
|
|
830
|
+
if (!(!t || !n)) return await ke(e, {
|
|
831
|
+
selectedRole: t,
|
|
832
|
+
draft: J.value,
|
|
833
|
+
scope: n,
|
|
834
|
+
mode: U.value === "edit" ? "edit" : "view"
|
|
835
|
+
}) === "accepted";
|
|
836
|
+
},
|
|
837
|
+
onPromoted: jt
|
|
838
|
+
}), nt = T(() => ({
|
|
839
|
+
title: {
|
|
840
|
+
label: "角色名称",
|
|
841
|
+
required: !0,
|
|
842
|
+
visible: !0,
|
|
843
|
+
placeholder: "请输入角色名称"
|
|
844
|
+
},
|
|
845
|
+
assignmentType: {
|
|
846
|
+
label: "授权层级",
|
|
847
|
+
required: !0,
|
|
848
|
+
visible: !0,
|
|
849
|
+
controlType: "select",
|
|
850
|
+
options: $t(J.value.roleKind)
|
|
851
|
+
},
|
|
852
|
+
roleKind: {
|
|
853
|
+
label: "角色类型",
|
|
854
|
+
required: !0,
|
|
855
|
+
visible: !0,
|
|
856
|
+
controlType: "select",
|
|
857
|
+
options: en(J.value.assignmentType)
|
|
858
|
+
},
|
|
859
|
+
memberRoleIds: {
|
|
860
|
+
label: "成员角色",
|
|
861
|
+
visible: J.value.roleKind === "group"
|
|
862
|
+
},
|
|
863
|
+
ownerScopeType: {
|
|
864
|
+
label: "归属范围",
|
|
865
|
+
required: !0,
|
|
866
|
+
visible: !0,
|
|
867
|
+
readOnly: !0,
|
|
868
|
+
controlType: "select",
|
|
869
|
+
options: [
|
|
870
|
+
{
|
|
871
|
+
label: "平台",
|
|
872
|
+
value: "platform"
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
label: "租户",
|
|
876
|
+
value: "tenant"
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
label: "机构",
|
|
880
|
+
value: "organization"
|
|
881
|
+
}
|
|
882
|
+
]
|
|
883
|
+
},
|
|
884
|
+
ownerScopeId: {
|
|
885
|
+
label: "归属对象",
|
|
886
|
+
visible: !0,
|
|
887
|
+
readOnly: !0
|
|
888
|
+
},
|
|
889
|
+
sharePolicy: {
|
|
890
|
+
label: "公开策略",
|
|
891
|
+
required: !0,
|
|
892
|
+
visible: !0,
|
|
893
|
+
controlType: "select",
|
|
894
|
+
options: an(z.value?.kind ?? J.value.ownerScopeType)
|
|
895
|
+
},
|
|
896
|
+
description: {
|
|
897
|
+
label: "说明",
|
|
898
|
+
visible: !0,
|
|
899
|
+
placeholder: "请输入角色说明"
|
|
900
|
+
},
|
|
901
|
+
enabled: {
|
|
902
|
+
label: "启用状态",
|
|
903
|
+
visible: !0,
|
|
904
|
+
controlType: "enabledStatus"
|
|
905
|
+
},
|
|
906
|
+
sortOrder: {
|
|
907
|
+
label: "排序号",
|
|
908
|
+
visible: !0,
|
|
909
|
+
placeholder: "请输入排序号"
|
|
910
|
+
}
|
|
911
|
+
})), rt = [
|
|
912
|
+
"title",
|
|
913
|
+
"assignmentType",
|
|
914
|
+
"roleKind"
|
|
915
|
+
], it = [
|
|
916
|
+
"ownerScopeType",
|
|
917
|
+
"ownerScopeId",
|
|
918
|
+
"sharePolicy",
|
|
919
|
+
"description",
|
|
920
|
+
"enabled",
|
|
921
|
+
"sortOrder"
|
|
922
|
+
], at = T(() => {
|
|
923
|
+
let e = [
|
|
924
|
+
"title",
|
|
925
|
+
"assignmentType",
|
|
926
|
+
"roleKind"
|
|
927
|
+
];
|
|
928
|
+
return J.value.roleKind === "group" && e.push("memberRoleIds"), e.push("ownerScopeType", "ownerScopeId", "sharePolicy", "description", "enabled", "sortOrder"), e;
|
|
929
|
+
}), ot;
|
|
930
|
+
be(() => {
|
|
931
|
+
if (ct(), !Z.value || !f.recordId || !f.scopeKind) return;
|
|
932
|
+
let e = Vt();
|
|
933
|
+
e && !Q.value && (ot = Ae(e, st)), Bt();
|
|
934
|
+
}), ye(() => ot?.());
|
|
935
|
+
function st(e) {
|
|
936
|
+
return U.value === "edit" ? !1 : (Wt(e), !0);
|
|
937
|
+
}
|
|
938
|
+
xe(V, (e) => {
|
|
939
|
+
!Z.value || !e || p?.setTitle(_n(e));
|
|
940
|
+
}, { immediate: !0 }), xe(Ve, ht, { immediate: !0 }), xe(z, () => {
|
|
941
|
+
Z.value || (B.value = void 0, V.value = void 0, J.value = Gt(z.value), jt(), F.value += 1, lt());
|
|
942
|
+
});
|
|
943
|
+
async function ct() {
|
|
944
|
+
try {
|
|
945
|
+
Y.value = g((await b.runtime.ready).uiDescriptor);
|
|
946
|
+
} catch (e) {
|
|
947
|
+
n(e, {
|
|
948
|
+
source: "role-management",
|
|
949
|
+
phase: "load"
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
async function lt(e = z.value) {
|
|
954
|
+
if (!e) {
|
|
955
|
+
X.value = [];
|
|
956
|
+
return;
|
|
957
|
+
}
|
|
958
|
+
try {
|
|
959
|
+
X.value = (await b.crud.query(dt({
|
|
960
|
+
page: {
|
|
961
|
+
pageNum: 0,
|
|
962
|
+
pageSize: 500
|
|
963
|
+
},
|
|
964
|
+
conditions: [
|
|
965
|
+
{
|
|
966
|
+
fieldName: "assignmentType",
|
|
967
|
+
operator: "EQ",
|
|
968
|
+
values: ["employment"]
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
fieldName: "roleKind",
|
|
972
|
+
operator: "IN",
|
|
973
|
+
values: ["standard", "dataGrant"]
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
fieldName: "enabled",
|
|
977
|
+
operator: "EQ",
|
|
978
|
+
values: [!0]
|
|
979
|
+
}
|
|
980
|
+
],
|
|
981
|
+
sorts: [{ field: "sortOrder" }, { field: "title" }]
|
|
982
|
+
}, e))).records;
|
|
983
|
+
} catch (e) {
|
|
984
|
+
X.value = [], n(e, {
|
|
985
|
+
source: "role-management",
|
|
986
|
+
phase: "load"
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
function ut(e, t) {
|
|
991
|
+
return {
|
|
992
|
+
...e,
|
|
993
|
+
crud: {
|
|
994
|
+
...e.crud,
|
|
995
|
+
query: (n) => t ? e.crud.query(dt(n, t)) : e.crud.query(n)
|
|
996
|
+
}
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
function dt(e, t) {
|
|
1000
|
+
let n = [...e?.conditions ?? [], {
|
|
1001
|
+
fieldName: "ownerScopeType",
|
|
1002
|
+
operator: "EQ",
|
|
1003
|
+
values: [t.kind]
|
|
1004
|
+
}];
|
|
1005
|
+
return t.kind !== "platform" && t.id && n.push({
|
|
1006
|
+
fieldName: "ownerScopeId",
|
|
1007
|
+
operator: "EQ",
|
|
1008
|
+
values: [t.id]
|
|
1009
|
+
}), {
|
|
1010
|
+
...e,
|
|
1011
|
+
conditions: n
|
|
1012
|
+
};
|
|
1013
|
+
}
|
|
1014
|
+
function ft(e) {
|
|
1015
|
+
return e === "ownerScopeType" || e === "ownerScopeId" || U.value === "edit" && ["assignmentType", "roleKind"].includes(e) ? !0 : V.value?.systemManaged === !0;
|
|
1016
|
+
}
|
|
1017
|
+
function pt(e, t) {
|
|
1018
|
+
let n = {
|
|
1019
|
+
...J.value,
|
|
1020
|
+
[e]: t
|
|
1021
|
+
};
|
|
1022
|
+
e === "roleKind" && (t === "group" || t === "dataGrant") && (n.assignmentType = "employment"), e === "roleKind" && t !== "group" && (n.memberRoleIds = void 0), e === "assignmentType" && t === "account" && Qt(n.roleKind) && (n.roleKind = "standard", n.memberRoleIds = void 0), J.value = n;
|
|
1023
|
+
}
|
|
1024
|
+
function mt(e) {
|
|
1025
|
+
if (Be.value) {
|
|
1026
|
+
if (!z.value && Ie.value) {
|
|
1027
|
+
gt();
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
!I.value && e.length > 0 && _t(e[0]);
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
function ht(e = Ve.value) {
|
|
1034
|
+
!e || Be.value || I.value || z.value || (I.value = e, vt(e), M.value += 1);
|
|
1035
|
+
}
|
|
1036
|
+
function gt() {
|
|
1037
|
+
!$() || !Ie.value || (I.value = void 0, z.value = {
|
|
1038
|
+
kind: "platform",
|
|
1039
|
+
key: "platform",
|
|
1040
|
+
title: "平台角色"
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
1043
|
+
function _t(e) {
|
|
1044
|
+
$() && (I.value = e, vt(e), M.value += 1);
|
|
1045
|
+
}
|
|
1046
|
+
function vt(e = I.value) {
|
|
1047
|
+
!e?.id || !$() || (z.value = {
|
|
1048
|
+
kind: "tenant",
|
|
1049
|
+
id: e.id,
|
|
1050
|
+
key: `tenant:${e.id}`,
|
|
1051
|
+
title: `${vn(e)} / 租户本级`,
|
|
1052
|
+
tenant: e
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
1055
|
+
function yt(e) {
|
|
1056
|
+
!e.id || !$() || (z.value = {
|
|
1057
|
+
kind: "organization",
|
|
1058
|
+
id: e.id,
|
|
1059
|
+
key: `organization:${e.id}`,
|
|
1060
|
+
title: yn(e),
|
|
1061
|
+
tenant: I.value,
|
|
1062
|
+
organization: e
|
|
1063
|
+
});
|
|
1064
|
+
}
|
|
1065
|
+
function bt(e) {
|
|
1066
|
+
e.key === "create" && kt();
|
|
1067
|
+
}
|
|
1068
|
+
function xt(e) {
|
|
1069
|
+
return [
|
|
1070
|
+
{
|
|
1071
|
+
key: "bind",
|
|
1072
|
+
actionCode: pn(e),
|
|
1073
|
+
title: "绑定",
|
|
1074
|
+
after: "edit",
|
|
1075
|
+
pinned: !0,
|
|
1076
|
+
visible: dn(e)
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
key: "authorize",
|
|
1080
|
+
actionCode: "rolePermissions",
|
|
1081
|
+
title: "授权",
|
|
1082
|
+
after: "bind",
|
|
1083
|
+
pinned: !0,
|
|
1084
|
+
visible: fn(e)
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
key: "toggle",
|
|
1088
|
+
actionCode: hn(e),
|
|
1089
|
+
title: gn(e),
|
|
1090
|
+
iconName: "power",
|
|
1091
|
+
before: "delete"
|
|
1092
|
+
}
|
|
1093
|
+
];
|
|
1094
|
+
}
|
|
1095
|
+
function St(e, t) {
|
|
1096
|
+
if (e.systemManaged !== !0) return;
|
|
1097
|
+
let n = t.key ?? t.actionCode;
|
|
1098
|
+
return n === "edit" || n === "update" || n === "bind" || n === "authorize" || n === "toggle" || n === "delete" ? { disabled: !0 } : void 0;
|
|
1099
|
+
}
|
|
1100
|
+
function Ct(e, t) {
|
|
1101
|
+
if ($()) {
|
|
1102
|
+
if (e.key === "view") {
|
|
1103
|
+
At(t, "view");
|
|
1104
|
+
return;
|
|
1105
|
+
}
|
|
1106
|
+
if (e.key === "edit") {
|
|
1107
|
+
At(t, "edit");
|
|
1108
|
+
return;
|
|
1109
|
+
}
|
|
1110
|
+
if (e.key === "bind") {
|
|
1111
|
+
Dt(t, t.assignmentType === "employment");
|
|
1112
|
+
return;
|
|
1113
|
+
}
|
|
1114
|
+
if (e.key === "authorize") {
|
|
1115
|
+
wt(t);
|
|
1116
|
+
return;
|
|
1117
|
+
}
|
|
1118
|
+
if (e.key === "toggle") {
|
|
1119
|
+
Lt(t);
|
|
1120
|
+
return;
|
|
1121
|
+
}
|
|
1122
|
+
e.key === "delete" && It(t);
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
function wt(e) {
|
|
1126
|
+
!String(e.id ?? "") || e.roleKind === "group" || (Ee.value = Kt(e), De.value = !0);
|
|
1127
|
+
}
|
|
1128
|
+
function Tt() {
|
|
1129
|
+
De.value = !1, Ee.value = void 0;
|
|
1130
|
+
}
|
|
1131
|
+
function Et(e) {
|
|
1132
|
+
$() && At(e, "view");
|
|
1133
|
+
}
|
|
1134
|
+
async function Dt(e, t = !1) {
|
|
1135
|
+
if (!$()) return;
|
|
1136
|
+
let r = String(e.id ?? "");
|
|
1137
|
+
if (r) {
|
|
1138
|
+
we.value = !t, Te.value = t, Ce.value = Kt(e);
|
|
1139
|
+
try {
|
|
1140
|
+
Ce.value = await b.crud.view(r);
|
|
1141
|
+
} catch (e) {
|
|
1142
|
+
we.value = !1, Te.value = !1, Ce.value = void 0, n(e, {
|
|
1143
|
+
source: "role-management",
|
|
1144
|
+
phase: "load"
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
function Ot() {
|
|
1150
|
+
K.value || (we.value = !1, Te.value = !1, Ce.value = void 0);
|
|
1151
|
+
}
|
|
1152
|
+
function kt() {
|
|
1153
|
+
if ($()) {
|
|
1154
|
+
if (!z.value) {
|
|
1155
|
+
t("请先选择角色归属范围", { phase: "validation" });
|
|
1156
|
+
return;
|
|
1157
|
+
}
|
|
1158
|
+
V.value = void 0, B.value = void 0, J.value = Gt(z.value), U.value = "create", W.value = !1, G.value = !1, q.value += 1, H.value = !0;
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
async function At(e, r) {
|
|
1162
|
+
if (!$()) return;
|
|
1163
|
+
let i = String(e.id ?? "");
|
|
1164
|
+
if (!i) return;
|
|
1165
|
+
B.value = i, H.value = !0, U.value = r, V.value = void 0, J.value = Kt(e), W.value = !0, G.value = !1;
|
|
1166
|
+
let a = q.value + 1;
|
|
1167
|
+
q.value = a;
|
|
1168
|
+
try {
|
|
1169
|
+
let e = await b.crud.view(i);
|
|
1170
|
+
if (!Rt(i, a)) return;
|
|
1171
|
+
if (!Ut(e)) {
|
|
1172
|
+
G.value = !0, t("角色不属于当前归属范围", {
|
|
1173
|
+
source: "role-management",
|
|
1174
|
+
phase: "load"
|
|
1175
|
+
});
|
|
1176
|
+
return;
|
|
1177
|
+
}
|
|
1178
|
+
zt(e, r);
|
|
1179
|
+
} catch (e) {
|
|
1180
|
+
Rt(i, a) && (G.value = !0, n(e, {
|
|
1181
|
+
source: "role-management",
|
|
1182
|
+
phase: "load"
|
|
1183
|
+
}));
|
|
1184
|
+
} finally {
|
|
1185
|
+
Rt(i, a) && (W.value = !1);
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
function jt() {
|
|
1189
|
+
K.value || (q.value += 1, W.value = !1, G.value = !1, H.value = !1, U.value = "view", J.value = V.value ? Kt(V.value) : Gt(z.value), Q.value && p?.dismiss());
|
|
1190
|
+
}
|
|
1191
|
+
function Mt() {
|
|
1192
|
+
if (!K.value) {
|
|
1193
|
+
if (!V.value?.id || U.value === "create") {
|
|
1194
|
+
jt();
|
|
1195
|
+
return;
|
|
1196
|
+
}
|
|
1197
|
+
J.value = Kt(V.value), U.value = "view", W.value = !1, G.value = !1;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
function Nt(e) {
|
|
1201
|
+
if (e.key === "cancel") {
|
|
1202
|
+
Mt();
|
|
1203
|
+
return;
|
|
1204
|
+
}
|
|
1205
|
+
if (e.key === "save") {
|
|
1206
|
+
Ft();
|
|
1207
|
+
return;
|
|
1208
|
+
}
|
|
1209
|
+
if ($()) {
|
|
1210
|
+
if (e.key === "edit" && V.value && !V.value.systemManaged) {
|
|
1211
|
+
J.value = Kt(V.value), U.value = "edit";
|
|
1212
|
+
return;
|
|
1213
|
+
}
|
|
1214
|
+
if (e.key === "bind" && V.value) {
|
|
1215
|
+
Dt(V.value, V.value.assignmentType === "employment");
|
|
1216
|
+
return;
|
|
1217
|
+
}
|
|
1218
|
+
e.key === "delete" && It(V.value);
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
function Pt() {
|
|
1222
|
+
let e = String(J.value.id ?? B.value ?? "");
|
|
1223
|
+
if (!e) return;
|
|
1224
|
+
let t = U.value === "create" ? "view" : U.value;
|
|
1225
|
+
At({
|
|
1226
|
+
...J.value,
|
|
1227
|
+
id: e
|
|
1228
|
+
}, t);
|
|
1229
|
+
}
|
|
1230
|
+
async function Ft() {
|
|
1231
|
+
await ce({
|
|
1232
|
+
loading: K,
|
|
1233
|
+
mode: U.value === "edit" ? "edit" : "create",
|
|
1234
|
+
source: "role-management",
|
|
1235
|
+
validateContext: () => z.value ? void 0 : "请先选择角色归属范围",
|
|
1236
|
+
canSave: () => Xe.value,
|
|
1237
|
+
deniedMessage: "当前用户无权保存角色",
|
|
1238
|
+
createRecord: () => qt(J.value, z.value),
|
|
1239
|
+
validateRecord: Yt,
|
|
1240
|
+
save: (e, t) => t === "edit" && V.value?.id ? b.crud.update(V.value.id, e) : b.crud.insert(e),
|
|
1241
|
+
onSaved: ({ record: e }) => {
|
|
1242
|
+
zt(e), F.value += 1, lt();
|
|
1243
|
+
}
|
|
1244
|
+
});
|
|
1245
|
+
}
|
|
1246
|
+
async function It(e) {
|
|
1247
|
+
await _({
|
|
1248
|
+
loading: K,
|
|
1249
|
+
source: "role-management",
|
|
1250
|
+
record: () => e?.id ? e : void 0,
|
|
1251
|
+
canExecute: (e) => b.can("delete") === !0 && e.systemManaged !== !0,
|
|
1252
|
+
deniedMessage: "当前用户无权删除角色",
|
|
1253
|
+
confirm: (e) => c({
|
|
1254
|
+
title: "删除角色",
|
|
1255
|
+
content: `确认删除角色「${_n(e)}」?`,
|
|
1256
|
+
okText: "删除",
|
|
1257
|
+
danger: !0
|
|
1258
|
+
}),
|
|
1259
|
+
execute: (e) => b.crud.delete(String(e.id), { version: e.version }),
|
|
1260
|
+
onExecuted: (e, t) => {
|
|
1261
|
+
B.value === String(t.id) && (B.value = void 0, V.value = void 0, J.value = Gt(z.value), H.value = !1, U.value = "view", W.value = !1, G.value = !1, q.value += 1), F.value += 1, lt();
|
|
1262
|
+
}
|
|
1263
|
+
});
|
|
1264
|
+
}
|
|
1265
|
+
async function Lt(e) {
|
|
1266
|
+
await _({
|
|
1267
|
+
loading: K,
|
|
1268
|
+
source: "role-management",
|
|
1269
|
+
record: () => e?.id ? e : void 0,
|
|
1270
|
+
canExecute: (e) => b.can(hn(e)) === !0 && e.systemManaged !== !0,
|
|
1271
|
+
deniedMessage: "当前用户无权变更角色启停状态",
|
|
1272
|
+
execute: (e) => e.enabled === !1 ? b.crud.enable(String(e.id), { version: e.version }) : b.crud.disable(String(e.id), { version: e.version }),
|
|
1273
|
+
onExecuted: async (e, t) => {
|
|
1274
|
+
B.value === String(t.id) && zt(await b.crud.view(String(t.id))), F.value += 1, lt();
|
|
1275
|
+
}
|
|
1276
|
+
});
|
|
1277
|
+
}
|
|
1278
|
+
function $() {
|
|
1279
|
+
return !K.value;
|
|
1280
|
+
}
|
|
1281
|
+
function Rt(e, t) {
|
|
1282
|
+
return q.value === t && B.value === e;
|
|
1283
|
+
}
|
|
1284
|
+
function zt(e, t = "view") {
|
|
1285
|
+
V.value = e, B.value = e.id, J.value = Kt(e), U.value = t === "edit" && e.systemManaged !== !0 ? "edit" : "view", H.value = !0, W.value = !1, G.value = !1, q.value += 1;
|
|
1286
|
+
}
|
|
1287
|
+
async function Bt() {
|
|
1288
|
+
let e = Vt();
|
|
1289
|
+
if (!e) return;
|
|
1290
|
+
z.value = Ht(e);
|
|
1291
|
+
let t = je(e);
|
|
1292
|
+
if (t) {
|
|
1293
|
+
Wt(t);
|
|
1294
|
+
return;
|
|
1295
|
+
}
|
|
1296
|
+
await At({ id: e.recordId }, "view");
|
|
1297
|
+
}
|
|
1298
|
+
function Vt() {
|
|
1299
|
+
let e = f.recordId, t = f.scopeKind;
|
|
1300
|
+
if (!(!e || !t || t !== "platform" && !f.scopeId)) return {
|
|
1301
|
+
recordId: e,
|
|
1302
|
+
scopeKind: t,
|
|
1303
|
+
...t === "platform" ? {} : { scopeId: f.scopeId }
|
|
1304
|
+
};
|
|
1305
|
+
}
|
|
1306
|
+
function Ht(e) {
|
|
1307
|
+
if (e.scopeKind === "platform") return {
|
|
1308
|
+
kind: "platform",
|
|
1309
|
+
key: "platform",
|
|
1310
|
+
title: "平台角色"
|
|
1311
|
+
};
|
|
1312
|
+
let t = e.scopeId, n = e.scopeKind === "organization" ? `机构:${t}` : `租户:${t}`;
|
|
1313
|
+
return {
|
|
1314
|
+
kind: e.scopeKind,
|
|
1315
|
+
id: t,
|
|
1316
|
+
key: `${e.scopeKind}:${t}`,
|
|
1317
|
+
title: n,
|
|
1318
|
+
...e.scopeKind === "tenant" ? { tenant: {
|
|
1319
|
+
id: t,
|
|
1320
|
+
title: t,
|
|
1321
|
+
alias: t
|
|
1322
|
+
} } : {}
|
|
1323
|
+
};
|
|
1324
|
+
}
|
|
1325
|
+
function Ut(e) {
|
|
1326
|
+
let t = z.value;
|
|
1327
|
+
return !t || e.ownerScopeType !== t.kind ? !1 : t.kind === "platform" || e.ownerScopeId === t.id;
|
|
1328
|
+
}
|
|
1329
|
+
function Wt(e) {
|
|
1330
|
+
z.value = e.scope, V.value = e.selectedRole, B.value = e.selectedRole.id, J.value = e.draft, U.value = e.mode, H.value = !0, W.value = !1, G.value = !1, q.value += 1;
|
|
1331
|
+
}
|
|
1332
|
+
function Gt(e) {
|
|
1333
|
+
return {
|
|
1334
|
+
tenantId: Jt(e),
|
|
1335
|
+
ownerScopeType: e?.kind,
|
|
1336
|
+
ownerScopeId: e?.kind === "platform" ? void 0 : e?.id,
|
|
1337
|
+
assignmentType: "employment",
|
|
1338
|
+
roleKind: "standard",
|
|
1339
|
+
sharePolicy: nn(),
|
|
1340
|
+
enabled: !0,
|
|
1341
|
+
sortOrder: 100
|
|
1342
|
+
};
|
|
1343
|
+
}
|
|
1344
|
+
function Kt(e) {
|
|
1345
|
+
return { ...e };
|
|
1346
|
+
}
|
|
1347
|
+
function qt(e, t) {
|
|
1348
|
+
let n = Zt(e.roleKind), r = tn(e.sharePolicy, t.kind), i = ie(e, {
|
|
1349
|
+
title: e.title?.trim(),
|
|
1350
|
+
assignmentType: Xt(e.assignmentType, n),
|
|
1351
|
+
roleKind: n,
|
|
1352
|
+
memberRoleIds: e.memberRoleIds?.trim() || void 0,
|
|
1353
|
+
tenantId: Jt(t),
|
|
1354
|
+
ownerScopeType: t.kind,
|
|
1355
|
+
ownerScopeId: t.kind === "platform" ? void 0 : t.id,
|
|
1356
|
+
ownerScopeKey: void 0,
|
|
1357
|
+
sharePolicy: r,
|
|
1358
|
+
description: e.description?.trim() || void 0,
|
|
1359
|
+
enabled: e.enabled !== !1,
|
|
1360
|
+
sortOrder: rn(e.sortOrder)
|
|
1361
|
+
});
|
|
1362
|
+
return n !== "group" && (i.memberRoleIds = void 0), i;
|
|
1363
|
+
}
|
|
1364
|
+
function Jt(e) {
|
|
1365
|
+
return e?.kind === "platform" ? void 0 : e?.tenant?.id ?? e?.id;
|
|
1366
|
+
}
|
|
1367
|
+
function Yt(e) {
|
|
1368
|
+
for (let t of [
|
|
1369
|
+
"title",
|
|
1370
|
+
"assignmentType",
|
|
1371
|
+
"roleKind",
|
|
1372
|
+
"ownerScopeType",
|
|
1373
|
+
"sharePolicy"
|
|
1374
|
+
]) {
|
|
1375
|
+
let n = m(t, {
|
|
1376
|
+
fields: Y.value,
|
|
1377
|
+
fallback: nt.value
|
|
1378
|
+
});
|
|
1379
|
+
if (n.visible && n.required && !e[t]) return `请填写${n.label}`;
|
|
1380
|
+
}
|
|
1381
|
+
if (e.ownerScopeType !== "platform" && !e.ownerScopeId) return "请选择归属对象";
|
|
1382
|
+
if (!an(e.ownerScopeType).some((t) => t.value === e.sharePolicy)) return "请选择当前归属范围可用的公开策略";
|
|
1383
|
+
}
|
|
1384
|
+
function Xt(e, t) {
|
|
1385
|
+
return t === "group" || t === "dataGrant" ? "employment" : e === "account" ? "account" : "employment";
|
|
1386
|
+
}
|
|
1387
|
+
function Zt(e) {
|
|
1388
|
+
return e === "group" || e === "dataGrant" || e === "system" ? e : "standard";
|
|
1389
|
+
}
|
|
1390
|
+
function Qt(e) {
|
|
1391
|
+
return e === "group" || e === "dataGrant";
|
|
1392
|
+
}
|
|
1393
|
+
function $t(e) {
|
|
1394
|
+
return Qt(e) ? [{
|
|
1395
|
+
label: "任职角色",
|
|
1396
|
+
value: "employment"
|
|
1397
|
+
}] : [{
|
|
1398
|
+
label: "账号角色",
|
|
1399
|
+
value: "account"
|
|
1400
|
+
}, {
|
|
1401
|
+
label: "任职角色",
|
|
1402
|
+
value: "employment"
|
|
1403
|
+
}];
|
|
1404
|
+
}
|
|
1405
|
+
function en(e) {
|
|
1406
|
+
let t = [{
|
|
1407
|
+
label: "标准角色",
|
|
1408
|
+
value: "standard"
|
|
1409
|
+
}, {
|
|
1410
|
+
label: "系统角色",
|
|
1411
|
+
value: "system"
|
|
1412
|
+
}];
|
|
1413
|
+
return e === "account" ? t : [
|
|
1414
|
+
t[0],
|
|
1415
|
+
{
|
|
1416
|
+
label: "角色组",
|
|
1417
|
+
value: "group"
|
|
1418
|
+
},
|
|
1419
|
+
{
|
|
1420
|
+
label: "数据授权角色",
|
|
1421
|
+
value: "dataGrant"
|
|
1422
|
+
},
|
|
1423
|
+
t[1]
|
|
1424
|
+
];
|
|
1425
|
+
}
|
|
1426
|
+
function tn(e, t) {
|
|
1427
|
+
return an(t).map((e) => e.value).includes(e ?? "") ? e : nn();
|
|
1428
|
+
}
|
|
1429
|
+
function nn() {
|
|
1430
|
+
return "private";
|
|
1431
|
+
}
|
|
1432
|
+
function rn(e) {
|
|
1433
|
+
if (typeof e == "number") return Number.isFinite(e) ? e : 100;
|
|
1434
|
+
let t = Number(String(e ?? "").trim());
|
|
1435
|
+
return Number.isFinite(t) ? t : 100;
|
|
1436
|
+
}
|
|
1437
|
+
function an(e) {
|
|
1438
|
+
return e === "platform" ? [{
|
|
1439
|
+
label: "私有",
|
|
1440
|
+
value: "private"
|
|
1441
|
+
}, {
|
|
1442
|
+
label: "全局公开",
|
|
1443
|
+
value: "platform"
|
|
1444
|
+
}] : e === "organization" ? [{
|
|
1445
|
+
label: "私有",
|
|
1446
|
+
value: "private"
|
|
1447
|
+
}, {
|
|
1448
|
+
label: "本级及下级",
|
|
1449
|
+
value: "ownerAndChildren"
|
|
1450
|
+
}] : [{
|
|
1451
|
+
label: "私有",
|
|
1452
|
+
value: "private"
|
|
1453
|
+
}, {
|
|
1454
|
+
label: "租户公开",
|
|
1455
|
+
value: "tenant"
|
|
1456
|
+
}];
|
|
1457
|
+
}
|
|
1458
|
+
function on(e) {
|
|
1459
|
+
return e === "account" ? "账号角色" : "任职角色";
|
|
1460
|
+
}
|
|
1461
|
+
function sn(e) {
|
|
1462
|
+
return {
|
|
1463
|
+
standard: "标准角色",
|
|
1464
|
+
group: "角色组",
|
|
1465
|
+
dataGrant: "数据授权角色",
|
|
1466
|
+
system: "系统角色"
|
|
1467
|
+
}[e ?? "standard"];
|
|
1468
|
+
}
|
|
1469
|
+
function cn(e) {
|
|
1470
|
+
return {
|
|
1471
|
+
private: "私有",
|
|
1472
|
+
ownerAndChildren: "本级及下级",
|
|
1473
|
+
tenant: "租户公开",
|
|
1474
|
+
platform: "全局公开"
|
|
1475
|
+
}[e ?? "private"];
|
|
1476
|
+
}
|
|
1477
|
+
function ln(e) {
|
|
1478
|
+
return e === !0 ? "是" : "否";
|
|
1479
|
+
}
|
|
1480
|
+
function un(e, t, n) {
|
|
1481
|
+
let r = e[`${t}Title`];
|
|
1482
|
+
return typeof r == "string" && r.trim() ? r : n;
|
|
1483
|
+
}
|
|
1484
|
+
function dn(e) {
|
|
1485
|
+
return !!e?.id && (e?.assignmentType === "account" || e?.assignmentType === "employment");
|
|
1486
|
+
}
|
|
1487
|
+
function fn(e) {
|
|
1488
|
+
return !!e?.id && e?.roleKind !== "group";
|
|
1489
|
+
}
|
|
1490
|
+
function pn(e) {
|
|
1491
|
+
return e?.assignmentType === "employment" ? "employmentRoleGrants" : "accountRoleGrants";
|
|
1492
|
+
}
|
|
1493
|
+
function mn(e) {
|
|
1494
|
+
return e?.assignmentType === "employment" ? "绑定任职" : "绑定用户";
|
|
1495
|
+
}
|
|
1496
|
+
function hn(e) {
|
|
1497
|
+
return e?.enabled === !1 ? "enable" : "disable";
|
|
1498
|
+
}
|
|
1499
|
+
function gn(e) {
|
|
1500
|
+
return e?.enabled === !1 ? "启用" : "停用";
|
|
1501
|
+
}
|
|
1502
|
+
function _n(e) {
|
|
1503
|
+
return String(e?.title ?? e?.id ?? "角色");
|
|
1504
|
+
}
|
|
1505
|
+
function vn(e) {
|
|
1506
|
+
return String(e?.title ?? e?.alias ?? e?.id ?? "未命名租户");
|
|
1507
|
+
}
|
|
1508
|
+
function yn(e) {
|
|
1509
|
+
return String(e?.title ?? e?.code ?? e?.id ?? "未命名机构");
|
|
1510
|
+
}
|
|
1511
|
+
function bn(e, t) {
|
|
1512
|
+
if (e === "ownerScopeType") return Sn(J.value.ownerScopeType);
|
|
1513
|
+
if (e === "ownerScopeId") return z.value?.title ?? String(t ?? "");
|
|
1514
|
+
if (e === "memberRoleIds") return xn(t);
|
|
1515
|
+
}
|
|
1516
|
+
function xn(e) {
|
|
1517
|
+
let t = Tn(e);
|
|
1518
|
+
return t.length === 0 ? "-" : t.map((e) => {
|
|
1519
|
+
let t = X.value.find((t) => t.id === e);
|
|
1520
|
+
return t ? _n(t) : e;
|
|
1521
|
+
}).join(",");
|
|
1522
|
+
}
|
|
1523
|
+
function Sn(e) {
|
|
1524
|
+
return e === "platform" ? "平台" : e === "organization" ? "机构" : "租户";
|
|
1525
|
+
}
|
|
1526
|
+
function Cn(e) {
|
|
1527
|
+
return {
|
|
1528
|
+
title: vn(e),
|
|
1529
|
+
secondary: e.alias ?? e.id,
|
|
1530
|
+
muted: e.enabled === !1
|
|
1531
|
+
};
|
|
1532
|
+
}
|
|
1533
|
+
function wn(e) {
|
|
1534
|
+
return {
|
|
1535
|
+
title: e.title ?? e.code ?? e.id ?? "未命名机构",
|
|
1536
|
+
secondary: e.code ?? e.id,
|
|
1537
|
+
muted: e.enabled === !1
|
|
1538
|
+
};
|
|
1539
|
+
}
|
|
1540
|
+
function Tn(e) {
|
|
1541
|
+
return Array.isArray(e) ? e.map((e) => String(e).trim()).filter(Boolean) : typeof e == "string" ? e.split(",").map((e) => e.trim()).filter(Boolean) : [];
|
|
1542
|
+
}
|
|
1543
|
+
return (t, n) => (N(), O("section", { class: ve(["role-management-page", {
|
|
1544
|
+
"role-management-page-platform": !Ue.value,
|
|
1545
|
+
"role-management-page--task": Z.value && !Q.value
|
|
1546
|
+
}]) }, [
|
|
1547
|
+
!Z.value || Q.value ? (N(), E(L(l), {
|
|
1548
|
+
key: 0,
|
|
1549
|
+
class: "role-scope-panel",
|
|
1550
|
+
title: "租户",
|
|
1551
|
+
"refresh-title": "刷新租户列表",
|
|
1552
|
+
"search-keyword": C.value,
|
|
1553
|
+
"search-placeholder": "搜索租户名称、alias 或 ID",
|
|
1554
|
+
searchable: Be.value,
|
|
1555
|
+
onRefresh: n[2] ||= (e) => Be.value ? he.value += 1 : ht(),
|
|
1556
|
+
"onUpdate:searchKeyword": n[3] ||= (e) => C.value = e
|
|
1557
|
+
}, {
|
|
1558
|
+
default: R(() => [Ie.value ? (N(), O("button", {
|
|
1559
|
+
key: 0,
|
|
1560
|
+
class: "role-platform-scope",
|
|
1561
|
+
type: "button",
|
|
1562
|
+
onClick: gt
|
|
1563
|
+
}, [j(L(d), {
|
|
1564
|
+
title: "平台角色",
|
|
1565
|
+
secondary: "全局范围",
|
|
1566
|
+
clickable: "",
|
|
1567
|
+
selected: z.value?.kind === "platform"
|
|
1568
|
+
}, null, 8, ["selected"])])) : D("v-if", !0), !Be.value && Ve.value ? (N(), O("button", {
|
|
1569
|
+
key: 1,
|
|
1570
|
+
class: "role-tenant-root-scope",
|
|
1571
|
+
type: "button",
|
|
1572
|
+
onClick: n[0] ||= (e) => _t(Ve.value)
|
|
1573
|
+
}, [j(L(d), {
|
|
1574
|
+
title: vn(Ve.value),
|
|
1575
|
+
secondary: "当前租户",
|
|
1576
|
+
clickable: "",
|
|
1577
|
+
selected: I.value?.id === Ve.value.id
|
|
1578
|
+
}, null, 8, ["title", "selected"])])) : (N(), E(L(se), {
|
|
1579
|
+
key: 2,
|
|
1580
|
+
context: Ne.value,
|
|
1581
|
+
"selected-id": I.value?.id,
|
|
1582
|
+
"reload-key": he.value,
|
|
1583
|
+
keyword: C.value,
|
|
1584
|
+
"empty-description": "暂无租户",
|
|
1585
|
+
"loading-tip": "加载租户列表",
|
|
1586
|
+
"fallback-title": "未命名租户",
|
|
1587
|
+
"item-of": Cn,
|
|
1588
|
+
onLoaded: mt,
|
|
1589
|
+
onSelect: n[1] ||= (e) => _t(e)
|
|
1590
|
+
}, null, 8, [
|
|
1591
|
+
"context",
|
|
1592
|
+
"selected-id",
|
|
1593
|
+
"reload-key",
|
|
1594
|
+
"keyword"
|
|
1595
|
+
]))]),
|
|
1596
|
+
_: 1
|
|
1597
|
+
}, 8, ["search-keyword", "searchable"])) : D("v-if", !0),
|
|
1598
|
+
(!Z.value || Q.value) && Ue.value ? (N(), E(L(l), {
|
|
1599
|
+
key: 1,
|
|
1600
|
+
class: "role-scope-panel",
|
|
1601
|
+
title: "归属范围",
|
|
1602
|
+
"refresh-title": "刷新机构树",
|
|
1603
|
+
"search-keyword": w.value,
|
|
1604
|
+
"search-placeholder": "搜索机构名称、编码或 ID",
|
|
1605
|
+
searchable: !!I.value,
|
|
1606
|
+
onRefresh: n[6] ||= (e) => M.value += 1,
|
|
1607
|
+
"onUpdate:searchKeyword": n[7] ||= (e) => w.value = e
|
|
1608
|
+
}, {
|
|
1609
|
+
default: R(() => [z.value?.kind === "platform" ? (N(), E(L(a), {
|
|
1610
|
+
key: 0,
|
|
1611
|
+
description: "平台角色不需要选择租户内范围"
|
|
1612
|
+
})) : I.value ? (N(), O(_e, { key: 2 }, [k("button", {
|
|
1613
|
+
class: "role-tenant-root-scope",
|
|
1614
|
+
type: "button",
|
|
1615
|
+
onClick: n[4] ||= (e) => vt()
|
|
1616
|
+
}, [j(L(d), {
|
|
1617
|
+
title: vn(I.value),
|
|
1618
|
+
secondary: "租户本级角色",
|
|
1619
|
+
clickable: "",
|
|
1620
|
+
selected: z.value?.kind === "tenant" && z.value.id === I.value.id
|
|
1621
|
+
}, null, 8, ["title", "selected"])]), j(L(oe), {
|
|
1622
|
+
context: He.value,
|
|
1623
|
+
"selected-id": z.value?.kind === "organization" ? z.value.id : void 0,
|
|
1624
|
+
"reload-key": M.value,
|
|
1625
|
+
keyword: w.value,
|
|
1626
|
+
"search-mode": "none",
|
|
1627
|
+
"search-trigger": "external",
|
|
1628
|
+
"empty-description": "当前租户暂无机构",
|
|
1629
|
+
"loading-tip": "加载机构树",
|
|
1630
|
+
"fallback-title": "未命名机构",
|
|
1631
|
+
"item-of": wn,
|
|
1632
|
+
onSelect: n[5] ||= (e) => yt(e)
|
|
1633
|
+
}, null, 8, [
|
|
1634
|
+
"context",
|
|
1635
|
+
"selected-id",
|
|
1636
|
+
"reload-key",
|
|
1637
|
+
"keyword"
|
|
1638
|
+
])], 64)) : (N(), E(L(a), {
|
|
1639
|
+
key: 1,
|
|
1640
|
+
description: "请选择左侧租户"
|
|
1641
|
+
}))]),
|
|
1642
|
+
_: 1
|
|
1643
|
+
}, 8, ["search-keyword", "searchable"])) : D("v-if", !0),
|
|
1644
|
+
!Z.value || Q.value ? (N(), E(L(x), {
|
|
1645
|
+
key: 2,
|
|
1646
|
+
class: "role-list-panel",
|
|
1647
|
+
context: We.value,
|
|
1648
|
+
title: z.value ? `角色列表 - ${z.value.title}` : "角色列表",
|
|
1649
|
+
columns: Ge.value,
|
|
1650
|
+
"standard-crud-actions": "",
|
|
1651
|
+
"standard-crud-row-actions": "",
|
|
1652
|
+
"extra-row-actions-of": xt,
|
|
1653
|
+
"row-action-state-of": St,
|
|
1654
|
+
"selected-key": B.value,
|
|
1655
|
+
"reload-key": F.value,
|
|
1656
|
+
ready: Ke.value,
|
|
1657
|
+
"quick-search-placeholder": "搜索角色名称或说明",
|
|
1658
|
+
"empty-description": "当前范围暂无角色",
|
|
1659
|
+
"waiting-description": "请选择角色归属范围",
|
|
1660
|
+
onAction: bt,
|
|
1661
|
+
onRowAction: Ct,
|
|
1662
|
+
onRowDblclick: Et,
|
|
1663
|
+
onSelect: n[8] ||= (e) => B.value = String(e.id ?? "")
|
|
1664
|
+
}, null, 8, [
|
|
1665
|
+
"context",
|
|
1666
|
+
"title",
|
|
1667
|
+
"columns",
|
|
1668
|
+
"selected-key",
|
|
1669
|
+
"reload-key",
|
|
1670
|
+
"ready"
|
|
1671
|
+
])) : D("v-if", !0),
|
|
1672
|
+
Me.value ? (N(), E(L(ae), {
|
|
1673
|
+
key: 3,
|
|
1674
|
+
open: H.value,
|
|
1675
|
+
title: qe.value,
|
|
1676
|
+
subtitle: Je.value,
|
|
1677
|
+
"close-on-outside": U.value === "view",
|
|
1678
|
+
promotion: L(tt),
|
|
1679
|
+
onClose: jt
|
|
1680
|
+
}, {
|
|
1681
|
+
status: R(() => [U.value === "view" && V.value ? (N(), E(L(s), {
|
|
1682
|
+
key: 0,
|
|
1683
|
+
enabled: V.value.enabled !== !1,
|
|
1684
|
+
disabled: K.value || !Ze.value,
|
|
1685
|
+
loading: K.value,
|
|
1686
|
+
"show-label": !1,
|
|
1687
|
+
onChange: n[9] ||= (e) => Lt(V.value)
|
|
1688
|
+
}, null, 8, [
|
|
1689
|
+
"enabled",
|
|
1690
|
+
"disabled",
|
|
1691
|
+
"loading"
|
|
1692
|
+
])) : D("v-if", !0)]),
|
|
1693
|
+
operation: R(() => [j(L(le), {
|
|
1694
|
+
context: We.value,
|
|
1695
|
+
actions: $e.value,
|
|
1696
|
+
onAction: Nt
|
|
1697
|
+
}, null, 8, ["context", "actions"])]),
|
|
1698
|
+
default: R(() => [W.value ? (N(), E(L(te), {
|
|
1699
|
+
key: 0,
|
|
1700
|
+
class: "role-detail-state",
|
|
1701
|
+
tip: "加载角色详情"
|
|
1702
|
+
})) : G.value ? (N(), O("div", Re, [j(L(ee), {
|
|
1703
|
+
title: "详情加载失败",
|
|
1704
|
+
message: "无法加载角色详情,请重试"
|
|
1705
|
+
}), j(L(y), {
|
|
1706
|
+
type: "primary",
|
|
1707
|
+
"icon-name": "reload",
|
|
1708
|
+
onClick: Pt
|
|
1709
|
+
}, {
|
|
1710
|
+
default: R(() => [...n[15] ||= [A("重试", -1)]]),
|
|
1711
|
+
_: 1
|
|
1712
|
+
})])) : U.value === "view" || U.value === "create" || V.value ? (N(), O(_e, { key: 2 }, [U.value === "view" ? (N(), E(L(o), {
|
|
1713
|
+
key: 0,
|
|
1714
|
+
record: J.value,
|
|
1715
|
+
"field-names": at.value,
|
|
1716
|
+
fields: Y.value,
|
|
1717
|
+
fallback: nt.value,
|
|
1718
|
+
"display-of": bn
|
|
1719
|
+
}, null, 8, [
|
|
1720
|
+
"record",
|
|
1721
|
+
"field-names",
|
|
1722
|
+
"fields",
|
|
1723
|
+
"fallback"
|
|
1724
|
+
])) : (N(), O("form", {
|
|
1725
|
+
key: 1,
|
|
1726
|
+
class: "role-form",
|
|
1727
|
+
onSubmit: Se(Ft, ["prevent"])
|
|
1728
|
+
}, [
|
|
1729
|
+
k("label", null, [n[16] ||= k("span", { class: "role-form-label" }, "当前范围", -1), j(L(ne), {
|
|
1730
|
+
value: z.value?.title ?? "-",
|
|
1731
|
+
disabled: ""
|
|
1732
|
+
}, null, 8, ["value"])]),
|
|
1733
|
+
j(L(e), {
|
|
1734
|
+
record: J.value,
|
|
1735
|
+
"field-names": rt,
|
|
1736
|
+
fields: Y.value,
|
|
1737
|
+
fallback: nt.value,
|
|
1738
|
+
disabled: Ye.value,
|
|
1739
|
+
"disabled-of": ft,
|
|
1740
|
+
"onUpdate:field": pt
|
|
1741
|
+
}, null, 8, [
|
|
1742
|
+
"record",
|
|
1743
|
+
"fields",
|
|
1744
|
+
"fallback",
|
|
1745
|
+
"disabled"
|
|
1746
|
+
]),
|
|
1747
|
+
J.value.roleKind === "group" ? (N(), E(Le, {
|
|
1748
|
+
key: 0,
|
|
1749
|
+
value: J.value.memberRoleIds,
|
|
1750
|
+
candidates: X.value,
|
|
1751
|
+
"current-role-id": V.value?.id,
|
|
1752
|
+
disabled: Ye.value || V.value?.systemManaged === !0,
|
|
1753
|
+
"onUpdate:value": n[10] ||= (e) => pt("memberRoleIds", e)
|
|
1754
|
+
}, null, 8, [
|
|
1755
|
+
"value",
|
|
1756
|
+
"candidates",
|
|
1757
|
+
"current-role-id",
|
|
1758
|
+
"disabled"
|
|
1759
|
+
])) : D("v-if", !0),
|
|
1760
|
+
j(L(e), {
|
|
1761
|
+
record: J.value,
|
|
1762
|
+
"field-names": it,
|
|
1763
|
+
fields: Y.value,
|
|
1764
|
+
fallback: nt.value,
|
|
1765
|
+
disabled: Ye.value,
|
|
1766
|
+
"disabled-of": ft,
|
|
1767
|
+
"onUpdate:field": pt
|
|
1768
|
+
}, null, 8, [
|
|
1769
|
+
"record",
|
|
1770
|
+
"fields",
|
|
1771
|
+
"fallback",
|
|
1772
|
+
"disabled"
|
|
1773
|
+
])
|
|
1774
|
+
], 32)), U.value === "create" ? D("v-if", !0) : (N(), E(L(u), {
|
|
1775
|
+
key: 2,
|
|
1776
|
+
record: J.value,
|
|
1777
|
+
"show-sort-order": ""
|
|
1778
|
+
}, null, 8, ["record"]))], 64)) : D("v-if", !0)]),
|
|
1779
|
+
_: 1
|
|
1780
|
+
}, 8, [
|
|
1781
|
+
"open",
|
|
1782
|
+
"title",
|
|
1783
|
+
"subtitle",
|
|
1784
|
+
"close-on-outside",
|
|
1785
|
+
"promotion"
|
|
1786
|
+
])) : (N(), E(L(i), {
|
|
1787
|
+
key: 4,
|
|
1788
|
+
title: qe.value,
|
|
1789
|
+
subtitle: Je.value
|
|
1790
|
+
}, {
|
|
1791
|
+
status: R(() => [U.value === "view" && V.value ? (N(), E(L(s), {
|
|
1792
|
+
key: 0,
|
|
1793
|
+
enabled: V.value.enabled !== !1,
|
|
1794
|
+
disabled: K.value || !Ze.value,
|
|
1795
|
+
loading: K.value,
|
|
1796
|
+
"show-label": !1,
|
|
1797
|
+
onChange: n[11] ||= (e) => Lt(V.value)
|
|
1798
|
+
}, null, 8, [
|
|
1799
|
+
"enabled",
|
|
1800
|
+
"disabled",
|
|
1801
|
+
"loading"
|
|
1802
|
+
])) : D("v-if", !0)]),
|
|
1803
|
+
operation: R(() => [j(L(le), {
|
|
1804
|
+
context: L(b),
|
|
1805
|
+
actions: et.value,
|
|
1806
|
+
"record-id": V.value?.id,
|
|
1807
|
+
onAction: Nt
|
|
1808
|
+
}, null, 8, [
|
|
1809
|
+
"context",
|
|
1810
|
+
"actions",
|
|
1811
|
+
"record-id"
|
|
1812
|
+
])]),
|
|
1813
|
+
default: R(() => [W.value ? (N(), E(L(te), {
|
|
1814
|
+
key: 0,
|
|
1815
|
+
class: "role-detail-state",
|
|
1816
|
+
tip: "加载角色详情"
|
|
1817
|
+
})) : G.value ? (N(), O("div", ze, [j(L(ee), {
|
|
1818
|
+
title: "详情加载失败",
|
|
1819
|
+
message: "无法加载角色详情,请重试"
|
|
1820
|
+
}), j(L(y), {
|
|
1821
|
+
type: "primary",
|
|
1822
|
+
"icon-name": "reload",
|
|
1823
|
+
onClick: Pt
|
|
1824
|
+
}, {
|
|
1825
|
+
default: R(() => [...n[17] ||= [A("重试", -1)]]),
|
|
1826
|
+
_: 1
|
|
1827
|
+
})])) : U.value === "view" || V.value ? (N(), O(_e, { key: 2 }, [U.value === "view" ? (N(), E(L(o), {
|
|
1828
|
+
key: 0,
|
|
1829
|
+
record: J.value,
|
|
1830
|
+
"field-names": at.value,
|
|
1831
|
+
fields: Y.value,
|
|
1832
|
+
fallback: nt.value,
|
|
1833
|
+
"display-of": bn
|
|
1834
|
+
}, null, 8, [
|
|
1835
|
+
"record",
|
|
1836
|
+
"field-names",
|
|
1837
|
+
"fields",
|
|
1838
|
+
"fallback"
|
|
1839
|
+
])) : (N(), O("form", {
|
|
1840
|
+
key: 1,
|
|
1841
|
+
class: "role-form",
|
|
1842
|
+
onSubmit: Se(Ft, ["prevent"])
|
|
1843
|
+
}, [
|
|
1844
|
+
k("label", null, [n[18] ||= k("span", { class: "role-form-label" }, "当前范围", -1), j(L(ne), {
|
|
1845
|
+
value: z.value?.title ?? "-",
|
|
1846
|
+
disabled: ""
|
|
1847
|
+
}, null, 8, ["value"])]),
|
|
1848
|
+
j(L(e), {
|
|
1849
|
+
record: J.value,
|
|
1850
|
+
"field-names": rt,
|
|
1851
|
+
fields: Y.value,
|
|
1852
|
+
fallback: nt.value,
|
|
1853
|
+
disabled: Ye.value,
|
|
1854
|
+
"disabled-of": ft,
|
|
1855
|
+
"onUpdate:field": pt
|
|
1856
|
+
}, null, 8, [
|
|
1857
|
+
"record",
|
|
1858
|
+
"fields",
|
|
1859
|
+
"fallback",
|
|
1860
|
+
"disabled"
|
|
1861
|
+
]),
|
|
1862
|
+
J.value.roleKind === "group" ? (N(), E(Le, {
|
|
1863
|
+
key: 0,
|
|
1864
|
+
value: J.value.memberRoleIds,
|
|
1865
|
+
candidates: X.value,
|
|
1866
|
+
"current-role-id": V.value?.id,
|
|
1867
|
+
disabled: Ye.value || V.value?.systemManaged === !0,
|
|
1868
|
+
"onUpdate:value": n[12] ||= (e) => pt("memberRoleIds", e)
|
|
1869
|
+
}, null, 8, [
|
|
1870
|
+
"value",
|
|
1871
|
+
"candidates",
|
|
1872
|
+
"current-role-id",
|
|
1873
|
+
"disabled"
|
|
1874
|
+
])) : D("v-if", !0),
|
|
1875
|
+
j(L(e), {
|
|
1876
|
+
record: J.value,
|
|
1877
|
+
"field-names": it,
|
|
1878
|
+
fields: Y.value,
|
|
1879
|
+
fallback: nt.value,
|
|
1880
|
+
disabled: Ye.value,
|
|
1881
|
+
"disabled-of": ft,
|
|
1882
|
+
"onUpdate:field": pt
|
|
1883
|
+
}, null, 8, [
|
|
1884
|
+
"record",
|
|
1885
|
+
"fields",
|
|
1886
|
+
"fallback",
|
|
1887
|
+
"disabled"
|
|
1888
|
+
])
|
|
1889
|
+
], 32)), j(L(u), {
|
|
1890
|
+
record: J.value,
|
|
1891
|
+
"show-sort-order": ""
|
|
1892
|
+
}, null, 8, ["record"])], 64)) : D("v-if", !0)]),
|
|
1893
|
+
_: 1
|
|
1894
|
+
}, 8, ["title", "subtitle"])),
|
|
1895
|
+
j(Oe, {
|
|
1896
|
+
open: we.value,
|
|
1897
|
+
context: L(b),
|
|
1898
|
+
role: Ce.value,
|
|
1899
|
+
onClose: Ot,
|
|
1900
|
+
onSaved: n[13] ||= (e) => F.value += 1
|
|
1901
|
+
}, null, 8, [
|
|
1902
|
+
"open",
|
|
1903
|
+
"context",
|
|
1904
|
+
"role"
|
|
1905
|
+
]),
|
|
1906
|
+
j(Fe, {
|
|
1907
|
+
open: Te.value,
|
|
1908
|
+
context: L(b),
|
|
1909
|
+
role: Ce.value,
|
|
1910
|
+
onClose: Ot,
|
|
1911
|
+
onSaved: n[14] ||= (e) => F.value += 1
|
|
1912
|
+
}, null, 8, [
|
|
1913
|
+
"open",
|
|
1914
|
+
"context",
|
|
1915
|
+
"role"
|
|
1916
|
+
]),
|
|
1917
|
+
De.value && Ee.value?.id ? (N(), E(ge, {
|
|
1918
|
+
key: 5,
|
|
1919
|
+
"role-id": Ee.value.id,
|
|
1920
|
+
drawer: "",
|
|
1921
|
+
onClose: Tt
|
|
1922
|
+
}, null, 8, ["role-id"])) : D("v-if", !0)
|
|
1923
|
+
], 2));
|
|
1924
|
+
}
|
|
1925
|
+
}), [["__scopeId", "data-v-96df52d3"]]);
|
|
1926
|
+
//#endregion
|
|
1927
|
+
export { Be as t };
|