@ximatai/muyun-web-app 0.26.9 → 0.26.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MetadataOrchestrationView-CzhAgEdX.js → MetadataOrchestrationView-F_Bmfn9K.js} +188 -188
- package/dist/{ModuleActionManagementView-CM2d8jPO.js → ModuleActionManagementView-Db_3Twom.js} +70 -70
- package/dist/RoleDetailWorkspaceView-UOm1ejGH.js +1369 -0
- package/dist/index.css +1 -1
- package/dist/index.js +274 -299
- package/dist/{platform-components-CIi6GdC9.js → platform-components-59b4qzUL.js} +2738 -2453
- package/dist/types/app/StaticRoutePageHost.vue.d.ts +2 -0
- package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +4 -2
- package/dist/types/consumer/index.d.ts +1 -1
- package/dist/types/dynamic-page-runtime/ManagedDetailRelationInlineSurface.vue.d.ts +3 -1
- package/dist/types/dynamic-page-runtime/ManagedDetailRelationSurface.vue.d.ts +2 -1
- package/dist/types/dynamic-page-runtime/ModulePageDetailRelations.vue.d.ts +3 -1
- package/dist/types/dynamic-page-runtime/ModulePageListExpansionSurface.vue.d.ts +2 -1
- package/dist/types/dynamic-page-runtime/ModulePageListRelationExpansion.vue.d.ts +2 -1
- package/dist/types/dynamic-page-runtime/ModulePageListRelationExpansions.vue.d.ts +2 -1
- package/dist/types/dynamic-page-runtime/ModulePageRecordContent.vue.d.ts +3 -1
- package/dist/types/dynamic-page-runtime/PageNavigatorExplorer.vue.d.ts +7 -2
- package/dist/types/dynamic-page-runtime/composables/useModulePageDetailExtensionRuntime.d.ts +5 -1
- package/dist/types/dynamic-page-runtime/composables/useModulePageFormContributionRuntime.d.ts +5 -3
- package/dist/types/dynamic-page-runtime/composables/useNavigatorRuntime.d.ts +95 -41
- package/dist/types/dynamic-page-runtime/composables/useRecordEditingSession.d.ts +3 -2
- package/dist/types/dynamic-page-runtime/index.d.ts +2 -2
- package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +103 -3
- package/dist/types/dynamic-page-runtime/navigatorEntrySelection.d.ts +18 -0
- package/dist/types/dynamic-page-runtime/pageContextRuntime.d.ts +8 -0
- package/dist/types/dynamic-page-runtime/pageNavigatorItemModel.d.ts +13 -0
- package/dist/types/dynamic-page-runtime/recordDetailController.d.ts +9 -8
- package/dist/types/formula/FormulaRuntime.d.ts +3 -0
- package/dist/types/platform-admin-runtime/platformModulePageEnhancement.d.ts +6 -0
- package/dist/types/{views/SystemUserManagementView.vue.d.ts → platform-admin-runtime/role/RoleAccountGrantDrawerSurface.vue.d.ts} +2 -2
- package/dist/types/{views/UserDetailRouteView.vue.d.ts → platform-admin-runtime/role/RoleAuthorizationDrawerSurface.vue.d.ts} +2 -3
- package/dist/types/{views/SystemUserDetailWorkspaceView.vue.d.ts → platform-admin-runtime/role/RoleEmploymentGrantDrawerSurface.vue.d.ts} +2 -2
- package/dist/types/platform-admin-runtime/role/RoleEnumTitleCell.vue.d.ts +8 -0
- package/dist/types/{dynamic-page-runtime/DynamicModuleHost.vue.d.ts → platform-admin-runtime/role/RoleGroupMemberFormField.vue.d.ts} +2 -2
- package/dist/types/platform-admin-runtime/role/RoleScopeTree.vue.d.ts +7 -0
- package/dist/types/platform-admin-runtime/roleModulePageEnhancement.d.ts +7 -0
- package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +5 -1
- package/dist/types/platform-components/DrawerOperationBar.vue.d.ts +4 -2
- package/dist/types/platform-components/ManagementPanelHeader.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordDetailDrawer.vue.d.ts +6 -3
- package/dist/types/platform-components/RecordDetailLayout.vue.d.ts +4 -2
- package/dist/types/platform-components/RecordExplorerPanel.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +2 -2
- package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordMultiPicker.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordPanelButton.vue.d.ts +2 -0
- package/dist/types/platform-components/RecordPicker.vue.d.ts +3 -1
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +13 -4
- package/dist/types/platform-components/RecordStatusSwitch.vue.d.ts +2 -0
- package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +5 -1
- package/dist/types/platform-components/index.d.ts +1 -3
- package/dist/types/platform-components/recordFormFieldModel.d.ts +16 -2
- package/dist/types/platform-components/recordPickerConstraints.d.ts +2 -0
- package/dist/types/platform-components/scopedTreeModuleContext.d.ts +2 -2
- package/dist/types/platform-components/staticTreeResourceModuleContext.d.ts +3 -3
- package/dist/types/platform-workbench/Workbench.vue.d.ts +4 -2
- package/dist/types/views/EmployeeEmploymentTable.vue.d.ts +5 -0
- package/dist/types/views/RoleAccountGrantDrawer.vue.d.ts +6 -2
- package/dist/types/views/RoleAuthorizationView.vue.d.ts +7 -0
- package/dist/types/views/RoleEmploymentGrantDrawer.vue.d.ts +5 -1
- package/dist/types/views/roleGrantClient.d.ts +8 -5
- package/dist/types/vue-ui-antdv/components/UiSidePanel.vue.d.ts +4 -2
- package/dist/types/vue-ui-antdv/components/UiSwitch.vue.d.ts +2 -0
- package/dist/types/vue-ui-antdv/components/UiTable.vue.d.ts +1 -0
- package/dist/types/vue-ui-antdv/components/UiTree.vue.d.ts +20 -1
- package/dist/types/vue-ui-antdv/types.d.ts +6 -0
- package/dist/types/web-contracts/index.d.ts +81 -4
- package/dist/types/web-core/http.d.ts +6 -0
- package/dist/types/web-core/module/index.d.ts +1 -1
- package/dist/types/web-core/module/moduleContext.d.ts +2 -1
- package/dist/types/web-core/module/staticModuleClient.d.ts +10 -4
- package/dist/types/web-core/realtime.d.ts +8 -0
- package/dist/workspaceViews-BvV8mpML.js +11149 -0
- package/package.json +1 -1
- package/dist/DictionaryManagementView-CtIQpqVA.js +0 -1035
- package/dist/MenuManagementView-DJhkN2sG.js +0 -837
- package/dist/RoleAuthorizationView-jn_WUCeg.js +0 -599
- package/dist/RoleDetailWorkspaceView-CzaQ3Dz1.js +0 -26
- package/dist/RoleManagementView-nY7qu4GF.js +0 -1951
- package/dist/SystemUserDetailWorkspaceView-CBvqmWvP.js +0 -17
- package/dist/SystemUserManagementView-AEomKvK7.js +0 -887
- package/dist/currentUserContext-B1lj1WgF.js +0 -11
- package/dist/types/dynamic-page-runtime/DynamicRecordDetailActions.vue.d.ts +0 -39
- package/dist/types/dynamic-page-runtime/dynamicModuleDetailStateModel.d.ts +0 -5
- package/dist/types/platform-components/scopedResourceTreeModuleContext.d.ts +0 -6
- package/dist/types/views/DictionaryManagementView.vue.d.ts +0 -3
- package/dist/types/views/MenuManagementView.vue.d.ts +0 -3
- package/dist/types/views/UserDetailContent.vue.d.ts +0 -32
- package/dist/types/views/UserManagementListView.vue.d.ts +0 -3
- package/dist/types/views/UserManagementView.vue.d.ts +0 -3
- package/dist/types/views/dictionaryManagementState.d.ts +0 -215
- package/dist/types/views/menuManagementState.d.ts +0 -180
- package/dist/types/views/systemUserDetailWorkspaceSession.d.ts +0 -12
- package/dist/types/views/systemUserDetailWorkspaceView.d.ts +0 -5
- package/dist/types/views/useUserSessionRows.d.ts +0 -28
- package/dist/types/views/userDetailStateModel.d.ts +0 -9
- package/dist/types/views/userManagementRouteState.d.ts +0 -11
- package/dist/workspaceViewSessions-B5g4M0rT.js +0 -51
- package/dist/workspaceViews-CkERhK0K.js +0 -8748
|
@@ -1,887 +0,0 @@
|
|
|
1
|
-
import { A as e, B as t, G as n, Kt as r, O as i, P as a, Qt as o, S as ee, V as s, Wt as te, b as ne, bt as re, fr as ie, ft as c, g as ae, h as l, i as u, l as d, m as oe, mt as f, r as se, rt as ce, vr as p, vt as le, xt as ue, zt as m } from "./platform-components-CIi6GdC9.js";
|
|
2
|
-
import { P as de, S as h, n as fe, r as pe, t as g } from "./workspaceViews-CkERhK0K.js";
|
|
3
|
-
import { i as me, n as _, r as v, t as he } from "./workspaceViewSessions-B5g4M0rT.js";
|
|
4
|
-
import { Fragment as ge, computed as y, createBlock as b, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createTextVNode as w, createVNode as T, defineComponent as E, onBeforeUnmount as _e, onMounted as ve, openBlock as D, ref as O, unref as k, watch as ye, withCtx as A, withModifiers as be } from "vue";
|
|
5
|
-
//#region src/views/systemUserDetailWorkspaceSession.ts
|
|
6
|
-
function xe(e, t) {
|
|
7
|
-
return he(h, e, {
|
|
8
|
-
...t,
|
|
9
|
-
selectedUser: { ...t.selectedUser },
|
|
10
|
-
draft: { ...t.draft }
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
function Se(e, t) {
|
|
14
|
-
return _(h, e, t);
|
|
15
|
-
}
|
|
16
|
-
function Ce(e) {
|
|
17
|
-
return v(h, e);
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/views/useUserSessionRows.ts
|
|
21
|
-
function we(e) {
|
|
22
|
-
let t = O([]), n = O({}), r = O([]), i = O({}), a = g({ load: async (e) => {
|
|
23
|
-
await ae(e.keys, e.isLatest);
|
|
24
|
-
} }), o = g({ load: async (e) => {
|
|
25
|
-
await Promise.all(e.keys.map((t) => s(t, e.isLatest)));
|
|
26
|
-
} });
|
|
27
|
-
function ee(e) {
|
|
28
|
-
o.enqueue(e);
|
|
29
|
-
}
|
|
30
|
-
async function s(t, n = () => !0) {
|
|
31
|
-
if (!(!t || e.context.can("sessions", t) === !1)) {
|
|
32
|
-
d(t, {
|
|
33
|
-
...u(t),
|
|
34
|
-
loading: !0,
|
|
35
|
-
error: void 0
|
|
36
|
-
});
|
|
37
|
-
try {
|
|
38
|
-
await te(t);
|
|
39
|
-
let r = await e.context.http.request({
|
|
40
|
-
method: "GET",
|
|
41
|
-
path: `/iam.user/${encodeURIComponent(t)}/sessions`
|
|
42
|
-
});
|
|
43
|
-
if (!n(t)) return;
|
|
44
|
-
d(t, {
|
|
45
|
-
records: r,
|
|
46
|
-
loading: !1,
|
|
47
|
-
error: void 0
|
|
48
|
-
});
|
|
49
|
-
} catch (r) {
|
|
50
|
-
if (!n(t)) return;
|
|
51
|
-
let i = c(r, {
|
|
52
|
-
source: `${e.source}-sessions`,
|
|
53
|
-
phase: "load"
|
|
54
|
-
});
|
|
55
|
-
d(t, {
|
|
56
|
-
...u(t),
|
|
57
|
-
loading: !1,
|
|
58
|
-
error: i.message
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
async function te(t) {
|
|
64
|
-
try {
|
|
65
|
-
await e.context.recordActions(t);
|
|
66
|
-
} catch (t) {
|
|
67
|
-
c(t, {
|
|
68
|
-
source: `${e.source}-sessions`,
|
|
69
|
-
phase: "load"
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
function ne(e, n) {
|
|
74
|
-
let r = String(e.id ?? "");
|
|
75
|
-
r && (t.value = n ? Array.from(new Set([...t.value, r])) : t.value.filter((e) => e !== r), n && u(r).records.length === 0 && o.enqueue(r));
|
|
76
|
-
}
|
|
77
|
-
function re(e) {
|
|
78
|
-
r.value = e.map((e) => String(e.id ?? "")).filter(Boolean), a.enqueue(r.value);
|
|
79
|
-
}
|
|
80
|
-
function ie(e) {
|
|
81
|
-
if (e.type !== "iam.user.session.collectionChanged" || e.moduleAlias !== "iam.user") return;
|
|
82
|
-
let n = String(e.recordId ?? "");
|
|
83
|
-
n && (r.value.includes(n) && a.enqueue(n), t.value.includes(n) && o.enqueue(n));
|
|
84
|
-
}
|
|
85
|
-
async function ae(t, n = () => !0) {
|
|
86
|
-
let r = Array.from(new Set(t.filter(Boolean)));
|
|
87
|
-
if (r.length !== 0) try {
|
|
88
|
-
let t = (await e.context.http.request({
|
|
89
|
-
method: "POST",
|
|
90
|
-
path: "/iam.user/sessions/status",
|
|
91
|
-
body: { userIds: r }
|
|
92
|
-
})).filter((e) => n(e.userId));
|
|
93
|
-
if (t.length === 0) return;
|
|
94
|
-
i.value = {
|
|
95
|
-
...i.value,
|
|
96
|
-
...Object.fromEntries(t.map((e) => [e.userId, e]))
|
|
97
|
-
};
|
|
98
|
-
} catch (t) {
|
|
99
|
-
c(t, {
|
|
100
|
-
source: `${e.source}-online-status`,
|
|
101
|
-
phase: "load"
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
function l(e) {
|
|
106
|
-
let t = String(e.id ?? ""), n = i.value[t];
|
|
107
|
-
if (!n) return "-";
|
|
108
|
-
if (n.present) {
|
|
109
|
-
let e = n.presentSessionCount ?? 0, t = n.idleSessionCount ?? 0;
|
|
110
|
-
return e > 0 && t >= e ? `闲置 (${e}/${n.activeSessionCount})` : `使用中 (${Math.max(0, e - t)}/${n.activeSessionCount})`;
|
|
111
|
-
}
|
|
112
|
-
return n.online ? `在线 (${n.activeSessionCount})` : "离线";
|
|
113
|
-
}
|
|
114
|
-
function u(e) {
|
|
115
|
-
return e ? n.value[e] ?? {
|
|
116
|
-
records: [],
|
|
117
|
-
loading: !1
|
|
118
|
-
} : {
|
|
119
|
-
records: [],
|
|
120
|
-
loading: !1
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
function d(e, t) {
|
|
124
|
-
n.value = {
|
|
125
|
-
...n.value,
|
|
126
|
-
[e]: t
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
function oe() {
|
|
130
|
-
a.reset(), o.reset(), t.value = [], n.value = {}, r.value = [], i.value = {};
|
|
131
|
-
}
|
|
132
|
-
return {
|
|
133
|
-
expandedUserKeys: t,
|
|
134
|
-
handleUserListLoaded: re,
|
|
135
|
-
handleUserRowExpand: ne,
|
|
136
|
-
handleUserSessionBusinessEvent: ie,
|
|
137
|
-
loadUserSessions: ee,
|
|
138
|
-
resetUserSessionRows: oe,
|
|
139
|
-
userOnlineStatusTitle: l,
|
|
140
|
-
userSessionState: u
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
//#endregion
|
|
144
|
-
//#region src/views/SystemUserManagementView.vue?vue&type=script&setup=true&lang.ts
|
|
145
|
-
var Te = { class: "system-user-detail-state" }, Ee = {
|
|
146
|
-
key: 0,
|
|
147
|
-
class: "system-user-password-reset-result"
|
|
148
|
-
}, De = { key: 0 }, Oe = { key: 1 }, ke = {
|
|
149
|
-
key: 1,
|
|
150
|
-
class: "system-user-detail-state"
|
|
151
|
-
}, Ae = {
|
|
152
|
-
key: 0,
|
|
153
|
-
class: "system-user-password-reset-result"
|
|
154
|
-
}, je = { key: 0 }, Me = { key: 1 }, j = /*@__PURE__*/ E({
|
|
155
|
-
name: "SystemUserManagementView",
|
|
156
|
-
__name: "SystemUserManagementView",
|
|
157
|
-
props: {
|
|
158
|
-
recordId: {},
|
|
159
|
-
mode: {}
|
|
160
|
-
},
|
|
161
|
-
setup(r) {
|
|
162
|
-
let p = r, g = o({ moduleAlias: "iam.user" }), _ = de(), v = O(), he = O(null), E = O(), j = O(!1), M = O("view"), N = O(!1), P = O(!1), F = O(!1), I = O(0), L = O(0), R = O(yt()), z = O(""), B = O(), V = O(s(void 0)), H = y(() => !!p.recordId), U = y(() => H.value && _?.presentation === "drawer"), Ne = y(() => !H.value || U.value), { expandedUserKeys: Pe, handleUserListLoaded: Fe, handleUserRowExpand: Ie, handleUserSessionBusinessEvent: Le, loadUserSessions: Re, userOnlineStatusTitle: ze, userSessionState: W } = we({
|
|
163
|
-
context: g,
|
|
164
|
-
source: "system-user-management"
|
|
165
|
-
}), G = pe({
|
|
166
|
-
moduleAlias: "iam.user",
|
|
167
|
-
recordId: () => E.value?.id,
|
|
168
|
-
editing: () => M.value === "edit",
|
|
169
|
-
saving: () => F.value
|
|
170
|
-
}), Be = y(() => $e(g)), Ve = y(() => [
|
|
171
|
-
{
|
|
172
|
-
key: "username",
|
|
173
|
-
title: "账号",
|
|
174
|
-
width: "24%"
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
key: "onlineStatus",
|
|
178
|
-
title: "在线状态",
|
|
179
|
-
width: "14%",
|
|
180
|
-
align: "center"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
key: "passwordStatusTitle",
|
|
184
|
-
title: "密码状态",
|
|
185
|
-
width: "18%"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
key: "lastLoginAt",
|
|
189
|
-
title: "最后登录",
|
|
190
|
-
type: "datetime",
|
|
191
|
-
width: "24%"
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
key: "enabled",
|
|
195
|
-
title: "登录状态",
|
|
196
|
-
type: "enabledStatus",
|
|
197
|
-
width: "14%"
|
|
198
|
-
}
|
|
199
|
-
]), He = y(() => $(E.value ?? R.value)), Ue = y(() => M.value === "resetPassword" ? "修改密码" : "系统账号"), K = y(() => F.value || N.value), We = y(() => {
|
|
200
|
-
if (N.value) return !1;
|
|
201
|
-
if (M.value === "edit") return !!E.value?.id && g.can("update") === !0;
|
|
202
|
-
if (M.value === "resetPassword") {
|
|
203
|
-
let e = E.value?.id;
|
|
204
|
-
return !!e && g.can("changePassword", e) === !0;
|
|
205
|
-
}
|
|
206
|
-
return !1;
|
|
207
|
-
}), Ge = y(() => !E.value?.id || N.value ? !1 : g.can(wt(E.value)) === !0), Ke = y(() => M.value === "view" ? E.value?.id ? [
|
|
208
|
-
{
|
|
209
|
-
key: "edit",
|
|
210
|
-
actionCode: "update",
|
|
211
|
-
title: "编辑",
|
|
212
|
-
iconName: "edit",
|
|
213
|
-
disabled: F.value
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
key: "resetPassword",
|
|
217
|
-
actionCode: "changePassword",
|
|
218
|
-
title: "修改密码",
|
|
219
|
-
iconName: "lock",
|
|
220
|
-
disabled: F.value
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
key: "resetGeneratedPassword",
|
|
224
|
-
actionCode: "resetPassword",
|
|
225
|
-
title: "重置密码",
|
|
226
|
-
iconName: "reload",
|
|
227
|
-
disabled: F.value
|
|
228
|
-
}
|
|
229
|
-
] : [] : [{
|
|
230
|
-
key: "cancel",
|
|
231
|
-
title: "取消",
|
|
232
|
-
iconName: "close",
|
|
233
|
-
disabled: F.value
|
|
234
|
-
}, {
|
|
235
|
-
key: "save",
|
|
236
|
-
actionCode: M.value === "resetPassword" ? "changePassword" : "update",
|
|
237
|
-
title: "保存",
|
|
238
|
-
iconName: "save",
|
|
239
|
-
primary: !0,
|
|
240
|
-
loading: F.value,
|
|
241
|
-
disabled: !We.value
|
|
242
|
-
}]), qe = y(() => Ke.value), Je = me({
|
|
243
|
-
view: h,
|
|
244
|
-
input: y(() => {
|
|
245
|
-
let e = E.value?.id;
|
|
246
|
-
return e && (M.value === "view" || M.value === "edit") ? { recordId: e } : void 0;
|
|
247
|
-
}),
|
|
248
|
-
title: y(() => $(E.value)),
|
|
249
|
-
eligibility: y(() => ({
|
|
250
|
-
hasStableIdentity: !!E.value?.id && !N.value,
|
|
251
|
-
busy: F.value
|
|
252
|
-
})),
|
|
253
|
-
beforePromote: async (e) => {
|
|
254
|
-
let t = E.value;
|
|
255
|
-
if (t) return await xe(e, {
|
|
256
|
-
selectedUser: t,
|
|
257
|
-
draft: R.value,
|
|
258
|
-
mode: M.value === "edit" ? "edit" : "view",
|
|
259
|
-
password: z.value,
|
|
260
|
-
resetPasswordResult: B.value
|
|
261
|
-
}) === "accepted";
|
|
262
|
-
},
|
|
263
|
-
onPromoted: it
|
|
264
|
-
});
|
|
265
|
-
ye(E, (e) => {
|
|
266
|
-
!H.value || !e || _?.setTitle($(e));
|
|
267
|
-
}, { immediate: !0 });
|
|
268
|
-
let q = y(() => ({
|
|
269
|
-
username: {
|
|
270
|
-
label: "账号",
|
|
271
|
-
required: !0,
|
|
272
|
-
visible: !0,
|
|
273
|
-
placeholder: "请输入登录账号"
|
|
274
|
-
},
|
|
275
|
-
enabled: {
|
|
276
|
-
label: "允许登录",
|
|
277
|
-
visible: !0,
|
|
278
|
-
controlType: "enabledStatus"
|
|
279
|
-
}
|
|
280
|
-
})), Ye = y(() => ["username", "enabled"]), Xe;
|
|
281
|
-
ve(() => {
|
|
282
|
-
if (Qe(), p.recordId) {
|
|
283
|
-
let e = { recordId: p.recordId };
|
|
284
|
-
U.value || (Xe = Se(e, Ze));
|
|
285
|
-
let t = Ce(e);
|
|
286
|
-
if (t) {
|
|
287
|
-
gt(t);
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
J({ id: p.recordId }, p.mode ?? "view");
|
|
291
|
-
}
|
|
292
|
-
}), _e(() => Xe?.());
|
|
293
|
-
function Ze(e) {
|
|
294
|
-
return M.value === "view" ? (gt(e), !0) : !1;
|
|
295
|
-
}
|
|
296
|
-
fe(Le);
|
|
297
|
-
async function Qe() {
|
|
298
|
-
try {
|
|
299
|
-
V.value = s((await g.runtime.ready).uiDescriptor);
|
|
300
|
-
} catch (e) {
|
|
301
|
-
c(e, {
|
|
302
|
-
source: "system-user-management",
|
|
303
|
-
phase: "load"
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
function $e(e) {
|
|
308
|
-
return {
|
|
309
|
-
...e,
|
|
310
|
-
crud: {
|
|
311
|
-
...e.crud,
|
|
312
|
-
query: (t) => e.crud.query(et(t))
|
|
313
|
-
}
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
function et(e) {
|
|
317
|
-
return {
|
|
318
|
-
...e,
|
|
319
|
-
conditions: [...e?.conditions ?? [], {
|
|
320
|
-
fieldName: "tenantId",
|
|
321
|
-
operator: "NULL",
|
|
322
|
-
values: []
|
|
323
|
-
}]
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
function tt() {
|
|
327
|
-
return [{
|
|
328
|
-
key: "view",
|
|
329
|
-
actionCode: "view",
|
|
330
|
-
title: "查看"
|
|
331
|
-
}, {
|
|
332
|
-
key: "edit",
|
|
333
|
-
actionCode: "update",
|
|
334
|
-
title: "编辑",
|
|
335
|
-
iconName: "edit"
|
|
336
|
-
}];
|
|
337
|
-
}
|
|
338
|
-
function nt(e, t) {
|
|
339
|
-
if (Y()) {
|
|
340
|
-
if (e.key === "view") {
|
|
341
|
-
J(t, "view");
|
|
342
|
-
return;
|
|
343
|
-
}
|
|
344
|
-
e.key === "edit" && J(t, "edit");
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
function rt(e) {
|
|
348
|
-
Y() && J(e, "view");
|
|
349
|
-
}
|
|
350
|
-
async function J(e, t) {
|
|
351
|
-
if (!Y()) return;
|
|
352
|
-
let n = String(e.id ?? "");
|
|
353
|
-
if (!n) return;
|
|
354
|
-
v.value = n, G.clearExternalChanged(), j.value = !0, M.value = t, E.value = void 0, R.value = Q(e), z.value = "", B.value = void 0, N.value = !0, P.value = !1;
|
|
355
|
-
let r = I.value + 1;
|
|
356
|
-
I.value = r;
|
|
357
|
-
try {
|
|
358
|
-
let e = await g.crud.view(n);
|
|
359
|
-
if (!X(n, r)) return;
|
|
360
|
-
if (!e?.id) {
|
|
361
|
-
P.value = !0, f("未找到指定系统账号", {
|
|
362
|
-
source: "system-user-management",
|
|
363
|
-
phase: "load"
|
|
364
|
-
});
|
|
365
|
-
return;
|
|
366
|
-
}
|
|
367
|
-
if (e.tenantId) {
|
|
368
|
-
at();
|
|
369
|
-
return;
|
|
370
|
-
}
|
|
371
|
-
Z(e, t);
|
|
372
|
-
} catch (e) {
|
|
373
|
-
X(n, r) && (P.value = !0, c(e, {
|
|
374
|
-
source: "system-user-management",
|
|
375
|
-
phase: "load"
|
|
376
|
-
}));
|
|
377
|
-
} finally {
|
|
378
|
-
X(n, r) && (N.value = !1);
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
function it() {
|
|
382
|
-
F.value || (I.value += 1, N.value = !1, P.value = !1, j.value = !1, M.value = "view", z.value = "", B.value = void 0, G.clearExternalChanged(), R.value = E.value ? Q(E.value) : yt(), U.value && _?.dismiss());
|
|
383
|
-
}
|
|
384
|
-
function at() {
|
|
385
|
-
I.value += 1, N.value = !1, P.value = !1, j.value = !1, E.value = void 0, v.value = void 0, R.value = yt(), f("指定账号不属于系统账号管理范围", {
|
|
386
|
-
source: "system-user-management",
|
|
387
|
-
phase: "validation"
|
|
388
|
-
}), H.value && _?.dismiss();
|
|
389
|
-
}
|
|
390
|
-
function ot() {
|
|
391
|
-
if (!F.value) {
|
|
392
|
-
if (!E.value?.id) {
|
|
393
|
-
it();
|
|
394
|
-
return;
|
|
395
|
-
}
|
|
396
|
-
R.value = Q(E.value), z.value = "", B.value = void 0, G.clearExternalChanged(), M.value = "view", N.value = !1, P.value = !1;
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
function st(e) {
|
|
400
|
-
if (e.key === "cancel") {
|
|
401
|
-
ot();
|
|
402
|
-
return;
|
|
403
|
-
}
|
|
404
|
-
if (e.key === "save") {
|
|
405
|
-
ut();
|
|
406
|
-
return;
|
|
407
|
-
}
|
|
408
|
-
if (Y()) {
|
|
409
|
-
if (e.key === "edit" && E.value) {
|
|
410
|
-
R.value = Q(E.value), G.clearExternalChanged(), M.value = "edit";
|
|
411
|
-
return;
|
|
412
|
-
}
|
|
413
|
-
if (e.key === "resetPassword" && E.value) {
|
|
414
|
-
z.value = "", B.value = void 0, G.clearExternalChanged(), M.value = "resetPassword";
|
|
415
|
-
return;
|
|
416
|
-
}
|
|
417
|
-
e.key === "resetGeneratedPassword" && E.value && ft();
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
function ct() {
|
|
421
|
-
let e = String(R.value.id ?? v.value ?? "");
|
|
422
|
-
e && J({
|
|
423
|
-
...R.value,
|
|
424
|
-
id: e
|
|
425
|
-
}, M.value);
|
|
426
|
-
}
|
|
427
|
-
function lt() {
|
|
428
|
-
let e = String(G.externalChangedRecordId.value ?? R.value.id ?? v.value ?? "");
|
|
429
|
-
e && (G.clearExternalChanged(), J({
|
|
430
|
-
...R.value,
|
|
431
|
-
id: e
|
|
432
|
-
}, "edit"));
|
|
433
|
-
}
|
|
434
|
-
async function ut() {
|
|
435
|
-
if (M.value === "resetPassword") {
|
|
436
|
-
await dt();
|
|
437
|
-
return;
|
|
438
|
-
}
|
|
439
|
-
await se({
|
|
440
|
-
loading: F,
|
|
441
|
-
mode: "edit",
|
|
442
|
-
source: "system-user-management",
|
|
443
|
-
canSave: () => We.value,
|
|
444
|
-
deniedMessage: "当前用户无权保存系统账号",
|
|
445
|
-
createRecord: () => bt(R.value),
|
|
446
|
-
validateRecord: xt,
|
|
447
|
-
save: (e) => g.crud.update(E.value.id, e),
|
|
448
|
-
actionErrorHandlers: [{
|
|
449
|
-
code: ie.conflictVersion,
|
|
450
|
-
handle: (e, { mode: t, record: n }) => t === "edit" && G.markExternalRecordChanged(n.id)
|
|
451
|
-
}],
|
|
452
|
-
onSaved: ({ record: e }) => {
|
|
453
|
-
Z(e), L.value += 1;
|
|
454
|
-
}
|
|
455
|
-
});
|
|
456
|
-
}
|
|
457
|
-
async function dt() {
|
|
458
|
-
if (!z.value.trim()) {
|
|
459
|
-
f("请填写新密码", {
|
|
460
|
-
source: "system-user-management",
|
|
461
|
-
phase: "validation"
|
|
462
|
-
});
|
|
463
|
-
return;
|
|
464
|
-
}
|
|
465
|
-
await u({
|
|
466
|
-
loading: F,
|
|
467
|
-
source: "system-user-management",
|
|
468
|
-
record: () => E.value?.id ? E.value : void 0,
|
|
469
|
-
canExecute: () => We.value,
|
|
470
|
-
deniedMessage: "当前用户无权重置系统账号密码",
|
|
471
|
-
execute: (e) => g.http.request({
|
|
472
|
-
method: "POST",
|
|
473
|
-
path: `/iam.user/changePassword/${encodeURIComponent(e.id)}`,
|
|
474
|
-
body: { password: z.value }
|
|
475
|
-
}),
|
|
476
|
-
onExecuted: async (e, t) => {
|
|
477
|
-
Z(await g.crud.view(t.id)), L.value += 1;
|
|
478
|
-
}
|
|
479
|
-
});
|
|
480
|
-
}
|
|
481
|
-
async function ft() {
|
|
482
|
-
await u({
|
|
483
|
-
loading: F,
|
|
484
|
-
source: "system-user-management",
|
|
485
|
-
record: () => E.value?.id ? E.value : void 0,
|
|
486
|
-
canExecute: (e) => g.can("resetPassword", e.id) === !0,
|
|
487
|
-
deniedMessage: "当前用户无权重置系统账号密码",
|
|
488
|
-
execute: (e) => g.http.request({
|
|
489
|
-
method: "POST",
|
|
490
|
-
path: `/iam.user/resetPassword/${encodeURIComponent(e.id)}`
|
|
491
|
-
}),
|
|
492
|
-
onExecuted: async (e, t) => {
|
|
493
|
-
Z(await g.crud.view(t.id)), B.value = e, L.value += 1;
|
|
494
|
-
}
|
|
495
|
-
});
|
|
496
|
-
}
|
|
497
|
-
async function pt(e, t) {
|
|
498
|
-
await u({
|
|
499
|
-
loading: F,
|
|
500
|
-
source: "system-user-management",
|
|
501
|
-
record: () => e?.id ? e : void 0,
|
|
502
|
-
canExecute: (e) => g.can("revokeSession", e.id) === !0 && !t.current,
|
|
503
|
-
deniedMessage: "当前用户无权下线该登录会话",
|
|
504
|
-
confirm: (e) => le({
|
|
505
|
-
title: "下线登录会话",
|
|
506
|
-
content: `确认下线系统账号「${$(e)}」的该登录会话?`,
|
|
507
|
-
okText: "下线",
|
|
508
|
-
danger: !0
|
|
509
|
-
}),
|
|
510
|
-
execute: (e) => g.http.request({
|
|
511
|
-
method: "POST",
|
|
512
|
-
path: `/iam.user/${encodeURIComponent(e.id)}/sessions/${encodeURIComponent(t.id)}/revoke`
|
|
513
|
-
}),
|
|
514
|
-
onExecuted: (e, t) => {
|
|
515
|
-
Re(t.id), L.value += 1;
|
|
516
|
-
}
|
|
517
|
-
});
|
|
518
|
-
}
|
|
519
|
-
async function mt(e) {
|
|
520
|
-
let t = _t(String(e.id ?? "")).map((e) => e.id);
|
|
521
|
-
if (t.length === 0) {
|
|
522
|
-
f("当前没有可下线的登录会话", {
|
|
523
|
-
source: "system-user-management",
|
|
524
|
-
phase: "validation"
|
|
525
|
-
});
|
|
526
|
-
return;
|
|
527
|
-
}
|
|
528
|
-
await u({
|
|
529
|
-
loading: F,
|
|
530
|
-
source: "system-user-management",
|
|
531
|
-
record: () => e?.id ? e : void 0,
|
|
532
|
-
canExecute: (e) => g.can("revokeSessions", e.id) === !0,
|
|
533
|
-
deniedMessage: "当前用户无权批量下线登录会话",
|
|
534
|
-
confirm: (e) => le({
|
|
535
|
-
title: "批量下线登录会话",
|
|
536
|
-
content: `确认下线系统账号「${$(e)}」的 ${t.length} 个登录会话?`,
|
|
537
|
-
okText: "全部下线",
|
|
538
|
-
danger: !0
|
|
539
|
-
}),
|
|
540
|
-
execute: (e) => g.http.request({
|
|
541
|
-
method: "POST",
|
|
542
|
-
path: `/iam.user/${encodeURIComponent(e.id)}/sessions/revoke`,
|
|
543
|
-
body: { sessionIds: t }
|
|
544
|
-
}),
|
|
545
|
-
onExecuted: (e, t) => {
|
|
546
|
-
Re(t.id), L.value += 1;
|
|
547
|
-
}
|
|
548
|
-
});
|
|
549
|
-
}
|
|
550
|
-
async function ht() {
|
|
551
|
-
await u({
|
|
552
|
-
loading: F,
|
|
553
|
-
source: "system-user-management",
|
|
554
|
-
record: () => E.value?.id ? E.value : void 0,
|
|
555
|
-
canExecute: () => Ge.value,
|
|
556
|
-
deniedMessage: "当前用户无权变更系统账号启停状态",
|
|
557
|
-
execute: (e) => e.enabled === !1 ? g.crud.enable(e.id, { version: e.version }) : g.crud.disable(e.id, { version: e.version }),
|
|
558
|
-
onExecuted: async (e, t) => {
|
|
559
|
-
Z(await g.crud.view(t.id)), L.value += 1;
|
|
560
|
-
}
|
|
561
|
-
});
|
|
562
|
-
}
|
|
563
|
-
function Y() {
|
|
564
|
-
return !F.value;
|
|
565
|
-
}
|
|
566
|
-
function X(e, t) {
|
|
567
|
-
return I.value === t && v.value === e;
|
|
568
|
-
}
|
|
569
|
-
function Z(e, t = "view") {
|
|
570
|
-
E.value = e, v.value = e.id, R.value = Q(e), z.value = "", M.value = t === "edit" ? "edit" : "view", G.clearExternalChanged(), j.value = !0, N.value = !1, P.value = !1, I.value += 1;
|
|
571
|
-
}
|
|
572
|
-
function gt(e) {
|
|
573
|
-
v.value = e.selectedUser.id, E.value = { ...e.selectedUser }, R.value = Q(e.draft), M.value = e.mode, z.value = e.password, B.value = e.resetPasswordResult, j.value = !0, N.value = !1, P.value = !1;
|
|
574
|
-
}
|
|
575
|
-
function _t(e) {
|
|
576
|
-
return !e || g.can("revokeSession", e) !== !0 ? [] : W(e).records.filter((e) => !e.current);
|
|
577
|
-
}
|
|
578
|
-
function vt(e, t) {
|
|
579
|
-
return !!e && !t.current && g.can("revokeSession", e) === !0;
|
|
580
|
-
}
|
|
581
|
-
function yt() {
|
|
582
|
-
return { enabled: !0 };
|
|
583
|
-
}
|
|
584
|
-
function Q(e) {
|
|
585
|
-
return {
|
|
586
|
-
...e,
|
|
587
|
-
password: void 0
|
|
588
|
-
};
|
|
589
|
-
}
|
|
590
|
-
function bt(e) {
|
|
591
|
-
return d(e, {
|
|
592
|
-
tenantId: void 0,
|
|
593
|
-
username: e.username?.trim(),
|
|
594
|
-
enabled: e.enabled !== !1,
|
|
595
|
-
password: void 0
|
|
596
|
-
});
|
|
597
|
-
}
|
|
598
|
-
function xt(e) {
|
|
599
|
-
let n = t("username", {
|
|
600
|
-
fields: V.value,
|
|
601
|
-
fallback: q.value
|
|
602
|
-
});
|
|
603
|
-
if (n.visible && n.required && !e.username) return `请填写${n.label}`;
|
|
604
|
-
if (M.value === "resetPassword" && !z.value.trim()) return "请填写新密码";
|
|
605
|
-
}
|
|
606
|
-
function St(e) {
|
|
607
|
-
return e === "username";
|
|
608
|
-
}
|
|
609
|
-
function Ct(e, t) {
|
|
610
|
-
R.value = {
|
|
611
|
-
...R.value,
|
|
612
|
-
[e]: t
|
|
613
|
-
};
|
|
614
|
-
}
|
|
615
|
-
function wt(e) {
|
|
616
|
-
return e.enabled === !1 ? "enable" : "disable";
|
|
617
|
-
}
|
|
618
|
-
function $(e) {
|
|
619
|
-
return String(e?.username ?? e?.id ?? "系统账号");
|
|
620
|
-
}
|
|
621
|
-
return (t, r) => (D(), S("section", {
|
|
622
|
-
ref_key: "pageRoot",
|
|
623
|
-
ref: he,
|
|
624
|
-
class: "system-user-management-page"
|
|
625
|
-
}, [!H.value || U.value ? (D(), b(k(e), {
|
|
626
|
-
key: 0,
|
|
627
|
-
class: "system-user-list-panel",
|
|
628
|
-
context: Be.value,
|
|
629
|
-
title: "系统账号",
|
|
630
|
-
columns: Ve.value,
|
|
631
|
-
"cell-renderers": { onlineStatus: k(ze) },
|
|
632
|
-
"row-actions-of": tt,
|
|
633
|
-
"selected-key": v.value,
|
|
634
|
-
"expanded-row-keys": k(Pe),
|
|
635
|
-
"reload-key": L.value,
|
|
636
|
-
ready: !0,
|
|
637
|
-
"quick-search-placeholder": "搜索账号、姓名、手机号或邮箱",
|
|
638
|
-
"empty-description": "暂无系统账号",
|
|
639
|
-
onRowAction: nt,
|
|
640
|
-
onRowDblclick: rt,
|
|
641
|
-
onRowExpand: k(Ie),
|
|
642
|
-
onLoaded: k(Fe),
|
|
643
|
-
onSelect: r[0] ||= (e) => v.value = String(e.id ?? "")
|
|
644
|
-
}, {
|
|
645
|
-
expandedRow: A(({ record: e }) => [T(k(ee), {
|
|
646
|
-
sessions: k(W)(String(e.id ?? "")).records,
|
|
647
|
-
loading: k(W)(String(e.id ?? "")).loading,
|
|
648
|
-
error: k(W)(String(e.id ?? "")).error,
|
|
649
|
-
"actions-disabled": F.value,
|
|
650
|
-
"can-revoke": (t) => vt(String(e.id ?? ""), t),
|
|
651
|
-
"can-revoke-all": _t(String(e.id ?? "")).length > 1,
|
|
652
|
-
onRefresh: (t) => k(Re)(String(e.id ?? "")),
|
|
653
|
-
onRevoke: (t) => pt(e, t),
|
|
654
|
-
onRevokeAll: (t) => mt(e)
|
|
655
|
-
}, null, 8, [
|
|
656
|
-
"sessions",
|
|
657
|
-
"loading",
|
|
658
|
-
"error",
|
|
659
|
-
"actions-disabled",
|
|
660
|
-
"can-revoke",
|
|
661
|
-
"can-revoke-all",
|
|
662
|
-
"onRefresh",
|
|
663
|
-
"onRevoke",
|
|
664
|
-
"onRevokeAll"
|
|
665
|
-
])]),
|
|
666
|
-
_: 1
|
|
667
|
-
}, 8, [
|
|
668
|
-
"context",
|
|
669
|
-
"columns",
|
|
670
|
-
"cell-renderers",
|
|
671
|
-
"selected-key",
|
|
672
|
-
"expanded-row-keys",
|
|
673
|
-
"reload-key",
|
|
674
|
-
"onRowExpand",
|
|
675
|
-
"onLoaded"
|
|
676
|
-
])) : x("v-if", !0), Ne.value ? (D(), b(k(oe), {
|
|
677
|
-
key: 1,
|
|
678
|
-
open: j.value,
|
|
679
|
-
title: He.value,
|
|
680
|
-
container: he.value,
|
|
681
|
-
subtitle: Ue.value,
|
|
682
|
-
mode: M.value,
|
|
683
|
-
"form-modes": ["edit", "resetPassword"],
|
|
684
|
-
loading: N.value,
|
|
685
|
-
"load-failed": P.value,
|
|
686
|
-
"externally-changed": k(G).externallyChanged.value,
|
|
687
|
-
promotion: k(Je),
|
|
688
|
-
"error-title": "详情加载失败",
|
|
689
|
-
"error-message": "无法加载系统账号详情,请重试",
|
|
690
|
-
onClose: it,
|
|
691
|
-
onRetry: ct,
|
|
692
|
-
onReloadExternalChange: lt,
|
|
693
|
-
onDismissExternalChange: k(G).clearExternalChanged
|
|
694
|
-
}, {
|
|
695
|
-
status: A(() => [M.value === "view" && E.value ? (D(), b(k(ne), {
|
|
696
|
-
key: 0,
|
|
697
|
-
enabled: E.value.enabled !== !1,
|
|
698
|
-
disabled: F.value || !Ge.value,
|
|
699
|
-
loading: F.value,
|
|
700
|
-
"show-label": !1,
|
|
701
|
-
onChange: ht
|
|
702
|
-
}, null, 8, [
|
|
703
|
-
"enabled",
|
|
704
|
-
"disabled",
|
|
705
|
-
"loading"
|
|
706
|
-
])) : x("v-if", !0)]),
|
|
707
|
-
operation: A(() => [T(k(n), {
|
|
708
|
-
context: Be.value,
|
|
709
|
-
actions: qe.value,
|
|
710
|
-
"record-id": E.value?.id,
|
|
711
|
-
onAction: st
|
|
712
|
-
}, null, 8, [
|
|
713
|
-
"context",
|
|
714
|
-
"actions",
|
|
715
|
-
"record-id"
|
|
716
|
-
])]),
|
|
717
|
-
loading: A(() => [T(k(ue), {
|
|
718
|
-
class: "system-user-detail-state",
|
|
719
|
-
tip: "加载系统账号详情"
|
|
720
|
-
})]),
|
|
721
|
-
error: A(() => [C("div", Te, [T(k(re), {
|
|
722
|
-
title: "详情加载失败",
|
|
723
|
-
message: "无法加载系统账号详情,请重试"
|
|
724
|
-
}), T(k(te), {
|
|
725
|
-
type: "primary",
|
|
726
|
-
"icon-name": "reload",
|
|
727
|
-
onClick: ct
|
|
728
|
-
}, {
|
|
729
|
-
default: A(() => [...r[3] ||= [w("重试", -1)]]),
|
|
730
|
-
_: 1
|
|
731
|
-
})])]),
|
|
732
|
-
view: A(() => [
|
|
733
|
-
T(k(a), {
|
|
734
|
-
record: R.value,
|
|
735
|
-
fields: V.value,
|
|
736
|
-
fallback: q.value
|
|
737
|
-
}, null, 8, [
|
|
738
|
-
"record",
|
|
739
|
-
"fields",
|
|
740
|
-
"fallback"
|
|
741
|
-
]),
|
|
742
|
-
M.value === "view" && B.value?.temporaryPassword ? (D(), S("div", Ee, [
|
|
743
|
-
r[5] ||= C("span", null, "临时密码", -1),
|
|
744
|
-
T(k(m), {
|
|
745
|
-
value: B.value.temporaryPassword,
|
|
746
|
-
disabled: ""
|
|
747
|
-
}, null, 8, ["value"]),
|
|
748
|
-
B.value.expiresAt ? (D(), S("small", De, [r[4] ||= w(" 有效期至 ", -1), T(k(ce), { value: B.value.expiresAt }, null, 8, ["value"])])) : x("v-if", !0)
|
|
749
|
-
])) : x("v-if", !0),
|
|
750
|
-
T(k(l), { record: R.value }, null, 8, ["record"])
|
|
751
|
-
]),
|
|
752
|
-
form: A(() => [C("form", {
|
|
753
|
-
class: "system-user-form",
|
|
754
|
-
onSubmit: be(ut, ["prevent"])
|
|
755
|
-
}, [M.value === "resetPassword" ? (D(), S("label", Oe, [r[6] ||= C("span", { class: "system-user-form-label" }, "新密码", -1), T(k(m), {
|
|
756
|
-
value: z.value,
|
|
757
|
-
type: "password",
|
|
758
|
-
disabled: K.value,
|
|
759
|
-
placeholder: "请输入密码",
|
|
760
|
-
"allow-clear": "",
|
|
761
|
-
"onUpdate:value": r[1] ||= (e) => z.value = e
|
|
762
|
-
}, null, 8, ["value", "disabled"])])) : (D(), b(k(ae), {
|
|
763
|
-
key: 0,
|
|
764
|
-
record: R.value,
|
|
765
|
-
"field-names": Ye.value,
|
|
766
|
-
fields: V.value,
|
|
767
|
-
fallback: q.value,
|
|
768
|
-
disabled: K.value,
|
|
769
|
-
"disabled-of": St,
|
|
770
|
-
"onUpdate:field": Ct
|
|
771
|
-
}, null, 8, [
|
|
772
|
-
"record",
|
|
773
|
-
"field-names",
|
|
774
|
-
"fields",
|
|
775
|
-
"fallback",
|
|
776
|
-
"disabled"
|
|
777
|
-
]))], 32), M.value === "resetPassword" ? x("v-if", !0) : (D(), b(k(l), {
|
|
778
|
-
key: 0,
|
|
779
|
-
record: R.value
|
|
780
|
-
}, null, 8, ["record"]))]),
|
|
781
|
-
_: 1
|
|
782
|
-
}, 8, [
|
|
783
|
-
"open",
|
|
784
|
-
"title",
|
|
785
|
-
"container",
|
|
786
|
-
"subtitle",
|
|
787
|
-
"mode",
|
|
788
|
-
"loading",
|
|
789
|
-
"load-failed",
|
|
790
|
-
"externally-changed",
|
|
791
|
-
"promotion",
|
|
792
|
-
"onDismissExternalChange"
|
|
793
|
-
])) : (D(), b(k(i), {
|
|
794
|
-
key: 2,
|
|
795
|
-
title: He.value,
|
|
796
|
-
subtitle: Ue.value
|
|
797
|
-
}, {
|
|
798
|
-
status: A(() => [M.value === "view" && E.value ? (D(), b(k(ne), {
|
|
799
|
-
key: 0,
|
|
800
|
-
enabled: E.value.enabled !== !1,
|
|
801
|
-
disabled: F.value || !Ge.value,
|
|
802
|
-
loading: F.value,
|
|
803
|
-
"show-label": !1,
|
|
804
|
-
onChange: ht
|
|
805
|
-
}, null, 8, [
|
|
806
|
-
"enabled",
|
|
807
|
-
"disabled",
|
|
808
|
-
"loading"
|
|
809
|
-
])) : x("v-if", !0)]),
|
|
810
|
-
operation: A(() => [T(k(n), {
|
|
811
|
-
context: Be.value,
|
|
812
|
-
actions: qe.value,
|
|
813
|
-
"record-id": E.value?.id,
|
|
814
|
-
onAction: st
|
|
815
|
-
}, null, 8, [
|
|
816
|
-
"context",
|
|
817
|
-
"actions",
|
|
818
|
-
"record-id"
|
|
819
|
-
])]),
|
|
820
|
-
default: A(() => [N.value ? (D(), b(k(ue), {
|
|
821
|
-
key: 0,
|
|
822
|
-
class: "system-user-detail-state",
|
|
823
|
-
tip: "加载系统账号详情"
|
|
824
|
-
})) : P.value ? (D(), S("div", ke, [T(k(re), {
|
|
825
|
-
title: "详情加载失败",
|
|
826
|
-
message: "无法加载系统账号详情,请重试"
|
|
827
|
-
}), T(k(te), {
|
|
828
|
-
type: "primary",
|
|
829
|
-
"icon-name": "reload",
|
|
830
|
-
onClick: ct
|
|
831
|
-
}, {
|
|
832
|
-
default: A(() => [...r[7] ||= [w("重试", -1)]]),
|
|
833
|
-
_: 1
|
|
834
|
-
})])) : M.value === "view" ? (D(), S(ge, { key: 2 }, [
|
|
835
|
-
T(k(a), {
|
|
836
|
-
record: R.value,
|
|
837
|
-
fields: V.value,
|
|
838
|
-
fallback: q.value
|
|
839
|
-
}, null, 8, [
|
|
840
|
-
"record",
|
|
841
|
-
"fields",
|
|
842
|
-
"fallback"
|
|
843
|
-
]),
|
|
844
|
-
B.value?.temporaryPassword ? (D(), S("div", Ae, [
|
|
845
|
-
r[9] ||= C("span", null, "临时密码", -1),
|
|
846
|
-
T(k(m), {
|
|
847
|
-
value: B.value.temporaryPassword,
|
|
848
|
-
disabled: ""
|
|
849
|
-
}, null, 8, ["value"]),
|
|
850
|
-
B.value.expiresAt ? (D(), S("small", je, [r[8] ||= w(" 有效期至 ", -1), T(k(ce), { value: B.value.expiresAt }, null, 8, ["value"])])) : x("v-if", !0)
|
|
851
|
-
])) : x("v-if", !0),
|
|
852
|
-
T(k(l), { record: R.value }, null, 8, ["record"])
|
|
853
|
-
], 64)) : (D(), S(ge, { key: 3 }, [C("form", {
|
|
854
|
-
class: "system-user-form",
|
|
855
|
-
onSubmit: be(ut, ["prevent"])
|
|
856
|
-
}, [M.value === "resetPassword" ? (D(), S("label", Me, [r[10] ||= C("span", { class: "system-user-form-label" }, "新密码", -1), T(k(m), {
|
|
857
|
-
value: z.value,
|
|
858
|
-
type: "password",
|
|
859
|
-
disabled: K.value,
|
|
860
|
-
placeholder: "请输入密码",
|
|
861
|
-
"allow-clear": "",
|
|
862
|
-
"onUpdate:value": r[2] ||= (e) => z.value = e
|
|
863
|
-
}, null, 8, ["value", "disabled"])])) : (D(), b(k(ae), {
|
|
864
|
-
key: 0,
|
|
865
|
-
record: R.value,
|
|
866
|
-
"field-names": Ye.value,
|
|
867
|
-
fields: V.value,
|
|
868
|
-
fallback: q.value,
|
|
869
|
-
disabled: K.value,
|
|
870
|
-
"disabled-of": St,
|
|
871
|
-
"onUpdate:field": Ct
|
|
872
|
-
}, null, 8, [
|
|
873
|
-
"record",
|
|
874
|
-
"field-names",
|
|
875
|
-
"fields",
|
|
876
|
-
"fallback",
|
|
877
|
-
"disabled"
|
|
878
|
-
]))], 32), M.value === "resetPassword" ? x("v-if", !0) : (D(), b(k(l), {
|
|
879
|
-
key: 0,
|
|
880
|
-
record: R.value
|
|
881
|
-
}, null, 8, ["record"]))], 64))]),
|
|
882
|
-
_: 1
|
|
883
|
-
}, 8, ["title", "subtitle"]))], 512));
|
|
884
|
-
}
|
|
885
|
-
}), M = /* @__PURE__ */ p({ default: () => N }), N = /*#__PURE__*/ r(j, [["__scopeId", "data-v-217a0ff6"]]);
|
|
886
|
-
//#endregion
|
|
887
|
-
export { M as n, N as t };
|