@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,761 +0,0 @@
|
|
|
1
|
-
import { $ as e, A as t, Et as n, Fn as r, I as i, M as a, N as o, Nt as ee, O as te, S as ne, Tt as re, _ as s, at as ie, c as ae, g as oe, i as c, m as se, r as ce, tt as l, v as le, w as ue, xt as u } from "./platform-components-DuAohqJO.js";
|
|
2
|
-
import { c as d, i as de, n as f, r as p, t as m, x as fe } from "./workspaceViewSessions-C3GP1UGp.js";
|
|
3
|
-
import { i as pe, n as me } from "./pageRealtime-Be2xkeKK.js";
|
|
4
|
-
import { t as he } from "./useUserSessionRows-DX9qYU5r.js";
|
|
5
|
-
import { Fragment as ge, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as b, createVNode as x, defineComponent as S, onBeforeUnmount as _e, onMounted as ve, openBlock as C, ref as w, resolveComponent as ye, unref as T, watch as be, withCtx as E, withModifiers as xe } from "vue";
|
|
6
|
-
//#region src/views/systemUserDetailWorkspaceSession.ts
|
|
7
|
-
function Se(e, t) {
|
|
8
|
-
return m(d, e, {
|
|
9
|
-
...t,
|
|
10
|
-
selectedUser: { ...t.selectedUser },
|
|
11
|
-
draft: { ...t.draft }
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
function Ce(e, t) {
|
|
15
|
-
return f(d, e, t);
|
|
16
|
-
}
|
|
17
|
-
function we(e) {
|
|
18
|
-
return p(d, e);
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/views/SystemUserManagementView.vue?vue&type=script&setup=true&lang.ts
|
|
22
|
-
var Te = { class: "system-user-management-page" }, Ee = { class: "system-user-detail-state" }, De = {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "system-user-password-reset-result"
|
|
25
|
-
}, Oe = { key: 0 }, ke = { key: 1 }, Ae = {
|
|
26
|
-
key: 1,
|
|
27
|
-
class: "system-user-detail-state"
|
|
28
|
-
}, je = {
|
|
29
|
-
key: 0,
|
|
30
|
-
class: "system-user-password-reset-result"
|
|
31
|
-
}, Me = { key: 0 }, Ne = { key: 1 }, D = /*#__PURE__*/ n(/* @__PURE__ */ S({
|
|
32
|
-
name: "SystemUserManagementView",
|
|
33
|
-
__name: "SystemUserManagementView",
|
|
34
|
-
props: {
|
|
35
|
-
recordId: {},
|
|
36
|
-
mode: {}
|
|
37
|
-
},
|
|
38
|
-
setup(n) {
|
|
39
|
-
let f = n, p = ee({ moduleAlias: "iam.user" }), m = fe(), S = w(), D = w(), O = w(!1), k = w("view"), A = w(!1), j = w(!1), M = w(!1), N = w(0), P = w(0), F = w(_t()), I = w(""), L = w(), R = w(o(void 0)), z = h(() => !!f.recordId), B = h(() => z.value && m?.presentation === "drawer"), Pe = h(() => !z.value || B.value), { expandedUserKeys: Fe, handleUserListLoaded: Ie, handleUserRowExpand: Le, handleUserSessionBusinessEvent: Re, loadUserSessions: ze, userOnlineStatusTitle: Be, userSessionState: V } = he({
|
|
40
|
-
context: p,
|
|
41
|
-
source: "system-user-management"
|
|
42
|
-
}), H = pe({
|
|
43
|
-
moduleAlias: "iam.user",
|
|
44
|
-
recordId: () => D.value?.id,
|
|
45
|
-
editing: () => k.value === "edit",
|
|
46
|
-
saving: () => M.value
|
|
47
|
-
}), U = h(() => Ze(p)), Ve = h(() => [
|
|
48
|
-
{
|
|
49
|
-
key: "username",
|
|
50
|
-
title: "账号",
|
|
51
|
-
width: "24%"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
key: "onlineStatus",
|
|
55
|
-
title: "在线状态",
|
|
56
|
-
width: "14%",
|
|
57
|
-
align: "center"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
key: "passwordStatusTitle",
|
|
61
|
-
title: "密码状态",
|
|
62
|
-
width: "18%"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
key: "lastLoginAt",
|
|
66
|
-
title: "最后登录",
|
|
67
|
-
type: "datetime",
|
|
68
|
-
width: "24%"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
key: "enabled",
|
|
72
|
-
title: "登录状态",
|
|
73
|
-
type: "enabledStatus",
|
|
74
|
-
width: "14%"
|
|
75
|
-
}
|
|
76
|
-
]), He = h(() => $(D.value ?? F.value)), Ue = h(() => k.value === "resetPassword" ? "修改密码" : "系统账号"), W = h(() => M.value || A.value), G = h(() => {
|
|
77
|
-
if (A.value) return !1;
|
|
78
|
-
if (k.value === "edit") return !!D.value?.id && p.can("update") === !0;
|
|
79
|
-
if (k.value === "resetPassword") {
|
|
80
|
-
let e = D.value?.id;
|
|
81
|
-
return !!e && p.can("changePassword", e) === !0;
|
|
82
|
-
}
|
|
83
|
-
return !1;
|
|
84
|
-
}), K = h(() => !D.value?.id || A.value ? !1 : p.can(St(D.value)) === !0), We = h(() => k.value === "view" ? D.value?.id ? [
|
|
85
|
-
{
|
|
86
|
-
key: "edit",
|
|
87
|
-
actionCode: "update",
|
|
88
|
-
title: "编辑",
|
|
89
|
-
iconName: "edit",
|
|
90
|
-
disabled: M.value
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
key: "resetPassword",
|
|
94
|
-
actionCode: "changePassword",
|
|
95
|
-
title: "修改密码",
|
|
96
|
-
iconName: "lock",
|
|
97
|
-
disabled: M.value
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
key: "resetGeneratedPassword",
|
|
101
|
-
actionCode: "resetPassword",
|
|
102
|
-
title: "重置密码",
|
|
103
|
-
iconName: "reload",
|
|
104
|
-
disabled: M.value
|
|
105
|
-
}
|
|
106
|
-
] : [] : [{
|
|
107
|
-
key: "cancel",
|
|
108
|
-
title: "取消",
|
|
109
|
-
iconName: "close",
|
|
110
|
-
disabled: M.value
|
|
111
|
-
}, {
|
|
112
|
-
key: "save",
|
|
113
|
-
actionCode: k.value === "resetPassword" ? "changePassword" : "update",
|
|
114
|
-
title: "保存",
|
|
115
|
-
iconName: "save",
|
|
116
|
-
primary: !0,
|
|
117
|
-
loading: M.value,
|
|
118
|
-
disabled: !G.value
|
|
119
|
-
}]), Ge = h(() => We.value), Ke = de({
|
|
120
|
-
view: d,
|
|
121
|
-
input: h(() => {
|
|
122
|
-
let e = D.value?.id;
|
|
123
|
-
return e && (k.value === "view" || k.value === "edit") ? { recordId: e } : void 0;
|
|
124
|
-
}),
|
|
125
|
-
title: h(() => $(D.value)),
|
|
126
|
-
eligibility: h(() => ({
|
|
127
|
-
hasStableIdentity: !!D.value?.id && !A.value,
|
|
128
|
-
busy: M.value
|
|
129
|
-
})),
|
|
130
|
-
beforePromote: async (e) => {
|
|
131
|
-
let t = D.value;
|
|
132
|
-
if (t) return await Se(e, {
|
|
133
|
-
selectedUser: t,
|
|
134
|
-
draft: F.value,
|
|
135
|
-
mode: k.value === "edit" ? "edit" : "view",
|
|
136
|
-
password: I.value,
|
|
137
|
-
resetPasswordResult: L.value
|
|
138
|
-
}) === "accepted";
|
|
139
|
-
},
|
|
140
|
-
onPromoted: nt
|
|
141
|
-
});
|
|
142
|
-
be(D, (e) => {
|
|
143
|
-
!z.value || !e || m?.setTitle($(e));
|
|
144
|
-
}, { immediate: !0 });
|
|
145
|
-
let q = h(() => ({
|
|
146
|
-
username: {
|
|
147
|
-
label: "账号",
|
|
148
|
-
required: !0,
|
|
149
|
-
visible: !0,
|
|
150
|
-
placeholder: "请输入登录账号"
|
|
151
|
-
},
|
|
152
|
-
enabled: {
|
|
153
|
-
label: "允许登录",
|
|
154
|
-
visible: !0,
|
|
155
|
-
controlType: "enabledStatus"
|
|
156
|
-
}
|
|
157
|
-
})), qe = h(() => ["username", "enabled"]), Je;
|
|
158
|
-
ve(() => {
|
|
159
|
-
if (Xe(), f.recordId) {
|
|
160
|
-
let e = { recordId: f.recordId };
|
|
161
|
-
B.value || (Je = Ce(e, Ye));
|
|
162
|
-
let t = we(e);
|
|
163
|
-
if (t) {
|
|
164
|
-
mt(t);
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
J({ id: f.recordId }, f.mode ?? "view");
|
|
168
|
-
}
|
|
169
|
-
}), _e(() => Je?.());
|
|
170
|
-
function Ye(e) {
|
|
171
|
-
return k.value === "view" ? (mt(e), !0) : !1;
|
|
172
|
-
}
|
|
173
|
-
me(Re);
|
|
174
|
-
async function Xe() {
|
|
175
|
-
try {
|
|
176
|
-
R.value = o((await p.runtime.ready).uiDescriptor);
|
|
177
|
-
} catch (t) {
|
|
178
|
-
e(t, {
|
|
179
|
-
source: "system-user-management",
|
|
180
|
-
phase: "load"
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
function Ze(e) {
|
|
185
|
-
return {
|
|
186
|
-
...e,
|
|
187
|
-
crud: {
|
|
188
|
-
...e.crud,
|
|
189
|
-
query: (t) => e.crud.query(Qe(t))
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
function Qe(e) {
|
|
194
|
-
return {
|
|
195
|
-
...e,
|
|
196
|
-
conditions: [...e?.conditions ?? [], {
|
|
197
|
-
fieldName: "tenantId",
|
|
198
|
-
operator: "NULL",
|
|
199
|
-
values: []
|
|
200
|
-
}]
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
function $e() {
|
|
204
|
-
return [{
|
|
205
|
-
key: "view",
|
|
206
|
-
actionCode: "view",
|
|
207
|
-
title: "查看"
|
|
208
|
-
}, {
|
|
209
|
-
key: "edit",
|
|
210
|
-
actionCode: "update",
|
|
211
|
-
title: "编辑",
|
|
212
|
-
iconName: "edit"
|
|
213
|
-
}];
|
|
214
|
-
}
|
|
215
|
-
function et(e, t) {
|
|
216
|
-
if (X()) {
|
|
217
|
-
if (e.key === "view") {
|
|
218
|
-
J(t, "view");
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
e.key === "edit" && J(t, "edit");
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
function tt(e) {
|
|
225
|
-
X() && J(e, "view");
|
|
226
|
-
}
|
|
227
|
-
async function J(t, n) {
|
|
228
|
-
if (!X()) return;
|
|
229
|
-
let r = String(t.id ?? "");
|
|
230
|
-
if (!r) return;
|
|
231
|
-
S.value = r, H.clearExternalChanged(), O.value = !0, k.value = n, D.value = void 0, F.value = Q(t), I.value = "", L.value = void 0, A.value = !0, j.value = !1;
|
|
232
|
-
let i = N.value + 1;
|
|
233
|
-
N.value = i;
|
|
234
|
-
try {
|
|
235
|
-
let e = await p.crud.view(r);
|
|
236
|
-
if (!pt(r, i)) return;
|
|
237
|
-
if (!e?.id) {
|
|
238
|
-
j.value = !0, l("未找到指定系统账号", {
|
|
239
|
-
source: "system-user-management",
|
|
240
|
-
phase: "load"
|
|
241
|
-
});
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
|
-
if (e.tenantId) {
|
|
245
|
-
rt();
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
Z(e, n);
|
|
249
|
-
} catch (t) {
|
|
250
|
-
pt(r, i) && (j.value = !0, e(t, {
|
|
251
|
-
source: "system-user-management",
|
|
252
|
-
phase: "load"
|
|
253
|
-
}));
|
|
254
|
-
} finally {
|
|
255
|
-
pt(r, i) && (A.value = !1);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
function nt() {
|
|
259
|
-
M.value || (N.value += 1, A.value = !1, j.value = !1, O.value = !1, k.value = "view", I.value = "", L.value = void 0, H.clearExternalChanged(), F.value = D.value ? Q(D.value) : _t(), B.value && m?.dismiss());
|
|
260
|
-
}
|
|
261
|
-
function rt() {
|
|
262
|
-
N.value += 1, A.value = !1, j.value = !1, O.value = !1, D.value = void 0, S.value = void 0, F.value = _t(), l("指定账号不属于系统账号管理范围", {
|
|
263
|
-
source: "system-user-management",
|
|
264
|
-
phase: "validation"
|
|
265
|
-
}), z.value && m?.dismiss();
|
|
266
|
-
}
|
|
267
|
-
function it() {
|
|
268
|
-
if (!M.value) {
|
|
269
|
-
if (!D.value?.id) {
|
|
270
|
-
nt();
|
|
271
|
-
return;
|
|
272
|
-
}
|
|
273
|
-
F.value = Q(D.value), I.value = "", L.value = void 0, H.clearExternalChanged(), k.value = "view", A.value = !1, j.value = !1;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
function at(e) {
|
|
277
|
-
if (e.key === "cancel") {
|
|
278
|
-
it();
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
if (e.key === "save") {
|
|
282
|
-
st();
|
|
283
|
-
return;
|
|
284
|
-
}
|
|
285
|
-
if (X()) {
|
|
286
|
-
if (e.key === "edit" && D.value) {
|
|
287
|
-
F.value = Q(D.value), H.clearExternalChanged(), k.value = "edit";
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
if (e.key === "resetPassword" && D.value) {
|
|
291
|
-
I.value = "", L.value = void 0, H.clearExternalChanged(), k.value = "resetPassword";
|
|
292
|
-
return;
|
|
293
|
-
}
|
|
294
|
-
e.key === "resetGeneratedPassword" && D.value && lt();
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
function Y() {
|
|
298
|
-
let e = String(F.value.id ?? S.value ?? "");
|
|
299
|
-
e && J({
|
|
300
|
-
...F.value,
|
|
301
|
-
id: e
|
|
302
|
-
}, k.value);
|
|
303
|
-
}
|
|
304
|
-
function ot() {
|
|
305
|
-
let e = String(H.externalChangedRecordId.value ?? F.value.id ?? S.value ?? "");
|
|
306
|
-
e && (H.clearExternalChanged(), J({
|
|
307
|
-
...F.value,
|
|
308
|
-
id: e
|
|
309
|
-
}, "edit"));
|
|
310
|
-
}
|
|
311
|
-
async function st() {
|
|
312
|
-
if (k.value === "resetPassword") {
|
|
313
|
-
await ct();
|
|
314
|
-
return;
|
|
315
|
-
}
|
|
316
|
-
await ce({
|
|
317
|
-
loading: M,
|
|
318
|
-
mode: "edit",
|
|
319
|
-
source: "system-user-management",
|
|
320
|
-
canSave: () => G.value,
|
|
321
|
-
deniedMessage: "当前用户无权保存系统账号",
|
|
322
|
-
createRecord: () => vt(F.value),
|
|
323
|
-
validateRecord: yt,
|
|
324
|
-
save: (e) => p.crud.update(D.value.id, e),
|
|
325
|
-
actionErrorHandlers: [{
|
|
326
|
-
code: r.conflictVersion,
|
|
327
|
-
handle: (e, { mode: t, record: n }) => t === "edit" && H.markExternalRecordChanged(n.id)
|
|
328
|
-
}],
|
|
329
|
-
onSaved: ({ record: e }) => {
|
|
330
|
-
Z(e), P.value += 1;
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
async function ct() {
|
|
335
|
-
if (!I.value.trim()) {
|
|
336
|
-
l("请填写新密码", {
|
|
337
|
-
source: "system-user-management",
|
|
338
|
-
phase: "validation"
|
|
339
|
-
});
|
|
340
|
-
return;
|
|
341
|
-
}
|
|
342
|
-
await c({
|
|
343
|
-
loading: M,
|
|
344
|
-
source: "system-user-management",
|
|
345
|
-
record: () => D.value?.id ? D.value : void 0,
|
|
346
|
-
canExecute: () => G.value,
|
|
347
|
-
deniedMessage: "当前用户无权重置系统账号密码",
|
|
348
|
-
execute: (e) => p.http.request({
|
|
349
|
-
method: "POST",
|
|
350
|
-
path: `/iam.user/changePassword/${encodeURIComponent(e.id)}`,
|
|
351
|
-
body: { password: I.value }
|
|
352
|
-
}),
|
|
353
|
-
onExecuted: async (e, t) => {
|
|
354
|
-
Z(await p.crud.view(t.id)), P.value += 1;
|
|
355
|
-
}
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
async function lt() {
|
|
359
|
-
await c({
|
|
360
|
-
loading: M,
|
|
361
|
-
source: "system-user-management",
|
|
362
|
-
record: () => D.value?.id ? D.value : void 0,
|
|
363
|
-
canExecute: (e) => p.can("resetPassword", e.id) === !0,
|
|
364
|
-
deniedMessage: "当前用户无权重置系统账号密码",
|
|
365
|
-
execute: (e) => p.http.request({
|
|
366
|
-
method: "POST",
|
|
367
|
-
path: `/iam.user/resetPassword/${encodeURIComponent(e.id)}`
|
|
368
|
-
}),
|
|
369
|
-
onExecuted: async (e, t) => {
|
|
370
|
-
Z(await p.crud.view(t.id)), L.value = e, P.value += 1;
|
|
371
|
-
}
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
async function ut(e, t) {
|
|
375
|
-
await c({
|
|
376
|
-
loading: M,
|
|
377
|
-
source: "system-user-management",
|
|
378
|
-
record: () => e?.id ? e : void 0,
|
|
379
|
-
canExecute: (e) => p.can("revokeSession", e.id) === !0 && !t.current,
|
|
380
|
-
deniedMessage: "当前用户无权下线该登录会话",
|
|
381
|
-
confirm: (e) => ie({
|
|
382
|
-
title: "下线登录会话",
|
|
383
|
-
content: `确认下线系统账号「${$(e)}」的该登录会话?`,
|
|
384
|
-
okText: "下线",
|
|
385
|
-
danger: !0
|
|
386
|
-
}),
|
|
387
|
-
execute: (e) => p.http.request({
|
|
388
|
-
method: "POST",
|
|
389
|
-
path: `/iam.user/${encodeURIComponent(e.id)}/sessions/${encodeURIComponent(t.id)}/revoke`
|
|
390
|
-
}),
|
|
391
|
-
onExecuted: (e, t) => {
|
|
392
|
-
ze(t.id), P.value += 1;
|
|
393
|
-
}
|
|
394
|
-
});
|
|
395
|
-
}
|
|
396
|
-
async function dt(e) {
|
|
397
|
-
let t = ht(String(e.id ?? "")).map((e) => e.id);
|
|
398
|
-
if (t.length === 0) {
|
|
399
|
-
l("当前没有可下线的登录会话", {
|
|
400
|
-
source: "system-user-management",
|
|
401
|
-
phase: "validation"
|
|
402
|
-
});
|
|
403
|
-
return;
|
|
404
|
-
}
|
|
405
|
-
await c({
|
|
406
|
-
loading: M,
|
|
407
|
-
source: "system-user-management",
|
|
408
|
-
record: () => e?.id ? e : void 0,
|
|
409
|
-
canExecute: (e) => p.can("revokeSessions", e.id) === !0,
|
|
410
|
-
deniedMessage: "当前用户无权批量下线登录会话",
|
|
411
|
-
confirm: (e) => ie({
|
|
412
|
-
title: "批量下线登录会话",
|
|
413
|
-
content: `确认下线系统账号「${$(e)}」的 ${t.length} 个登录会话?`,
|
|
414
|
-
okText: "全部下线",
|
|
415
|
-
danger: !0
|
|
416
|
-
}),
|
|
417
|
-
execute: (e) => p.http.request({
|
|
418
|
-
method: "POST",
|
|
419
|
-
path: `/iam.user/${encodeURIComponent(e.id)}/sessions/revoke`,
|
|
420
|
-
body: { sessionIds: t }
|
|
421
|
-
}),
|
|
422
|
-
onExecuted: (e, t) => {
|
|
423
|
-
ze(t.id), P.value += 1;
|
|
424
|
-
}
|
|
425
|
-
});
|
|
426
|
-
}
|
|
427
|
-
async function ft() {
|
|
428
|
-
await c({
|
|
429
|
-
loading: M,
|
|
430
|
-
source: "system-user-management",
|
|
431
|
-
record: () => D.value?.id ? D.value : void 0,
|
|
432
|
-
canExecute: () => K.value,
|
|
433
|
-
deniedMessage: "当前用户无权变更系统账号启停状态",
|
|
434
|
-
execute: (e) => e.enabled === !1 ? p.crud.enable(e.id, { version: e.version }) : p.crud.disable(e.id, { version: e.version }),
|
|
435
|
-
onExecuted: async (e, t) => {
|
|
436
|
-
Z(await p.crud.view(t.id)), P.value += 1;
|
|
437
|
-
}
|
|
438
|
-
});
|
|
439
|
-
}
|
|
440
|
-
function X() {
|
|
441
|
-
return !M.value;
|
|
442
|
-
}
|
|
443
|
-
function pt(e, t) {
|
|
444
|
-
return N.value === t && S.value === e;
|
|
445
|
-
}
|
|
446
|
-
function Z(e, t = "view") {
|
|
447
|
-
D.value = e, S.value = e.id, F.value = Q(e), I.value = "", k.value = t === "edit" ? "edit" : "view", H.clearExternalChanged(), O.value = !0, A.value = !1, j.value = !1, N.value += 1;
|
|
448
|
-
}
|
|
449
|
-
function mt(e) {
|
|
450
|
-
S.value = e.selectedUser.id, D.value = { ...e.selectedUser }, F.value = Q(e.draft), k.value = e.mode, I.value = e.password, L.value = e.resetPasswordResult, O.value = !0, A.value = !1, j.value = !1;
|
|
451
|
-
}
|
|
452
|
-
function ht(e) {
|
|
453
|
-
return !e || p.can("revokeSession", e) !== !0 ? [] : V(e).records.filter((e) => !e.current);
|
|
454
|
-
}
|
|
455
|
-
function gt(e, t) {
|
|
456
|
-
return !!e && !t.current && p.can("revokeSession", e) === !0;
|
|
457
|
-
}
|
|
458
|
-
function _t() {
|
|
459
|
-
return { enabled: !0 };
|
|
460
|
-
}
|
|
461
|
-
function Q(e) {
|
|
462
|
-
return {
|
|
463
|
-
...e,
|
|
464
|
-
password: void 0
|
|
465
|
-
};
|
|
466
|
-
}
|
|
467
|
-
function vt(e) {
|
|
468
|
-
return ae(e, {
|
|
469
|
-
tenantId: void 0,
|
|
470
|
-
username: e.username?.trim(),
|
|
471
|
-
enabled: e.enabled !== !1,
|
|
472
|
-
password: void 0
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
function yt(e) {
|
|
476
|
-
let t = a("username", {
|
|
477
|
-
fields: R.value,
|
|
478
|
-
fallback: q.value
|
|
479
|
-
});
|
|
480
|
-
if (t.visible && t.required && !e.username) return `请填写${t.label}`;
|
|
481
|
-
if (k.value === "resetPassword" && !I.value.trim()) return "请填写新密码";
|
|
482
|
-
}
|
|
483
|
-
function bt(e) {
|
|
484
|
-
return e === "username";
|
|
485
|
-
}
|
|
486
|
-
function xt(e, t) {
|
|
487
|
-
F.value = {
|
|
488
|
-
...F.value,
|
|
489
|
-
[e]: t
|
|
490
|
-
};
|
|
491
|
-
}
|
|
492
|
-
function St(e) {
|
|
493
|
-
return e.enabled === !1 ? "enable" : "disable";
|
|
494
|
-
}
|
|
495
|
-
function $(e) {
|
|
496
|
-
return String(e?.username ?? e?.id ?? "系统账号");
|
|
497
|
-
}
|
|
498
|
-
return (e, n) => {
|
|
499
|
-
let r = ye("UiSpin"), a = ye("UiError"), o = ye("DateTimeText");
|
|
500
|
-
return C(), v("section", Te, [!z.value || B.value ? (C(), g(T(se), {
|
|
501
|
-
key: 0,
|
|
502
|
-
class: "system-user-list-panel",
|
|
503
|
-
context: U.value,
|
|
504
|
-
title: "系统账号",
|
|
505
|
-
columns: Ve.value,
|
|
506
|
-
"cell-renderers": { onlineStatus: T(Be) },
|
|
507
|
-
"row-actions-of": $e,
|
|
508
|
-
"selected-key": S.value,
|
|
509
|
-
"expanded-row-keys": T(Fe),
|
|
510
|
-
"reload-key": P.value,
|
|
511
|
-
ready: !0,
|
|
512
|
-
"quick-search-placeholder": "搜索账号、姓名、手机号或邮箱",
|
|
513
|
-
"empty-description": "暂无系统账号",
|
|
514
|
-
onRowAction: et,
|
|
515
|
-
onRowDblclick: tt,
|
|
516
|
-
onRowExpand: T(Le),
|
|
517
|
-
onLoaded: T(Ie),
|
|
518
|
-
onSelect: n[0] ||= (e) => S.value = String(e.id ?? "")
|
|
519
|
-
}, {
|
|
520
|
-
expandedRow: E(({ record: e }) => [x(T(ue), {
|
|
521
|
-
sessions: T(V)(String(e.id ?? "")).records,
|
|
522
|
-
loading: T(V)(String(e.id ?? "")).loading,
|
|
523
|
-
error: T(V)(String(e.id ?? "")).error,
|
|
524
|
-
"actions-disabled": M.value,
|
|
525
|
-
"can-revoke": (t) => gt(String(e.id ?? ""), t),
|
|
526
|
-
"can-revoke-all": ht(String(e.id ?? "")).length > 1,
|
|
527
|
-
onRefresh: (t) => T(ze)(String(e.id ?? "")),
|
|
528
|
-
onRevoke: (t) => ut(e, t),
|
|
529
|
-
onRevokeAll: (t) => dt(e)
|
|
530
|
-
}, null, 8, [
|
|
531
|
-
"sessions",
|
|
532
|
-
"loading",
|
|
533
|
-
"error",
|
|
534
|
-
"actions-disabled",
|
|
535
|
-
"can-revoke",
|
|
536
|
-
"can-revoke-all",
|
|
537
|
-
"onRefresh",
|
|
538
|
-
"onRevoke",
|
|
539
|
-
"onRevokeAll"
|
|
540
|
-
])]),
|
|
541
|
-
_: 1
|
|
542
|
-
}, 8, [
|
|
543
|
-
"context",
|
|
544
|
-
"columns",
|
|
545
|
-
"cell-renderers",
|
|
546
|
-
"selected-key",
|
|
547
|
-
"expanded-row-keys",
|
|
548
|
-
"reload-key",
|
|
549
|
-
"onRowExpand",
|
|
550
|
-
"onLoaded"
|
|
551
|
-
])) : _("v-if", !0), Pe.value ? (C(), g(T(oe), {
|
|
552
|
-
key: 1,
|
|
553
|
-
open: O.value,
|
|
554
|
-
title: He.value,
|
|
555
|
-
subtitle: Ue.value,
|
|
556
|
-
mode: k.value,
|
|
557
|
-
"form-modes": ["edit", "resetPassword"],
|
|
558
|
-
loading: A.value,
|
|
559
|
-
"load-failed": j.value,
|
|
560
|
-
"externally-changed": T(H).externallyChanged.value,
|
|
561
|
-
promotion: T(Ke),
|
|
562
|
-
"error-title": "详情加载失败",
|
|
563
|
-
"error-message": "无法加载系统账号详情,请重试",
|
|
564
|
-
onClose: nt,
|
|
565
|
-
onRetry: Y,
|
|
566
|
-
onReloadExternalChange: ot,
|
|
567
|
-
onDismissExternalChange: T(H).clearExternalChanged
|
|
568
|
-
}, {
|
|
569
|
-
status: E(() => [k.value === "view" && D.value ? (C(), g(T(ne), {
|
|
570
|
-
key: 0,
|
|
571
|
-
enabled: D.value.enabled !== !1,
|
|
572
|
-
disabled: M.value || !K.value,
|
|
573
|
-
loading: M.value,
|
|
574
|
-
"show-label": !1,
|
|
575
|
-
onChange: ft
|
|
576
|
-
}, null, 8, [
|
|
577
|
-
"enabled",
|
|
578
|
-
"disabled",
|
|
579
|
-
"loading"
|
|
580
|
-
])) : _("v-if", !0)]),
|
|
581
|
-
operation: E(() => [x(T(i), {
|
|
582
|
-
context: U.value,
|
|
583
|
-
actions: Ge.value,
|
|
584
|
-
"record-id": D.value?.id,
|
|
585
|
-
onAction: at
|
|
586
|
-
}, null, 8, [
|
|
587
|
-
"context",
|
|
588
|
-
"actions",
|
|
589
|
-
"record-id"
|
|
590
|
-
])]),
|
|
591
|
-
loading: E(() => [x(r, {
|
|
592
|
-
class: "system-user-detail-state",
|
|
593
|
-
tip: "加载系统账号详情"
|
|
594
|
-
})]),
|
|
595
|
-
error: E(() => [y("div", Ee, [x(a, {
|
|
596
|
-
title: "详情加载失败",
|
|
597
|
-
message: "无法加载系统账号详情,请重试"
|
|
598
|
-
}), x(T(re), {
|
|
599
|
-
type: "primary",
|
|
600
|
-
"icon-name": "reload",
|
|
601
|
-
onClick: Y
|
|
602
|
-
}, {
|
|
603
|
-
default: E(() => [...n[3] ||= [b("重试", -1)]]),
|
|
604
|
-
_: 1
|
|
605
|
-
})])]),
|
|
606
|
-
view: E(() => [
|
|
607
|
-
x(T(t), {
|
|
608
|
-
record: F.value,
|
|
609
|
-
fields: R.value,
|
|
610
|
-
fallback: q.value
|
|
611
|
-
}, null, 8, [
|
|
612
|
-
"record",
|
|
613
|
-
"fields",
|
|
614
|
-
"fallback"
|
|
615
|
-
]),
|
|
616
|
-
k.value === "view" && L.value?.temporaryPassword ? (C(), v("div", De, [
|
|
617
|
-
n[5] ||= y("span", null, "临时密码", -1),
|
|
618
|
-
x(T(u), {
|
|
619
|
-
value: L.value.temporaryPassword,
|
|
620
|
-
disabled: ""
|
|
621
|
-
}, null, 8, ["value"]),
|
|
622
|
-
L.value.expiresAt ? (C(), v("small", Oe, [n[4] ||= b(" 有效期至 ", -1), x(o, { value: L.value.expiresAt }, null, 8, ["value"])])) : _("v-if", !0)
|
|
623
|
-
])) : _("v-if", !0),
|
|
624
|
-
x(T(s), { record: F.value }, null, 8, ["record"])
|
|
625
|
-
]),
|
|
626
|
-
form: E(() => [y("form", {
|
|
627
|
-
class: "system-user-form",
|
|
628
|
-
onSubmit: xe(st, ["prevent"])
|
|
629
|
-
}, [k.value === "resetPassword" ? (C(), v("label", ke, [n[6] ||= y("span", { class: "system-user-form-label" }, "新密码", -1), x(T(u), {
|
|
630
|
-
value: I.value,
|
|
631
|
-
type: "password",
|
|
632
|
-
disabled: W.value,
|
|
633
|
-
placeholder: "请输入密码",
|
|
634
|
-
"allow-clear": "",
|
|
635
|
-
"onUpdate:value": n[1] ||= (e) => I.value = e
|
|
636
|
-
}, null, 8, ["value", "disabled"])])) : (C(), g(T(le), {
|
|
637
|
-
key: 0,
|
|
638
|
-
record: F.value,
|
|
639
|
-
"field-names": qe.value,
|
|
640
|
-
fields: R.value,
|
|
641
|
-
fallback: q.value,
|
|
642
|
-
disabled: W.value,
|
|
643
|
-
"disabled-of": bt,
|
|
644
|
-
"onUpdate:field": xt
|
|
645
|
-
}, null, 8, [
|
|
646
|
-
"record",
|
|
647
|
-
"field-names",
|
|
648
|
-
"fields",
|
|
649
|
-
"fallback",
|
|
650
|
-
"disabled"
|
|
651
|
-
]))], 32), k.value === "resetPassword" ? _("v-if", !0) : (C(), g(T(s), {
|
|
652
|
-
key: 0,
|
|
653
|
-
record: F.value
|
|
654
|
-
}, null, 8, ["record"]))]),
|
|
655
|
-
_: 1
|
|
656
|
-
}, 8, [
|
|
657
|
-
"open",
|
|
658
|
-
"title",
|
|
659
|
-
"subtitle",
|
|
660
|
-
"mode",
|
|
661
|
-
"loading",
|
|
662
|
-
"load-failed",
|
|
663
|
-
"externally-changed",
|
|
664
|
-
"promotion",
|
|
665
|
-
"onDismissExternalChange"
|
|
666
|
-
])) : (C(), g(T(te), {
|
|
667
|
-
key: 2,
|
|
668
|
-
title: He.value,
|
|
669
|
-
subtitle: Ue.value
|
|
670
|
-
}, {
|
|
671
|
-
status: E(() => [k.value === "view" && D.value ? (C(), g(T(ne), {
|
|
672
|
-
key: 0,
|
|
673
|
-
enabled: D.value.enabled !== !1,
|
|
674
|
-
disabled: M.value || !K.value,
|
|
675
|
-
loading: M.value,
|
|
676
|
-
"show-label": !1,
|
|
677
|
-
onChange: ft
|
|
678
|
-
}, null, 8, [
|
|
679
|
-
"enabled",
|
|
680
|
-
"disabled",
|
|
681
|
-
"loading"
|
|
682
|
-
])) : _("v-if", !0)]),
|
|
683
|
-
operation: E(() => [x(T(i), {
|
|
684
|
-
context: U.value,
|
|
685
|
-
actions: Ge.value,
|
|
686
|
-
"record-id": D.value?.id,
|
|
687
|
-
onAction: at
|
|
688
|
-
}, null, 8, [
|
|
689
|
-
"context",
|
|
690
|
-
"actions",
|
|
691
|
-
"record-id"
|
|
692
|
-
])]),
|
|
693
|
-
default: E(() => [A.value ? (C(), g(r, {
|
|
694
|
-
key: 0,
|
|
695
|
-
class: "system-user-detail-state",
|
|
696
|
-
tip: "加载系统账号详情"
|
|
697
|
-
})) : j.value ? (C(), v("div", Ae, [x(a, {
|
|
698
|
-
title: "详情加载失败",
|
|
699
|
-
message: "无法加载系统账号详情,请重试"
|
|
700
|
-
}), x(T(re), {
|
|
701
|
-
type: "primary",
|
|
702
|
-
"icon-name": "reload",
|
|
703
|
-
onClick: Y
|
|
704
|
-
}, {
|
|
705
|
-
default: E(() => [...n[7] ||= [b("重试", -1)]]),
|
|
706
|
-
_: 1
|
|
707
|
-
})])) : k.value === "view" ? (C(), v(ge, { key: 2 }, [
|
|
708
|
-
x(T(t), {
|
|
709
|
-
record: F.value,
|
|
710
|
-
fields: R.value,
|
|
711
|
-
fallback: q.value
|
|
712
|
-
}, null, 8, [
|
|
713
|
-
"record",
|
|
714
|
-
"fields",
|
|
715
|
-
"fallback"
|
|
716
|
-
]),
|
|
717
|
-
L.value?.temporaryPassword ? (C(), v("div", je, [
|
|
718
|
-
n[9] ||= y("span", null, "临时密码", -1),
|
|
719
|
-
x(T(u), {
|
|
720
|
-
value: L.value.temporaryPassword,
|
|
721
|
-
disabled: ""
|
|
722
|
-
}, null, 8, ["value"]),
|
|
723
|
-
L.value.expiresAt ? (C(), v("small", Me, [n[8] ||= b(" 有效期至 ", -1), x(o, { value: L.value.expiresAt }, null, 8, ["value"])])) : _("v-if", !0)
|
|
724
|
-
])) : _("v-if", !0),
|
|
725
|
-
x(T(s), { record: F.value }, null, 8, ["record"])
|
|
726
|
-
], 64)) : (C(), v(ge, { key: 3 }, [y("form", {
|
|
727
|
-
class: "system-user-form",
|
|
728
|
-
onSubmit: xe(st, ["prevent"])
|
|
729
|
-
}, [k.value === "resetPassword" ? (C(), v("label", Ne, [n[10] ||= y("span", { class: "system-user-form-label" }, "新密码", -1), x(T(u), {
|
|
730
|
-
value: I.value,
|
|
731
|
-
type: "password",
|
|
732
|
-
disabled: W.value,
|
|
733
|
-
placeholder: "请输入密码",
|
|
734
|
-
"allow-clear": "",
|
|
735
|
-
"onUpdate:value": n[2] ||= (e) => I.value = e
|
|
736
|
-
}, null, 8, ["value", "disabled"])])) : (C(), g(T(le), {
|
|
737
|
-
key: 0,
|
|
738
|
-
record: F.value,
|
|
739
|
-
"field-names": qe.value,
|
|
740
|
-
fields: R.value,
|
|
741
|
-
fallback: q.value,
|
|
742
|
-
disabled: W.value,
|
|
743
|
-
"disabled-of": bt,
|
|
744
|
-
"onUpdate:field": xt
|
|
745
|
-
}, null, 8, [
|
|
746
|
-
"record",
|
|
747
|
-
"field-names",
|
|
748
|
-
"fields",
|
|
749
|
-
"fallback",
|
|
750
|
-
"disabled"
|
|
751
|
-
]))], 32), k.value === "resetPassword" ? _("v-if", !0) : (C(), g(T(s), {
|
|
752
|
-
key: 0,
|
|
753
|
-
record: F.value
|
|
754
|
-
}, null, 8, ["record"]))], 64))]),
|
|
755
|
-
_: 1
|
|
756
|
-
}, 8, ["title", "subtitle"]))]);
|
|
757
|
-
};
|
|
758
|
-
}
|
|
759
|
-
}), [["__scopeId", "data-v-01fb79d3"]]);
|
|
760
|
-
//#endregion
|
|
761
|
-
export { D as t };
|