@ximatai/muyun-web-app 0.26.6 → 0.26.7
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-DHZ4arBj.js → EmployeeDetailWorkspaceView-DYJLlkSz.js} +1 -1
- package/dist/EmployeeManagementView-taxWUa7g.js +1778 -0
- package/dist/{MetadataOrchestrationView-BLxigKBh.js → MetadataOrchestrationView-B-CPudJl.js} +195 -195
- package/dist/{ModuleActionManagementView-ByJzNkQs.js → ModuleActionManagementView-CmVj0e0C.js} +122 -122
- package/dist/RoleAuthorizationView-q_6CsBYq.js +592 -0
- package/dist/{RoleDetailWorkspaceView-Dfdigf04.js → RoleDetailWorkspaceView-DmJlJgAj.js} +1 -1
- package/dist/{RoleManagementView-D0e9nLwW.js → RoleManagementView-HCa9rH0f.js} +283 -283
- package/dist/{SystemUserDetailWorkspaceView-D-UPhCmD.js → SystemUserDetailWorkspaceView-U6Ij0US1.js} +1 -1
- package/dist/SystemUserManagementView-C1CkKivH.js +758 -0
- package/dist/{UserDetailWorkspaceView-BCSCLNSz.js → UserDetailWorkspaceView-OPYvD6mH.js} +1 -1
- package/dist/UserManagementView-gbCL9SnC.js +965 -0
- package/dist/index.css +1 -1
- package/dist/index.js +3257 -2210
- package/dist/{pageRealtime-Be2xkeKK.js → pageRealtime-CzJlr9hs.js} +17 -17
- package/dist/{platform-components-DuAohqJO.js → platform-components-DKKWbNrz.js} +3320 -2102
- package/dist/types/app/CurrentUserProfileDialog.vue.d.ts +33 -0
- package/dist/types/app/LoginView.vue.d.ts +4 -1
- package/dist/types/app/ThemeSkinPreferencesDialog.vue.d.ts +20 -0
- package/dist/types/app/lockedTabPreference.d.ts +6 -0
- package/dist/types/app/themeSkinPreference.d.ts +11 -0
- package/dist/types/app/workbenchStartup.d.ts +14 -1
- package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +43 -0
- package/dist/types/consumer/index.d.ts +15 -1
- package/dist/types/consumer/userPreferencePersistence.d.ts +7 -0
- package/dist/types/consumer/workbenchNavigation.d.ts +8 -0
- package/dist/types/dynamic-page-runtime/index.d.ts +1 -1
- package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +19 -1
- package/dist/types/platform-components/FileTransferUploader.vue.d.ts +20 -1
- package/dist/types/platform-components/ManagementPanelHeader.vue.d.ts +30 -0
- package/dist/types/platform-components/RecordDetailLayout.vue.d.ts +8 -6
- package/dist/types/platform-components/RecordDetailPanel.vue.d.ts +5 -5
- package/dist/types/platform-components/RecordExplorerPanel.vue.d.ts +6 -6
- package/dist/types/platform-components/RecordFileReferenceTransfer.vue.d.ts +10 -0
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +5 -1
- package/dist/types/platform-components/SingleImageFileReferenceField.vue.d.ts +23 -0
- package/dist/types/platform-components/fileReferenceTransfer.d.ts +8 -0
- package/dist/types/platform-components/index.d.ts +1 -0
- package/dist/types/platform-components/platformErrorFeedback.d.ts +2 -0
- package/dist/types/platform-components/recordActionBarModel.d.ts +6 -0
- package/dist/types/platform-components/recordFormFieldModel.d.ts +5 -2
- package/dist/types/platform-components/scopedTreeModuleContext.d.ts +1 -1
- package/dist/types/platform-components/staticCrudManagementState.d.ts +1 -1
- package/dist/types/platform-workbench/Workbench.vue.d.ts +12 -2
- package/dist/types/platform-workbench/WorkbenchBrandControl.vue.d.ts +22 -2
- package/dist/types/platform-workbench/WorkbenchMenu.vue.d.ts +24 -0
- package/dist/types/platform-workbench/WorkbenchSidebarMenuEntry.vue.d.ts +19 -0
- package/dist/types/platform-workbench/menuHoverClickIntent.d.ts +10 -0
- package/dist/types/platform-workbench/menuPointerAim.d.ts +1 -1
- package/dist/types/platform-workbench/workbenchLayout.d.ts +3 -0
- package/dist/types/views/applicationManagementState.d.ts +1 -1
- package/dist/types/views/fieldSpecManagementState.d.ts +1 -1
- package/dist/types/views/fieldUiControlManagementState.d.ts +1 -1
- package/dist/types/views/tenantManagementState.d.ts +11 -1
- package/dist/types/vue-ui-antdv/components/UiDataTable.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiTabs.vue.d.ts +6 -0
- package/dist/types/vue-ui-antdv/components/UiThemeProvider.vue.d.ts +21 -0
- package/dist/types/vue-ui-antdv/index.d.ts +3 -0
- package/dist/types/vue-ui-antdv/theme.d.ts +58 -0
- package/dist/types/vue-ui-antdv/themeGlobalScope.d.ts +2 -0
- package/dist/types/vue-ui-antdv/types.d.ts +1 -0
- package/dist/types/web-contracts/index.d.ts +58 -0
- package/dist/types/web-core/clients.d.ts +9 -1
- package/dist/types/web-core/index.d.ts +2 -0
- package/dist/types/web-core/mock.d.ts +3 -1
- package/dist/types/web-core/userPreferences.d.ts +24 -0
- package/dist/{useUserSessionRows-DX9qYU5r.js → useUserSessionRows-CBHEzRFQ.js} +2 -2
- package/dist/workspaceViewSessions-DkB9myrq.js +3252 -0
- package/package.json +1 -1
- package/dist/EmployeeManagementView-BfGb_ssB.js +0 -1706
- package/dist/RoleAuthorizationView-DJSWY3fu.js +0 -592
- package/dist/SystemUserManagementView-DNKRvmDk.js +0 -761
- package/dist/UserManagementView-aY2AeeWK.js +0 -965
- package/dist/workspaceViewSessions-C3GP1UGp.js +0 -2639
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as ue, l as de, n as fe, r as C, t as w, x as pe } from "./workspaceViewSessions-
|
|
1
|
+
import { A as e, C as t, Dt as n, F as r, I as i, M as a, Mt as o, N as s, O as c, Ot as l, S as u, T as d, X as ee, Y as f, _ as p, c as m, ct as h, gt as g, ht as _, i as v, jt as y, l as b, lt as te, m as ne, r as re, rt as ie, s as ae, st as oe, tt as x, ut as se, v as ce, vt as le, zt as S } from "./platform-components-DKKWbNrz.js";
|
|
2
|
+
import { i as ue, l as de, n as fe, r as C, t as w, x as pe } from "./workspaceViewSessions-DkB9myrq.js";
|
|
3
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-q_6CsBYq.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__*/ o(/* @__PURE__ */ M({
|
|
20
20
|
name: "RoleAccountGrantDrawer",
|
|
21
21
|
__name: "RoleAccountGrantDrawer",
|
|
22
22
|
props: {
|
|
@@ -25,20 +25,20 @@ var B = {
|
|
|
25
25
|
role: {}
|
|
26
26
|
},
|
|
27
27
|
emits: ["close", "saved"],
|
|
28
|
-
setup(
|
|
29
|
-
let
|
|
28
|
+
setup(e, { emit: t }) {
|
|
29
|
+
let i = e, a = t, o = P([]), s = P({}), c = P([]), l = P(/* @__PURE__ */ new Set()), u = P(/* @__PURE__ */ new Set()), d = P(""), f = P(""), p = P(0), m = P(0), g = P(!1), _ = P(!1), v = P(!1), b = P(!1), ne = T(() => he(i.context.http)), re = T(() => i.role?.id), ie = T(() => i.role ? `绑定用户 - ${X(i.role)}` : "绑定用户"), ae = T(() => i.role?.ownerScopeType === "platform" ? "platform" : i.role?.ownerScopeType === "organization" ? "organization" : "tenant"), oe = T(() => ae.value === "platform" ? void 0 : i.role?.ownerScopeId), ce = T(() => {
|
|
30
30
|
let e = /* @__PURE__ */ new Map();
|
|
31
|
-
for (let t of
|
|
31
|
+
for (let t of o.value) t.userId && e.set(t.userId, t);
|
|
32
32
|
return e;
|
|
33
|
-
}),
|
|
33
|
+
}), le = T(() => c.value.filter((e) => e.id).map((e) => ({
|
|
34
34
|
id: e.id,
|
|
35
35
|
username: J(e),
|
|
36
36
|
employeeNo: e.employeeNo ?? "",
|
|
37
37
|
employeeTitle: e.employeeTitle ?? "",
|
|
38
38
|
organizationTitle: e.organizationTitle ?? e.organizationId ?? "",
|
|
39
39
|
departmentTitle: e.departmentTitle ?? e.departmentId ?? "",
|
|
40
|
-
boundTitle:
|
|
41
|
-
}))), S = T(() => [...
|
|
40
|
+
boundTitle: u.value.has(e.id) ? "已绑定" : "未绑定"
|
|
41
|
+
}))), S = T(() => [...l.value].map((e) => s.value[e] ?? q(e))), ue = T(() => Math.max(1, Math.ceil(m.value / De))), de = T(() => p.value > 0), fe = T(() => p.value + 1 < ue.value), C = T(() => [...l.value].filter((e) => !u.value.has(e))), w = T(() => [...u.value].filter((e) => !l.value.has(e))), pe = T(() => C.value.length > 0 || w.value.length > 0), me = {
|
|
42
42
|
rowKey: "id",
|
|
43
43
|
columns: [
|
|
44
44
|
{
|
|
@@ -73,94 +73,94 @@ var B = {
|
|
|
73
73
|
}
|
|
74
74
|
]
|
|
75
75
|
}, ge = T(() => ({
|
|
76
|
-
selectedRowKeys: [...
|
|
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(() => [i.open, i.role?.id], ([e]) => {
|
|
84
84
|
e ? M() : ke();
|
|
85
85
|
}, { immediate: !0 });
|
|
86
86
|
async function M() {
|
|
87
|
-
let
|
|
88
|
-
if (!
|
|
87
|
+
let e = re.value;
|
|
88
|
+
if (!e) {
|
|
89
89
|
ke();
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
g.value = !0, b.value = !1;
|
|
93
93
|
try {
|
|
94
|
-
let [
|
|
95
|
-
roleId:
|
|
94
|
+
let [t, n] = await Promise.all([ne.value.accountRoleGrants(e), ne.value.userSelector({
|
|
95
|
+
roleId: e,
|
|
96
96
|
enabledOnly: !1,
|
|
97
97
|
page: {
|
|
98
98
|
pageNum: 0,
|
|
99
99
|
pageSize: 500
|
|
100
100
|
}
|
|
101
101
|
})]);
|
|
102
|
-
|
|
103
|
-
let r = new Set(
|
|
104
|
-
|
|
105
|
-
} catch (
|
|
106
|
-
|
|
102
|
+
o.value = t;
|
|
103
|
+
let r = new Set(t.map((e) => e.userId).filter((e) => !!e));
|
|
104
|
+
u.value = r, l.value = new Set(r), s.value = je([...t.map((e) => q(e.userId)).filter((e) => !!e), ...n.records]), await ve(0);
|
|
105
|
+
} catch (e) {
|
|
106
|
+
b.value = !0, x(e, {
|
|
107
107
|
source: "role-account-grants",
|
|
108
108
|
phase: "load"
|
|
109
109
|
});
|
|
110
110
|
} finally {
|
|
111
|
-
|
|
111
|
+
g.value = !1;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
async function ve(
|
|
115
|
-
|
|
114
|
+
async function ve(e) {
|
|
115
|
+
_.value = !0;
|
|
116
116
|
try {
|
|
117
|
-
let
|
|
118
|
-
keyword:
|
|
117
|
+
let t = await ne.value.userSelector({
|
|
118
|
+
keyword: f.value,
|
|
119
119
|
enabledOnly: !0,
|
|
120
120
|
page: {
|
|
121
|
-
pageNum: Math.max(0,
|
|
121
|
+
pageNum: Math.max(0, e),
|
|
122
122
|
pageSize: De
|
|
123
123
|
}
|
|
124
124
|
});
|
|
125
|
-
|
|
126
|
-
...
|
|
127
|
-
...je(
|
|
128
|
-
},
|
|
129
|
-
} catch (
|
|
130
|
-
e
|
|
125
|
+
c.value = t.records, s.value = {
|
|
126
|
+
...s.value,
|
|
127
|
+
...je(t.records)
|
|
128
|
+
}, p.value = t.pageNum, m.value = t.total;
|
|
129
|
+
} catch (e) {
|
|
130
|
+
x(e, {
|
|
131
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
|
+
f.value = d.value.trim(), ve(0);
|
|
140
140
|
}
|
|
141
141
|
function be(e, t) {
|
|
142
|
-
let n = new Set(
|
|
143
|
-
t ? n.add(e) : n.delete(e),
|
|
142
|
+
let n = new Set(l.value);
|
|
143
|
+
t ? n.add(e) : n.delete(e), l.value = n;
|
|
144
144
|
}
|
|
145
145
|
async function Se() {
|
|
146
|
-
let
|
|
147
|
-
if (
|
|
146
|
+
let e = re.value;
|
|
147
|
+
if (e) {
|
|
148
148
|
if (!pe.value) {
|
|
149
149
|
a("close");
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
v.value = !0;
|
|
153
153
|
try {
|
|
154
|
-
for (let
|
|
155
|
-
userId:
|
|
156
|
-
managementScopeType:
|
|
157
|
-
managementScopeId:
|
|
154
|
+
for (let t of C.value) await ne.value.grantAccountRole(e, {
|
|
155
|
+
userId: t,
|
|
156
|
+
managementScopeType: ae.value,
|
|
157
|
+
managementScopeId: oe.value
|
|
158
158
|
});
|
|
159
|
-
for (let
|
|
160
|
-
let n =
|
|
161
|
-
n && await
|
|
159
|
+
for (let t of w.value) {
|
|
160
|
+
let n = ce.value.get(t)?.id;
|
|
161
|
+
n && await ne.value.deleteAccountRoleGrant(e, n);
|
|
162
162
|
}
|
|
163
|
-
await
|
|
163
|
+
await ee({
|
|
164
164
|
success: !0,
|
|
165
165
|
message: "用户绑定已保存"
|
|
166
166
|
}, {
|
|
@@ -168,21 +168,21 @@ var B = {
|
|
|
168
168
|
phase: "action",
|
|
169
169
|
fallbackMessage: "用户绑定已保存"
|
|
170
170
|
}), a("saved"), a("close");
|
|
171
|
-
} catch (
|
|
172
|
-
e
|
|
171
|
+
} catch (e) {
|
|
172
|
+
x(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
|
-
|
|
185
|
+
o.value = [], s.value = {}, c.value = [], l.value = /* @__PURE__ */ new Set(), u.value = /* @__PURE__ */ new Set(), d.value = "", f.value = "", p.value = 0, m.value = 0, g.value = !1, _.value = !1, v.value = !1, b.value = !1;
|
|
186
186
|
}
|
|
187
187
|
function Ae(e) {
|
|
188
188
|
be(e, !1);
|
|
@@ -207,70 +207,70 @@ var B = {
|
|
|
207
207
|
function X(e) {
|
|
208
208
|
return String(e.title ?? e.id ?? "角色");
|
|
209
209
|
}
|
|
210
|
-
return (
|
|
211
|
-
open:
|
|
212
|
-
title:
|
|
210
|
+
return (t, i) => (N(), E(L(r), {
|
|
211
|
+
open: e.open,
|
|
212
|
+
title: ie.value,
|
|
213
213
|
"close-title": "关闭",
|
|
214
214
|
onClose: Oe
|
|
215
215
|
}, {
|
|
216
|
-
operation: R(() => [j(L(
|
|
217
|
-
disabled:
|
|
216
|
+
operation: R(() => [j(L(y), {
|
|
217
|
+
disabled: v.value || g.value,
|
|
218
218
|
onClick: Oe
|
|
219
219
|
}, {
|
|
220
|
-
default: R(() => [...
|
|
220
|
+
default: R(() => [...i[3] ||= [A("取消", -1)]]),
|
|
221
221
|
_: 1
|
|
222
|
-
}, 8, ["disabled"]), j(L(
|
|
222
|
+
}, 8, ["disabled"]), j(L(y), {
|
|
223
223
|
type: "primary",
|
|
224
|
-
loading:
|
|
225
|
-
disabled:
|
|
224
|
+
loading: v.value,
|
|
225
|
+
disabled: g.value || !pe.value,
|
|
226
226
|
onClick: Se
|
|
227
227
|
}, {
|
|
228
|
-
default: R(() => [...
|
|
228
|
+
default: R(() => [...i[4] ||= [A(" 确定 ", -1)]]),
|
|
229
229
|
_: 1
|
|
230
230
|
}, 8, ["loading", "disabled"])]),
|
|
231
|
-
default: R(() => [
|
|
231
|
+
default: R(() => [g.value ? (N(), E(L(se), {
|
|
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(te), {
|
|
236
236
|
title: "用户加载失败",
|
|
237
237
|
message: "无法加载当前角色的用户绑定"
|
|
238
|
-
}), j(L(
|
|
238
|
+
}), j(L(y), {
|
|
239
239
|
type: "primary",
|
|
240
240
|
"icon-name": "reload",
|
|
241
241
|
onClick: M
|
|
242
242
|
}, {
|
|
243
|
-
default: R(() => [...
|
|
243
|
+
default: R(() => [...i[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(n), {
|
|
247
|
+
value: d.value,
|
|
248
248
|
"allow-clear": "",
|
|
249
|
-
disabled:
|
|
249
|
+
disabled: v.value,
|
|
250
250
|
placeholder: "搜索用户账号",
|
|
251
|
-
"onUpdate:value":
|
|
251
|
+
"onUpdate:value": i[0] ||= (e) => d.value = e,
|
|
252
252
|
onKeydown: z(ye, ["enter"])
|
|
253
|
-
}, null, 8, ["value", "disabled"]), j(L(
|
|
253
|
+
}, null, 8, ["value", "disabled"]), j(L(y), {
|
|
254
254
|
"icon-name": "search",
|
|
255
|
-
disabled:
|
|
255
|
+
disabled: v.value,
|
|
256
256
|
onClick: ye
|
|
257
257
|
}, {
|
|
258
|
-
default: R(() => [...
|
|
258
|
+
default: R(() => [...i[6] ||= [A("查询", -1)]]),
|
|
259
259
|
_: 1
|
|
260
260
|
}, 8, ["disabled"])]),
|
|
261
|
-
k("div", U, [k("span", null, "已选 " + I(
|
|
262
|
-
k("section", G, [k("div", K, [
|
|
261
|
+
k("div", U, [k("span", null, "已选 " + I(l.value.size) + " 个", 1), pe.value ? (N(), O("span", W, "新增 " + I(C.value.length) + " 个,移除 " + I(w.value.length) + " 个", 1)) : D("v-if", !0)]),
|
|
262
|
+
k("section", G, [k("div", K, [i[7] ||= k("strong", null, "已选用户", -1), k("span", null, I(S.value.length) + " 个", 1)]), S.value.length > 0 ? (N(), O("div", Ce, [(N(!0), O(_e, null, F(S.value, (e) => (N(), O("button", {
|
|
263
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(h), {
|
|
269
269
|
class: "role-account-grant-table",
|
|
270
270
|
size: "middle",
|
|
271
271
|
contract: me,
|
|
272
|
-
rows:
|
|
273
|
-
loading:
|
|
272
|
+
rows: le.value,
|
|
273
|
+
loading: _.value,
|
|
274
274
|
pagination: !1,
|
|
275
275
|
selection: ge.value
|
|
276
276
|
}, null, 8, [
|
|
@@ -278,17 +278,17 @@ var B = {
|
|
|
278
278
|
"loading",
|
|
279
279
|
"selection"
|
|
280
280
|
]),
|
|
281
|
-
k("div", Ee, [k("span", null, "共 " + I(
|
|
282
|
-
disabled:
|
|
283
|
-
onClick:
|
|
281
|
+
k("div", Ee, [k("span", null, "共 " + I(m.value) + " 个用户,第 " + I(p.value + 1) + " / " + I(ue.value) + " 页", 1), k("div", null, [j(L(y), {
|
|
282
|
+
disabled: v.value || _.value || !de.value,
|
|
283
|
+
onClick: i[1] ||= (e) => ve(p.value - 1)
|
|
284
284
|
}, {
|
|
285
|
-
default: R(() => [...
|
|
285
|
+
default: R(() => [...i[8] ||= [A(" 上一页 ", -1)]]),
|
|
286
286
|
_: 1
|
|
287
|
-
}, 8, ["disabled"]), j(L(
|
|
288
|
-
disabled:
|
|
289
|
-
onClick:
|
|
287
|
+
}, 8, ["disabled"]), j(L(y), {
|
|
288
|
+
disabled: v.value || _.value || !fe.value,
|
|
289
|
+
onClick: i[2] ||= (e) => ve(p.value + 1)
|
|
290
290
|
}, {
|
|
291
|
-
default: R(() => [...
|
|
291
|
+
default: R(() => [...i[9] ||= [A(" 下一页 ", -1)]]),
|
|
292
292
|
_: 1
|
|
293
293
|
}, 8, ["disabled"])])])
|
|
294
294
|
]))]),
|
|
@@ -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__*/ o(/* @__PURE__ */ M({
|
|
322
322
|
name: "EmployeeEmploymentTable",
|
|
323
323
|
__name: "EmployeeEmploymentTable",
|
|
324
324
|
props: {
|
|
@@ -400,13 +400,13 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
400
400
|
}), c = T(() => s.value);
|
|
401
401
|
function l(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" ? `${ee(n)} 项` : "";
|
|
404
404
|
}
|
|
405
405
|
function u(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 ee(e) {
|
|
410
410
|
return e.positions.filter((e) => n.selectedIds.has(e.id)).length;
|
|
411
411
|
}
|
|
412
412
|
function f(e) {
|
|
@@ -414,24 +414,24 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
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) => p(e, t)
|
|
418
418
|
};
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function p(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 m(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 h(e) {
|
|
431
431
|
let t = e.employeeId;
|
|
432
|
-
|
|
432
|
+
m(e, !i.value.includes(t));
|
|
433
433
|
}
|
|
434
|
-
return (e, t) => (N(), E(L(
|
|
434
|
+
return (e, t) => (N(), E(L(_), {
|
|
435
435
|
class: "employee-employment-table",
|
|
436
436
|
columns: a,
|
|
437
437
|
rows: c.value,
|
|
@@ -440,12 +440,12 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
440
440
|
"expanded-row-keys": i.value,
|
|
441
441
|
"clickable-rows": "",
|
|
442
442
|
"horizontal-scroll": "",
|
|
443
|
-
onRowExpand:
|
|
444
|
-
onRowDblclick:
|
|
443
|
+
onRowExpand: m,
|
|
444
|
+
onRowDblclick: h
|
|
445
445
|
}, {
|
|
446
446
|
cell: R(({ column: e, record: t }) => [A(I(l(e, t)), 1)]),
|
|
447
|
-
expandedRow: R(({ record: e }) => [j(L(
|
|
448
|
-
default: R(() => [j(L(
|
|
447
|
+
expandedRow: R(({ record: e }) => [j(L(d), { title: "任职信息" }, {
|
|
448
|
+
default: R(() => [j(L(_), {
|
|
449
449
|
columns: o,
|
|
450
450
|
rows: e.positions,
|
|
451
451
|
"row-key": "id",
|
|
@@ -475,7 +475,7 @@ var q = /*#__PURE__*/ r(/* @__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__*/ o(/* @__PURE__ */ M({
|
|
479
479
|
name: "RoleEmploymentGrantDrawer",
|
|
480
480
|
__name: "RoleEmploymentGrantDrawer",
|
|
481
481
|
props: {
|
|
@@ -484,66 +484,66 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
484
484
|
role: {}
|
|
485
485
|
},
|
|
486
486
|
emits: ["close", "saved"],
|
|
487
|
-
setup(
|
|
488
|
-
let
|
|
489
|
-
xe(() => [
|
|
487
|
+
setup(e, { emit: t }) {
|
|
488
|
+
let i = e, a = t, o = P([]), s = P([]), c = P({}), l = P(/* @__PURE__ */ new Set()), u = P(/* @__PURE__ */ new Set()), d = P(!1), f = P(!1), p = P(!1), m = P(!1), h = P(0), g = P(0), _ = P(""), v = T(() => i.role?.id), b = T(() => he(i.context.http)), ne = T(() => `绑定任职 - ${i.role?.title ?? i.role?.id ?? ""}`), re = T(() => [...l.value].filter((e) => !u.value.has(e))), ie = T(() => [...u.value].filter((e) => !l.value.has(e))), ae = T(() => new Map(o.value.map((e) => [e.employeePositionId, e]))), oe = T(() => s.value.filter((e) => !_.value.trim() || fe(e).includes(_.value.trim()))), ce = T(() => new Set(oe.value.filter((e) => l.value.has(e.id)).map((e) => e.employeeId)).size), le = T(() => [...l.value].map((e) => c.value[e] ?? pe(e)));
|
|
489
|
+
xe(() => [i.open, i.role?.id], ([e]) => {
|
|
490
490
|
e ? S() : de();
|
|
491
491
|
}, { immediate: !0 });
|
|
492
|
-
async function S(
|
|
493
|
-
let
|
|
494
|
-
if (
|
|
495
|
-
|
|
492
|
+
async function S(e = 0) {
|
|
493
|
+
let t = v.value;
|
|
494
|
+
if (t) {
|
|
495
|
+
f.value = !0, m.value = !1;
|
|
496
496
|
try {
|
|
497
|
-
let [
|
|
497
|
+
let [n, r] = await Promise.all([b.value.employmentRoleGrants(t), b.value.employmentSelector(t, {
|
|
498
498
|
enabledOnly: !0,
|
|
499
499
|
page: {
|
|
500
|
-
pageNum:
|
|
500
|
+
pageNum: e,
|
|
501
501
|
pageSize: 50
|
|
502
502
|
}
|
|
503
503
|
})]);
|
|
504
|
-
|
|
505
|
-
...
|
|
504
|
+
o.value = n, u.value = new Set(n.map((e) => e.employeePositionId).filter((e) => !!e)), c.value = {
|
|
505
|
+
...c.value,
|
|
506
506
|
...w(r.records)
|
|
507
|
-
},
|
|
508
|
-
} catch (
|
|
509
|
-
|
|
507
|
+
}, d.value ||= (l.value = new Set(u.value), !0), s.value = r.records, h.value = r.pageNum, g.value = r.total;
|
|
508
|
+
} catch (e) {
|
|
509
|
+
m.value = !0, x(e, {
|
|
510
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 ue() {
|
|
519
|
-
let
|
|
520
|
-
if (
|
|
521
|
-
|
|
519
|
+
let e = v.value;
|
|
520
|
+
if (e) {
|
|
521
|
+
p.value = !0;
|
|
522
522
|
try {
|
|
523
|
-
for (let
|
|
524
|
-
for (let
|
|
525
|
-
let n =
|
|
526
|
-
n && await b.value.deleteEmploymentRoleGrant(
|
|
523
|
+
for (let t of re.value) await b.value.grantEmploymentRole(e, t);
|
|
524
|
+
for (let t of ie.value) {
|
|
525
|
+
let n = ae.value.get(t)?.id;
|
|
526
|
+
n && await b.value.deleteEmploymentRoleGrant(e, n);
|
|
527
527
|
}
|
|
528
|
-
await
|
|
528
|
+
await ee({
|
|
529
529
|
success: !0,
|
|
530
530
|
message: "任职角色授权已保存"
|
|
531
531
|
}, {
|
|
532
532
|
source: "role-employment-grants",
|
|
533
533
|
phase: "action"
|
|
534
534
|
}), a("saved"), a("close");
|
|
535
|
-
} catch (
|
|
536
|
-
e
|
|
535
|
+
} catch (e) {
|
|
536
|
+
x(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 de() {
|
|
546
|
-
|
|
546
|
+
o.value = [], s.value = [], c.value = {}, l.value = /* @__PURE__ */ new Set(), u.value = /* @__PURE__ */ new Set(), d.value = !1, _.value = "", h.value = 0, g.value = 0, m.value = !1;
|
|
547
547
|
}
|
|
548
548
|
function fe(e) {
|
|
549
549
|
return [
|
|
@@ -555,8 +555,8 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
555
555
|
].filter(Boolean).join(" ");
|
|
556
556
|
}
|
|
557
557
|
function C(e) {
|
|
558
|
-
let t = new Set(
|
|
559
|
-
t.delete(e),
|
|
558
|
+
let t = new Set(l.value);
|
|
559
|
+
t.delete(e), l.value = t;
|
|
560
560
|
}
|
|
561
561
|
function w(e) {
|
|
562
562
|
let t = {};
|
|
@@ -580,76 +580,76 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
580
580
|
e.departmentTitle ?? e.departmentId
|
|
581
581
|
].filter(Boolean).join(" / ") || e.id;
|
|
582
582
|
}
|
|
583
|
-
return (
|
|
584
|
-
open:
|
|
583
|
+
return (t, i) => (N(), E(L(r), {
|
|
584
|
+
open: e.open,
|
|
585
585
|
title: ne.value,
|
|
586
586
|
"close-title": "关闭",
|
|
587
|
-
onClose:
|
|
587
|
+
onClose: i[6] ||= (e) => !p.value && a("close")
|
|
588
588
|
}, {
|
|
589
|
-
operation: R(() => [j(L(
|
|
590
|
-
disabled:
|
|
591
|
-
onClick:
|
|
589
|
+
operation: R(() => [j(L(y), {
|
|
590
|
+
disabled: p.value,
|
|
591
|
+
onClick: i[0] ||= (e) => a("close")
|
|
592
592
|
}, {
|
|
593
|
-
default: R(() => [...
|
|
593
|
+
default: R(() => [...i[7] ||= [A("取消", -1)]]),
|
|
594
594
|
_: 1
|
|
595
|
-
}, 8, ["disabled"]), j(L(
|
|
595
|
+
}, 8, ["disabled"]), j(L(y), {
|
|
596
596
|
type: "primary",
|
|
597
|
-
loading:
|
|
598
|
-
disabled:
|
|
597
|
+
loading: p.value,
|
|
598
|
+
disabled: f.value || re.value.length === 0 && ie.value.length === 0,
|
|
599
599
|
onClick: ue
|
|
600
600
|
}, {
|
|
601
|
-
default: R(() => [...
|
|
601
|
+
default: R(() => [...i[8] ||= [A(" 确定 ", -1)]]),
|
|
602
602
|
_: 1
|
|
603
603
|
}, 8, ["loading", "disabled"])]),
|
|
604
|
-
default: R(() => [
|
|
604
|
+
default: R(() => [f.value ? (N(), E(L(se), {
|
|
605
605
|
key: 0,
|
|
606
606
|
tip: "加载任职"
|
|
607
|
-
})) :
|
|
607
|
+
})) : m.value ? (N(), O("div", J, [j(L(te), {
|
|
608
608
|
title: "任职加载失败",
|
|
609
609
|
message: "无法加载任职授权"
|
|
610
|
-
}), j(L(
|
|
611
|
-
default: R(() => [...
|
|
610
|
+
}), j(L(y), { onClick: i[1] ||= (e) => S() }, {
|
|
611
|
+
default: R(() => [...i[9] ||= [A("重试", -1)]]),
|
|
612
612
|
_: 1
|
|
613
613
|
})])) : (N(), O("section", Y, [
|
|
614
|
-
|
|
615
|
-
j(L(
|
|
616
|
-
value:
|
|
617
|
-
"onUpdate:value":
|
|
614
|
+
i[13] ||= k("p", null, "角色将在所选任职的机构、部门和岗位上下文中生效。展开职员后选择其具体任职。", -1),
|
|
615
|
+
j(L(n), {
|
|
616
|
+
value: _.value,
|
|
617
|
+
"onUpdate:value": i[2] ||= (e) => _.value = e,
|
|
618
618
|
"allow-clear": "",
|
|
619
619
|
placeholder: "筛选职员、工号、机构、部门或岗位"
|
|
620
620
|
}, null, 8, ["value"]),
|
|
621
|
-
k("div", null, " 已选 " + I(
|
|
622
|
-
k("section", X, [k("div", Z, [
|
|
621
|
+
k("div", null, " 已选 " + I(l.value.size) + " 个任职;当前页涉及 " + I(ce.value) + " 名职员;新增 " + I(re.value.length) + " 个,移除 " + I(ie.value.length) + " 个 ", 1),
|
|
622
|
+
k("section", X, [k("div", Z, [i[10] ||= k("strong", null, "已选任职", -1), k("span", null, I(le.value.length) + " 个", 1)]), le.value.length > 0 ? (N(), O("div", Q, [(N(!0), O(_e, null, F(le.value, (e) => (N(), O("button", {
|
|
623
623
|
key: e.id,
|
|
624
624
|
type: "button",
|
|
625
|
-
disabled:
|
|
625
|
+
disabled: p.value,
|
|
626
626
|
onClick: (t) => C(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
|
-
"selected-ids":
|
|
630
|
-
"onUpdate:selectedIds":
|
|
631
|
-
rows:
|
|
629
|
+
"selected-ids": l.value,
|
|
630
|
+
"onUpdate:selectedIds": i[3] ||= (e) => l.value = e,
|
|
631
|
+
rows: oe.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:
|
|
640
|
+
k("span", null, "共 " + I(g.value) + " 个启用任职", 1),
|
|
641
|
+
j(L(y), {
|
|
642
|
+
disabled: f.value || h.value === 0,
|
|
643
|
+
onClick: i[4] ||= (e) => S(h.value - 1)
|
|
644
644
|
}, {
|
|
645
|
-
default: R(() => [...
|
|
645
|
+
default: R(() => [...i[11] ||= [A("上一页", -1)]]),
|
|
646
646
|
_: 1
|
|
647
647
|
}, 8, ["disabled"]),
|
|
648
|
-
j(L(
|
|
649
|
-
disabled:
|
|
650
|
-
onClick:
|
|
648
|
+
j(L(y), {
|
|
649
|
+
disabled: f.value || (h.value + 1) * 50 >= g.value,
|
|
650
|
+
onClick: i[5] ||= (e) => S(h.value + 1)
|
|
651
651
|
}, {
|
|
652
|
-
default: R(() => [...
|
|
652
|
+
default: R(() => [...i[12] ||= [A(" 下一页 ", -1)]]),
|
|
653
653
|
_: 1
|
|
654
654
|
}, 8, ["disabled"])
|
|
655
655
|
])
|
|
@@ -657,7 +657,7 @@ var q = /*#__PURE__*/ r(/* @__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__*/ o(/* @__PURE__ */ M({
|
|
661
661
|
name: "RoleGroupMemberSelector",
|
|
662
662
|
__name: "RoleGroupMemberSelector",
|
|
663
663
|
props: {
|
|
@@ -672,7 +672,7 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
672
672
|
emits: ["update:value"],
|
|
673
673
|
setup(e, { emit: t }) {
|
|
674
674
|
let n = e, r = t, i = T(() => c(n.value)), a = T(() => new Set(n.candidates.filter((e) => e.roleKind === "dataGrant" && e.id && i.value.includes(e.id)).map((e) => e.id))), o = T(() => n.candidates.filter((e) => e.id && e.id !== n.currentRoleId).map((e) => ({
|
|
675
|
-
label: `${
|
|
675
|
+
label: `${u(e)} / ${d(e.roleKind)}`,
|
|
676
676
|
value: e.id,
|
|
677
677
|
disabled: e.roleKind === "dataGrant" && a.value.size > 0 && !i.value.includes(e.id)
|
|
678
678
|
})));
|
|
@@ -687,13 +687,13 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
687
687
|
function c(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 u(e) {
|
|
691
691
|
return String(e?.title ?? e?.id ?? "角色");
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function d(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(l), {
|
|
697
697
|
mode: "multiple",
|
|
698
698
|
value: i.value,
|
|
699
699
|
options: o.value,
|
|
@@ -713,7 +713,7 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
713
713
|
}, ze = {
|
|
714
714
|
key: 1,
|
|
715
715
|
class: "role-detail-state"
|
|
716
|
-
}, Be = /*#__PURE__*/
|
|
716
|
+
}, Be = /*#__PURE__*/ o(/* @__PURE__ */ M({
|
|
717
717
|
name: "RoleManagementView",
|
|
718
718
|
__name: "RoleManagementView",
|
|
719
719
|
props: {
|
|
@@ -721,8 +721,8 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
721
721
|
scopeKind: {},
|
|
722
722
|
scopeId: {}
|
|
723
723
|
},
|
|
724
|
-
setup(
|
|
725
|
-
let
|
|
724
|
+
setup(o) {
|
|
725
|
+
let l = o, d = pe(), ee = S({ moduleAlias: "iam.tenant" }), h = S({ moduleAlias: "iam.organization" }), _ = S({ moduleAlias: "iam.role" }), fe = me(), C = P(""), w = P(""), he = P(0), M = P(0), F = P(0), I = P(), z = P(), B = P(), V = P(), H = P(!1), U = P("view"), W = P(!1), G = P(!1), K = P(!1), Ce = P(), we = P(!1), Te = P(!1), Ee = P(), De = P(!1), q = P(0), J = P(Gt(void 0)), Y = P(s(void 0)), X = P([]), Z = T(() => !!(l.recordId && l.scopeKind)), Q = T(() => Z.value && d?.presentation === "drawer"), Me = T(() => !Z.value || Q.value), Ne = T(() => ee), Pe = T(() => I.value?.id), Ie = T(() => fe?.value?.system === !0), Be = T(() => fe?.value?.system === !0), Ve = T(() => {
|
|
726
726
|
let e = fe?.value?.tenantId;
|
|
727
727
|
if (!(fe?.value?.system === !0 || !e)) return {
|
|
728
728
|
id: e,
|
|
@@ -730,11 +730,11 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
730
730
|
alias: e,
|
|
731
731
|
enabled: !0
|
|
732
732
|
};
|
|
733
|
-
}), He = T(() =>
|
|
733
|
+
}), He = T(() => ae(h, {
|
|
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(_, z.value)), Ge = T(() => [
|
|
738
738
|
{
|
|
739
739
|
key: "title",
|
|
740
740
|
title: "角色名称",
|
|
@@ -770,9 +770,9 @@ var q = /*#__PURE__*/ r(/* @__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" ? _.can("create") === !0 : !!V.value?.id && _.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 && _.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__*/ r(/* @__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 || !l.recordId || !l.scopeKind) return;
|
|
932
932
|
let e = Vt();
|
|
933
933
|
e && !Q.value && (ot = Ae(e, st)), Bt();
|
|
934
934
|
}), ye(() => ot?.());
|
|
@@ -936,27 +936,27 @@ var q = /*#__PURE__*/ r(/* @__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 || d?.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 =
|
|
946
|
-
} catch (
|
|
947
|
-
e
|
|
945
|
+
Y.value = s((await _.runtime.ready).uiDescriptor);
|
|
946
|
+
} catch (e) {
|
|
947
|
+
x(e, {
|
|
948
948
|
source: "role-management",
|
|
949
949
|
phase: "load"
|
|
950
950
|
});
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
|
-
async function lt(
|
|
954
|
-
if (!
|
|
953
|
+
async function lt(e = z.value) {
|
|
954
|
+
if (!e) {
|
|
955
955
|
X.value = [];
|
|
956
956
|
return;
|
|
957
957
|
}
|
|
958
958
|
try {
|
|
959
|
-
X.value = (await
|
|
959
|
+
X.value = (await _.crud.query(dt({
|
|
960
960
|
page: {
|
|
961
961
|
pageNum: 0,
|
|
962
962
|
pageSize: 500
|
|
@@ -979,9 +979,9 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
979
979
|
}
|
|
980
980
|
],
|
|
981
981
|
sorts: [{ field: "sortOrder" }, { field: "title" }]
|
|
982
|
-
},
|
|
983
|
-
} catch (
|
|
984
|
-
X.value = [], e
|
|
982
|
+
}, e))).records;
|
|
983
|
+
} catch (e) {
|
|
984
|
+
X.value = [], x(e, {
|
|
985
985
|
source: "role-management",
|
|
986
986
|
phase: "load"
|
|
987
987
|
});
|
|
@@ -1131,15 +1131,15 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1131
1131
|
function Et(e) {
|
|
1132
1132
|
$() && At(e, "view");
|
|
1133
1133
|
}
|
|
1134
|
-
async function Dt(
|
|
1134
|
+
async function Dt(e, t = !1) {
|
|
1135
1135
|
if (!$()) return;
|
|
1136
|
-
let
|
|
1137
|
-
if (
|
|
1138
|
-
we.value = !
|
|
1136
|
+
let n = String(e.id ?? "");
|
|
1137
|
+
if (n) {
|
|
1138
|
+
we.value = !t, Te.value = t, Ce.value = Kt(e);
|
|
1139
1139
|
try {
|
|
1140
|
-
Ce.value = await
|
|
1141
|
-
} catch (
|
|
1142
|
-
we.value = !1, Te.value = !1, Ce.value = void 0, e
|
|
1140
|
+
Ce.value = await _.crud.view(n);
|
|
1141
|
+
} catch (e) {
|
|
1142
|
+
we.value = !1, Te.value = !1, Ce.value = void 0, x(e, {
|
|
1143
1143
|
source: "role-management",
|
|
1144
1144
|
phase: "load"
|
|
1145
1145
|
});
|
|
@@ -1152,41 +1152,41 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1152
1152
|
function kt() {
|
|
1153
1153
|
if ($()) {
|
|
1154
1154
|
if (!z.value) {
|
|
1155
|
-
|
|
1155
|
+
ie("请先选择角色归属范围", { 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(
|
|
1161
|
+
async function At(e, t) {
|
|
1162
1162
|
if (!$()) return;
|
|
1163
|
-
let
|
|
1164
|
-
if (!
|
|
1165
|
-
B.value =
|
|
1166
|
-
let
|
|
1167
|
-
q.value =
|
|
1163
|
+
let n = String(e.id ?? "");
|
|
1164
|
+
if (!n) return;
|
|
1165
|
+
B.value = n, H.value = !0, U.value = t, V.value = void 0, J.value = Kt(e), W.value = !0, G.value = !1;
|
|
1166
|
+
let r = q.value + 1;
|
|
1167
|
+
q.value = r;
|
|
1168
1168
|
try {
|
|
1169
|
-
let e = await
|
|
1170
|
-
if (!Rt(
|
|
1169
|
+
let e = await _.crud.view(n);
|
|
1170
|
+
if (!Rt(n, r)) return;
|
|
1171
1171
|
if (!Ut(e)) {
|
|
1172
|
-
G.value = !0,
|
|
1172
|
+
G.value = !0, ie("角色不属于当前归属范围", {
|
|
1173
1173
|
source: "role-management",
|
|
1174
1174
|
phase: "load"
|
|
1175
1175
|
});
|
|
1176
1176
|
return;
|
|
1177
1177
|
}
|
|
1178
|
-
zt(e,
|
|
1179
|
-
} catch (
|
|
1180
|
-
Rt(
|
|
1178
|
+
zt(e, t);
|
|
1179
|
+
} catch (e) {
|
|
1180
|
+
Rt(n, r) && (G.value = !0, x(e, {
|
|
1181
1181
|
source: "role-management",
|
|
1182
1182
|
phase: "load"
|
|
1183
1183
|
}));
|
|
1184
1184
|
} finally {
|
|
1185
|
-
Rt(
|
|
1185
|
+
Rt(n, r) && (W.value = !1);
|
|
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 && d?.dismiss());
|
|
1190
1190
|
}
|
|
1191
1191
|
function Mt() {
|
|
1192
1192
|
if (!K.value) {
|
|
@@ -1228,7 +1228,7 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1228
1228
|
}, t);
|
|
1229
1229
|
}
|
|
1230
1230
|
async function Ft() {
|
|
1231
|
-
await
|
|
1231
|
+
await re({
|
|
1232
1232
|
loading: K,
|
|
1233
1233
|
mode: U.value === "edit" ? "edit" : "create",
|
|
1234
1234
|
source: "role-management",
|
|
@@ -1237,41 +1237,41 @@ var q = /*#__PURE__*/ r(/* @__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 ? _.crud.update(V.value.id, e) : _.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 v({
|
|
1248
1248
|
loading: K,
|
|
1249
1249
|
source: "role-management",
|
|
1250
1250
|
record: () => e?.id ? e : void 0,
|
|
1251
|
-
canExecute: (e) =>
|
|
1251
|
+
canExecute: (e) => _.can("delete") === !0 && e.systemManaged !== !0,
|
|
1252
1252
|
deniedMessage: "当前用户无权删除角色",
|
|
1253
|
-
confirm: (e) =>
|
|
1253
|
+
confirm: (e) => oe({
|
|
1254
1254
|
title: "删除角色",
|
|
1255
1255
|
content: `确认删除角色「${_n(e)}」?`,
|
|
1256
1256
|
okText: "删除",
|
|
1257
1257
|
danger: !0
|
|
1258
1258
|
}),
|
|
1259
|
-
execute: (e) =>
|
|
1259
|
+
execute: (e) => _.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 v({
|
|
1267
1267
|
loading: K,
|
|
1268
1268
|
source: "role-management",
|
|
1269
1269
|
record: () => e?.id ? e : void 0,
|
|
1270
|
-
canExecute: (e) =>
|
|
1270
|
+
canExecute: (e) => _.can(hn(e)) === !0 && e.systemManaged !== !0,
|
|
1271
1271
|
deniedMessage: "当前用户无权变更角色启停状态",
|
|
1272
|
-
execute: (e) => e.enabled === !1 ?
|
|
1272
|
+
execute: (e) => e.enabled === !1 ? _.crud.enable(String(e.id), { version: e.version }) : _.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 _.crud.view(String(t.id))), F.value += 1, lt();
|
|
1275
1275
|
}
|
|
1276
1276
|
});
|
|
1277
1277
|
}
|
|
@@ -1296,11 +1296,11 @@ var q = /*#__PURE__*/ r(/* @__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 = l.recordId, t = l.scopeKind;
|
|
1300
|
+
if (!(!e || !t || t !== "platform" && !l.scopeId)) return {
|
|
1301
1301
|
recordId: e,
|
|
1302
1302
|
scopeKind: t,
|
|
1303
|
-
...t === "platform" ? {} : { scopeId:
|
|
1303
|
+
...t === "platform" ? {} : { scopeId: l.scopeId }
|
|
1304
1304
|
};
|
|
1305
1305
|
}
|
|
1306
1306
|
function Ht(e) {
|
|
@@ -1345,7 +1345,7 @@ var q = /*#__PURE__*/ r(/* @__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 = m(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__*/ r(/* @__PURE__ */ M({
|
|
|
1372
1372
|
"ownerScopeType",
|
|
1373
1373
|
"sharePolicy"
|
|
1374
1374
|
]) {
|
|
1375
|
-
let n =
|
|
1375
|
+
let n = a(t, {
|
|
1376
1376
|
fields: Y.value,
|
|
1377
1377
|
fallback: nt.value
|
|
1378
1378
|
});
|
|
@@ -1540,11 +1540,11 @@ var q = /*#__PURE__*/ r(/* @__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 (a, o) => (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(t), {
|
|
1548
1548
|
key: 0,
|
|
1549
1549
|
class: "role-scope-panel",
|
|
1550
1550
|
title: "租户",
|
|
@@ -1552,15 +1552,15 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1552
1552
|
"search-keyword": C.value,
|
|
1553
1553
|
"search-placeholder": "搜索租户名称、alias 或 ID",
|
|
1554
1554
|
searchable: Be.value,
|
|
1555
|
-
onRefresh:
|
|
1556
|
-
"onUpdate:searchKeyword":
|
|
1555
|
+
onRefresh: o[2] ||= (e) => Be.value ? he.value += 1 : ht(),
|
|
1556
|
+
"onUpdate:searchKeyword": o[3] ||= (e) => C.value = e
|
|
1557
1557
|
}, {
|
|
1558
1558
|
default: R(() => [Ie.value ? (N(), O("button", {
|
|
1559
1559
|
key: 0,
|
|
1560
1560
|
class: "role-platform-scope",
|
|
1561
1561
|
type: "button",
|
|
1562
1562
|
onClick: gt
|
|
1563
|
-
}, [j(L(
|
|
1563
|
+
}, [j(L(le), {
|
|
1564
1564
|
title: "平台角色",
|
|
1565
1565
|
secondary: "全局范围",
|
|
1566
1566
|
clickable: "",
|
|
@@ -1569,13 +1569,13 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1569
1569
|
key: 1,
|
|
1570
1570
|
class: "role-tenant-root-scope",
|
|
1571
1571
|
type: "button",
|
|
1572
|
-
onClick:
|
|
1573
|
-
}, [j(L(
|
|
1572
|
+
onClick: o[0] ||= (e) => _t(Ve.value)
|
|
1573
|
+
}, [j(L(le), {
|
|
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(f), {
|
|
1579
1579
|
key: 2,
|
|
1580
1580
|
context: Ne.value,
|
|
1581
1581
|
"selected-id": I.value?.id,
|
|
@@ -1586,7 +1586,7 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1586
1586
|
"fallback-title": "未命名租户",
|
|
1587
1587
|
"item-of": Cn,
|
|
1588
1588
|
onLoaded: mt,
|
|
1589
|
-
onSelect:
|
|
1589
|
+
onSelect: o[1] ||= (e) => _t(e)
|
|
1590
1590
|
}, null, 8, [
|
|
1591
1591
|
"context",
|
|
1592
1592
|
"selected-id",
|
|
@@ -1595,7 +1595,7 @@ var q = /*#__PURE__*/ r(/* @__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(t), {
|
|
1599
1599
|
key: 1,
|
|
1600
1600
|
class: "role-scope-panel",
|
|
1601
1601
|
title: "归属范围",
|
|
@@ -1603,22 +1603,22 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1603
1603
|
"search-keyword": w.value,
|
|
1604
1604
|
"search-placeholder": "搜索机构名称、编码或 ID",
|
|
1605
1605
|
searchable: !!I.value,
|
|
1606
|
-
onRefresh:
|
|
1607
|
-
"onUpdate:searchKeyword":
|
|
1606
|
+
onRefresh: o[6] ||= (e) => M.value += 1,
|
|
1607
|
+
"onUpdate:searchKeyword": o[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(g), {
|
|
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
|
-
onClick:
|
|
1616
|
-
}, [j(L(
|
|
1615
|
+
onClick: o[4] ||= (e) => vt()
|
|
1616
|
+
}, [j(L(le), {
|
|
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(b), {
|
|
1622
1622
|
context: He.value,
|
|
1623
1623
|
"selected-id": z.value?.kind === "organization" ? z.value.id : void 0,
|
|
1624
1624
|
"reload-key": M.value,
|
|
@@ -1629,19 +1629,19 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1629
1629
|
"loading-tip": "加载机构树",
|
|
1630
1630
|
"fallback-title": "未命名机构",
|
|
1631
1631
|
"item-of": wn,
|
|
1632
|
-
onSelect:
|
|
1632
|
+
onSelect: o[5] ||= (e) => yt(e)
|
|
1633
1633
|
}, null, 8, [
|
|
1634
1634
|
"context",
|
|
1635
1635
|
"selected-id",
|
|
1636
1636
|
"reload-key",
|
|
1637
1637
|
"keyword"
|
|
1638
|
-
])], 64)) : (N(), E(L(
|
|
1638
|
+
])], 64)) : (N(), E(L(g), {
|
|
1639
1639
|
key: 1,
|
|
1640
1640
|
description: "请选择左侧租户"
|
|
1641
1641
|
}))]),
|
|
1642
1642
|
_: 1
|
|
1643
1643
|
}, 8, ["search-keyword", "searchable"])) : D("v-if", !0),
|
|
1644
|
-
!Z.value || Q.value ? (N(), E(L(
|
|
1644
|
+
!Z.value || Q.value ? (N(), E(L(ne), {
|
|
1645
1645
|
key: 2,
|
|
1646
1646
|
class: "role-list-panel",
|
|
1647
1647
|
context: We.value,
|
|
@@ -1660,7 +1660,7 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1660
1660
|
onAction: bt,
|
|
1661
1661
|
onRowAction: Ct,
|
|
1662
1662
|
onRowDblclick: Et,
|
|
1663
|
-
onSelect:
|
|
1663
|
+
onSelect: o[8] ||= (e) => B.value = String(e.id ?? "")
|
|
1664
1664
|
}, null, 8, [
|
|
1665
1665
|
"context",
|
|
1666
1666
|
"title",
|
|
@@ -1669,7 +1669,7 @@ var q = /*#__PURE__*/ r(/* @__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(r), {
|
|
1673
1673
|
key: 3,
|
|
1674
1674
|
open: H.value,
|
|
1675
1675
|
title: qe.value,
|
|
@@ -1678,38 +1678,38 @@ var q = /*#__PURE__*/ r(/* @__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(u), {
|
|
1682
1682
|
key: 0,
|
|
1683
1683
|
enabled: V.value.enabled !== !1,
|
|
1684
1684
|
disabled: K.value || !Ze.value,
|
|
1685
1685
|
loading: K.value,
|
|
1686
1686
|
"show-label": !1,
|
|
1687
|
-
onChange:
|
|
1687
|
+
onChange: o[9] ||= (e) => Lt(V.value)
|
|
1688
1688
|
}, null, 8, [
|
|
1689
1689
|
"enabled",
|
|
1690
1690
|
"disabled",
|
|
1691
1691
|
"loading"
|
|
1692
1692
|
])) : D("v-if", !0)]),
|
|
1693
|
-
operation: R(() => [j(L(
|
|
1693
|
+
operation: R(() => [j(L(i), {
|
|
1694
1694
|
context: We.value,
|
|
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(se), {
|
|
1699
1699
|
key: 0,
|
|
1700
1700
|
class: "role-detail-state",
|
|
1701
1701
|
tip: "加载角色详情"
|
|
1702
|
-
})) : G.value ? (N(), O("div", Re, [j(L(
|
|
1702
|
+
})) : G.value ? (N(), O("div", Re, [j(L(te), {
|
|
1703
1703
|
title: "详情加载失败",
|
|
1704
1704
|
message: "无法加载角色详情,请重试"
|
|
1705
|
-
}), j(L(
|
|
1705
|
+
}), j(L(y), {
|
|
1706
1706
|
type: "primary",
|
|
1707
1707
|
"icon-name": "reload",
|
|
1708
1708
|
onClick: Pt
|
|
1709
1709
|
}, {
|
|
1710
|
-
default: R(() => [...
|
|
1710
|
+
default: R(() => [...o[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(e), {
|
|
1713
1713
|
key: 0,
|
|
1714
1714
|
record: J.value,
|
|
1715
1715
|
"field-names": at.value,
|
|
@@ -1726,11 +1726,11 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1726
1726
|
class: "role-form",
|
|
1727
1727
|
onSubmit: Se(Ft, ["prevent"])
|
|
1728
1728
|
}, [
|
|
1729
|
-
k("label", null, [
|
|
1729
|
+
k("label", null, [o[16] ||= k("span", { class: "role-form-label" }, "当前范围", -1), j(L(n), {
|
|
1730
1730
|
value: z.value?.title ?? "-",
|
|
1731
1731
|
disabled: ""
|
|
1732
1732
|
}, null, 8, ["value"])]),
|
|
1733
|
-
j(L(
|
|
1733
|
+
j(L(ce), {
|
|
1734
1734
|
record: J.value,
|
|
1735
1735
|
"field-names": rt,
|
|
1736
1736
|
fields: Y.value,
|
|
@@ -1750,14 +1750,14 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1750
1750
|
candidates: X.value,
|
|
1751
1751
|
"current-role-id": V.value?.id,
|
|
1752
1752
|
disabled: Ye.value || V.value?.systemManaged === !0,
|
|
1753
|
-
"onUpdate:value":
|
|
1753
|
+
"onUpdate:value": o[10] ||= (e) => pt("memberRoleIds", e)
|
|
1754
1754
|
}, null, 8, [
|
|
1755
1755
|
"value",
|
|
1756
1756
|
"candidates",
|
|
1757
1757
|
"current-role-id",
|
|
1758
1758
|
"disabled"
|
|
1759
1759
|
])) : D("v-if", !0),
|
|
1760
|
-
j(L(
|
|
1760
|
+
j(L(ce), {
|
|
1761
1761
|
record: J.value,
|
|
1762
1762
|
"field-names": it,
|
|
1763
1763
|
fields: Y.value,
|
|
@@ -1771,7 +1771,7 @@ var q = /*#__PURE__*/ r(/* @__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(p), {
|
|
1775
1775
|
key: 2,
|
|
1776
1776
|
record: J.value,
|
|
1777
1777
|
"show-sort-order": ""
|
|
@@ -1783,25 +1783,25 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1783
1783
|
"subtitle",
|
|
1784
1784
|
"close-on-outside",
|
|
1785
1785
|
"promotion"
|
|
1786
|
-
])) : (N(), E(L(
|
|
1786
|
+
])) : (N(), E(L(c), {
|
|
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(u), {
|
|
1792
1792
|
key: 0,
|
|
1793
1793
|
enabled: V.value.enabled !== !1,
|
|
1794
1794
|
disabled: K.value || !Ze.value,
|
|
1795
1795
|
loading: K.value,
|
|
1796
1796
|
"show-label": !1,
|
|
1797
|
-
onChange:
|
|
1797
|
+
onChange: o[11] ||= (e) => Lt(V.value)
|
|
1798
1798
|
}, null, 8, [
|
|
1799
1799
|
"enabled",
|
|
1800
1800
|
"disabled",
|
|
1801
1801
|
"loading"
|
|
1802
1802
|
])) : D("v-if", !0)]),
|
|
1803
|
-
operation: R(() => [j(L(
|
|
1804
|
-
context: L(
|
|
1803
|
+
operation: R(() => [j(L(i), {
|
|
1804
|
+
context: L(_),
|
|
1805
1805
|
actions: et.value,
|
|
1806
1806
|
"record-id": V.value?.id,
|
|
1807
1807
|
onAction: Nt
|
|
@@ -1810,21 +1810,21 @@ var q = /*#__PURE__*/ r(/* @__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(se), {
|
|
1814
1814
|
key: 0,
|
|
1815
1815
|
class: "role-detail-state",
|
|
1816
1816
|
tip: "加载角色详情"
|
|
1817
|
-
})) : G.value ? (N(), O("div", ze, [j(L(
|
|
1817
|
+
})) : G.value ? (N(), O("div", ze, [j(L(te), {
|
|
1818
1818
|
title: "详情加载失败",
|
|
1819
1819
|
message: "无法加载角色详情,请重试"
|
|
1820
|
-
}), j(L(
|
|
1820
|
+
}), j(L(y), {
|
|
1821
1821
|
type: "primary",
|
|
1822
1822
|
"icon-name": "reload",
|
|
1823
1823
|
onClick: Pt
|
|
1824
1824
|
}, {
|
|
1825
|
-
default: R(() => [...
|
|
1825
|
+
default: R(() => [...o[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(e), {
|
|
1828
1828
|
key: 0,
|
|
1829
1829
|
record: J.value,
|
|
1830
1830
|
"field-names": at.value,
|
|
@@ -1841,11 +1841,11 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1841
1841
|
class: "role-form",
|
|
1842
1842
|
onSubmit: Se(Ft, ["prevent"])
|
|
1843
1843
|
}, [
|
|
1844
|
-
k("label", null, [
|
|
1844
|
+
k("label", null, [o[18] ||= k("span", { class: "role-form-label" }, "当前范围", -1), j(L(n), {
|
|
1845
1845
|
value: z.value?.title ?? "-",
|
|
1846
1846
|
disabled: ""
|
|
1847
1847
|
}, null, 8, ["value"])]),
|
|
1848
|
-
j(L(
|
|
1848
|
+
j(L(ce), {
|
|
1849
1849
|
record: J.value,
|
|
1850
1850
|
"field-names": rt,
|
|
1851
1851
|
fields: Y.value,
|
|
@@ -1865,14 +1865,14 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1865
1865
|
candidates: X.value,
|
|
1866
1866
|
"current-role-id": V.value?.id,
|
|
1867
1867
|
disabled: Ye.value || V.value?.systemManaged === !0,
|
|
1868
|
-
"onUpdate:value":
|
|
1868
|
+
"onUpdate:value": o[12] ||= (e) => pt("memberRoleIds", e)
|
|
1869
1869
|
}, null, 8, [
|
|
1870
1870
|
"value",
|
|
1871
1871
|
"candidates",
|
|
1872
1872
|
"current-role-id",
|
|
1873
1873
|
"disabled"
|
|
1874
1874
|
])) : D("v-if", !0),
|
|
1875
|
-
j(L(
|
|
1875
|
+
j(L(ce), {
|
|
1876
1876
|
record: J.value,
|
|
1877
1877
|
"field-names": it,
|
|
1878
1878
|
fields: Y.value,
|
|
@@ -1886,7 +1886,7 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1886
1886
|
"fallback",
|
|
1887
1887
|
"disabled"
|
|
1888
1888
|
])
|
|
1889
|
-
], 32)), j(L(
|
|
1889
|
+
], 32)), j(L(p), {
|
|
1890
1890
|
record: J.value,
|
|
1891
1891
|
"show-sort-order": ""
|
|
1892
1892
|
}, null, 8, ["record"])], 64)) : D("v-if", !0)]),
|
|
@@ -1894,10 +1894,10 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1894
1894
|
}, 8, ["title", "subtitle"])),
|
|
1895
1895
|
j(Oe, {
|
|
1896
1896
|
open: we.value,
|
|
1897
|
-
context: L(
|
|
1897
|
+
context: L(_),
|
|
1898
1898
|
role: Ce.value,
|
|
1899
1899
|
onClose: Ot,
|
|
1900
|
-
onSaved:
|
|
1900
|
+
onSaved: o[13] ||= (e) => F.value += 1
|
|
1901
1901
|
}, null, 8, [
|
|
1902
1902
|
"open",
|
|
1903
1903
|
"context",
|
|
@@ -1905,10 +1905,10 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1905
1905
|
]),
|
|
1906
1906
|
j(Fe, {
|
|
1907
1907
|
open: Te.value,
|
|
1908
|
-
context: L(
|
|
1908
|
+
context: L(_),
|
|
1909
1909
|
role: Ce.value,
|
|
1910
1910
|
onClose: Ot,
|
|
1911
|
-
onSaved:
|
|
1911
|
+
onSaved: o[14] ||= (e) => F.value += 1
|
|
1912
1912
|
}, null, 8, [
|
|
1913
1913
|
"open",
|
|
1914
1914
|
"context",
|
|
@@ -1922,6 +1922,6 @@ var q = /*#__PURE__*/ r(/* @__PURE__ */ M({
|
|
|
1922
1922
|
}, null, 8, ["role-id"])) : D("v-if", !0)
|
|
1923
1923
|
], 2));
|
|
1924
1924
|
}
|
|
1925
|
-
}), [["__scopeId", "data-v-
|
|
1925
|
+
}), [["__scopeId", "data-v-47bf49a4"]]);
|
|
1926
1926
|
//#endregion
|
|
1927
1927
|
export { Be as t };
|