@ximatai/muyun-web-app 0.26.7 → 0.26.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DictionaryManagementView-CtIQpqVA.js +1035 -0
- package/dist/MenuManagementView-DJhkN2sG.js +837 -0
- package/dist/{MetadataOrchestrationView-B-CPudJl.js → MetadataOrchestrationView-CzhAgEdX.js} +210 -204
- package/dist/{ModuleActionManagementView-CmVj0e0C.js → ModuleActionManagementView-CM2d8jPO.js} +69 -69
- package/dist/RoleAuthorizationView-jn_WUCeg.js +599 -0
- package/dist/{RoleDetailWorkspaceView-DmJlJgAj.js → RoleDetailWorkspaceView-CzaQ3Dz1.js} +1 -1
- package/dist/RoleManagementView-nY7qu4GF.js +1951 -0
- package/dist/{SystemUserDetailWorkspaceView-U6Ij0US1.js → SystemUserDetailWorkspaceView-CBvqmWvP.js} +1 -1
- package/dist/SystemUserManagementView-AEomKvK7.js +887 -0
- package/dist/index.css +1 -1
- package/dist/index.js +651 -6970
- package/dist/{platform-components-DKKWbNrz.js → platform-components-CIi6GdC9.js} +5292 -3634
- package/dist/types/App.vue.d.ts +1 -0
- package/dist/types/app/StaticRoutePageHost.vue.d.ts +11 -0
- package/dist/types/app/loginTenant.d.ts +1 -1
- package/dist/types/app/menuRouteCompiler.d.ts +45 -0
- package/dist/types/app/menuRouteRuntime.d.ts +24 -0
- package/dist/types/app/pageRouteContext.d.ts +24 -0
- package/dist/types/app/routeDiagnosticsStore.d.ts +10 -0
- package/dist/types/app/router.d.ts +15 -0
- package/dist/types/app/staticRouteDefinitions.d.ts +25 -0
- package/dist/types/app/workbenchRouteSync.d.ts +1 -1
- package/dist/types/app/workbenchStartup.d.ts +9 -5
- package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +2 -2
- package/dist/types/consumer/index.d.ts +7 -4
- package/dist/types/dynamic-page-runtime/DynamicModuleHost.vue.d.ts +3 -10
- package/dist/types/{views/EmployeeEmploymentDrawer.vue.d.ts → dynamic-page-runtime/DynamicModuleWorkspaceDetailView.vue.d.ts} +3 -7
- package/dist/types/dynamic-page-runtime/DynamicRecordDetailActions.vue.d.ts +39 -0
- package/dist/types/dynamic-page-runtime/ManagedDetailRelationInlineSurface.vue.d.ts +40 -0
- package/dist/types/dynamic-page-runtime/ManagedDetailRelationSurface.vue.d.ts +14 -0
- package/dist/types/dynamic-page-runtime/ModulePageDetailRelations.vue.d.ts +26 -0
- package/dist/types/dynamic-page-runtime/ModulePageFormContributionRenderer.vue.d.ts +12 -0
- package/dist/types/dynamic-page-runtime/ModulePageHost.vue.d.ts +14 -0
- package/dist/types/dynamic-page-runtime/ModulePageListExpansionSurface.vue.d.ts +19 -0
- package/dist/types/dynamic-page-runtime/ModulePageListRelationExpansion.vue.d.ts +13 -0
- package/dist/types/dynamic-page-runtime/ModulePageListRelationExpansions.vue.d.ts +16 -0
- package/dist/types/dynamic-page-runtime/ModulePageRecordContent.vue.d.ts +42 -0
- package/dist/types/dynamic-page-runtime/ModuleRecordDetailActions.vue.d.ts +41 -0
- package/dist/types/dynamic-page-runtime/NavigatorManagementEditor.vue.d.ts +44 -0
- package/dist/types/dynamic-page-runtime/PageNavigatorExplorer.vue.d.ts +50 -0
- package/dist/types/dynamic-page-runtime/RecordFormSurface.vue.d.ts +31 -0
- package/dist/types/dynamic-page-runtime/composables/useManagedDetailRelationRuntime.d.ts +30 -0
- package/dist/types/dynamic-page-runtime/composables/useModulePageActions.d.ts +13 -0
- package/dist/types/dynamic-page-runtime/composables/useModulePageBootstrap.d.ts +17 -0
- package/dist/types/dynamic-page-runtime/composables/useModulePageDetailActionRuntime.d.ts +48 -0
- package/dist/types/dynamic-page-runtime/composables/useModulePageDetailExtensionRuntime.d.ts +26 -0
- package/dist/types/dynamic-page-runtime/composables/useModulePageFormContributionRuntime.d.ts +22 -0
- package/dist/types/dynamic-page-runtime/composables/useModulePageListSession.d.ts +41 -0
- package/dist/types/dynamic-page-runtime/composables/useNavigatorRuntime.d.ts +1324 -0
- package/dist/types/dynamic-page-runtime/composables/useRecordEditingSession.d.ts +22 -0
- package/dist/types/dynamic-page-runtime/detailSurfacePreference.d.ts +10 -0
- package/dist/types/dynamic-page-runtime/dynamicModuleDetailStateModel.d.ts +5 -12
- package/dist/types/dynamic-page-runtime/formComputeCoordinator.d.ts +18 -0
- package/dist/types/dynamic-page-runtime/index.d.ts +4 -2
- package/dist/types/dynamic-page-runtime/listPageSizePreference.d.ts +10 -0
- package/dist/types/dynamic-page-runtime/moduleDetailStateModel.d.ts +12 -0
- package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +218 -6
- package/dist/types/dynamic-page-runtime/modulePageNavigation.d.ts +1 -1
- package/dist/types/dynamic-page-runtime/navigatorVisibility.d.ts +6 -0
- package/dist/types/dynamic-page-runtime/pageContextRuntime.d.ts +6 -0
- package/dist/types/dynamic-page-runtime/recordDetailController.d.ts +35 -0
- package/dist/types/dynamic-page-runtime/relationFormComputeCoordinator.d.ts +9 -0
- package/dist/types/formula/FormulaRuntime.d.ts +29 -0
- package/dist/types/platform-admin-runtime/WorkspaceViewDrawer.vue.d.ts +1 -0
- package/dist/types/{views/EmployeeDetailWorkspaceView.vue.d.ts → platform-admin-runtime/employee/EmployeeAccountDrawer.vue.d.ts} +2 -1
- package/dist/types/platform-admin-runtime/employeeModulePageEnhancement.d.ts +3 -0
- package/dist/types/platform-admin-runtime/moduleOpenApi.d.ts +2 -0
- package/dist/types/platform-admin-runtime/passwordPolicyPageEnhancement.d.ts +6 -0
- package/dist/types/platform-admin-runtime/platformAdminRoutes.d.ts +1 -1
- package/dist/types/platform-admin-runtime/platformModulePageEnhancement.d.ts +9 -0
- package/dist/types/platform-admin-runtime/realtime.d.ts +2 -1
- package/dist/types/platform-admin-runtime/tenant/TenantApplicationConfigurationDrawer.vue.d.ts +7 -0
- package/dist/types/platform-admin-runtime/tenant/TenantApplicationsDetailSection.vue.d.ts +7 -0
- package/dist/types/platform-admin-runtime/tenantModulePageEnhancement.d.ts +7 -0
- package/dist/types/platform-admin-runtime/user/UserOnlineStatusCell.vue.d.ts +8 -0
- package/dist/types/platform-admin-runtime/user/UserPasswordDrawer.vue.d.ts +7 -0
- package/dist/types/platform-admin-runtime/user/UserSessionListExpansion.vue.d.ts +7 -0
- package/dist/types/platform-admin-runtime/user/useUserSessionRows.d.ts +23 -0
- package/dist/types/platform-admin-runtime/user/userOnlineStatusStore.d.ts +11 -0
- package/dist/types/platform-admin-runtime/userModulePageEnhancement.d.ts +7 -0
- package/dist/types/platform-components/BusinessNotificationPanel.vue.d.ts +12 -0
- package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +10 -2
- package/dist/types/platform-components/DetailRelationListPanel.vue.d.ts +13 -0
- package/dist/types/{views/EmployeeManagementView.vue.d.ts → platform-components/DrawerTitleActions.vue.d.ts} +2 -2
- package/dist/types/platform-components/FileTransferUploader.vue.d.ts +7 -0
- package/dist/types/platform-components/ManagementPanelHeader.vue.d.ts +5 -3
- package/dist/types/platform-components/ManagementWorkspace.vue.d.ts +8 -2
- package/dist/types/platform-components/ModuleActionButton.vue.d.ts +5 -2
- package/dist/types/platform-components/RecordActionBar.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordContentSectionHeading.vue.d.ts +17 -0
- package/dist/types/platform-components/RecordDetailDrawer.vue.d.ts +7 -1
- package/dist/types/platform-components/RecordDetailExtensionSection.vue.d.ts +8 -3
- package/dist/types/platform-components/RecordDetailFields.vue.d.ts +5 -0
- package/dist/types/platform-components/RecordDetailLayout.vue.d.ts +17 -7
- package/dist/types/platform-components/RecordDetailPanel.vue.d.ts +15 -5
- package/dist/types/platform-components/RecordExpandedSubtable.vue.d.ts +3 -0
- package/dist/types/platform-components/RecordFileReferenceTransfer.vue.d.ts +4 -0
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +29 -1
- package/dist/types/platform-components/RecordImageFileReferencePreview.vue.d.ts +11 -0
- package/dist/types/platform-components/RecordListExpansionSurface.vue.d.ts +13 -0
- package/dist/types/platform-components/RecordListExplorer.vue.d.ts +4 -2
- package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +6 -2
- package/dist/types/platform-components/RecordMultiPicker.vue.d.ts +12 -2
- package/dist/types/platform-components/RecordPanelButton.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordPicker.vue.d.ts +10 -2
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +42 -7
- package/dist/types/platform-components/RecordRelationTabs.vue.d.ts +14 -0
- package/dist/types/platform-components/RecordSelectionCheckbox.vue.d.ts +13 -0
- package/dist/types/platform-components/RecordStatusSwitch.vue.d.ts +3 -0
- package/dist/types/platform-components/StaticManagementLayout.vue.d.ts +21 -7
- package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +7 -2
- package/dist/types/platform-components/UserSessionExpandedSubtable.vue.d.ts +2 -0
- package/dist/types/platform-components/drawerTitleActions.d.ts +11 -0
- package/dist/types/platform-components/index.d.ts +15 -5
- package/dist/types/platform-components/managementWorkspaceLayout.d.ts +14 -0
- package/dist/types/platform-components/optionFieldOptionCache.d.ts +3 -0
- package/dist/types/platform-components/recordDetailFieldModel.d.ts +2 -0
- package/dist/types/platform-components/recordFormFieldModel.d.ts +69 -6
- package/dist/types/platform-components/recordPickerConstraints.d.ts +2 -0
- package/dist/types/platform-components/recordPickerModel.d.ts +6 -2
- package/dist/types/platform-components/recycleBinState.d.ts +2 -0
- package/dist/types/platform-components/scopedTreeModuleContext.d.ts +11 -0
- package/dist/types/platform-workbench/Workbench.vue.d.ts +2 -2
- package/dist/types/platform-workbench/index.d.ts +4 -2
- package/dist/types/platform-workbench/legacyPageHostTypeCompatibility.d.ts +6 -0
- package/dist/types/platform-workbench/menuNavigation.d.ts +26 -1
- package/dist/types/platform-workbench/modulePageWorkspaceViews.d.ts +7 -0
- package/dist/types/platform-workbench/pageCacheKey.d.ts +2 -0
- package/dist/types/platform-workbench/pageHostRegistry.d.ts +1 -1
- package/dist/types/platform-workbench/workbenchLayout.d.ts +36 -0
- package/dist/types/platform-workbench/workbenchNavigation.d.ts +16 -1
- package/dist/types/platform-workbench/workspaceViewHost.d.ts +2 -0
- package/dist/types/views/PasswordPolicyPreview.vue.d.ts +7 -0
- package/dist/types/views/RoleAccountGrantDrawer.vue.d.ts +1 -0
- package/dist/types/views/RoleAuthorizationView.vue.d.ts +2 -0
- package/dist/types/views/RoleEmploymentGrantDrawer.vue.d.ts +1 -0
- package/dist/types/views/{UserDetailWorkspaceView.vue.d.ts → UserDetailRouteView.vue.d.ts} +3 -2
- package/dist/types/views/UserManagementView.vue.d.ts +1 -6
- package/dist/types/views/menuManagementState.d.ts +2 -0
- package/dist/types/views/userDetailStateModel.d.ts +1 -3
- package/dist/types/views/userManagementRouteState.d.ts +11 -0
- package/dist/types/vue-ui-antdv/components/UiButton.vue.d.ts +4 -1
- package/dist/types/vue-ui-antdv/components/UiDataTable.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiInput.vue.d.ts +2 -1
- package/dist/types/vue-ui-antdv/components/UiModal.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiRadioGroup.vue.d.ts +18 -0
- package/dist/types/vue-ui-antdv/components/UiRecordExplorerItem.vue.d.ts +2 -2
- package/dist/types/vue-ui-antdv/components/UiSelect.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiTree.vue.d.ts +4 -2
- package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +7 -1
- package/dist/types/vue-ui-antdv/index.d.ts +5 -2
- package/dist/types/web-contracts/index.d.ts +408 -24
- package/dist/types/web-core/businessNotifications.d.ts +4 -0
- package/dist/types/web-core/index.d.ts +2 -0
- package/dist/types/web-core/module/abilities.d.ts +7 -7
- package/dist/types/web-core/module/moduleContext.d.ts +6 -3
- package/dist/types/web-core/module/runtimeContext.d.ts +5 -1
- package/dist/types/web-core/module/staticModuleClient.d.ts +42 -9
- package/dist/types/web-core/realtime.d.ts +5 -1
- package/dist/types/web-core/referenceResolveClient.d.ts +11 -0
- package/dist/workspaceViewSessions-B5g4M0rT.js +51 -0
- package/dist/workspaceViews-CkERhK0K.js +8748 -0
- package/package.json +1 -1
- package/dist/EmployeeDetailWorkspaceView-DYJLlkSz.js +0 -14
- package/dist/EmployeeManagementView-taxWUa7g.js +0 -1778
- package/dist/RoleAuthorizationView-q_6CsBYq.js +0 -592
- package/dist/RoleManagementView-HCa9rH0f.js +0 -1927
- package/dist/SystemUserManagementView-C1CkKivH.js +0 -758
- package/dist/UserDetailWorkspaceView-OPYvD6mH.js +0 -17
- package/dist/UserManagementView-gbCL9SnC.js +0 -965
- package/dist/pageRealtime-CzJlr9hs.js +0 -225
- package/dist/types/views/EmployeeDetailContent.vue.d.ts +0 -64
- package/dist/types/views/PositionManagementView.vue.d.ts +0 -3
- package/dist/types/views/TenantManagementView.vue.d.ts +0 -3
- package/dist/types/views/applicationManagementState.d.ts +0 -64
- package/dist/types/views/departmentManagementState.d.ts +0 -137
- package/dist/types/views/employeeDetailStateModel.d.ts +0 -39
- package/dist/types/views/employeeDetailWorkspaceSession.d.ts +0 -16
- package/dist/types/views/employeeDetailWorkspaceView.d.ts +0 -4
- package/dist/types/views/fieldSpecManagementState.d.ts +0 -80
- package/dist/types/views/fieldUiControlManagementState.d.ts +0 -76
- package/dist/types/views/moduleManagementState.d.ts +0 -76
- package/dist/types/views/organizationManagementState.d.ts +0 -64
- package/dist/types/views/positionManagementState.d.ts +0 -218
- package/dist/types/views/tenantManagementState.d.ts +0 -74
- package/dist/types/views/useEmployeeEmploymentRows.d.ts +0 -20
- package/dist/types/views/userDetailWorkspaceSession.d.ts +0 -14
- package/dist/types/views/userDetailWorkspaceView.d.ts +0 -4
- package/dist/useUserSessionRows-CBHEzRFQ.js +0 -128
- package/dist/workspaceViewSessions-DkB9myrq.js +0 -3252
- /package/dist/types/views/{ApplicationManagementView.vue.d.ts → DynamicModuleRouteView.vue.d.ts} +0 -0
- /package/dist/types/views/{DepartmentManagementView.vue.d.ts → ExternalRouteView.vue.d.ts} +0 -0
- /package/dist/types/views/{FieldSpecManagementView.vue.d.ts → ModuleOpenApiRouteView.vue.d.ts} +0 -0
- /package/dist/types/views/{FieldUiControlManagementView.vue.d.ts → OpenApiCatalogRouteView.vue.d.ts} +0 -0
- /package/dist/types/views/{ModuleManagementView.vue.d.ts → RouteDiagnosticsView.vue.d.ts} +0 -0
- /package/dist/types/views/{OrganizationManagementView.vue.d.ts → UserManagementListView.vue.d.ts} +0 -0
- /package/dist/types/views/{PasswordManagementView.vue.d.ts → WorkspaceRouteView.vue.d.ts} +0 -0
|
@@ -1,1927 +0,0 @@
|
|
|
1
|
-
import { A as e, C as t, Dt as n, F as r, I as i, M as a, Mt as o, N as s, O as c, Ot as l, S as u, T as d, X as ee, Y as f, _ as p, c as m, ct as h, gt as g, ht as _, i as v, jt as y, l as b, lt as te, m as ne, r as re, rt as ie, s as ae, st as oe, tt as x, ut as se, v as ce, vt as le, zt as S } from "./platform-components-DKKWbNrz.js";
|
|
2
|
-
import { i as ue, l as de, n as fe, r as C, t as w, x as pe } from "./workspaceViewSessions-DkB9myrq.js";
|
|
3
|
-
import { n as me } from "./currentUserContext-B1lj1WgF.js";
|
|
4
|
-
import { r as he, t as ge } from "./RoleAuthorizationView-q_6CsBYq.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__*/ o(/* @__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), g = P(!1), _ = P(!1), v = P(!1), b = P(!1), ne = T(() => he(i.context.http)), re = T(() => i.role?.id), ie = T(() => i.role ? `绑定用户 - ${X(i.role)}` : "绑定用户"), ae = T(() => i.role?.ownerScopeType === "platform" ? "platform" : i.role?.ownerScopeType === "organization" ? "organization" : "tenant"), oe = T(() => ae.value === "platform" ? void 0 : i.role?.ownerScopeId), ce = 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
|
-
}), le = 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
|
-
}))), S = T(() => [...l.value].map((e) => s.value[e] ?? q(e))), ue = T(() => Math.max(1, Math.ceil(m.value / De))), de = T(() => p.value > 0), fe = T(() => p.value + 1 < ue.value), C = T(() => [...l.value].filter((e) => !u.value.has(e))), w = T(() => [...u.value].filter((e) => !l.value.has(e))), pe = T(() => C.value.length > 0 || w.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: () => v.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 = re.value;
|
|
88
|
-
if (!e) {
|
|
89
|
-
ke();
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
g.value = !0, b.value = !1;
|
|
93
|
-
try {
|
|
94
|
-
let [t, n] = await Promise.all([ne.value.accountRoleGrants(e), ne.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
|
-
b.value = !0, x(e, {
|
|
107
|
-
source: "role-account-grants",
|
|
108
|
-
phase: "load"
|
|
109
|
-
});
|
|
110
|
-
} finally {
|
|
111
|
-
g.value = !1;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
async function ve(e) {
|
|
115
|
-
_.value = !0;
|
|
116
|
-
try {
|
|
117
|
-
let t = await ne.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
|
-
x(e, {
|
|
131
|
-
source: "role-account-grants",
|
|
132
|
-
phase: "load"
|
|
133
|
-
});
|
|
134
|
-
} finally {
|
|
135
|
-
_.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 = re.value;
|
|
147
|
-
if (e) {
|
|
148
|
-
if (!pe.value) {
|
|
149
|
-
a("close");
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
v.value = !0;
|
|
153
|
-
try {
|
|
154
|
-
for (let t of C.value) await ne.value.grantAccountRole(e, {
|
|
155
|
-
userId: t,
|
|
156
|
-
managementScopeType: ae.value,
|
|
157
|
-
managementScopeId: oe.value
|
|
158
|
-
});
|
|
159
|
-
for (let t of w.value) {
|
|
160
|
-
let n = ce.value.get(t)?.id;
|
|
161
|
-
n && await ne.value.deleteAccountRoleGrant(e, n);
|
|
162
|
-
}
|
|
163
|
-
await ee({
|
|
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
|
-
x(e, {
|
|
173
|
-
source: "role-account-grants",
|
|
174
|
-
phase: "action"
|
|
175
|
-
});
|
|
176
|
-
} finally {
|
|
177
|
-
v.value = !1;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
function Oe() {
|
|
182
|
-
v.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, g.value = !1, _.value = !1, v.value = !1, b.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, i) => (N(), E(L(r), {
|
|
211
|
-
open: e.open,
|
|
212
|
-
title: ie.value,
|
|
213
|
-
"close-title": "关闭",
|
|
214
|
-
onClose: Oe
|
|
215
|
-
}, {
|
|
216
|
-
operation: R(() => [j(L(y), {
|
|
217
|
-
disabled: v.value || g.value,
|
|
218
|
-
onClick: Oe
|
|
219
|
-
}, {
|
|
220
|
-
default: R(() => [...i[3] ||= [A("取消", -1)]]),
|
|
221
|
-
_: 1
|
|
222
|
-
}, 8, ["disabled"]), j(L(y), {
|
|
223
|
-
type: "primary",
|
|
224
|
-
loading: v.value,
|
|
225
|
-
disabled: g.value || !pe.value,
|
|
226
|
-
onClick: Se
|
|
227
|
-
}, {
|
|
228
|
-
default: R(() => [...i[4] ||= [A(" 确定 ", -1)]]),
|
|
229
|
-
_: 1
|
|
230
|
-
}, 8, ["loading", "disabled"])]),
|
|
231
|
-
default: R(() => [g.value ? (N(), E(L(se), {
|
|
232
|
-
key: 0,
|
|
233
|
-
class: "role-account-grant-drawer-state",
|
|
234
|
-
tip: "加载用户"
|
|
235
|
-
})) : b.value ? (N(), O("div", B, [j(L(te), {
|
|
236
|
-
title: "用户加载失败",
|
|
237
|
-
message: "无法加载当前角色的用户绑定"
|
|
238
|
-
}), j(L(y), {
|
|
239
|
-
type: "primary",
|
|
240
|
-
"icon-name": "reload",
|
|
241
|
-
onClick: M
|
|
242
|
-
}, {
|
|
243
|
-
default: R(() => [...i[5] ||= [A("重试", -1)]]),
|
|
244
|
-
_: 1
|
|
245
|
-
})])) : (N(), O("section", V, [
|
|
246
|
-
k("div", H, [j(L(n), {
|
|
247
|
-
value: d.value,
|
|
248
|
-
"allow-clear": "",
|
|
249
|
-
disabled: v.value,
|
|
250
|
-
placeholder: "搜索用户账号",
|
|
251
|
-
"onUpdate:value": i[0] ||= (e) => d.value = e,
|
|
252
|
-
onKeydown: z(ye, ["enter"])
|
|
253
|
-
}, null, 8, ["value", "disabled"]), j(L(y), {
|
|
254
|
-
"icon-name": "search",
|
|
255
|
-
disabled: v.value,
|
|
256
|
-
onClick: ye
|
|
257
|
-
}, {
|
|
258
|
-
default: R(() => [...i[6] ||= [A("查询", -1)]]),
|
|
259
|
-
_: 1
|
|
260
|
-
}, 8, ["disabled"])]),
|
|
261
|
-
k("div", U, [k("span", null, "已选 " + I(l.value.size) + " 个", 1), pe.value ? (N(), O("span", W, "新增 " + I(C.value.length) + " 个,移除 " + I(w.value.length) + " 个", 1)) : D("v-if", !0)]),
|
|
262
|
-
k("section", G, [k("div", K, [i[7] ||= k("strong", null, "已选用户", -1), k("span", null, I(S.value.length) + " 个", 1)]), S.value.length > 0 ? (N(), O("div", Ce, [(N(!0), O(_e, null, F(S.value, (e) => (N(), O("button", {
|
|
263
|
-
key: e.id,
|
|
264
|
-
type: "button",
|
|
265
|
-
disabled: v.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(h), {
|
|
269
|
-
class: "role-account-grant-table",
|
|
270
|
-
size: "middle",
|
|
271
|
-
contract: me,
|
|
272
|
-
rows: le.value,
|
|
273
|
-
loading: _.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(ue.value) + " 页", 1), k("div", null, [j(L(y), {
|
|
282
|
-
disabled: v.value || _.value || !de.value,
|
|
283
|
-
onClick: i[1] ||= (e) => ve(p.value - 1)
|
|
284
|
-
}, {
|
|
285
|
-
default: R(() => [...i[8] ||= [A(" 上一页 ", -1)]]),
|
|
286
|
-
_: 1
|
|
287
|
-
}, 8, ["disabled"]), j(L(y), {
|
|
288
|
-
disabled: v.value || _.value || !fe.value,
|
|
289
|
-
onClick: i[2] ||= (e) => ve(p.value + 1)
|
|
290
|
-
}, {
|
|
291
|
-
default: R(() => [...i[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 fe(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__*/ o(/* @__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
|
-
], o = [
|
|
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
|
-
], s = 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
|
-
}), c = T(() => s.value);
|
|
401
|
-
function l(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" ? `${ee(n)} 项` : "";
|
|
404
|
-
}
|
|
405
|
-
function u(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 ee(e) {
|
|
410
|
-
return e.positions.filter((e) => n.selectedIds.has(e.id)).length;
|
|
411
|
-
}
|
|
412
|
-
function f(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) => p(e, t)
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
function p(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(_), {
|
|
435
|
-
class: "employee-employment-table",
|
|
436
|
-
columns: a,
|
|
437
|
-
rows: c.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(l(e, t)), 1)]),
|
|
447
|
-
expandedRow: R(({ record: e }) => [j(L(d), { title: "任职信息" }, {
|
|
448
|
-
default: R(() => [j(L(_), {
|
|
449
|
-
columns: o,
|
|
450
|
-
rows: e.positions,
|
|
451
|
-
"row-key": "id",
|
|
452
|
-
pagination: !1,
|
|
453
|
-
selection: f(e),
|
|
454
|
-
"horizontal-scroll": "",
|
|
455
|
-
"row-muted": (e) => e.enabled === !1
|
|
456
|
-
}, {
|
|
457
|
-
cell: R(({ column: e, record: t }) => [A(I(u(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__*/ o(/* @__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 i = e, a = t, o = P([]), s = P([]), c = P({}), l = P(/* @__PURE__ */ new Set()), u = P(/* @__PURE__ */ new Set()), d = P(!1), f = P(!1), p = P(!1), m = P(!1), h = P(0), g = P(0), _ = P(""), v = T(() => i.role?.id), b = T(() => he(i.context.http)), ne = T(() => `绑定任职 - ${i.role?.title ?? i.role?.id ?? ""}`), re = T(() => [...l.value].filter((e) => !u.value.has(e))), ie = T(() => [...u.value].filter((e) => !l.value.has(e))), ae = T(() => new Map(o.value.map((e) => [e.employeePositionId, e]))), oe = T(() => s.value.filter((e) => !_.value.trim() || fe(e).includes(_.value.trim()))), ce = T(() => new Set(oe.value.filter((e) => l.value.has(e.id)).map((e) => e.employeeId)).size), le = T(() => [...l.value].map((e) => c.value[e] ?? pe(e)));
|
|
489
|
-
xe(() => [i.open, i.role?.id], ([e]) => {
|
|
490
|
-
e ? S() : de();
|
|
491
|
-
}, { immediate: !0 });
|
|
492
|
-
async function S(e = 0) {
|
|
493
|
-
let t = v.value;
|
|
494
|
-
if (t) {
|
|
495
|
-
f.value = !0, m.value = !1;
|
|
496
|
-
try {
|
|
497
|
-
let [n, r] = await Promise.all([b.value.employmentRoleGrants(t), b.value.employmentSelector(t, {
|
|
498
|
-
enabledOnly: !0,
|
|
499
|
-
page: {
|
|
500
|
-
pageNum: e,
|
|
501
|
-
pageSize: 50
|
|
502
|
-
}
|
|
503
|
-
})]);
|
|
504
|
-
o.value = n, u.value = new Set(n.map((e) => e.employeePositionId).filter((e) => !!e)), c.value = {
|
|
505
|
-
...c.value,
|
|
506
|
-
...w(r.records)
|
|
507
|
-
}, d.value ||= (l.value = new Set(u.value), !0), s.value = r.records, h.value = r.pageNum, g.value = r.total;
|
|
508
|
-
} catch (e) {
|
|
509
|
-
m.value = !0, x(e, {
|
|
510
|
-
source: "role-employment-grants",
|
|
511
|
-
phase: "load"
|
|
512
|
-
});
|
|
513
|
-
} finally {
|
|
514
|
-
f.value = !1;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
async function ue() {
|
|
519
|
-
let e = v.value;
|
|
520
|
-
if (e) {
|
|
521
|
-
p.value = !0;
|
|
522
|
-
try {
|
|
523
|
-
for (let t of re.value) await b.value.grantEmploymentRole(e, t);
|
|
524
|
-
for (let t of ie.value) {
|
|
525
|
-
let n = ae.value.get(t)?.id;
|
|
526
|
-
n && await b.value.deleteEmploymentRoleGrant(e, n);
|
|
527
|
-
}
|
|
528
|
-
await ee({
|
|
529
|
-
success: !0,
|
|
530
|
-
message: "任职角色授权已保存"
|
|
531
|
-
}, {
|
|
532
|
-
source: "role-employment-grants",
|
|
533
|
-
phase: "action"
|
|
534
|
-
}), a("saved"), a("close");
|
|
535
|
-
} catch (e) {
|
|
536
|
-
x(e, {
|
|
537
|
-
source: "role-employment-grants",
|
|
538
|
-
phase: "action"
|
|
539
|
-
});
|
|
540
|
-
} finally {
|
|
541
|
-
p.value = !1;
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
function de() {
|
|
546
|
-
o.value = [], s.value = [], c.value = {}, l.value = /* @__PURE__ */ new Set(), u.value = /* @__PURE__ */ new Set(), d.value = !1, _.value = "", h.value = 0, g.value = 0, m.value = !1;
|
|
547
|
-
}
|
|
548
|
-
function fe(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 C(e) {
|
|
558
|
-
let t = new Set(l.value);
|
|
559
|
-
t.delete(e), l.value = t;
|
|
560
|
-
}
|
|
561
|
-
function w(e) {
|
|
562
|
-
let t = {};
|
|
563
|
-
for (let n of e) n.id && (t[n.id] = n);
|
|
564
|
-
return t;
|
|
565
|
-
}
|
|
566
|
-
function pe(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, i) => (N(), E(L(r), {
|
|
584
|
-
open: e.open,
|
|
585
|
-
title: ne.value,
|
|
586
|
-
"close-title": "关闭",
|
|
587
|
-
onClose: i[6] ||= (e) => !p.value && a("close")
|
|
588
|
-
}, {
|
|
589
|
-
operation: R(() => [j(L(y), {
|
|
590
|
-
disabled: p.value,
|
|
591
|
-
onClick: i[0] ||= (e) => a("close")
|
|
592
|
-
}, {
|
|
593
|
-
default: R(() => [...i[7] ||= [A("取消", -1)]]),
|
|
594
|
-
_: 1
|
|
595
|
-
}, 8, ["disabled"]), j(L(y), {
|
|
596
|
-
type: "primary",
|
|
597
|
-
loading: p.value,
|
|
598
|
-
disabled: f.value || re.value.length === 0 && ie.value.length === 0,
|
|
599
|
-
onClick: ue
|
|
600
|
-
}, {
|
|
601
|
-
default: R(() => [...i[8] ||= [A(" 确定 ", -1)]]),
|
|
602
|
-
_: 1
|
|
603
|
-
}, 8, ["loading", "disabled"])]),
|
|
604
|
-
default: R(() => [f.value ? (N(), E(L(se), {
|
|
605
|
-
key: 0,
|
|
606
|
-
tip: "加载任职"
|
|
607
|
-
})) : m.value ? (N(), O("div", J, [j(L(te), {
|
|
608
|
-
title: "任职加载失败",
|
|
609
|
-
message: "无法加载任职授权"
|
|
610
|
-
}), j(L(y), { onClick: i[1] ||= (e) => S() }, {
|
|
611
|
-
default: R(() => [...i[9] ||= [A("重试", -1)]]),
|
|
612
|
-
_: 1
|
|
613
|
-
})])) : (N(), O("section", Y, [
|
|
614
|
-
i[13] ||= k("p", null, "角色将在所选任职的机构、部门和岗位上下文中生效。展开职员后选择其具体任职。", -1),
|
|
615
|
-
j(L(n), {
|
|
616
|
-
value: _.value,
|
|
617
|
-
"onUpdate:value": i[2] ||= (e) => _.value = e,
|
|
618
|
-
"allow-clear": "",
|
|
619
|
-
placeholder: "筛选职员、工号、机构、部门或岗位"
|
|
620
|
-
}, null, 8, ["value"]),
|
|
621
|
-
k("div", null, " 已选 " + I(l.value.size) + " 个任职;当前页涉及 " + I(ce.value) + " 名职员;新增 " + I(re.value.length) + " 个,移除 " + I(ie.value.length) + " 个 ", 1),
|
|
622
|
-
k("section", X, [k("div", Z, [i[10] ||= k("strong", null, "已选任职", -1), k("span", null, I(le.value.length) + " 个", 1)]), le.value.length > 0 ? (N(), O("div", Q, [(N(!0), O(_e, null, F(le.value, (e) => (N(), O("button", {
|
|
623
|
-
key: e.id,
|
|
624
|
-
type: "button",
|
|
625
|
-
disabled: p.value,
|
|
626
|
-
onClick: (t) => C(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": l.value,
|
|
630
|
-
"onUpdate:selectedIds": i[3] ||= (e) => l.value = e,
|
|
631
|
-
rows: oe.value,
|
|
632
|
-
selectable: "",
|
|
633
|
-
disabled: p.value
|
|
634
|
-
}, null, 8, [
|
|
635
|
-
"selected-ids",
|
|
636
|
-
"rows",
|
|
637
|
-
"disabled"
|
|
638
|
-
]),
|
|
639
|
-
k("div", Pe, [
|
|
640
|
-
k("span", null, "共 " + I(g.value) + " 个启用任职", 1),
|
|
641
|
-
j(L(y), {
|
|
642
|
-
disabled: f.value || h.value === 0,
|
|
643
|
-
onClick: i[4] ||= (e) => S(h.value - 1)
|
|
644
|
-
}, {
|
|
645
|
-
default: R(() => [...i[11] ||= [A("上一页", -1)]]),
|
|
646
|
-
_: 1
|
|
647
|
-
}, 8, ["disabled"]),
|
|
648
|
-
j(L(y), {
|
|
649
|
-
disabled: f.value || (h.value + 1) * 50 >= g.value,
|
|
650
|
-
onClick: i[5] ||= (e) => S(h.value + 1)
|
|
651
|
-
}, {
|
|
652
|
-
default: R(() => [...i[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__*/ o(/* @__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(() => c(n.value)), a = T(() => new Set(n.candidates.filter((e) => e.roleKind === "dataGrant" && e.id && i.value.includes(e.id)).map((e) => e.id))), o = T(() => n.candidates.filter((e) => e.id && e.id !== n.currentRoleId).map((e) => ({
|
|
675
|
-
label: `${u(e)} / ${d(e.roleKind)}`,
|
|
676
|
-
value: e.id,
|
|
677
|
-
disabled: e.roleKind === "dataGrant" && a.value.size > 0 && !i.value.includes(e.id)
|
|
678
|
-
})));
|
|
679
|
-
function s(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 c(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 u(e) {
|
|
691
|
-
return String(e?.title ?? e?.id ?? "角色");
|
|
692
|
-
}
|
|
693
|
-
function d(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(l), {
|
|
697
|
-
mode: "multiple",
|
|
698
|
-
value: i.value,
|
|
699
|
-
options: o.value,
|
|
700
|
-
placeholder: "请选择成员角色",
|
|
701
|
-
disabled: e.disabled,
|
|
702
|
-
"allow-clear": !0,
|
|
703
|
-
"onUpdate:value": s
|
|
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__*/ o(/* @__PURE__ */ M({
|
|
717
|
-
name: "RoleManagementView",
|
|
718
|
-
__name: "RoleManagementView",
|
|
719
|
-
props: {
|
|
720
|
-
recordId: {},
|
|
721
|
-
scopeKind: {},
|
|
722
|
-
scopeId: {}
|
|
723
|
-
},
|
|
724
|
-
setup(o) {
|
|
725
|
-
let l = o, d = pe(), ee = S({ moduleAlias: "iam.tenant" }), h = S({ moduleAlias: "iam.organization" }), _ = S({ moduleAlias: "iam.role" }), fe = 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(s(void 0)), X = P([]), Z = T(() => !!(l.recordId && l.scopeKind)), Q = T(() => Z.value && d?.presentation === "drawer"), Me = T(() => !Z.value || Q.value), Ne = T(() => ee), Pe = T(() => I.value?.id), Ie = T(() => fe?.value?.system === !0), Be = T(() => fe?.value?.system === !0), Ve = T(() => {
|
|
726
|
-
let e = fe?.value?.tenantId;
|
|
727
|
-
if (!(fe?.value?.system === !0 || !e)) return {
|
|
728
|
-
id: e,
|
|
729
|
-
title: e,
|
|
730
|
-
alias: e,
|
|
731
|
-
enabled: !0
|
|
732
|
-
};
|
|
733
|
-
}), He = T(() => ae(h, {
|
|
734
|
-
scopeFieldName: "tenantId",
|
|
735
|
-
scopeValue: Pe.value,
|
|
736
|
-
treePath: "/iam.organization/tree"
|
|
737
|
-
})), Ue = T(() => z.value?.kind !== "platform"), We = T(() => ut(_, 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" ? _.can("create") === !0 : !!V.value?.id && _.can("update") === !0 && !V.value?.systemManaged), Ze = T(() => {
|
|
774
|
-
let e = V.value;
|
|
775
|
-
return !!(e?.id && e.systemManaged !== !0 && _.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 = ue({
|
|
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 || !l.recordId || !l.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 || d?.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 = s((await _.runtime.ready).uiDescriptor);
|
|
946
|
-
} catch (e) {
|
|
947
|
-
x(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 _.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 = [], x(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 n = String(e.id ?? "");
|
|
1137
|
-
if (n) {
|
|
1138
|
-
we.value = !t, Te.value = t, Ce.value = Kt(e);
|
|
1139
|
-
try {
|
|
1140
|
-
Ce.value = await _.crud.view(n);
|
|
1141
|
-
} catch (e) {
|
|
1142
|
-
we.value = !1, Te.value = !1, Ce.value = void 0, x(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
|
-
ie("请先选择角色归属范围", { 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, t) {
|
|
1162
|
-
if (!$()) return;
|
|
1163
|
-
let n = String(e.id ?? "");
|
|
1164
|
-
if (!n) return;
|
|
1165
|
-
B.value = n, H.value = !0, U.value = t, V.value = void 0, J.value = Kt(e), W.value = !0, G.value = !1;
|
|
1166
|
-
let r = q.value + 1;
|
|
1167
|
-
q.value = r;
|
|
1168
|
-
try {
|
|
1169
|
-
let e = await _.crud.view(n);
|
|
1170
|
-
if (!Rt(n, r)) return;
|
|
1171
|
-
if (!Ut(e)) {
|
|
1172
|
-
G.value = !0, ie("角色不属于当前归属范围", {
|
|
1173
|
-
source: "role-management",
|
|
1174
|
-
phase: "load"
|
|
1175
|
-
});
|
|
1176
|
-
return;
|
|
1177
|
-
}
|
|
1178
|
-
zt(e, t);
|
|
1179
|
-
} catch (e) {
|
|
1180
|
-
Rt(n, r) && (G.value = !0, x(e, {
|
|
1181
|
-
source: "role-management",
|
|
1182
|
-
phase: "load"
|
|
1183
|
-
}));
|
|
1184
|
-
} finally {
|
|
1185
|
-
Rt(n, r) && (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 && d?.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 re({
|
|
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 ? _.crud.update(V.value.id, e) : _.crud.insert(e),
|
|
1241
|
-
onSaved: ({ record: e }) => {
|
|
1242
|
-
zt(e), F.value += 1, lt();
|
|
1243
|
-
}
|
|
1244
|
-
});
|
|
1245
|
-
}
|
|
1246
|
-
async function It(e) {
|
|
1247
|
-
await v({
|
|
1248
|
-
loading: K,
|
|
1249
|
-
source: "role-management",
|
|
1250
|
-
record: () => e?.id ? e : void 0,
|
|
1251
|
-
canExecute: (e) => _.can("delete") === !0 && e.systemManaged !== !0,
|
|
1252
|
-
deniedMessage: "当前用户无权删除角色",
|
|
1253
|
-
confirm: (e) => oe({
|
|
1254
|
-
title: "删除角色",
|
|
1255
|
-
content: `确认删除角色「${_n(e)}」?`,
|
|
1256
|
-
okText: "删除",
|
|
1257
|
-
danger: !0
|
|
1258
|
-
}),
|
|
1259
|
-
execute: (e) => _.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 v({
|
|
1267
|
-
loading: K,
|
|
1268
|
-
source: "role-management",
|
|
1269
|
-
record: () => e?.id ? e : void 0,
|
|
1270
|
-
canExecute: (e) => _.can(hn(e)) === !0 && e.systemManaged !== !0,
|
|
1271
|
-
deniedMessage: "当前用户无权变更角色启停状态",
|
|
1272
|
-
execute: (e) => e.enabled === !1 ? _.crud.enable(String(e.id), { version: e.version }) : _.crud.disable(String(e.id), { version: e.version }),
|
|
1273
|
-
onExecuted: async (e, t) => {
|
|
1274
|
-
B.value === String(t.id) && zt(await _.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 = l.recordId, t = l.scopeKind;
|
|
1300
|
-
if (!(!e || !t || t !== "platform" && !l.scopeId)) return {
|
|
1301
|
-
recordId: e,
|
|
1302
|
-
scopeKind: t,
|
|
1303
|
-
...t === "platform" ? {} : { scopeId: l.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 = m(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 = a(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 (a, o) => (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(t), {
|
|
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: o[2] ||= (e) => Be.value ? he.value += 1 : ht(),
|
|
1556
|
-
"onUpdate:searchKeyword": o[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(le), {
|
|
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: o[0] ||= (e) => _t(Ve.value)
|
|
1573
|
-
}, [j(L(le), {
|
|
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(f), {
|
|
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: o[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(t), {
|
|
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: o[6] ||= (e) => M.value += 1,
|
|
1607
|
-
"onUpdate:searchKeyword": o[7] ||= (e) => w.value = e
|
|
1608
|
-
}, {
|
|
1609
|
-
default: R(() => [z.value?.kind === "platform" ? (N(), E(L(g), {
|
|
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: o[4] ||= (e) => vt()
|
|
1616
|
-
}, [j(L(le), {
|
|
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(b), {
|
|
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: o[5] ||= (e) => yt(e)
|
|
1633
|
-
}, null, 8, [
|
|
1634
|
-
"context",
|
|
1635
|
-
"selected-id",
|
|
1636
|
-
"reload-key",
|
|
1637
|
-
"keyword"
|
|
1638
|
-
])], 64)) : (N(), E(L(g), {
|
|
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(ne), {
|
|
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: o[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(r), {
|
|
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(u), {
|
|
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: o[9] ||= (e) => Lt(V.value)
|
|
1688
|
-
}, null, 8, [
|
|
1689
|
-
"enabled",
|
|
1690
|
-
"disabled",
|
|
1691
|
-
"loading"
|
|
1692
|
-
])) : D("v-if", !0)]),
|
|
1693
|
-
operation: R(() => [j(L(i), {
|
|
1694
|
-
context: We.value,
|
|
1695
|
-
actions: $e.value,
|
|
1696
|
-
onAction: Nt
|
|
1697
|
-
}, null, 8, ["context", "actions"])]),
|
|
1698
|
-
default: R(() => [W.value ? (N(), E(L(se), {
|
|
1699
|
-
key: 0,
|
|
1700
|
-
class: "role-detail-state",
|
|
1701
|
-
tip: "加载角色详情"
|
|
1702
|
-
})) : G.value ? (N(), O("div", Re, [j(L(te), {
|
|
1703
|
-
title: "详情加载失败",
|
|
1704
|
-
message: "无法加载角色详情,请重试"
|
|
1705
|
-
}), j(L(y), {
|
|
1706
|
-
type: "primary",
|
|
1707
|
-
"icon-name": "reload",
|
|
1708
|
-
onClick: Pt
|
|
1709
|
-
}, {
|
|
1710
|
-
default: R(() => [...o[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(e), {
|
|
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, [o[16] ||= k("span", { class: "role-form-label" }, "当前范围", -1), j(L(n), {
|
|
1730
|
-
value: z.value?.title ?? "-",
|
|
1731
|
-
disabled: ""
|
|
1732
|
-
}, null, 8, ["value"])]),
|
|
1733
|
-
j(L(ce), {
|
|
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": o[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(ce), {
|
|
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(p), {
|
|
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(c), {
|
|
1787
|
-
key: 4,
|
|
1788
|
-
title: qe.value,
|
|
1789
|
-
subtitle: Je.value
|
|
1790
|
-
}, {
|
|
1791
|
-
status: R(() => [U.value === "view" && V.value ? (N(), E(L(u), {
|
|
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: o[11] ||= (e) => Lt(V.value)
|
|
1798
|
-
}, null, 8, [
|
|
1799
|
-
"enabled",
|
|
1800
|
-
"disabled",
|
|
1801
|
-
"loading"
|
|
1802
|
-
])) : D("v-if", !0)]),
|
|
1803
|
-
operation: R(() => [j(L(i), {
|
|
1804
|
-
context: L(_),
|
|
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(se), {
|
|
1814
|
-
key: 0,
|
|
1815
|
-
class: "role-detail-state",
|
|
1816
|
-
tip: "加载角色详情"
|
|
1817
|
-
})) : G.value ? (N(), O("div", ze, [j(L(te), {
|
|
1818
|
-
title: "详情加载失败",
|
|
1819
|
-
message: "无法加载角色详情,请重试"
|
|
1820
|
-
}), j(L(y), {
|
|
1821
|
-
type: "primary",
|
|
1822
|
-
"icon-name": "reload",
|
|
1823
|
-
onClick: Pt
|
|
1824
|
-
}, {
|
|
1825
|
-
default: R(() => [...o[17] ||= [A("重试", -1)]]),
|
|
1826
|
-
_: 1
|
|
1827
|
-
})])) : U.value === "view" || V.value ? (N(), O(_e, { key: 2 }, [U.value === "view" ? (N(), E(L(e), {
|
|
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, [o[18] ||= k("span", { class: "role-form-label" }, "当前范围", -1), j(L(n), {
|
|
1845
|
-
value: z.value?.title ?? "-",
|
|
1846
|
-
disabled: ""
|
|
1847
|
-
}, null, 8, ["value"])]),
|
|
1848
|
-
j(L(ce), {
|
|
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": o[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(ce), {
|
|
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(p), {
|
|
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(_),
|
|
1898
|
-
role: Ce.value,
|
|
1899
|
-
onClose: Ot,
|
|
1900
|
-
onSaved: o[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(_),
|
|
1909
|
-
role: Ce.value,
|
|
1910
|
-
onClose: Ot,
|
|
1911
|
-
onSaved: o[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-47bf49a4"]]);
|
|
1926
|
-
//#endregion
|
|
1927
|
-
export { Be as t };
|