@ximatai/muyun-web-app 0.26.3 → 0.26.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{EmployeeDetailWorkspaceView-mtdcsqgF.js → EmployeeDetailWorkspaceView-BySbWjCV.js} +1 -1
- package/dist/{EmployeeManagementView-CKKvQZaC.js → EmployeeManagementView-DvmDPxzN.js} +205 -205
- package/dist/{MetadataOrchestrationView-CprWBocy.js → MetadataOrchestrationView-2JxJkFEC.js} +194 -194
- package/dist/{ModuleActionManagementView-DNuAQUPE.js → ModuleActionManagementView-DRtYMXOK.js} +122 -122
- package/dist/{RoleAuthorizationView-CQtSAJoJ.js → RoleAuthorizationView-CK6Vfdup.js} +52 -52
- package/dist/{RoleDetailWorkspaceView-Dh8DXpyS.js → RoleDetailWorkspaceView-BPZcZy-r.js} +1 -1
- package/dist/{RoleManagementView-BrqaFV7y.js → RoleManagementView-B7TzzVOm.js} +204 -204
- package/dist/{SystemUserDetailWorkspaceView-N-kvycAu.js → SystemUserDetailWorkspaceView-BtEDyU-k.js} +1 -1
- package/dist/SystemUserManagementView-TKqj92zG.js +761 -0
- package/dist/{UserDetailWorkspaceView-Iek6xwix.js → UserDetailWorkspaceView-B6fGrnQ7.js} +1 -1
- package/dist/UserManagementView-4IJeDSQS.js +965 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1054 -1054
- package/dist/{pageRealtime-sRtDYlQP.js → pageRealtime-CJriNmzP.js} +12 -12
- package/dist/{platform-components-bC1gwhic.js → platform-components-CgMBopmF.js} +1107 -1377
- package/dist/types/app/LoginView.vue.d.ts +2 -2
- package/dist/types/app/appWorkbenchStartup.d.ts +1 -1
- package/dist/types/app/platformMessage.d.ts +1 -1
- package/dist/types/app/query.d.ts +1 -1
- package/dist/types/app/workbenchStartup.d.ts +3 -3
- package/dist/types/consumer/PlatformAdminOutlet.vue.d.ts +1 -1
- package/dist/types/dynamic-page-runtime/DynamicModuleHost.vue.d.ts +1 -1
- package/dist/types/dynamic-page-runtime/DynamicModulePage.vue.d.ts +1 -1
- package/dist/types/dynamic-page-runtime/actionReactions.d.ts +1 -1
- package/dist/types/dynamic-page-runtime/mockDescriptor.d.ts +1 -1
- package/dist/types/main.d.ts +1 -1
- package/dist/types/platform-admin-runtime/PlatformAdminOutlet.vue.d.ts +1 -1
- package/dist/types/platform-admin-runtime/WorkspaceViewDrawer.vue.d.ts +1 -1
- package/dist/types/platform-admin-runtime/WorkspaceViewOutlet.vue.d.ts +1 -1
- package/dist/types/platform-admin-runtime/backendHttp.d.ts +1 -1
- package/dist/types/platform-admin-runtime/currentUserContext.d.ts +1 -1
- package/dist/types/platform-admin-runtime/moduleOpenApi.d.ts +2 -2
- package/dist/types/platform-admin-runtime/pageRealtime.d.ts +1 -1
- package/dist/types/platform-admin-runtime/platformAdminRoutes.d.ts +1 -1
- package/dist/types/platform-admin-runtime/realtime.d.ts +4 -4
- package/dist/types/platform-admin-runtime/sessionRecovery.d.ts +1 -1
- package/dist/types/platform-admin-runtime/useWorkspaceViewPromotion.d.ts +1 -1
- package/dist/types/platform-admin-runtime/workspaceViewContract.d.ts +1 -1
- package/dist/types/platform-admin-runtime/workspaceViews.d.ts +1 -1
- package/dist/types/platform-components/ApplicationScopeSwitcher.vue.d.ts +1 -1
- package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +2 -2
- package/dist/types/platform-components/ModuleActionButton.vue.d.ts +2 -2
- package/dist/types/platform-components/RecordActionBar.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordDetailDrawer.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordListExplorer.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordMetaSection.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordPicker.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +1 -1
- package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +2 -2
- package/dist/types/platform-components/UserSessionExpandedSubtable.vue.d.ts +1 -1
- package/dist/types/platform-components/actionConfirmation.d.ts +1 -1
- package/dist/types/platform-components/index.d.ts +1 -0
- package/dist/types/platform-components/optionFieldOptions.d.ts +1 -1
- package/dist/types/platform-components/pageLayoutContext.d.ts +1 -1
- package/dist/types/platform-components/platformActionResultReactions.d.ts +1 -1
- package/dist/types/platform-components/platformErrorFeedback.d.ts +1 -1
- package/dist/types/platform-components/recordActionBarModel.d.ts +2 -2
- package/dist/types/platform-components/recordEditorSessionState.d.ts +1 -1
- package/dist/types/platform-components/recordExplorerItemModel.d.ts +1 -1
- package/dist/types/platform-components/recordFormFieldModel.d.ts +2 -2
- package/dist/types/platform-components/recycleBinState.d.ts +2 -2
- package/dist/types/platform-components/scopedResourceTreeModuleContext.d.ts +1 -1
- package/dist/types/platform-components/scopedTreeModuleContext.d.ts +1 -1
- package/dist/types/platform-components/softDeletedConflictHandler.d.ts +1 -1
- package/dist/types/platform-components/staticCrudManagementState.d.ts +2 -2
- package/dist/types/platform-components/staticFormActionFlow.d.ts +1 -1
- package/dist/types/platform-components/staticTreeResourceModuleContext.d.ts +1 -1
- package/dist/types/platform-components/treeRecordModel.d.ts +1 -1
- package/dist/types/platform-components/useRecycleBinExplorerMode.d.ts +1 -1
- package/dist/types/platform-components/userSessionPresentation.d.ts +1 -1
- package/dist/types/platform-workbench/Workbench.vue.d.ts +1 -1
- package/dist/types/platform-workbench/WorkbenchMenu.vue.d.ts +1 -1
- package/dist/types/platform-workbench/WorkbenchMenuTree.vue.d.ts +1 -1
- package/dist/types/platform-workbench/WorkbenchOutlet.vue.d.ts +1 -1
- package/dist/types/platform-workbench/hosts/BusinessRouteHost.vue.d.ts +1 -1
- package/dist/types/platform-workbench/hosts/ExternalPageHost.vue.d.ts +1 -1
- package/dist/types/platform-workbench/hosts/PlatformRouteHost.vue.d.ts +1 -1
- package/dist/types/platform-workbench/menuNavigation.d.ts +1 -1
- package/dist/types/platform-workbench/menuTreeModel.d.ts +1 -1
- package/dist/types/platform-workbench/pageHostRegistry.d.ts +1 -1
- package/dist/types/platform-workbench/workbenchNavigation.d.ts +1 -1
- package/dist/types/views/EmployeeDetailContent.vue.d.ts +3 -3
- package/dist/types/views/EmployeeEmploymentDrawer.vue.d.ts +1 -1
- package/dist/types/views/EmployeeEmploymentTable.vue.d.ts +1 -1
- package/dist/types/views/RoleAccountGrantDrawer.vue.d.ts +2 -2
- package/dist/types/views/RoleDetailWorkspaceView.vue.d.ts +1 -1
- package/dist/types/views/RoleEmploymentGrantDrawer.vue.d.ts +2 -2
- package/dist/types/views/RoleGroupMemberSelector.vue.d.ts +1 -1
- package/dist/types/views/RoleManagementView.vue.d.ts +1 -1
- package/dist/types/views/UserDetailContent.vue.d.ts +2 -2
- package/dist/types/views/applicationManagementState.d.ts +3 -3
- package/dist/types/views/departmentManagementState.d.ts +3 -3
- package/dist/types/views/dictionaryManagementState.d.ts +4 -4
- package/dist/types/views/employeeDetailWorkspaceSession.d.ts +1 -1
- package/dist/types/views/fieldSpecManagementState.d.ts +3 -3
- package/dist/types/views/fieldUiControlManagementState.d.ts +3 -3
- package/dist/types/views/menuManagementState.d.ts +7 -7
- package/dist/types/views/metadataOrchestrationState.d.ts +1 -1
- package/dist/types/views/moduleManagementState.d.ts +5 -5
- package/dist/types/views/organizationManagementState.d.ts +4 -4
- package/dist/types/views/positionManagementState.d.ts +4 -4
- package/dist/types/views/roleAuthorizationWorkspaceSession.d.ts +1 -1
- package/dist/types/views/roleDetailWorkspaceSession.d.ts +1 -1
- package/dist/types/views/roleDetailWorkspaceView.d.ts +1 -1
- package/dist/types/views/roleGrantClient.d.ts +2 -2
- package/dist/types/views/systemUserDetailWorkspaceSession.d.ts +1 -1
- package/dist/types/views/tenantManagementState.d.ts +3 -3
- package/dist/types/views/useEmployeeEmploymentRows.d.ts +2 -2
- package/dist/types/views/useUserSessionRows.d.ts +3 -3
- package/dist/types/views/userDetailWorkspaceSession.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/ActionBar.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/DictionarySelect.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/ReferenceSelect.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiForm.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiInput.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiSelect.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiTable.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/dictionaries.d.ts +1 -1
- package/dist/types/vue-ui-antdv/references.d.ts +1 -1
- package/dist/types/vue-ui-antdv/registry.d.ts +1 -1
- package/dist/types/web-core/actionResult.d.ts +1 -2
- package/dist/types/web-core/clients.d.ts +1 -1
- package/dist/types/web-core/dataChanges.d.ts +1 -1
- package/dist/types/web-core/errors.d.ts +1 -1
- package/dist/types/web-core/http.d.ts +1 -1
- package/dist/types/web-core/mock.d.ts +1 -1
- package/dist/types/web-core/module/runtimeContext.d.ts +1 -1
- package/dist/types/web-core/module/staticModuleClient.d.ts +1 -1
- package/dist/types/web-core/realtime.d.ts +1 -1
- package/dist/{useUserSessionRows-CLM0ZvAF.js → useUserSessionRows-DHsyr2Vy.js} +2 -2
- package/dist/{workspaceViewSessions-WsJU3OS7.js → workspaceViewSessions-BMbyO9O4.js} +403 -410
- package/package.json +1 -1
- package/dist/SystemUserManagementView-BVS5moV5.js +0 -761
- package/dist/UserManagementView-BR_Jz8O-.js +0 -965
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as de, g as fe, i as pe, n as S, r as C, t as w } from "./workspaceViewSessions-
|
|
1
|
+
import { $t as e, C as t, Dt as n, Et as r, Ft as i, G as a, Ht as o, It as ee, Jt as te, K as s, L as c, Lt as ne, Pt as l, Qt as u, R as d, S as f, Ut as p, Vt as m, W as h, X as g, Yt as _, Z as v, _t as y, a as b, d as re, et as ie, f as ae, ht as oe, i as se, on as ce, tt as le, u as ue, y as x } from "./platform-components-CgMBopmF.js";
|
|
2
|
+
import { f as de, g as fe, i as pe, n as S, r as C, t as w } from "./workspaceViewSessions-BMbyO9O4.js";
|
|
3
3
|
import { n as me } from "./currentUserContext-B1lj1WgF.js";
|
|
4
|
-
import { r as he, t as ge } from "./RoleAuthorizationView-
|
|
4
|
+
import { r as he, t as ge } from "./RoleAuthorizationView-CK6Vfdup.js";
|
|
5
5
|
import { Fragment as _e, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createTextVNode as A, createVNode as j, defineComponent as M, normalizeClass as ve, onBeforeUnmount as ye, onMounted as be, openBlock as N, ref as P, renderList as F, toDisplayString as I, unref as L, watch as xe, withCtx as R, withKeys as z, withModifiers as Se } from "vue";
|
|
6
6
|
//#region src/views/RoleAccountGrantDrawer.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var B = {
|
|
@@ -16,7 +16,7 @@ var B = {
|
|
|
16
16
|
}, we = ["disabled", "onClick"], Te = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "role-account-grant-selected-empty"
|
|
19
|
-
}, Ee = { class: "role-account-grant-pagination" }, De = 20, Oe = /*#__PURE__*/
|
|
19
|
+
}, Ee = { class: "role-account-grant-pagination" }, De = 20, Oe = /*#__PURE__*/ e(/* @__PURE__ */ M({
|
|
20
20
|
name: "RoleAccountGrantDrawer",
|
|
21
21
|
__name: "RoleAccountGrantDrawer",
|
|
22
22
|
props: {
|
|
@@ -26,7 +26,7 @@ var B = {
|
|
|
26
26
|
},
|
|
27
27
|
emits: ["close", "saved"],
|
|
28
28
|
setup(e, { emit: t }) {
|
|
29
|
-
let
|
|
29
|
+
let n = e, a = t, o = P([]), s = P({}), c = P([]), l = P(/* @__PURE__ */ new Set()), d = P(/* @__PURE__ */ new Set()), f = P(""), p = P(""), m = P(0), h = P(0), g = P(!1), _ = P(!1), v = P(!1), b = P(!1), re = T(() => he(n.context.http)), ae = T(() => n.role?.id), oe = T(() => n.role ? `绑定用户 - ${X(n.role)}` : "绑定用户"), se = T(() => n.role?.ownerScopeType === "platform" ? "platform" : n.role?.ownerScopeType === "organization" ? "organization" : "tenant"), ce = T(() => se.value === "platform" ? void 0 : n.role?.ownerScopeId), le = T(() => {
|
|
30
30
|
let e = /* @__PURE__ */ new Map();
|
|
31
31
|
for (let t of o.value) t.userId && e.set(t.userId, t);
|
|
32
32
|
return e;
|
|
@@ -37,8 +37,8 @@ var B = {
|
|
|
37
37
|
employeeTitle: e.employeeTitle ?? "",
|
|
38
38
|
organizationTitle: e.organizationTitle ?? e.organizationId ?? "",
|
|
39
39
|
departmentTitle: e.departmentTitle ?? e.departmentId ?? "",
|
|
40
|
-
boundTitle:
|
|
41
|
-
}))), x = T(() => [...l.value].map((e) => s.value[e] ?? q(e))), de = T(() => Math.max(1, Math.ceil(
|
|
40
|
+
boundTitle: d.value.has(e.id) ? "已绑定" : "未绑定"
|
|
41
|
+
}))), x = T(() => [...l.value].map((e) => s.value[e] ?? q(e))), de = T(() => Math.max(1, Math.ceil(h.value / De))), fe = T(() => m.value > 0), pe = T(() => m.value + 1 < de.value), S = T(() => [...l.value].filter((e) => !d.value.has(e))), C = T(() => [...d.value].filter((e) => !l.value.has(e))), w = T(() => S.value.length > 0 || C.value.length > 0), me = {
|
|
42
42
|
rowKey: "id",
|
|
43
43
|
columns: [
|
|
44
44
|
{
|
|
@@ -75,23 +75,23 @@ var B = {
|
|
|
75
75
|
}, ge = T(() => ({
|
|
76
76
|
selectedRowKeys: [...l.value],
|
|
77
77
|
preserveSelectedRowKeys: !0,
|
|
78
|
-
disabledOf: () =>
|
|
78
|
+
disabledOf: () => v.value,
|
|
79
79
|
onChange: (e) => {
|
|
80
80
|
l.value = new Set(e.map((e) => String(e)));
|
|
81
81
|
}
|
|
82
82
|
}));
|
|
83
|
-
xe(() => [
|
|
83
|
+
xe(() => [n.open, n.role?.id], ([e]) => {
|
|
84
84
|
e ? M() : ke();
|
|
85
85
|
}, { immediate: !0 });
|
|
86
86
|
async function M() {
|
|
87
|
-
let e =
|
|
87
|
+
let e = ae.value;
|
|
88
88
|
if (!e) {
|
|
89
89
|
ke();
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
g.value = !0, b.value = !1;
|
|
93
93
|
try {
|
|
94
|
-
let [t, n] = await Promise.all([
|
|
94
|
+
let [t, n] = await Promise.all([re.value.accountRoleGrants(e), re.value.userSelector({
|
|
95
95
|
roleId: e,
|
|
96
96
|
enabledOnly: !1,
|
|
97
97
|
page: {
|
|
@@ -101,21 +101,21 @@ var B = {
|
|
|
101
101
|
})]);
|
|
102
102
|
o.value = t;
|
|
103
103
|
let r = new Set(t.map((e) => e.userId).filter((e) => !!e));
|
|
104
|
-
|
|
104
|
+
d.value = r, l.value = new Set(r), s.value = je([...t.map((e) => q(e.userId)).filter((e) => !!e), ...n.records]), await ve(0);
|
|
105
105
|
} catch (e) {
|
|
106
|
-
|
|
106
|
+
b.value = !0, r(e, {
|
|
107
107
|
source: "role-account-grants",
|
|
108
108
|
phase: "load"
|
|
109
109
|
});
|
|
110
110
|
} finally {
|
|
111
|
-
|
|
111
|
+
g.value = !1;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
async function ve(e) {
|
|
115
|
-
|
|
115
|
+
_.value = !0;
|
|
116
116
|
try {
|
|
117
|
-
let t = await
|
|
118
|
-
keyword:
|
|
117
|
+
let t = await re.value.userSelector({
|
|
118
|
+
keyword: p.value,
|
|
119
119
|
enabledOnly: !0,
|
|
120
120
|
page: {
|
|
121
121
|
pageNum: Math.max(0, e),
|
|
@@ -125,42 +125,42 @@ var B = {
|
|
|
125
125
|
c.value = t.records, s.value = {
|
|
126
126
|
...s.value,
|
|
127
127
|
...je(t.records)
|
|
128
|
-
},
|
|
128
|
+
}, m.value = t.pageNum, h.value = t.total;
|
|
129
129
|
} catch (e) {
|
|
130
|
-
|
|
130
|
+
r(e, {
|
|
131
131
|
source: "role-account-grants",
|
|
132
132
|
phase: "load"
|
|
133
133
|
});
|
|
134
134
|
} finally {
|
|
135
|
-
|
|
135
|
+
_.value = !1;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
function ye() {
|
|
139
|
-
|
|
139
|
+
p.value = f.value.trim(), ve(0);
|
|
140
140
|
}
|
|
141
141
|
function be(e, t) {
|
|
142
142
|
let n = new Set(l.value);
|
|
143
143
|
t ? n.add(e) : n.delete(e), l.value = n;
|
|
144
144
|
}
|
|
145
145
|
async function Se() {
|
|
146
|
-
let e =
|
|
146
|
+
let e = ae.value;
|
|
147
147
|
if (e) {
|
|
148
148
|
if (!w.value) {
|
|
149
149
|
a("close");
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
v.value = !0;
|
|
153
153
|
try {
|
|
154
|
-
for (let t of S.value) await
|
|
154
|
+
for (let t of S.value) await re.value.grantAccountRole(e, {
|
|
155
155
|
userId: t,
|
|
156
|
-
managementScopeType:
|
|
157
|
-
managementScopeId:
|
|
156
|
+
managementScopeType: se.value,
|
|
157
|
+
managementScopeId: ce.value
|
|
158
158
|
});
|
|
159
159
|
for (let t of C.value) {
|
|
160
160
|
let n = le.value.get(t)?.id;
|
|
161
|
-
n && await
|
|
161
|
+
n && await re.value.deleteAccountRoleGrant(e, n);
|
|
162
162
|
}
|
|
163
|
-
await
|
|
163
|
+
await y({
|
|
164
164
|
success: !0,
|
|
165
165
|
message: "用户绑定已保存"
|
|
166
166
|
}, {
|
|
@@ -169,20 +169,20 @@ var B = {
|
|
|
169
169
|
fallbackMessage: "用户绑定已保存"
|
|
170
170
|
}), a("saved"), a("close");
|
|
171
171
|
} catch (e) {
|
|
172
|
-
|
|
172
|
+
r(e, {
|
|
173
173
|
source: "role-account-grants",
|
|
174
174
|
phase: "action"
|
|
175
175
|
});
|
|
176
176
|
} finally {
|
|
177
|
-
|
|
177
|
+
v.value = !1;
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
function Oe() {
|
|
182
|
-
|
|
182
|
+
v.value || a("close");
|
|
183
183
|
}
|
|
184
184
|
function ke() {
|
|
185
|
-
o.value = [], s.value = {}, c.value = [], l.value = /* @__PURE__ */ new Set(),
|
|
185
|
+
o.value = [], s.value = {}, c.value = [], l.value = /* @__PURE__ */ new Set(), d.value = /* @__PURE__ */ new Set(), f.value = "", p.value = "", m.value = 0, h.value = 0, g.value = !1, _.value = !1, v.value = !1, b.value = !1;
|
|
186
186
|
}
|
|
187
187
|
function Ae(e) {
|
|
188
188
|
be(e, !1);
|
|
@@ -207,35 +207,35 @@ var B = {
|
|
|
207
207
|
function X(e) {
|
|
208
208
|
return String(e.title ?? e.id ?? "角色");
|
|
209
209
|
}
|
|
210
|
-
return (t, n) => (N(), E(L(
|
|
210
|
+
return (t, n) => (N(), E(L(ie), {
|
|
211
211
|
open: e.open,
|
|
212
|
-
title:
|
|
212
|
+
title: oe.value,
|
|
213
213
|
"close-title": "关闭",
|
|
214
214
|
onClose: Oe
|
|
215
215
|
}, {
|
|
216
|
-
operation: R(() => [j(L(
|
|
217
|
-
disabled:
|
|
216
|
+
operation: R(() => [j(L(u), {
|
|
217
|
+
disabled: v.value || g.value,
|
|
218
218
|
onClick: Oe
|
|
219
219
|
}, {
|
|
220
220
|
default: R(() => [...n[3] ||= [A("取消", -1)]]),
|
|
221
221
|
_: 1
|
|
222
|
-
}, 8, ["disabled"]), j(L(
|
|
222
|
+
}, 8, ["disabled"]), j(L(u), {
|
|
223
223
|
type: "primary",
|
|
224
|
-
loading:
|
|
225
|
-
disabled:
|
|
224
|
+
loading: v.value,
|
|
225
|
+
disabled: g.value || !w.value,
|
|
226
226
|
onClick: Se
|
|
227
227
|
}, {
|
|
228
228
|
default: R(() => [...n[4] ||= [A(" 确定 ", -1)]]),
|
|
229
229
|
_: 1
|
|
230
230
|
}, 8, ["loading", "disabled"])]),
|
|
231
|
-
default: R(() => [
|
|
231
|
+
default: R(() => [g.value ? (N(), E(L(ne), {
|
|
232
232
|
key: 0,
|
|
233
233
|
class: "role-account-grant-drawer-state",
|
|
234
234
|
tip: "加载用户"
|
|
235
|
-
})) :
|
|
235
|
+
})) : b.value ? (N(), O("div", B, [j(L(ee), {
|
|
236
236
|
title: "用户加载失败",
|
|
237
237
|
message: "无法加载当前角色的用户绑定"
|
|
238
|
-
}), j(L(
|
|
238
|
+
}), j(L(u), {
|
|
239
239
|
type: "primary",
|
|
240
240
|
"icon-name": "reload",
|
|
241
241
|
onClick: M
|
|
@@ -243,16 +243,16 @@ var B = {
|
|
|
243
243
|
default: R(() => [...n[5] ||= [A("重试", -1)]]),
|
|
244
244
|
_: 1
|
|
245
245
|
})])) : (N(), O("section", V, [
|
|
246
|
-
k("div", H, [j(L(
|
|
247
|
-
value:
|
|
246
|
+
k("div", H, [j(L(te), {
|
|
247
|
+
value: f.value,
|
|
248
248
|
"allow-clear": "",
|
|
249
|
-
disabled:
|
|
249
|
+
disabled: v.value,
|
|
250
250
|
placeholder: "搜索用户账号",
|
|
251
|
-
"onUpdate:value": n[0] ||= (e) =>
|
|
251
|
+
"onUpdate:value": n[0] ||= (e) => f.value = e,
|
|
252
252
|
onKeydown: z(ye, ["enter"])
|
|
253
|
-
}, null, 8, ["value", "disabled"]), j(L(
|
|
253
|
+
}, null, 8, ["value", "disabled"]), j(L(u), {
|
|
254
254
|
"icon-name": "search",
|
|
255
|
-
disabled:
|
|
255
|
+
disabled: v.value,
|
|
256
256
|
onClick: ye
|
|
257
257
|
}, {
|
|
258
258
|
default: R(() => [...n[6] ||= [A("查询", -1)]]),
|
|
@@ -262,15 +262,15 @@ var B = {
|
|
|
262
262
|
k("section", G, [k("div", K, [n[7] ||= k("strong", null, "已选用户", -1), k("span", null, I(x.value.length) + " 个", 1)]), x.value.length > 0 ? (N(), O("div", Ce, [(N(!0), O(_e, null, F(x.value, (e) => (N(), O("button", {
|
|
263
263
|
key: e.id,
|
|
264
264
|
type: "button",
|
|
265
|
-
disabled:
|
|
265
|
+
disabled: v.value,
|
|
266
266
|
onClick: (t) => Ae(e.id)
|
|
267
267
|
}, [k("span", null, I(J(e)), 1), k("small", null, I(Y(e)), 1)], 8, we))), 128))])) : (N(), O("span", Te, "暂无已选用户"))]),
|
|
268
|
-
j(L(
|
|
268
|
+
j(L(i), {
|
|
269
269
|
class: "role-account-grant-table",
|
|
270
270
|
size: "middle",
|
|
271
271
|
contract: me,
|
|
272
272
|
rows: ue.value,
|
|
273
|
-
loading:
|
|
273
|
+
loading: _.value,
|
|
274
274
|
pagination: !1,
|
|
275
275
|
selection: ge.value
|
|
276
276
|
}, null, 8, [
|
|
@@ -278,15 +278,15 @@ var B = {
|
|
|
278
278
|
"loading",
|
|
279
279
|
"selection"
|
|
280
280
|
]),
|
|
281
|
-
k("div", Ee, [k("span", null, "共 " + I(
|
|
282
|
-
disabled:
|
|
283
|
-
onClick: n[1] ||= (e) => ve(
|
|
281
|
+
k("div", Ee, [k("span", null, "共 " + I(h.value) + " 个用户,第 " + I(m.value + 1) + " / " + I(de.value) + " 页", 1), k("div", null, [j(L(u), {
|
|
282
|
+
disabled: v.value || _.value || !fe.value,
|
|
283
|
+
onClick: n[1] ||= (e) => ve(m.value - 1)
|
|
284
284
|
}, {
|
|
285
285
|
default: R(() => [...n[8] ||= [A(" 上一页 ", -1)]]),
|
|
286
286
|
_: 1
|
|
287
|
-
}, 8, ["disabled"]), j(L(
|
|
288
|
-
disabled:
|
|
289
|
-
onClick: n[2] ||= (e) => ve(
|
|
287
|
+
}, 8, ["disabled"]), j(L(u), {
|
|
288
|
+
disabled: v.value || _.value || !pe.value,
|
|
289
|
+
onClick: n[2] ||= (e) => ve(m.value + 1)
|
|
290
290
|
}, {
|
|
291
291
|
default: R(() => [...n[9] ||= [A(" 下一页 ", -1)]]),
|
|
292
292
|
_: 1
|
|
@@ -318,7 +318,7 @@ function je(e) {
|
|
|
318
318
|
}
|
|
319
319
|
//#endregion
|
|
320
320
|
//#region src/views/EmployeeEmploymentTable.vue
|
|
321
|
-
var q = /*#__PURE__*/
|
|
321
|
+
var q = /*#__PURE__*/ e(/* @__PURE__ */ M({
|
|
322
322
|
name: "EmployeeEmploymentTable",
|
|
323
323
|
__name: "EmployeeEmploymentTable",
|
|
324
324
|
props: {
|
|
@@ -363,7 +363,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
363
363
|
width: 88,
|
|
364
364
|
align: "right"
|
|
365
365
|
}
|
|
366
|
-
],
|
|
366
|
+
], o = [
|
|
367
367
|
{
|
|
368
368
|
key: "position",
|
|
369
369
|
title: "岗位",
|
|
@@ -384,7 +384,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
384
384
|
title: "主岗位",
|
|
385
385
|
width: 88
|
|
386
386
|
}
|
|
387
|
-
],
|
|
387
|
+
], ee = T(() => {
|
|
388
388
|
let e = /* @__PURE__ */ new Map();
|
|
389
389
|
for (let t of n.rows) {
|
|
390
390
|
let n = t.employeeId ?? t.id, r = e.get(n) ?? {
|
|
@@ -397,60 +397,60 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
397
397
|
r.positions.push(t), e.set(n, r);
|
|
398
398
|
}
|
|
399
399
|
return [...e.values()];
|
|
400
|
-
}),
|
|
401
|
-
function
|
|
400
|
+
}), te = T(() => ee.value);
|
|
401
|
+
function s(e, t) {
|
|
402
402
|
let n = t;
|
|
403
|
-
return e.key === "title" ? n.title : e.key === "employeeNo" ? n.employeeNo ?? n.employeeId : e.key === "organizationTitle" ? n.organizationTitle ?? "-" : e.key === "employmentCount" ? `${n.positions.length} 项` : e.key === "selectedCount" ? `${
|
|
403
|
+
return e.key === "title" ? n.title : e.key === "employeeNo" ? n.employeeNo ?? n.employeeId : e.key === "organizationTitle" ? n.organizationTitle ?? "-" : e.key === "employmentCount" ? `${n.positions.length} 项` : e.key === "selectedCount" ? `${ne(n)} 项` : "";
|
|
404
404
|
}
|
|
405
405
|
function c(e, t) {
|
|
406
406
|
let n = t;
|
|
407
407
|
return e.key === "position" ? n.positionTitle ?? n.positionId : e.key === "organization" ? n.organizationTitle ?? n.organizationId : e.key === "department" ? n.departmentTitle ?? n.departmentId : e.key === "primaryPosition" ? n.primaryPosition ? "是" : "否" : "";
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function ne(e) {
|
|
410
410
|
return e.positions.filter((e) => n.selectedIds.has(e.id)).length;
|
|
411
411
|
}
|
|
412
|
-
function
|
|
412
|
+
function l(e) {
|
|
413
413
|
if (n.selectable) return {
|
|
414
414
|
selectedRowKeys: e.positions.filter((e) => n.selectedIds.has(e.id)).map((e) => e.id),
|
|
415
415
|
preserveSelectedRowKeys: !0,
|
|
416
416
|
disabledOf: () => n.disabled,
|
|
417
|
-
onChange: (t) =>
|
|
417
|
+
onChange: (t) => u(e, t)
|
|
418
418
|
};
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function u(e, t) {
|
|
421
421
|
let i = new Set(n.selectedIds);
|
|
422
422
|
for (let t of e.positions) i.delete(t.id);
|
|
423
423
|
for (let e of t) i.add(String(e));
|
|
424
424
|
r("update:selectedIds", i);
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function d(e, t) {
|
|
427
427
|
let n = e.employeeId;
|
|
428
428
|
i.value = t ? Array.from(new Set([...i.value, n])) : i.value.filter((e) => e !== n);
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function f(e) {
|
|
431
431
|
let t = e.employeeId;
|
|
432
|
-
|
|
432
|
+
d(e, !i.value.includes(t));
|
|
433
433
|
}
|
|
434
|
-
return (e, t) => (N(), E(L(
|
|
434
|
+
return (e, t) => (N(), E(L(m), {
|
|
435
435
|
class: "employee-employment-table",
|
|
436
436
|
columns: a,
|
|
437
|
-
rows:
|
|
437
|
+
rows: te.value,
|
|
438
438
|
"row-key": "employeeId",
|
|
439
439
|
pagination: !1,
|
|
440
440
|
"expanded-row-keys": i.value,
|
|
441
441
|
"clickable-rows": "",
|
|
442
442
|
"horizontal-scroll": "",
|
|
443
|
-
onRowExpand:
|
|
444
|
-
onRowDblclick:
|
|
443
|
+
onRowExpand: d,
|
|
444
|
+
onRowDblclick: f
|
|
445
445
|
}, {
|
|
446
|
-
cell: R(({ column: e, record: t }) => [A(I(
|
|
447
|
-
expandedRow: R(({ record: e }) => [j(L(
|
|
448
|
-
default: R(() => [j(L(
|
|
449
|
-
columns:
|
|
446
|
+
cell: R(({ column: e, record: t }) => [A(I(s(e, t)), 1)]),
|
|
447
|
+
expandedRow: R(({ record: e }) => [j(L(h), { title: "任职信息" }, {
|
|
448
|
+
default: R(() => [j(L(m), {
|
|
449
|
+
columns: o,
|
|
450
450
|
rows: e.positions,
|
|
451
451
|
"row-key": "id",
|
|
452
452
|
pagination: !1,
|
|
453
|
-
selection:
|
|
453
|
+
selection: l(e),
|
|
454
454
|
"horizontal-scroll": "",
|
|
455
455
|
"row-muted": (e) => e.enabled === !1
|
|
456
456
|
}, {
|
|
@@ -475,7 +475,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
475
475
|
}, Me = ["disabled", "onClick"], Ne = {
|
|
476
476
|
key: 1,
|
|
477
477
|
class: "role-employment-grant-selected-empty"
|
|
478
|
-
}, Pe = { class: "role-employment-grant-pagination" }, Fe = /*#__PURE__*/
|
|
478
|
+
}, Pe = { class: "role-employment-grant-pagination" }, Fe = /*#__PURE__*/ e(/* @__PURE__ */ M({
|
|
479
479
|
name: "RoleEmploymentGrantDrawer",
|
|
480
480
|
__name: "RoleEmploymentGrantDrawer",
|
|
481
481
|
props: {
|
|
@@ -485,16 +485,16 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
485
485
|
},
|
|
486
486
|
emits: ["close", "saved"],
|
|
487
487
|
setup(e, { emit: t }) {
|
|
488
|
-
let
|
|
489
|
-
xe(() => [
|
|
488
|
+
let n = e, i = t, a = P([]), o = P([]), s = P({}), c = P(/* @__PURE__ */ new Set()), l = P(/* @__PURE__ */ new Set()), d = P(!1), f = P(!1), p = P(!1), m = P(!1), h = P(0), g = P(0), _ = P(""), v = T(() => n.role?.id), b = T(() => he(n.context.http)), re = T(() => `绑定任职 - ${n.role?.title ?? n.role?.id ?? ""}`), ae = T(() => [...c.value].filter((e) => !l.value.has(e))), oe = T(() => [...l.value].filter((e) => !c.value.has(e))), se = T(() => new Map(a.value.map((e) => [e.employeePositionId, e]))), ce = T(() => o.value.filter((e) => !_.value.trim() || pe(e).includes(_.value.trim()))), le = T(() => new Set(ce.value.filter((e) => c.value.has(e.id)).map((e) => e.employeeId)).size), ue = T(() => [...c.value].map((e) => s.value[e] ?? w(e)));
|
|
489
|
+
xe(() => [n.open, n.role?.id], ([e]) => {
|
|
490
490
|
e ? x() : fe();
|
|
491
491
|
}, { immediate: !0 });
|
|
492
492
|
async function x(e = 0) {
|
|
493
|
-
let t =
|
|
493
|
+
let t = v.value;
|
|
494
494
|
if (t) {
|
|
495
|
-
|
|
495
|
+
f.value = !0, m.value = !1;
|
|
496
496
|
try {
|
|
497
|
-
let [n, r] = await Promise.all([
|
|
497
|
+
let [n, r] = await Promise.all([b.value.employmentRoleGrants(t), b.value.employmentSelector(t, {
|
|
498
498
|
enabledOnly: !0,
|
|
499
499
|
page: {
|
|
500
500
|
pageNum: e,
|
|
@@ -504,28 +504,28 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
504
504
|
a.value = n, l.value = new Set(n.map((e) => e.employeePositionId).filter((e) => !!e)), s.value = {
|
|
505
505
|
...s.value,
|
|
506
506
|
...C(r.records)
|
|
507
|
-
},
|
|
507
|
+
}, d.value ||= (c.value = new Set(l.value), !0), o.value = r.records, h.value = r.pageNum, g.value = r.total;
|
|
508
508
|
} catch (e) {
|
|
509
|
-
|
|
509
|
+
m.value = !0, r(e, {
|
|
510
510
|
source: "role-employment-grants",
|
|
511
511
|
phase: "load"
|
|
512
512
|
});
|
|
513
513
|
} finally {
|
|
514
|
-
|
|
514
|
+
f.value = !1;
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
518
|
async function de() {
|
|
519
|
-
let e =
|
|
519
|
+
let e = v.value;
|
|
520
520
|
if (e) {
|
|
521
|
-
|
|
521
|
+
p.value = !0;
|
|
522
522
|
try {
|
|
523
|
-
for (let t of
|
|
524
|
-
for (let t of
|
|
525
|
-
let n =
|
|
526
|
-
n && await
|
|
523
|
+
for (let t of ae.value) await b.value.grantEmploymentRole(e, t);
|
|
524
|
+
for (let t of oe.value) {
|
|
525
|
+
let n = se.value.get(t)?.id;
|
|
526
|
+
n && await b.value.deleteEmploymentRoleGrant(e, n);
|
|
527
527
|
}
|
|
528
|
-
await
|
|
528
|
+
await y({
|
|
529
529
|
success: !0,
|
|
530
530
|
message: "任职角色授权已保存"
|
|
531
531
|
}, {
|
|
@@ -533,17 +533,17 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
533
533
|
phase: "action"
|
|
534
534
|
}), i("saved"), i("close");
|
|
535
535
|
} catch (e) {
|
|
536
|
-
|
|
536
|
+
r(e, {
|
|
537
537
|
source: "role-employment-grants",
|
|
538
538
|
phase: "action"
|
|
539
539
|
});
|
|
540
540
|
} finally {
|
|
541
|
-
|
|
541
|
+
p.value = !1;
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
function fe() {
|
|
546
|
-
a.value = [], o.value = [], s.value = {}, c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(),
|
|
546
|
+
a.value = [], o.value = [], s.value = {}, c.value = /* @__PURE__ */ new Set(), l.value = /* @__PURE__ */ new Set(), d.value = !1, _.value = "", h.value = 0, g.value = 0, m.value = !1;
|
|
547
547
|
}
|
|
548
548
|
function pe(e) {
|
|
549
549
|
return [
|
|
@@ -580,74 +580,74 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
580
580
|
e.departmentTitle ?? e.departmentId
|
|
581
581
|
].filter(Boolean).join(" / ") || e.id;
|
|
582
582
|
}
|
|
583
|
-
return (t, n) => (N(), E(L(
|
|
583
|
+
return (t, n) => (N(), E(L(ie), {
|
|
584
584
|
open: e.open,
|
|
585
|
-
title:
|
|
585
|
+
title: re.value,
|
|
586
586
|
"close-title": "关闭",
|
|
587
|
-
onClose: n[6] ||= (e) => !
|
|
587
|
+
onClose: n[6] ||= (e) => !p.value && i("close")
|
|
588
588
|
}, {
|
|
589
|
-
operation: R(() => [j(L(
|
|
590
|
-
disabled:
|
|
589
|
+
operation: R(() => [j(L(u), {
|
|
590
|
+
disabled: p.value,
|
|
591
591
|
onClick: n[0] ||= (e) => i("close")
|
|
592
592
|
}, {
|
|
593
593
|
default: R(() => [...n[7] ||= [A("取消", -1)]]),
|
|
594
594
|
_: 1
|
|
595
|
-
}, 8, ["disabled"]), j(L(
|
|
595
|
+
}, 8, ["disabled"]), j(L(u), {
|
|
596
596
|
type: "primary",
|
|
597
|
-
loading:
|
|
598
|
-
disabled:
|
|
597
|
+
loading: p.value,
|
|
598
|
+
disabled: f.value || ae.value.length === 0 && oe.value.length === 0,
|
|
599
599
|
onClick: de
|
|
600
600
|
}, {
|
|
601
601
|
default: R(() => [...n[8] ||= [A(" 确定 ", -1)]]),
|
|
602
602
|
_: 1
|
|
603
603
|
}, 8, ["loading", "disabled"])]),
|
|
604
|
-
default: R(() => [
|
|
604
|
+
default: R(() => [f.value ? (N(), E(L(ne), {
|
|
605
605
|
key: 0,
|
|
606
606
|
tip: "加载任职"
|
|
607
|
-
})) :
|
|
607
|
+
})) : m.value ? (N(), O("div", J, [j(L(ee), {
|
|
608
608
|
title: "任职加载失败",
|
|
609
609
|
message: "无法加载任职授权"
|
|
610
|
-
}), j(L(
|
|
610
|
+
}), j(L(u), { onClick: n[1] ||= (e) => x() }, {
|
|
611
611
|
default: R(() => [...n[9] ||= [A("重试", -1)]]),
|
|
612
612
|
_: 1
|
|
613
613
|
})])) : (N(), O("section", Y, [
|
|
614
614
|
n[13] ||= k("p", null, "角色将在所选任职的机构、部门和岗位上下文中生效。展开职员后选择其具体任职。", -1),
|
|
615
|
-
j(L(
|
|
616
|
-
value:
|
|
617
|
-
"onUpdate:value": n[2] ||= (e) =>
|
|
615
|
+
j(L(te), {
|
|
616
|
+
value: _.value,
|
|
617
|
+
"onUpdate:value": n[2] ||= (e) => _.value = e,
|
|
618
618
|
"allow-clear": "",
|
|
619
619
|
placeholder: "筛选职员、工号、机构、部门或岗位"
|
|
620
620
|
}, null, 8, ["value"]),
|
|
621
|
-
k("div", null, " 已选 " + I(c.value.size) + " 个任职;当前页涉及 " + I(le.value) + " 名职员;新增 " + I(
|
|
621
|
+
k("div", null, " 已选 " + I(c.value.size) + " 个任职;当前页涉及 " + I(le.value) + " 名职员;新增 " + I(ae.value.length) + " 个,移除 " + I(oe.value.length) + " 个 ", 1),
|
|
622
622
|
k("section", X, [k("div", Z, [n[10] ||= k("strong", null, "已选任职", -1), k("span", null, I(ue.value.length) + " 个", 1)]), ue.value.length > 0 ? (N(), O("div", Q, [(N(!0), O(_e, null, F(ue.value, (e) => (N(), O("button", {
|
|
623
623
|
key: e.id,
|
|
624
624
|
type: "button",
|
|
625
|
-
disabled:
|
|
625
|
+
disabled: p.value,
|
|
626
626
|
onClick: (t) => S(e.id)
|
|
627
627
|
}, [k("span", null, I(me(e)), 1), k("small", null, I(ge(e)), 1)], 8, Me))), 128))])) : (N(), O("span", Ne, "暂无已选任职"))]),
|
|
628
628
|
j(q, {
|
|
629
629
|
"selected-ids": c.value,
|
|
630
630
|
"onUpdate:selectedIds": n[3] ||= (e) => c.value = e,
|
|
631
|
-
rows:
|
|
631
|
+
rows: ce.value,
|
|
632
632
|
selectable: "",
|
|
633
|
-
disabled:
|
|
633
|
+
disabled: p.value
|
|
634
634
|
}, null, 8, [
|
|
635
635
|
"selected-ids",
|
|
636
636
|
"rows",
|
|
637
637
|
"disabled"
|
|
638
638
|
]),
|
|
639
639
|
k("div", Pe, [
|
|
640
|
-
k("span", null, "共 " + I(
|
|
641
|
-
j(L(
|
|
642
|
-
disabled:
|
|
643
|
-
onClick: n[4] ||= (e) => x(
|
|
640
|
+
k("span", null, "共 " + I(g.value) + " 个启用任职", 1),
|
|
641
|
+
j(L(u), {
|
|
642
|
+
disabled: f.value || h.value === 0,
|
|
643
|
+
onClick: n[4] ||= (e) => x(h.value - 1)
|
|
644
644
|
}, {
|
|
645
645
|
default: R(() => [...n[11] ||= [A("上一页", -1)]]),
|
|
646
646
|
_: 1
|
|
647
647
|
}, 8, ["disabled"]),
|
|
648
|
-
j(L(
|
|
649
|
-
disabled:
|
|
650
|
-
onClick: n[5] ||= (e) => x(
|
|
648
|
+
j(L(u), {
|
|
649
|
+
disabled: f.value || (h.value + 1) * 50 >= g.value,
|
|
650
|
+
onClick: n[5] ||= (e) => x(h.value + 1)
|
|
651
651
|
}, {
|
|
652
652
|
default: R(() => [...n[12] ||= [A(" 下一页 ", -1)]]),
|
|
653
653
|
_: 1
|
|
@@ -657,7 +657,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
657
657
|
_: 1
|
|
658
658
|
}, 8, ["open", "title"]));
|
|
659
659
|
}
|
|
660
|
-
}), [["__scopeId", "data-v-06d7cca7"]]), Ie = { class: "role-group-member-selector" }, Le = /*#__PURE__*/
|
|
660
|
+
}), [["__scopeId", "data-v-06d7cca7"]]), Ie = { class: "role-group-member-selector" }, Le = /*#__PURE__*/ e(/* @__PURE__ */ M({
|
|
661
661
|
name: "RoleGroupMemberSelector",
|
|
662
662
|
__name: "RoleGroupMemberSelector",
|
|
663
663
|
props: {
|
|
@@ -671,12 +671,12 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
671
671
|
},
|
|
672
672
|
emits: ["update:value"],
|
|
673
673
|
setup(e, { emit: t }) {
|
|
674
|
-
let n = e, r = t, i = T(() =>
|
|
675
|
-
label: `${
|
|
674
|
+
let n = e, r = t, i = T(() => te(n.value)), a = T(() => new Set(n.candidates.filter((e) => e.roleKind === "dataGrant" && e.id && i.value.includes(e.id)).map((e) => e.id))), o = T(() => n.candidates.filter((e) => e.id && e.id !== n.currentRoleId).map((e) => ({
|
|
675
|
+
label: `${s(e)} / ${c(e.roleKind)}`,
|
|
676
676
|
value: e.id,
|
|
677
677
|
disabled: e.roleKind === "dataGrant" && a.value.size > 0 && !i.value.includes(e.id)
|
|
678
678
|
})));
|
|
679
|
-
function
|
|
679
|
+
function ee(e) {
|
|
680
680
|
if (!Array.isArray(e)) {
|
|
681
681
|
r("update:value", void 0);
|
|
682
682
|
return;
|
|
@@ -684,23 +684,23 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
684
684
|
let t = e.map((e) => String(e).trim()).filter(Boolean);
|
|
685
685
|
r("update:value", t.length > 0 ? t.join(",") : void 0);
|
|
686
686
|
}
|
|
687
|
-
function
|
|
687
|
+
function te(e) {
|
|
688
688
|
return Array.isArray(e) ? e.map((e) => String(e).trim()).filter(Boolean) : typeof e == "string" ? e.split(",").map((e) => e.trim()).filter(Boolean) : [];
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function s(e) {
|
|
691
691
|
return String(e?.title ?? e?.id ?? "角色");
|
|
692
692
|
}
|
|
693
693
|
function c(e) {
|
|
694
694
|
return e === "dataGrant" ? "数据授权角色" : "标准角色";
|
|
695
695
|
}
|
|
696
|
-
return (t, n) => (N(), O("label", Ie, [n[0] ||= k("span", { class: "role-group-member-selector-label" }, "成员角色", -1), j(L(
|
|
696
|
+
return (t, n) => (N(), O("label", Ie, [n[0] ||= k("span", { class: "role-group-member-selector-label" }, "成员角色", -1), j(L(_), {
|
|
697
697
|
mode: "multiple",
|
|
698
698
|
value: i.value,
|
|
699
|
-
options:
|
|
699
|
+
options: o.value,
|
|
700
700
|
placeholder: "请选择成员角色",
|
|
701
701
|
disabled: e.disabled,
|
|
702
702
|
"allow-clear": !0,
|
|
703
|
-
"onUpdate:value":
|
|
703
|
+
"onUpdate:value": ee
|
|
704
704
|
}, null, 8, [
|
|
705
705
|
"value",
|
|
706
706
|
"options",
|
|
@@ -713,7 +713,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
713
713
|
}, ze = {
|
|
714
714
|
key: 1,
|
|
715
715
|
class: "role-detail-state"
|
|
716
|
-
}, Be = /*#__PURE__*/
|
|
716
|
+
}, Be = /*#__PURE__*/ e(/* @__PURE__ */ M({
|
|
717
717
|
name: "RoleManagementView",
|
|
718
718
|
__name: "RoleManagementView",
|
|
719
719
|
props: {
|
|
@@ -721,8 +721,8 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
721
721
|
scopeKind: {},
|
|
722
722
|
scopeId: {}
|
|
723
723
|
},
|
|
724
|
-
setup(
|
|
725
|
-
let
|
|
724
|
+
setup(e) {
|
|
725
|
+
let i = e, m = fe(), h = ce({ moduleAlias: "iam.tenant" }), _ = ce({ moduleAlias: "iam.organization" }), y = ce({ moduleAlias: "iam.role" }), S = me(), C = P(""), w = P(""), he = P(0), M = P(0), F = P(0), I = P(), z = P(), B = P(), V = P(), H = P(!1), U = P("view"), W = P(!1), G = P(!1), K = P(!1), Ce = P(), we = P(!1), Te = P(!1), Ee = P(), De = P(!1), q = P(0), J = P(Gt(void 0)), Y = P(v(void 0)), X = P([]), Z = T(() => !!(i.recordId && i.scopeKind)), Q = T(() => Z.value && m?.presentation === "drawer"), Me = T(() => !Z.value || Q.value), Ne = T(() => h), Pe = T(() => I.value?.id), Ie = T(() => S?.value?.system === !0), Be = T(() => S?.value?.system === !0), Ve = T(() => {
|
|
726
726
|
let e = S?.value?.tenantId;
|
|
727
727
|
if (!(S?.value?.system === !0 || !e)) return {
|
|
728
728
|
id: e,
|
|
@@ -730,11 +730,11 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
730
730
|
alias: e,
|
|
731
731
|
enabled: !0
|
|
732
732
|
};
|
|
733
|
-
}), He = T(() => ue(
|
|
733
|
+
}), He = T(() => ue(_, {
|
|
734
734
|
scopeFieldName: "tenantId",
|
|
735
735
|
scopeValue: Pe.value,
|
|
736
736
|
treePath: "/iam.organization/tree"
|
|
737
|
-
})), Ue = T(() => z.value?.kind !== "platform"), We = T(() => ut(
|
|
737
|
+
})), Ue = T(() => z.value?.kind !== "platform"), We = T(() => ut(y, z.value)), Ge = T(() => [
|
|
738
738
|
{
|
|
739
739
|
key: "title",
|
|
740
740
|
title: "角色名称",
|
|
@@ -770,9 +770,9 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
770
770
|
type: "enabledStatus",
|
|
771
771
|
width: "10%"
|
|
772
772
|
}
|
|
773
|
-
]), Ke = T(() => !!z.value), qe = T(() => U.value === "create" ? "新建角色" : _n(V.value ?? J.value)), Je = T(() => z.value?.title ?? "角色详情"), Ye = T(() => K.value || W.value), Xe = T(() => W.value || !z.value ? !1 : U.value === "create" ?
|
|
773
|
+
]), Ke = T(() => !!z.value), qe = T(() => U.value === "create" ? "新建角色" : _n(V.value ?? J.value)), Je = T(() => z.value?.title ?? "角色详情"), Ye = T(() => K.value || W.value), Xe = T(() => W.value || !z.value ? !1 : U.value === "create" ? y.can("create") === !0 : !!V.value?.id && y.can("update") === !0 && !V.value?.systemManaged), Ze = T(() => {
|
|
774
774
|
let e = V.value;
|
|
775
|
-
return !!(e?.id && e.systemManaged !== !0 &&
|
|
775
|
+
return !!(e?.id && e.systemManaged !== !0 && y.can(hn(e)) === !0);
|
|
776
776
|
}), Qe = T(() => U.value === "view" ? V.value?.id ? [
|
|
777
777
|
{
|
|
778
778
|
key: "edit",
|
|
@@ -928,7 +928,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
928
928
|
return J.value.roleKind === "group" && e.push("memberRoleIds"), e.push("ownerScopeType", "ownerScopeId", "sharePolicy", "description", "enabled", "sortOrder"), e;
|
|
929
929
|
}), ot;
|
|
930
930
|
be(() => {
|
|
931
|
-
if (ct(), !Z.value || !
|
|
931
|
+
if (ct(), !Z.value || !i.recordId || !i.scopeKind) return;
|
|
932
932
|
let e = Vt();
|
|
933
933
|
e && !Q.value && (ot = Ae(e, st)), Bt();
|
|
934
934
|
}), ye(() => ot?.());
|
|
@@ -936,15 +936,15 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
936
936
|
return U.value === "edit" ? !1 : (Wt(e), !0);
|
|
937
937
|
}
|
|
938
938
|
xe(V, (e) => {
|
|
939
|
-
!Z.value || !e ||
|
|
939
|
+
!Z.value || !e || m?.setTitle(_n(e));
|
|
940
940
|
}, { immediate: !0 }), xe(Ve, ht, { immediate: !0 }), xe(z, () => {
|
|
941
941
|
Z.value || (B.value = void 0, V.value = void 0, J.value = Gt(z.value), jt(), F.value += 1, lt());
|
|
942
942
|
});
|
|
943
943
|
async function ct() {
|
|
944
944
|
try {
|
|
945
|
-
Y.value =
|
|
945
|
+
Y.value = v((await y.runtime.ready).uiDescriptor);
|
|
946
946
|
} catch (e) {
|
|
947
|
-
|
|
947
|
+
r(e, {
|
|
948
948
|
source: "role-management",
|
|
949
949
|
phase: "load"
|
|
950
950
|
});
|
|
@@ -956,7 +956,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
956
956
|
return;
|
|
957
957
|
}
|
|
958
958
|
try {
|
|
959
|
-
X.value = (await
|
|
959
|
+
X.value = (await y.crud.query(dt({
|
|
960
960
|
page: {
|
|
961
961
|
pageNum: 0,
|
|
962
962
|
pageSize: 500
|
|
@@ -981,7 +981,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
981
981
|
sorts: [{ field: "sortOrder" }, { field: "title" }]
|
|
982
982
|
}, e))).records;
|
|
983
983
|
} catch (e) {
|
|
984
|
-
X.value = [],
|
|
984
|
+
X.value = [], r(e, {
|
|
985
985
|
source: "role-management",
|
|
986
986
|
phase: "load"
|
|
987
987
|
});
|
|
@@ -1133,13 +1133,13 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1133
1133
|
}
|
|
1134
1134
|
async function Dt(e, t = !1) {
|
|
1135
1135
|
if (!$()) return;
|
|
1136
|
-
let
|
|
1137
|
-
if (
|
|
1136
|
+
let n = String(e.id ?? "");
|
|
1137
|
+
if (n) {
|
|
1138
1138
|
we.value = !t, Te.value = t, Ce.value = Kt(e);
|
|
1139
1139
|
try {
|
|
1140
|
-
Ce.value = await
|
|
1140
|
+
Ce.value = await y.crud.view(n);
|
|
1141
1141
|
} catch (e) {
|
|
1142
|
-
we.value = !1, Te.value = !1, Ce.value = void 0,
|
|
1142
|
+
we.value = !1, Te.value = !1, Ce.value = void 0, r(e, {
|
|
1143
1143
|
source: "role-management",
|
|
1144
1144
|
phase: "load"
|
|
1145
1145
|
});
|
|
@@ -1152,32 +1152,32 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1152
1152
|
function kt() {
|
|
1153
1153
|
if ($()) {
|
|
1154
1154
|
if (!z.value) {
|
|
1155
|
-
|
|
1155
|
+
n("请先选择角色归属范围", { phase: "validation" });
|
|
1156
1156
|
return;
|
|
1157
1157
|
}
|
|
1158
1158
|
V.value = void 0, B.value = void 0, J.value = Gt(z.value), U.value = "create", W.value = !1, G.value = !1, q.value += 1, H.value = !0;
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
|
-
async function At(e,
|
|
1161
|
+
async function At(e, t) {
|
|
1162
1162
|
if (!$()) return;
|
|
1163
1163
|
let i = String(e.id ?? "");
|
|
1164
1164
|
if (!i) return;
|
|
1165
|
-
B.value = i, H.value = !0, U.value =
|
|
1165
|
+
B.value = i, H.value = !0, U.value = t, V.value = void 0, J.value = Kt(e), W.value = !0, G.value = !1;
|
|
1166
1166
|
let a = q.value + 1;
|
|
1167
1167
|
q.value = a;
|
|
1168
1168
|
try {
|
|
1169
|
-
let e = await
|
|
1169
|
+
let e = await y.crud.view(i);
|
|
1170
1170
|
if (!Rt(i, a)) return;
|
|
1171
1171
|
if (!Ut(e)) {
|
|
1172
|
-
G.value = !0,
|
|
1172
|
+
G.value = !0, n("角色不属于当前归属范围", {
|
|
1173
1173
|
source: "role-management",
|
|
1174
1174
|
phase: "load"
|
|
1175
1175
|
});
|
|
1176
1176
|
return;
|
|
1177
1177
|
}
|
|
1178
|
-
zt(e,
|
|
1178
|
+
zt(e, t);
|
|
1179
1179
|
} catch (e) {
|
|
1180
|
-
Rt(i, a) && (G.value = !0,
|
|
1180
|
+
Rt(i, a) && (G.value = !0, r(e, {
|
|
1181
1181
|
source: "role-management",
|
|
1182
1182
|
phase: "load"
|
|
1183
1183
|
}));
|
|
@@ -1186,7 +1186,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1186
1186
|
}
|
|
1187
1187
|
}
|
|
1188
1188
|
function jt() {
|
|
1189
|
-
K.value || (q.value += 1, W.value = !1, G.value = !1, H.value = !1, U.value = "view", J.value = V.value ? Kt(V.value) : Gt(z.value), Q.value &&
|
|
1189
|
+
K.value || (q.value += 1, W.value = !1, G.value = !1, H.value = !1, U.value = "view", J.value = V.value ? Kt(V.value) : Gt(z.value), Q.value && m?.dismiss());
|
|
1190
1190
|
}
|
|
1191
1191
|
function Mt() {
|
|
1192
1192
|
if (!K.value) {
|
|
@@ -1228,7 +1228,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1228
1228
|
}, t);
|
|
1229
1229
|
}
|
|
1230
1230
|
async function Ft() {
|
|
1231
|
-
await
|
|
1231
|
+
await se({
|
|
1232
1232
|
loading: K,
|
|
1233
1233
|
mode: U.value === "edit" ? "edit" : "create",
|
|
1234
1234
|
source: "role-management",
|
|
@@ -1237,41 +1237,41 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1237
1237
|
deniedMessage: "当前用户无权保存角色",
|
|
1238
1238
|
createRecord: () => qt(J.value, z.value),
|
|
1239
1239
|
validateRecord: Yt,
|
|
1240
|
-
save: (e, t) => t === "edit" && V.value?.id ?
|
|
1240
|
+
save: (e, t) => t === "edit" && V.value?.id ? y.crud.update(V.value.id, e) : y.crud.insert(e),
|
|
1241
1241
|
onSaved: ({ record: e }) => {
|
|
1242
1242
|
zt(e), F.value += 1, lt();
|
|
1243
1243
|
}
|
|
1244
1244
|
});
|
|
1245
1245
|
}
|
|
1246
1246
|
async function It(e) {
|
|
1247
|
-
await
|
|
1247
|
+
await b({
|
|
1248
1248
|
loading: K,
|
|
1249
1249
|
source: "role-management",
|
|
1250
1250
|
record: () => e?.id ? e : void 0,
|
|
1251
|
-
canExecute: (e) =>
|
|
1251
|
+
canExecute: (e) => y.can("delete") === !0 && e.systemManaged !== !0,
|
|
1252
1252
|
deniedMessage: "当前用户无权删除角色",
|
|
1253
|
-
confirm: (e) =>
|
|
1253
|
+
confirm: (e) => l({
|
|
1254
1254
|
title: "删除角色",
|
|
1255
1255
|
content: `确认删除角色「${_n(e)}」?`,
|
|
1256
1256
|
okText: "删除",
|
|
1257
1257
|
danger: !0
|
|
1258
1258
|
}),
|
|
1259
|
-
execute: (e) =>
|
|
1259
|
+
execute: (e) => y.crud.delete(String(e.id), { version: e.version }),
|
|
1260
1260
|
onExecuted: (e, t) => {
|
|
1261
1261
|
B.value === String(t.id) && (B.value = void 0, V.value = void 0, J.value = Gt(z.value), H.value = !1, U.value = "view", W.value = !1, G.value = !1, q.value += 1), F.value += 1, lt();
|
|
1262
1262
|
}
|
|
1263
1263
|
});
|
|
1264
1264
|
}
|
|
1265
1265
|
async function Lt(e) {
|
|
1266
|
-
await
|
|
1266
|
+
await b({
|
|
1267
1267
|
loading: K,
|
|
1268
1268
|
source: "role-management",
|
|
1269
1269
|
record: () => e?.id ? e : void 0,
|
|
1270
|
-
canExecute: (e) =>
|
|
1270
|
+
canExecute: (e) => y.can(hn(e)) === !0 && e.systemManaged !== !0,
|
|
1271
1271
|
deniedMessage: "当前用户无权变更角色启停状态",
|
|
1272
|
-
execute: (e) => e.enabled === !1 ?
|
|
1272
|
+
execute: (e) => e.enabled === !1 ? y.crud.enable(String(e.id), { version: e.version }) : y.crud.disable(String(e.id), { version: e.version }),
|
|
1273
1273
|
onExecuted: async (e, t) => {
|
|
1274
|
-
B.value === String(t.id) && zt(await
|
|
1274
|
+
B.value === String(t.id) && zt(await y.crud.view(String(t.id))), F.value += 1, lt();
|
|
1275
1275
|
}
|
|
1276
1276
|
});
|
|
1277
1277
|
}
|
|
@@ -1296,11 +1296,11 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1296
1296
|
await At({ id: e.recordId }, "view");
|
|
1297
1297
|
}
|
|
1298
1298
|
function Vt() {
|
|
1299
|
-
let e =
|
|
1300
|
-
if (!(!e || !t || t !== "platform" && !
|
|
1299
|
+
let e = i.recordId, t = i.scopeKind;
|
|
1300
|
+
if (!(!e || !t || t !== "platform" && !i.scopeId)) return {
|
|
1301
1301
|
recordId: e,
|
|
1302
1302
|
scopeKind: t,
|
|
1303
|
-
...t === "platform" ? {} : { scopeId:
|
|
1303
|
+
...t === "platform" ? {} : { scopeId: i.scopeId }
|
|
1304
1304
|
};
|
|
1305
1305
|
}
|
|
1306
1306
|
function Ht(e) {
|
|
@@ -1345,7 +1345,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1345
1345
|
return { ...e };
|
|
1346
1346
|
}
|
|
1347
1347
|
function qt(e, t) {
|
|
1348
|
-
let n = Zt(e.roleKind), r = tn(e.sharePolicy, t.kind), i =
|
|
1348
|
+
let n = Zt(e.roleKind), r = tn(e.sharePolicy, t.kind), i = re(e, {
|
|
1349
1349
|
title: e.title?.trim(),
|
|
1350
1350
|
assignmentType: Xt(e.assignmentType, n),
|
|
1351
1351
|
roleKind: n,
|
|
@@ -1372,7 +1372,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1372
1372
|
"ownerScopeType",
|
|
1373
1373
|
"sharePolicy"
|
|
1374
1374
|
]) {
|
|
1375
|
-
let n =
|
|
1375
|
+
let n = g(t, {
|
|
1376
1376
|
fields: Y.value,
|
|
1377
1377
|
fallback: nt.value
|
|
1378
1378
|
});
|
|
@@ -1540,11 +1540,11 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1540
1540
|
function Tn(e) {
|
|
1541
1541
|
return Array.isArray(e) ? e.map((e) => String(e).trim()).filter(Boolean) : typeof e == "string" ? e.split(",").map((e) => e.trim()).filter(Boolean) : [];
|
|
1542
1542
|
}
|
|
1543
|
-
return (
|
|
1543
|
+
return (e, n) => (N(), O("section", { class: ve(["role-management-page", {
|
|
1544
1544
|
"role-management-page-platform": !Ue.value,
|
|
1545
1545
|
"role-management-page--task": Z.value && !Q.value
|
|
1546
1546
|
}]) }, [
|
|
1547
|
-
!Z.value || Q.value ? (N(), E(L(
|
|
1547
|
+
!Z.value || Q.value ? (N(), E(L(d), {
|
|
1548
1548
|
key: 0,
|
|
1549
1549
|
class: "role-scope-panel",
|
|
1550
1550
|
title: "租户",
|
|
@@ -1560,7 +1560,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1560
1560
|
class: "role-platform-scope",
|
|
1561
1561
|
type: "button",
|
|
1562
1562
|
onClick: gt
|
|
1563
|
-
}, [j(L(
|
|
1563
|
+
}, [j(L(p), {
|
|
1564
1564
|
title: "平台角色",
|
|
1565
1565
|
secondary: "全局范围",
|
|
1566
1566
|
clickable: "",
|
|
@@ -1570,12 +1570,12 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1570
1570
|
class: "role-tenant-root-scope",
|
|
1571
1571
|
type: "button",
|
|
1572
1572
|
onClick: n[0] ||= (e) => _t(Ve.value)
|
|
1573
|
-
}, [j(L(
|
|
1573
|
+
}, [j(L(p), {
|
|
1574
1574
|
title: vn(Ve.value),
|
|
1575
1575
|
secondary: "当前租户",
|
|
1576
1576
|
clickable: "",
|
|
1577
1577
|
selected: I.value?.id === Ve.value.id
|
|
1578
|
-
}, null, 8, ["title", "selected"])])) : (N(), E(L(
|
|
1578
|
+
}, null, 8, ["title", "selected"])])) : (N(), E(L(oe), {
|
|
1579
1579
|
key: 2,
|
|
1580
1580
|
context: Ne.value,
|
|
1581
1581
|
"selected-id": I.value?.id,
|
|
@@ -1595,7 +1595,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1595
1595
|
]))]),
|
|
1596
1596
|
_: 1
|
|
1597
1597
|
}, 8, ["search-keyword", "searchable"])) : D("v-if", !0),
|
|
1598
|
-
(!Z.value || Q.value) && Ue.value ? (N(), E(L(
|
|
1598
|
+
(!Z.value || Q.value) && Ue.value ? (N(), E(L(d), {
|
|
1599
1599
|
key: 1,
|
|
1600
1600
|
class: "role-scope-panel",
|
|
1601
1601
|
title: "归属范围",
|
|
@@ -1606,19 +1606,19 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1606
1606
|
onRefresh: n[6] ||= (e) => M.value += 1,
|
|
1607
1607
|
"onUpdate:searchKeyword": n[7] ||= (e) => w.value = e
|
|
1608
1608
|
}, {
|
|
1609
|
-
default: R(() => [z.value?.kind === "platform" ? (N(), E(L(
|
|
1609
|
+
default: R(() => [z.value?.kind === "platform" ? (N(), E(L(o), {
|
|
1610
1610
|
key: 0,
|
|
1611
1611
|
description: "平台角色不需要选择租户内范围"
|
|
1612
1612
|
})) : I.value ? (N(), O(_e, { key: 2 }, [k("button", {
|
|
1613
1613
|
class: "role-tenant-root-scope",
|
|
1614
1614
|
type: "button",
|
|
1615
1615
|
onClick: n[4] ||= (e) => vt()
|
|
1616
|
-
}, [j(L(
|
|
1616
|
+
}, [j(L(p), {
|
|
1617
1617
|
title: vn(I.value),
|
|
1618
1618
|
secondary: "租户本级角色",
|
|
1619
1619
|
clickable: "",
|
|
1620
1620
|
selected: z.value?.kind === "tenant" && z.value.id === I.value.id
|
|
1621
|
-
}, null, 8, ["title", "selected"])]), j(L(
|
|
1621
|
+
}, null, 8, ["title", "selected"])]), j(L(ae), {
|
|
1622
1622
|
context: He.value,
|
|
1623
1623
|
"selected-id": z.value?.kind === "organization" ? z.value.id : void 0,
|
|
1624
1624
|
"reload-key": M.value,
|
|
@@ -1635,7 +1635,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1635
1635
|
"selected-id",
|
|
1636
1636
|
"reload-key",
|
|
1637
1637
|
"keyword"
|
|
1638
|
-
])], 64)) : (N(), E(L(
|
|
1638
|
+
])], 64)) : (N(), E(L(o), {
|
|
1639
1639
|
key: 1,
|
|
1640
1640
|
description: "请选择左侧租户"
|
|
1641
1641
|
}))]),
|
|
@@ -1669,7 +1669,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1669
1669
|
"reload-key",
|
|
1670
1670
|
"ready"
|
|
1671
1671
|
])) : D("v-if", !0),
|
|
1672
|
-
Me.value ? (N(), E(L(
|
|
1672
|
+
Me.value ? (N(), E(L(ie), {
|
|
1673
1673
|
key: 3,
|
|
1674
1674
|
open: H.value,
|
|
1675
1675
|
title: qe.value,
|
|
@@ -1678,7 +1678,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1678
1678
|
promotion: L(tt),
|
|
1679
1679
|
onClose: jt
|
|
1680
1680
|
}, {
|
|
1681
|
-
status: R(() => [U.value === "view" && V.value ? (N(), E(L(
|
|
1681
|
+
status: R(() => [U.value === "view" && V.value ? (N(), E(L(c), {
|
|
1682
1682
|
key: 0,
|
|
1683
1683
|
enabled: V.value.enabled !== !1,
|
|
1684
1684
|
disabled: K.value || !Ze.value,
|
|
@@ -1695,21 +1695,21 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1695
1695
|
actions: $e.value,
|
|
1696
1696
|
onAction: Nt
|
|
1697
1697
|
}, null, 8, ["context", "actions"])]),
|
|
1698
|
-
default: R(() => [W.value ? (N(), E(L(
|
|
1698
|
+
default: R(() => [W.value ? (N(), E(L(ne), {
|
|
1699
1699
|
key: 0,
|
|
1700
1700
|
class: "role-detail-state",
|
|
1701
1701
|
tip: "加载角色详情"
|
|
1702
1702
|
})) : G.value ? (N(), O("div", Re, [j(L(ee), {
|
|
1703
1703
|
title: "详情加载失败",
|
|
1704
1704
|
message: "无法加载角色详情,请重试"
|
|
1705
|
-
}), j(L(
|
|
1705
|
+
}), j(L(u), {
|
|
1706
1706
|
type: "primary",
|
|
1707
1707
|
"icon-name": "reload",
|
|
1708
1708
|
onClick: Pt
|
|
1709
1709
|
}, {
|
|
1710
1710
|
default: R(() => [...n[15] ||= [A("重试", -1)]]),
|
|
1711
1711
|
_: 1
|
|
1712
|
-
})])) : U.value === "view" || U.value === "create" || V.value ? (N(), O(_e, { key: 2 }, [U.value === "view" ? (N(), E(L(
|
|
1712
|
+
})])) : U.value === "view" || U.value === "create" || V.value ? (N(), O(_e, { key: 2 }, [U.value === "view" ? (N(), E(L(s), {
|
|
1713
1713
|
key: 0,
|
|
1714
1714
|
record: J.value,
|
|
1715
1715
|
"field-names": at.value,
|
|
@@ -1726,11 +1726,11 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1726
1726
|
class: "role-form",
|
|
1727
1727
|
onSubmit: Se(Ft, ["prevent"])
|
|
1728
1728
|
}, [
|
|
1729
|
-
k("label", null, [n[16] ||= k("span", { class: "role-form-label" }, "当前范围", -1), j(L(
|
|
1729
|
+
k("label", null, [n[16] ||= k("span", { class: "role-form-label" }, "当前范围", -1), j(L(te), {
|
|
1730
1730
|
value: z.value?.title ?? "-",
|
|
1731
1731
|
disabled: ""
|
|
1732
1732
|
}, null, 8, ["value"])]),
|
|
1733
|
-
j(L(
|
|
1733
|
+
j(L(t), {
|
|
1734
1734
|
record: J.value,
|
|
1735
1735
|
"field-names": rt,
|
|
1736
1736
|
fields: Y.value,
|
|
@@ -1757,7 +1757,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1757
1757
|
"current-role-id",
|
|
1758
1758
|
"disabled"
|
|
1759
1759
|
])) : D("v-if", !0),
|
|
1760
|
-
j(L(
|
|
1760
|
+
j(L(t), {
|
|
1761
1761
|
record: J.value,
|
|
1762
1762
|
"field-names": it,
|
|
1763
1763
|
fields: Y.value,
|
|
@@ -1771,7 +1771,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1771
1771
|
"fallback",
|
|
1772
1772
|
"disabled"
|
|
1773
1773
|
])
|
|
1774
|
-
], 32)), U.value === "create" ? D("v-if", !0) : (N(), E(L(
|
|
1774
|
+
], 32)), U.value === "create" ? D("v-if", !0) : (N(), E(L(f), {
|
|
1775
1775
|
key: 2,
|
|
1776
1776
|
record: J.value,
|
|
1777
1777
|
"show-sort-order": ""
|
|
@@ -1783,12 +1783,12 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1783
1783
|
"subtitle",
|
|
1784
1784
|
"close-on-outside",
|
|
1785
1785
|
"promotion"
|
|
1786
|
-
])) : (N(), E(L(
|
|
1786
|
+
])) : (N(), E(L(a), {
|
|
1787
1787
|
key: 4,
|
|
1788
1788
|
title: qe.value,
|
|
1789
1789
|
subtitle: Je.value
|
|
1790
1790
|
}, {
|
|
1791
|
-
status: R(() => [U.value === "view" && V.value ? (N(), E(L(
|
|
1791
|
+
status: R(() => [U.value === "view" && V.value ? (N(), E(L(c), {
|
|
1792
1792
|
key: 0,
|
|
1793
1793
|
enabled: V.value.enabled !== !1,
|
|
1794
1794
|
disabled: K.value || !Ze.value,
|
|
@@ -1801,7 +1801,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1801
1801
|
"loading"
|
|
1802
1802
|
])) : D("v-if", !0)]),
|
|
1803
1803
|
operation: R(() => [j(L(le), {
|
|
1804
|
-
context: L(
|
|
1804
|
+
context: L(y),
|
|
1805
1805
|
actions: et.value,
|
|
1806
1806
|
"record-id": V.value?.id,
|
|
1807
1807
|
onAction: Nt
|
|
@@ -1810,21 +1810,21 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1810
1810
|
"actions",
|
|
1811
1811
|
"record-id"
|
|
1812
1812
|
])]),
|
|
1813
|
-
default: R(() => [W.value ? (N(), E(L(
|
|
1813
|
+
default: R(() => [W.value ? (N(), E(L(ne), {
|
|
1814
1814
|
key: 0,
|
|
1815
1815
|
class: "role-detail-state",
|
|
1816
1816
|
tip: "加载角色详情"
|
|
1817
1817
|
})) : G.value ? (N(), O("div", ze, [j(L(ee), {
|
|
1818
1818
|
title: "详情加载失败",
|
|
1819
1819
|
message: "无法加载角色详情,请重试"
|
|
1820
|
-
}), j(L(
|
|
1820
|
+
}), j(L(u), {
|
|
1821
1821
|
type: "primary",
|
|
1822
1822
|
"icon-name": "reload",
|
|
1823
1823
|
onClick: Pt
|
|
1824
1824
|
}, {
|
|
1825
1825
|
default: R(() => [...n[17] ||= [A("重试", -1)]]),
|
|
1826
1826
|
_: 1
|
|
1827
|
-
})])) : U.value === "view" || V.value ? (N(), O(_e, { key: 2 }, [U.value === "view" ? (N(), E(L(
|
|
1827
|
+
})])) : U.value === "view" || V.value ? (N(), O(_e, { key: 2 }, [U.value === "view" ? (N(), E(L(s), {
|
|
1828
1828
|
key: 0,
|
|
1829
1829
|
record: J.value,
|
|
1830
1830
|
"field-names": at.value,
|
|
@@ -1841,11 +1841,11 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1841
1841
|
class: "role-form",
|
|
1842
1842
|
onSubmit: Se(Ft, ["prevent"])
|
|
1843
1843
|
}, [
|
|
1844
|
-
k("label", null, [n[18] ||= k("span", { class: "role-form-label" }, "当前范围", -1), j(L(
|
|
1844
|
+
k("label", null, [n[18] ||= k("span", { class: "role-form-label" }, "当前范围", -1), j(L(te), {
|
|
1845
1845
|
value: z.value?.title ?? "-",
|
|
1846
1846
|
disabled: ""
|
|
1847
1847
|
}, null, 8, ["value"])]),
|
|
1848
|
-
j(L(
|
|
1848
|
+
j(L(t), {
|
|
1849
1849
|
record: J.value,
|
|
1850
1850
|
"field-names": rt,
|
|
1851
1851
|
fields: Y.value,
|
|
@@ -1872,7 +1872,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1872
1872
|
"current-role-id",
|
|
1873
1873
|
"disabled"
|
|
1874
1874
|
])) : D("v-if", !0),
|
|
1875
|
-
j(L(
|
|
1875
|
+
j(L(t), {
|
|
1876
1876
|
record: J.value,
|
|
1877
1877
|
"field-names": it,
|
|
1878
1878
|
fields: Y.value,
|
|
@@ -1886,7 +1886,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1886
1886
|
"fallback",
|
|
1887
1887
|
"disabled"
|
|
1888
1888
|
])
|
|
1889
|
-
], 32)), j(L(
|
|
1889
|
+
], 32)), j(L(f), {
|
|
1890
1890
|
record: J.value,
|
|
1891
1891
|
"show-sort-order": ""
|
|
1892
1892
|
}, null, 8, ["record"])], 64)) : D("v-if", !0)]),
|
|
@@ -1894,7 +1894,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1894
1894
|
}, 8, ["title", "subtitle"])),
|
|
1895
1895
|
j(Oe, {
|
|
1896
1896
|
open: we.value,
|
|
1897
|
-
context: L(
|
|
1897
|
+
context: L(y),
|
|
1898
1898
|
role: Ce.value,
|
|
1899
1899
|
onClose: Ot,
|
|
1900
1900
|
onSaved: n[13] ||= (e) => F.value += 1
|
|
@@ -1905,7 +1905,7 @@ var q = /*#__PURE__*/ b(/* @__PURE__ */ M({
|
|
|
1905
1905
|
]),
|
|
1906
1906
|
j(Fe, {
|
|
1907
1907
|
open: Te.value,
|
|
1908
|
-
context: L(
|
|
1908
|
+
context: L(y),
|
|
1909
1909
|
role: Ce.value,
|
|
1910
1910
|
onClose: Ot,
|
|
1911
1911
|
onSaved: n[14] ||= (e) => F.value += 1
|