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