@ximatai/muyun-web-app 0.26.4 → 0.26.6
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-BySbWjCV.js → EmployeeDetailWorkspaceView-DHZ4arBj.js} +1 -1
- package/dist/{EmployeeManagementView-DvmDPxzN.js → EmployeeManagementView-BfGb_ssB.js} +336 -336
- package/dist/MetadataOrchestrationView-BLxigKBh.js +655 -0
- package/dist/{ModuleActionManagementView-DRtYMXOK.js → ModuleActionManagementView-ByJzNkQs.js} +102 -102
- package/dist/{RoleAuthorizationView-CK6Vfdup.js → RoleAuthorizationView-DJSWY3fu.js} +62 -62
- package/dist/{RoleDetailWorkspaceView-BPZcZy-r.js → RoleDetailWorkspaceView-Dfdigf04.js} +1 -1
- package/dist/{RoleManagementView-B7TzzVOm.js → RoleManagementView-D0e9nLwW.js} +295 -295
- package/dist/{SystemUserDetailWorkspaceView-BtEDyU-k.js → SystemUserDetailWorkspaceView-D-UPhCmD.js} +1 -1
- package/dist/{SystemUserManagementView-TKqj92zG.js → SystemUserManagementView-DNKRvmDk.js} +198 -198
- package/dist/{UserDetailWorkspaceView-B6fGrnQ7.js → UserDetailWorkspaceView-BCSCLNSz.js} +1 -1
- package/dist/{UserManagementView-4IJeDSQS.js → UserManagementView-aY2AeeWK.js} +287 -287
- package/dist/index.css +1 -1
- package/dist/index.js +2384 -2410
- package/dist/pageRealtime-Be2xkeKK.js +225 -0
- package/dist/{platform-components-CgMBopmF.js → platform-components-DuAohqJO.js} +2732 -1546
- package/dist/types/app/workbenchRouteSync.d.ts +13 -0
- package/dist/types/consumer/index.d.ts +10 -2
- package/dist/types/dynamic-page-runtime/DynamicModuleHost.vue.d.ts +8 -1
- package/dist/types/dynamic-page-runtime/dynamicModuleDetailStateModel.d.ts +12 -0
- package/dist/types/dynamic-page-runtime/index.d.ts +5 -0
- package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +126 -0
- package/dist/types/dynamic-page-runtime/modulePageListRefresh.d.ts +12 -0
- package/dist/types/dynamic-page-runtime/modulePageNavigation.d.ts +11 -0
- package/dist/types/platform-admin-runtime/PlatformAdminOutlet.vue.d.ts +1 -0
- package/dist/types/platform-admin-runtime/backendHttp.d.ts +1 -1
- package/dist/types/platform-admin-runtime/index.d.ts +3 -0
- package/dist/types/platform-admin-runtime/realtime.d.ts +9 -5
- package/dist/types/platform-admin-runtime/workspaceViewContract.d.ts +1 -36
- package/dist/types/platform-admin-runtime/workspaceViewHost.d.ts +2 -10
- package/dist/types/platform-admin-runtime/workspaceViews.d.ts +1 -17
- package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +2 -2
- package/dist/types/platform-components/DateTimeText.vue.d.ts +1 -1
- package/dist/types/platform-components/FileSizeText.vue.d.ts +10 -0
- package/dist/types/platform-components/FileTransferUploader.vue.d.ts +51 -0
- package/dist/types/platform-components/RecordDetailExtensionSection.vue.d.ts +16 -0
- package/dist/types/platform-components/RecordDetailFields.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordFileReferenceTransfer.vue.d.ts +19 -0
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +4 -0
- package/dist/types/platform-components/RecordListExplorer.vue.d.ts +2 -2
- package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +15 -0
- package/dist/types/platform-components/RecordMultiPicker.vue.d.ts +33 -0
- package/dist/types/platform-components/RecordPanelButton.vue.d.ts +33 -0
- package/dist/types/platform-components/RecordPanelState.vue.d.ts +11 -0
- package/dist/types/platform-components/RecordPicker.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +47 -2
- package/dist/types/platform-components/RecordStatusTag.vue.d.ts +6 -1
- package/dist/types/platform-components/RecordTagList.vue.d.ts +7 -0
- package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +2 -2
- package/dist/types/platform-components/fileReferenceTransfer.d.ts +17 -0
- package/dist/types/platform-components/fileTransferUpload.d.ts +43 -0
- package/dist/types/platform-components/index.d.ts +14 -1
- package/dist/types/platform-components/platformErrorFeedback.d.ts +2 -0
- package/dist/types/platform-components/platformFileSize.d.ts +10 -0
- package/dist/types/platform-components/recordActionBarModel.d.ts +6 -1
- package/dist/types/platform-components/recordFormFieldModel.d.ts +21 -3
- package/dist/types/platform-workbench/Workbench.vue.d.ts +2 -2
- package/dist/types/platform-workbench/WorkbenchBrandControl.vue.d.ts +21 -0
- package/dist/types/platform-workbench/WorkbenchMenu.vue.d.ts +15 -1
- package/dist/types/platform-workbench/WorkbenchMenuTree.vue.d.ts +2 -0
- package/dist/types/platform-workbench/WorkspaceViewOutlet.vue.d.ts +7 -0
- package/dist/types/platform-workbench/index.d.ts +7 -0
- package/dist/types/platform-workbench/menuPointerAim.d.ts +11 -0
- package/dist/types/platform-workbench/workbenchLayout.d.ts +1 -0
- package/dist/types/platform-workbench/workspaceViewContract.d.ts +20 -0
- package/dist/types/platform-workbench/workspaceViewHost.d.ts +8 -0
- package/dist/types/platform-workbench/workspaceViews.d.ts +21 -0
- package/dist/types/views/employeeDetailWorkspaceView.d.ts +1 -1
- package/dist/types/views/metadataOrchestrationWorkspaceView.d.ts +1 -1
- package/dist/types/views/moduleActionManagementWorkspaceView.d.ts +1 -1
- package/dist/types/views/roleAuthorizationWorkspaceView.d.ts +1 -1
- package/dist/types/views/roleDetailWorkspaceView.d.ts +1 -1
- package/dist/types/views/systemUserDetailWorkspaceView.d.ts +1 -1
- package/dist/types/views/userDetailWorkspaceView.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiColorPicker.vue.d.ts +14 -0
- package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiRecordExplorerItem.vue.d.ts +3 -3
- package/dist/types/vue-ui-antdv/components/UiSelect.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiTagList.vue.d.ts +17 -0
- package/dist/types/vue-ui-antdv/components/UiTree.vue.d.ts +3 -3
- package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/index.d.ts +3 -0
- package/dist/types/vue-ui-antdv/types.d.ts +3 -9
- package/dist/types/web-contracts/index.d.ts +111 -1
- package/dist/types/web-core/clients.d.ts +6 -1
- package/dist/types/web-core/http.d.ts +12 -1
- package/dist/types/web-core/module/staticModuleClient.d.ts +1 -0
- package/dist/{useUserSessionRows-DHsyr2Vy.js → useUserSessionRows-DX9qYU5r.js} +2 -2
- package/dist/workspaceViewSessions-C3GP1UGp.js +2639 -0
- package/package.json +1 -1
- package/dist/MetadataOrchestrationView-2JxJkFEC.js +0 -655
- package/dist/pageRealtime-CJriNmzP.js +0 -140
- package/dist/workspaceViewSessions-BMbyO9O4.js +0 -1571
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { $ as e, A as t, An as n, C as r, Et as i, F as ee, G as a, I as te, M as ne, N as re, Nt as ie, O as ae, S as oe, Tt as o, _ as s, at as se, c as ce, ct as c, gt as le, i as l, m as ue, q as de, r as fe, st as u, tt as d, v as f, w as pe, xt as p } from "./platform-components-DuAohqJO.js";
|
|
2
|
+
import { d as m, i as me, n as h, r as g, t as _, x as he } from "./workspaceViewSessions-C3GP1UGp.js";
|
|
3
|
+
import { f as v, n as ge } from "./pageRealtime-Be2xkeKK.js";
|
|
4
4
|
import { n as _e } from "./currentUserContext-B1lj1WgF.js";
|
|
5
|
-
import { t as ve } from "./useUserSessionRows-
|
|
6
|
-
import { Fragment as y, computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createTextVNode as T, createVNode as E, defineComponent as D, normalizeClass as ye, onBeforeUnmount as be, onMounted as xe, openBlock as O, ref as k, toDisplayString as A, unref as j, watch as
|
|
5
|
+
import { t as ve } from "./useUserSessionRows-DX9qYU5r.js";
|
|
6
|
+
import { Fragment as y, computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createTextVNode as T, createVNode as E, defineComponent as D, normalizeClass as ye, onBeforeUnmount as be, onMounted as xe, openBlock as O, ref as k, toDisplayString as A, unref as j, watch as M, withCtx as N, withModifiers as P } from "vue";
|
|
7
7
|
//#region src/platform-admin-runtime/sessionRecovery.ts
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
return
|
|
8
|
+
var F;
|
|
9
|
+
function I(e, t) {
|
|
10
|
+
return F?.(e, t) ?? !1;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/platform-admin-runtime/backendHttp.ts
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
function Se(e = {}) {
|
|
15
|
+
return n({
|
|
16
16
|
baseUrl: void 0,
|
|
17
17
|
token: e.withAuth === !1 ? void 0 : v(void 0),
|
|
18
|
-
credentials:
|
|
19
|
-
onAuthenticationRequired: e.withAuth === !1 ? void 0 : (e, t) =>
|
|
18
|
+
credentials: Ce(void 0),
|
|
19
|
+
onAuthenticationRequired: e.withAuth === !1 ? void 0 : (e, t) => I(e, t)
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Ce(e) {
|
|
23
23
|
return e === "include" || e === "omit" || e === "same-origin" ? e : void 0;
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/views/UserDetailContent.vue?vue&type=script&setup=true&lang.ts
|
|
27
|
-
var
|
|
27
|
+
var we = {
|
|
28
28
|
key: 1,
|
|
29
29
|
class: "user-detail-state"
|
|
30
|
-
},
|
|
30
|
+
}, Te = {
|
|
31
31
|
key: 1,
|
|
32
32
|
class: "user-password-reset-result"
|
|
33
|
-
},
|
|
33
|
+
}, Ee = { key: 0 }, L = { key: 1 }, De = { class: "user-form-label" }, Oe = /*#__PURE__*/ i(/* @__PURE__ */ D({
|
|
34
34
|
name: "UserDetailContent",
|
|
35
35
|
__name: "UserDetailContent",
|
|
36
36
|
props: {
|
|
@@ -61,18 +61,18 @@ var Te = {
|
|
|
61
61
|
key: 0,
|
|
62
62
|
class: "user-detail-state",
|
|
63
63
|
tip: "加载用户详情"
|
|
64
|
-
})) : e.loadFailed ? (O(), C("div",
|
|
64
|
+
})) : e.loadFailed ? (O(), C("div", we, [E(j(u), {
|
|
65
65
|
title: "详情加载失败",
|
|
66
66
|
message: "无法加载用户详情,请重试"
|
|
67
|
-
}), E(j(
|
|
67
|
+
}), E(j(o), {
|
|
68
68
|
type: "primary",
|
|
69
69
|
"icon-name": "reload",
|
|
70
70
|
onClick: i[0] ||= (e) => r("retry")
|
|
71
71
|
}, {
|
|
72
|
-
default:
|
|
72
|
+
default: N(() => [...i[4] ||= [T("重试", -1)]]),
|
|
73
73
|
_: 1
|
|
74
74
|
})])) : e.mode === "view" || e.mode === "create" || e.selectedUser ? (O(), C(y, { key: 2 }, [
|
|
75
|
-
e.mode === "view" ? (O(), x(j(
|
|
75
|
+
e.mode === "view" ? (O(), x(j(t), {
|
|
76
76
|
key: 0,
|
|
77
77
|
record: e.draft,
|
|
78
78
|
fields: e.fields,
|
|
@@ -84,24 +84,24 @@ var Te = {
|
|
|
84
84
|
"fallback",
|
|
85
85
|
"display-of"
|
|
86
86
|
])) : S("v-if", !0),
|
|
87
|
-
e.mode === "view" && e.resetPasswordResult?.temporaryPassword ? (O(), C("div",
|
|
87
|
+
e.mode === "view" && e.resetPasswordResult?.temporaryPassword ? (O(), C("div", Te, [
|
|
88
88
|
i[6] ||= w("span", null, "临时密码", -1),
|
|
89
|
-
E(j(
|
|
89
|
+
E(j(p), {
|
|
90
90
|
value: e.resetPasswordResult.temporaryPassword,
|
|
91
91
|
disabled: ""
|
|
92
92
|
}, null, 8, ["value"]),
|
|
93
|
-
e.resetPasswordResult.expiresAt ? (O(), C("small",
|
|
93
|
+
e.resetPasswordResult.expiresAt ? (O(), C("small", Ee, [i[5] ||= T(" 有效期至 ", -1), E(j(a), { value: e.resetPasswordResult.expiresAt }, null, 8, ["value"])])) : S("v-if", !0)
|
|
94
94
|
])) : S("v-if", !0),
|
|
95
95
|
e.mode === "view" ? S("v-if", !0) : (O(), C("form", {
|
|
96
96
|
key: 2,
|
|
97
97
|
class: "user-form",
|
|
98
|
-
onSubmit: i[3] ||=
|
|
98
|
+
onSubmit: i[3] ||= P((e) => r("save"), ["prevent"])
|
|
99
99
|
}, [
|
|
100
|
-
w("label", null, [i[7] ||= w("span", { class: "user-form-label" }, "当前租户", -1), E(j(
|
|
100
|
+
w("label", null, [i[7] ||= w("span", { class: "user-form-label" }, "当前租户", -1), E(j(p), {
|
|
101
101
|
value: e.tenantTitle,
|
|
102
102
|
disabled: ""
|
|
103
103
|
}, null, 8, ["value"])]),
|
|
104
|
-
e.mode === "resetPassword" ? S("v-if", !0) : (O(), x(j(
|
|
104
|
+
e.mode === "resetPassword" ? S("v-if", !0) : (O(), x(j(f), {
|
|
105
105
|
key: 0,
|
|
106
106
|
record: e.draft,
|
|
107
107
|
"field-names": e.fieldNames,
|
|
@@ -118,7 +118,7 @@ var Te = {
|
|
|
118
118
|
"disabled",
|
|
119
119
|
"disabled-of"
|
|
120
120
|
])),
|
|
121
|
-
e.mode === "create" || e.mode === "resetPassword" ? (O(), C("label",
|
|
121
|
+
e.mode === "create" || e.mode === "resetPassword" ? (O(), C("label", L, [w("span", De, A(e.mode === "create" ? "初始密码" : "新密码"), 1), E(j(p), {
|
|
122
122
|
value: e.password,
|
|
123
123
|
type: "password",
|
|
124
124
|
disabled: e.saving,
|
|
@@ -127,7 +127,7 @@ var Te = {
|
|
|
127
127
|
"onUpdate:value": i[2] ||= (e) => r("update:password", e)
|
|
128
128
|
}, null, 8, ["value", "disabled"])])) : S("v-if", !0)
|
|
129
129
|
], 32)),
|
|
130
|
-
e.mode !== "create" && e.mode !== "resetPassword" ? (O(), x(j(
|
|
130
|
+
e.mode !== "create" && e.mode !== "resetPassword" ? (O(), x(j(s), {
|
|
131
131
|
key: 3,
|
|
132
132
|
record: e.draft
|
|
133
133
|
}, null, 8, ["record"])) : S("v-if", !0)
|
|
@@ -136,7 +136,7 @@ var Te = {
|
|
|
136
136
|
}), [["__scopeId", "data-v-621edc75"]]);
|
|
137
137
|
//#endregion
|
|
138
138
|
//#region src/views/userDetailWorkspaceSession.ts
|
|
139
|
-
function
|
|
139
|
+
function ke(e, t) {
|
|
140
140
|
return _(m, e, {
|
|
141
141
|
...t,
|
|
142
142
|
selectedUser: { ...t.selectedUser },
|
|
@@ -144,45 +144,45 @@ function Ae(e, t) {
|
|
|
144
144
|
tenant: t.tenant ? { ...t.tenant } : void 0
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function Ae(e, t) {
|
|
148
148
|
return h(m, e, t);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function je(e) {
|
|
151
151
|
return g(m, e);
|
|
152
152
|
}
|
|
153
153
|
//#endregion
|
|
154
154
|
//#region src/views/userDetailStateModel.ts
|
|
155
|
-
function
|
|
155
|
+
function Me(e) {
|
|
156
156
|
return !e;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Ne(e) {
|
|
159
159
|
return e.activeRequestSeq === e.requestSeq && e.selectedUserKey === e.recordId;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function Pe(e) {
|
|
162
162
|
return e === "edit" ? "edit" : "view";
|
|
163
163
|
}
|
|
164
164
|
//#endregion
|
|
165
165
|
//#region src/views/UserManagementView.vue
|
|
166
|
-
var
|
|
166
|
+
var Fe = /*#__PURE__*/ i(/* @__PURE__ */ D({
|
|
167
167
|
name: "UserManagementView",
|
|
168
168
|
__name: "UserManagementView",
|
|
169
169
|
props: {
|
|
170
170
|
recordId: {},
|
|
171
171
|
mode: {}
|
|
172
172
|
},
|
|
173
|
-
setup(
|
|
174
|
-
let
|
|
175
|
-
context:
|
|
173
|
+
setup(t) {
|
|
174
|
+
let n = t, i = ie({ moduleAlias: "iam.tenant" }), a = ie({ moduleAlias: "iam.user" }), o = _e(), s = he(), c = k(""), u = k(0), f = k(0), p = k(), h = k(), g = k(), _ = k(!1), v = k("view"), y = k(!1), w = k(!1), T = k(!1), D = k(0), A = k(Y(void 0)), P = k(""), F = k(), I = k(re(void 0)), { expandedUserKeys: Ce, handleUserListLoaded: we, handleUserRowExpand: Te, handleUserSessionBusinessEvent: Ee, loadUserSessions: L, resetUserSessionRows: De, userOnlineStatusTitle: Fe, userSessionState: R } = ve({
|
|
175
|
+
context: a,
|
|
176
176
|
source: "user-management"
|
|
177
|
-
}),
|
|
178
|
-
let e =
|
|
179
|
-
if (!(
|
|
177
|
+
}), Ie = b(() => i), z = b(() => !!n.recordId), B = b(() => z.value && s?.presentation === "drawer"), Le = b(() => !z.value || B.value), V = b(() => o?.value?.system === !0), H = b(() => {
|
|
178
|
+
let e = o?.value?.tenantId;
|
|
179
|
+
if (!(o?.value?.system === !0 || !e)) return {
|
|
180
180
|
id: e,
|
|
181
181
|
title: e,
|
|
182
182
|
alias: e,
|
|
183
183
|
enabled: !0
|
|
184
184
|
};
|
|
185
|
-
}),
|
|
185
|
+
}), Re = b(() => et(a, p.value)), ze = b(() => [
|
|
186
186
|
{
|
|
187
187
|
key: "username",
|
|
188
188
|
title: "账号",
|
|
@@ -222,18 +222,18 @@ var Ie = /*#__PURE__*/ e(/* @__PURE__ */ D({
|
|
|
222
222
|
type: "datetime",
|
|
223
223
|
width: "180px"
|
|
224
224
|
}
|
|
225
|
-
]),
|
|
225
|
+
]), Be = b(() => !!p.value?.id), Ve = b(() => p.value ? `用户列表 - ${$(p.value)}` : "用户列表"), He = b(() => v.value === "create" ? "新建用户" : Q(g.value ?? A.value)), Ue = b(() => {
|
|
226
226
|
if (v.value !== "create") return Ot(g.value ?? A.value);
|
|
227
|
-
}),
|
|
227
|
+
}), U = b(() => {
|
|
228
228
|
if (y.value) return !1;
|
|
229
|
-
if (v.value === "create") return !!p.value?.id &&
|
|
230
|
-
if (v.value === "edit") return !!g.value?.id &&
|
|
229
|
+
if (v.value === "create") return !!p.value?.id && a.can("create") === !0;
|
|
230
|
+
if (v.value === "edit") return !!g.value?.id && a.can("update") === !0;
|
|
231
231
|
if (v.value === "resetPassword") {
|
|
232
232
|
let e = g.value?.id;
|
|
233
|
-
return !!e &&
|
|
233
|
+
return !!e && a.can("changePassword", e) === !0;
|
|
234
234
|
}
|
|
235
235
|
return !1;
|
|
236
|
-
}),
|
|
236
|
+
}), We = b(() => !g.value?.id || y.value ? !1 : a.can(Dt(g.value)) === !0), Ge = b(() => v.value === "view" ? g.value?.id ? [
|
|
237
237
|
{
|
|
238
238
|
key: "edit",
|
|
239
239
|
actionCode: "update",
|
|
@@ -275,7 +275,7 @@ var Ie = /*#__PURE__*/ e(/* @__PURE__ */ D({
|
|
|
275
275
|
iconName: "save",
|
|
276
276
|
primary: !0,
|
|
277
277
|
loading: T.value,
|
|
278
|
-
disabled: !
|
|
278
|
+
disabled: !U.value
|
|
279
279
|
}]), Ke = b(() => Ge.value), qe = b(() => v.value === "view" ? g.value?.id ? [{
|
|
280
280
|
key: "edit",
|
|
281
281
|
actionCode: "update",
|
|
@@ -294,35 +294,35 @@ var Ie = /*#__PURE__*/ e(/* @__PURE__ */ D({
|
|
|
294
294
|
iconName: "save",
|
|
295
295
|
primary: !0,
|
|
296
296
|
loading: T.value,
|
|
297
|
-
disabled: !
|
|
298
|
-
}] : []), Je =
|
|
297
|
+
disabled: !U.value
|
|
298
|
+
}] : []), Je = me({
|
|
299
299
|
view: m,
|
|
300
300
|
input: b(() => {
|
|
301
301
|
let e = g.value?.id, t = v.value;
|
|
302
302
|
return e && (t === "view" || t === "edit") ? { recordId: e } : void 0;
|
|
303
303
|
}),
|
|
304
|
-
title: b(() =>
|
|
304
|
+
title: b(() => Q(g.value)),
|
|
305
305
|
eligibility: b(() => ({
|
|
306
306
|
hasStableIdentity: !!g.value?.id && !y.value,
|
|
307
307
|
busy: T.value
|
|
308
308
|
})),
|
|
309
309
|
beforePromote: async (e) => {
|
|
310
310
|
let t = g.value;
|
|
311
|
-
if (t) return await
|
|
311
|
+
if (t) return await ke(e, {
|
|
312
312
|
selectedUser: t,
|
|
313
313
|
draft: A.value,
|
|
314
314
|
tenant: p.value,
|
|
315
315
|
mode: v.value === "edit" ? "edit" : "view",
|
|
316
|
-
password:
|
|
317
|
-
resetPasswordResult:
|
|
316
|
+
password: P.value,
|
|
317
|
+
resetPasswordResult: F.value
|
|
318
318
|
}) === "accepted";
|
|
319
319
|
},
|
|
320
|
-
onPromoted:
|
|
320
|
+
onPromoted: G
|
|
321
321
|
});
|
|
322
|
-
|
|
323
|
-
!
|
|
322
|
+
M(g, (e) => {
|
|
323
|
+
!z.value || !e || s?.setTitle(Q(e));
|
|
324
324
|
}, { immediate: !0 });
|
|
325
|
-
let
|
|
325
|
+
let Ye = b(() => ({
|
|
326
326
|
username: {
|
|
327
327
|
label: "账号",
|
|
328
328
|
required: !0,
|
|
@@ -334,45 +334,45 @@ var Ie = /*#__PURE__*/ e(/* @__PURE__ */ D({
|
|
|
334
334
|
visible: !0,
|
|
335
335
|
controlType: "enabledStatus"
|
|
336
336
|
}
|
|
337
|
-
})),
|
|
337
|
+
})), Xe = b(() => ["username", "enabled"]), Ze;
|
|
338
338
|
xe(() => {
|
|
339
|
-
if (
|
|
340
|
-
let e = { recordId:
|
|
341
|
-
|
|
342
|
-
let
|
|
343
|
-
if (
|
|
344
|
-
|
|
339
|
+
if ($e(), n.recordId) {
|
|
340
|
+
let e = { recordId: n.recordId };
|
|
341
|
+
B.value || (Ze = Ae(e, Qe));
|
|
342
|
+
let t = je(e);
|
|
343
|
+
if (t) {
|
|
344
|
+
bt(t);
|
|
345
345
|
return;
|
|
346
346
|
}
|
|
347
|
-
|
|
347
|
+
W({ id: n.recordId }, n.mode ?? "view");
|
|
348
348
|
}
|
|
349
|
-
}), be(() =>
|
|
350
|
-
function
|
|
351
|
-
return v.value === "view" ? (
|
|
349
|
+
}), be(() => Ze?.());
|
|
350
|
+
function Qe(e) {
|
|
351
|
+
return v.value === "view" ? (bt(e), !0) : !1;
|
|
352
352
|
}
|
|
353
|
-
ge(
|
|
354
|
-
|
|
353
|
+
ge(Ee), M(H, rt, { immediate: !0 }), M(p, () => {
|
|
354
|
+
z.value || (h.value = void 0, g.value = void 0, De(), A.value = Y(p.value), G(), f.value += 1);
|
|
355
355
|
});
|
|
356
|
-
async function
|
|
356
|
+
async function $e() {
|
|
357
357
|
try {
|
|
358
|
-
|
|
359
|
-
} catch (
|
|
360
|
-
|
|
358
|
+
I.value = re((await a.runtime.ready).uiDescriptor);
|
|
359
|
+
} catch (t) {
|
|
360
|
+
e(t, {
|
|
361
361
|
source: "user-management",
|
|
362
362
|
phase: "load"
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function et(e, t) {
|
|
367
367
|
return {
|
|
368
368
|
...e,
|
|
369
369
|
crud: {
|
|
370
370
|
...e.crud,
|
|
371
|
-
query: (n) => e.crud.query(
|
|
371
|
+
query: (n) => e.crud.query(tt(n, t))
|
|
372
372
|
}
|
|
373
373
|
};
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function tt(e, t) {
|
|
376
376
|
let n = [...e?.conditions ?? []];
|
|
377
377
|
return t?.id && n.push({
|
|
378
378
|
fieldName: "tenantId",
|
|
@@ -383,333 +383,333 @@ var Ie = /*#__PURE__*/ e(/* @__PURE__ */ D({
|
|
|
383
383
|
conditions: n
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
|
-
function
|
|
387
|
-
!
|
|
388
|
-
}
|
|
389
|
-
function nt(e = V.value) {
|
|
390
|
-
R.value || !e || B.value || p.value || (p.value = e);
|
|
386
|
+
function nt(e) {
|
|
387
|
+
!V.value || p.value || e.length > 0 && it(e[0]);
|
|
391
388
|
}
|
|
392
|
-
function rt(e) {
|
|
393
|
-
|
|
389
|
+
function rt(e = H.value) {
|
|
390
|
+
z.value || !e || V.value || p.value || (p.value = e);
|
|
394
391
|
}
|
|
395
392
|
function it(e) {
|
|
396
|
-
|
|
393
|
+
K() && (p.value = e);
|
|
394
|
+
}
|
|
395
|
+
function at(e) {
|
|
396
|
+
e.key === "create" && ct();
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
if (
|
|
398
|
+
function ot(e, t) {
|
|
399
|
+
if (K()) {
|
|
400
400
|
if (e.key === "view") {
|
|
401
|
-
|
|
401
|
+
W(t, "view");
|
|
402
402
|
return;
|
|
403
403
|
}
|
|
404
404
|
if (e.key === "edit") {
|
|
405
|
-
|
|
405
|
+
W(t, "edit");
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
|
-
e.key === "delete" &&
|
|
408
|
+
e.key === "delete" && yt(t);
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
function
|
|
412
|
-
|
|
411
|
+
function st(e) {
|
|
412
|
+
K() && W(e, "view");
|
|
413
413
|
}
|
|
414
|
-
function
|
|
415
|
-
if (
|
|
414
|
+
function ct() {
|
|
415
|
+
if (K()) {
|
|
416
416
|
if (!p.value?.id) {
|
|
417
|
-
|
|
417
|
+
d("请先选择租户", { phase: "validation" });
|
|
418
418
|
return;
|
|
419
419
|
}
|
|
420
|
-
g.value = void 0, h.value = void 0, A.value =
|
|
420
|
+
g.value = void 0, h.value = void 0, A.value = Y(p.value), P.value = "", v.value = "create", y.value = !1, w.value = !1, D.value += 1, _.value = !0;
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
async function
|
|
424
|
-
if (!
|
|
425
|
-
let
|
|
426
|
-
if (!
|
|
427
|
-
h.value =
|
|
428
|
-
let
|
|
429
|
-
D.value =
|
|
423
|
+
async function W(t, n) {
|
|
424
|
+
if (!K()) return;
|
|
425
|
+
let r = String(t.id ?? "");
|
|
426
|
+
if (!r) return;
|
|
427
|
+
h.value = r, _.value = !0, v.value = n, g.value = void 0, A.value = X(t), P.value = "", F.value = void 0, y.value = !0, w.value = !1;
|
|
428
|
+
let i = D.value + 1;
|
|
429
|
+
D.value = i;
|
|
430
430
|
try {
|
|
431
|
-
let e = await
|
|
432
|
-
if (!
|
|
431
|
+
let e = await a.crud.view(r);
|
|
432
|
+
if (!q(r, i)) return;
|
|
433
433
|
if (!e?.id) {
|
|
434
|
-
w.value = !0,
|
|
434
|
+
w.value = !0, d("未找到指定用户", {
|
|
435
435
|
source: "user-management",
|
|
436
436
|
phase: "load"
|
|
437
437
|
});
|
|
438
438
|
return;
|
|
439
439
|
}
|
|
440
|
-
let
|
|
441
|
-
if (!
|
|
442
|
-
|
|
440
|
+
let t = await lt(r);
|
|
441
|
+
if (!q(r, i)) return;
|
|
442
|
+
J({
|
|
443
443
|
...e,
|
|
444
|
-
...
|
|
445
|
-
},
|
|
446
|
-
} catch (
|
|
447
|
-
|
|
444
|
+
...t
|
|
445
|
+
}, n);
|
|
446
|
+
} catch (t) {
|
|
447
|
+
q(r, i) && (w.value = !0, e(t, {
|
|
448
448
|
source: "user-management",
|
|
449
449
|
phase: "load"
|
|
450
450
|
}));
|
|
451
451
|
} finally {
|
|
452
|
-
|
|
452
|
+
q(r, i) && (y.value = !1);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
function
|
|
456
|
-
return
|
|
455
|
+
function lt(e) {
|
|
456
|
+
return Se().request({ path: `/iam.user/${encodeURIComponent(e)}/employee-binding` });
|
|
457
457
|
}
|
|
458
|
-
function
|
|
459
|
-
T.value || (D.value += 1, y.value = !1, w.value = !1, _.value = !1, v.value = "view",
|
|
458
|
+
function G() {
|
|
459
|
+
T.value || (D.value += 1, y.value = !1, w.value = !1, _.value = !1, v.value = "view", P.value = "", F.value = void 0, A.value = g.value ? X(g.value) : Y(p.value), B.value && s?.dismiss());
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function ut() {
|
|
462
462
|
if (!T.value) {
|
|
463
463
|
if (!g.value?.id || v.value === "create") {
|
|
464
|
-
|
|
464
|
+
G();
|
|
465
465
|
return;
|
|
466
466
|
}
|
|
467
|
-
A.value =
|
|
467
|
+
A.value = X(g.value), P.value = "", F.value = void 0, v.value = "view", y.value = !1, w.value = !1;
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function dt(e) {
|
|
471
471
|
if (e.key === "cancel") {
|
|
472
|
-
|
|
472
|
+
ut();
|
|
473
473
|
return;
|
|
474
474
|
}
|
|
475
475
|
if (e.key === "save") {
|
|
476
|
-
|
|
476
|
+
pt();
|
|
477
477
|
return;
|
|
478
478
|
}
|
|
479
|
-
if (
|
|
479
|
+
if (K()) {
|
|
480
480
|
if (e.key === "edit" && g.value) {
|
|
481
|
-
A.value =
|
|
481
|
+
A.value = X(g.value), v.value = "edit";
|
|
482
482
|
return;
|
|
483
483
|
}
|
|
484
484
|
if (e.key === "resetPassword" && g.value) {
|
|
485
|
-
|
|
485
|
+
P.value = "", F.value = void 0, v.value = "resetPassword";
|
|
486
486
|
return;
|
|
487
487
|
}
|
|
488
488
|
if (e.key === "resetGeneratedPassword" && g.value) {
|
|
489
|
-
|
|
489
|
+
ht();
|
|
490
490
|
return;
|
|
491
491
|
}
|
|
492
|
-
e.key === "delete" &&
|
|
492
|
+
e.key === "delete" && yt(g.value);
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function ft() {
|
|
496
496
|
let e = String(A.value.id ?? h.value ?? "");
|
|
497
497
|
if (!e) return;
|
|
498
498
|
let t = v.value === "create" ? "view" : v.value;
|
|
499
|
-
|
|
499
|
+
W({
|
|
500
500
|
...A.value,
|
|
501
501
|
id: e
|
|
502
502
|
}, t);
|
|
503
503
|
}
|
|
504
|
-
async function
|
|
504
|
+
async function pt() {
|
|
505
505
|
if (v.value === "resetPassword") {
|
|
506
|
-
await
|
|
506
|
+
await mt();
|
|
507
507
|
return;
|
|
508
508
|
}
|
|
509
|
-
await
|
|
509
|
+
await fe({
|
|
510
510
|
loading: T,
|
|
511
511
|
mode: v.value === "edit" ? "edit" : "create",
|
|
512
512
|
source: "user-management",
|
|
513
513
|
validateContext: () => v.value === "create" && !p.value?.id ? "请先选择租户" : void 0,
|
|
514
|
-
canSave: () =>
|
|
514
|
+
canSave: () => U.value,
|
|
515
515
|
deniedMessage: "当前用户无权保存用户",
|
|
516
|
-
createRecord: () =>
|
|
517
|
-
validateRecord:
|
|
518
|
-
save: (e, t) => t === "edit" && g.value?.id ?
|
|
516
|
+
createRecord: () => Ct(A.value, p.value, v.value, P.value),
|
|
517
|
+
validateRecord: wt,
|
|
518
|
+
save: (e, t) => t === "edit" && g.value?.id ? a.crud.update(g.value.id, e) : a.crud.insert(e),
|
|
519
519
|
onSaved: ({ record: e }) => {
|
|
520
|
-
|
|
520
|
+
J(e), f.value += 1;
|
|
521
521
|
}
|
|
522
522
|
});
|
|
523
523
|
}
|
|
524
|
-
async function
|
|
525
|
-
await
|
|
524
|
+
async function mt() {
|
|
525
|
+
await l({
|
|
526
526
|
loading: T,
|
|
527
527
|
source: "user-management",
|
|
528
528
|
record: () => g.value?.id ? g.value : void 0,
|
|
529
|
-
canExecute: () =>
|
|
529
|
+
canExecute: () => U.value,
|
|
530
530
|
deniedMessage: "当前用户无权重置用户密码",
|
|
531
|
-
execute: (e) =>
|
|
531
|
+
execute: (e) => a.http.request({
|
|
532
532
|
method: "POST",
|
|
533
533
|
path: `/iam.user/changePassword/${encodeURIComponent(e.id)}`,
|
|
534
|
-
body: { password:
|
|
534
|
+
body: { password: P.value }
|
|
535
535
|
}),
|
|
536
536
|
onExecuted: async (e, t) => {
|
|
537
|
-
|
|
537
|
+
J(await a.crud.view(t.id)), f.value += 1;
|
|
538
538
|
}
|
|
539
539
|
});
|
|
540
540
|
}
|
|
541
|
-
async function
|
|
542
|
-
await
|
|
541
|
+
async function ht() {
|
|
542
|
+
await l({
|
|
543
543
|
loading: T,
|
|
544
544
|
source: "user-management",
|
|
545
545
|
record: () => g.value?.id ? g.value : void 0,
|
|
546
|
-
canExecute: (e) =>
|
|
546
|
+
canExecute: (e) => a.can("resetPassword", e.id) === !0,
|
|
547
547
|
deniedMessage: "当前用户无权重置用户密码",
|
|
548
|
-
execute: (e) =>
|
|
548
|
+
execute: (e) => a.http.request({
|
|
549
549
|
method: "POST",
|
|
550
550
|
path: `/iam.user/resetPassword/${encodeURIComponent(e.id)}`
|
|
551
551
|
}),
|
|
552
552
|
onExecuted: async (e, t) => {
|
|
553
|
-
|
|
553
|
+
J(await a.crud.view(t.id)), F.value = e, f.value += 1;
|
|
554
554
|
}
|
|
555
555
|
});
|
|
556
556
|
}
|
|
557
|
-
async function
|
|
558
|
-
await
|
|
557
|
+
async function gt(e, t) {
|
|
558
|
+
await l({
|
|
559
559
|
loading: T,
|
|
560
560
|
source: "user-management",
|
|
561
561
|
record: () => e?.id ? e : void 0,
|
|
562
|
-
canExecute: (e) =>
|
|
562
|
+
canExecute: (e) => a.can("revokeSession", e.id) === !0 && !t.current,
|
|
563
563
|
deniedMessage: "当前用户无权下线该登录会话",
|
|
564
|
-
confirm: (e) =>
|
|
564
|
+
confirm: (e) => se({
|
|
565
565
|
title: "下线登录会话",
|
|
566
|
-
content: `确认下线用户「${
|
|
566
|
+
content: `确认下线用户「${Z(e)}」的该登录会话?`,
|
|
567
567
|
okText: "下线",
|
|
568
568
|
danger: !0
|
|
569
569
|
}),
|
|
570
|
-
execute: (e) =>
|
|
570
|
+
execute: (e) => a.http.request({
|
|
571
571
|
method: "POST",
|
|
572
572
|
path: `/iam.user/${encodeURIComponent(e.id)}/sessions/${encodeURIComponent(t.id)}/revoke`
|
|
573
573
|
}),
|
|
574
574
|
onExecuted: (e, t) => {
|
|
575
|
-
|
|
575
|
+
L(t.id), f.value += 1;
|
|
576
576
|
}
|
|
577
577
|
});
|
|
578
578
|
}
|
|
579
|
-
async function
|
|
580
|
-
let t =
|
|
579
|
+
async function _t(e) {
|
|
580
|
+
let t = xt(String(e.id ?? "")).map((e) => e.id);
|
|
581
581
|
if (t.length === 0) {
|
|
582
|
-
|
|
582
|
+
d("当前没有可下线的登录会话", {
|
|
583
583
|
source: "user-management",
|
|
584
584
|
phase: "validation"
|
|
585
585
|
});
|
|
586
586
|
return;
|
|
587
587
|
}
|
|
588
|
-
await
|
|
588
|
+
await l({
|
|
589
589
|
loading: T,
|
|
590
590
|
source: "user-management",
|
|
591
591
|
record: () => e?.id ? e : void 0,
|
|
592
|
-
canExecute: (e) =>
|
|
592
|
+
canExecute: (e) => a.can("revokeSessions", e.id) === !0,
|
|
593
593
|
deniedMessage: "当前用户无权批量下线登录会话",
|
|
594
|
-
confirm: (e) =>
|
|
594
|
+
confirm: (e) => se({
|
|
595
595
|
title: "批量下线登录会话",
|
|
596
|
-
content: `确认下线用户「${
|
|
596
|
+
content: `确认下线用户「${Z(e)}」的 ${t.length} 个登录会话?`,
|
|
597
597
|
okText: "全部下线",
|
|
598
598
|
danger: !0
|
|
599
599
|
}),
|
|
600
|
-
execute: (e) =>
|
|
600
|
+
execute: (e) => a.http.request({
|
|
601
601
|
method: "POST",
|
|
602
602
|
path: `/iam.user/${encodeURIComponent(e.id)}/sessions/revoke`,
|
|
603
603
|
body: { sessionIds: t }
|
|
604
604
|
}),
|
|
605
605
|
onExecuted: (e, t) => {
|
|
606
|
-
|
|
606
|
+
L(t.id), f.value += 1;
|
|
607
607
|
}
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
|
-
async function
|
|
611
|
-
await
|
|
610
|
+
async function vt() {
|
|
611
|
+
await l({
|
|
612
612
|
loading: T,
|
|
613
613
|
source: "user-management",
|
|
614
614
|
record: () => g.value?.id ? g.value : void 0,
|
|
615
|
-
canExecute: () =>
|
|
615
|
+
canExecute: () => We.value,
|
|
616
616
|
deniedMessage: "当前用户无权变更用户启停状态",
|
|
617
|
-
execute: (e) => e.enabled === !1 ?
|
|
617
|
+
execute: (e) => e.enabled === !1 ? a.crud.enable(e.id, { version: e.version }) : a.crud.disable(e.id, { version: e.version }),
|
|
618
618
|
onExecuted: async (e, t) => {
|
|
619
|
-
|
|
619
|
+
J(await a.crud.view(t.id)), f.value += 1;
|
|
620
620
|
}
|
|
621
621
|
});
|
|
622
622
|
}
|
|
623
|
-
async function
|
|
624
|
-
await
|
|
623
|
+
async function yt(e) {
|
|
624
|
+
await l({
|
|
625
625
|
loading: T,
|
|
626
626
|
source: "user-management",
|
|
627
627
|
record: () => e?.id ? e : void 0,
|
|
628
|
-
canExecute: () =>
|
|
628
|
+
canExecute: () => a.can("delete") === !0,
|
|
629
629
|
deniedMessage: "当前用户无权删除用户",
|
|
630
|
-
confirm: (e) =>
|
|
630
|
+
confirm: (e) => se({
|
|
631
631
|
title: "删除用户",
|
|
632
|
-
content: `确认删除用户「${
|
|
632
|
+
content: `确认删除用户「${Z(e)}」?`,
|
|
633
633
|
okText: "删除",
|
|
634
634
|
danger: !0
|
|
635
635
|
}),
|
|
636
|
-
execute: (e) =>
|
|
636
|
+
execute: (e) => a.crud.delete(String(e.id), { version: e.version }),
|
|
637
637
|
onExecuted: (e, t) => {
|
|
638
|
-
h.value === String(t.id) && (h.value = void 0, g.value = void 0, A.value =
|
|
638
|
+
h.value === String(t.id) && (h.value = void 0, g.value = void 0, A.value = Y(p.value), _.value = !1, v.value = "view", y.value = !1, w.value = !1, D.value += 1), f.value += 1;
|
|
639
639
|
}
|
|
640
640
|
});
|
|
641
641
|
}
|
|
642
|
-
function
|
|
643
|
-
return
|
|
642
|
+
function K() {
|
|
643
|
+
return Me(T.value);
|
|
644
644
|
}
|
|
645
|
-
function
|
|
646
|
-
return
|
|
645
|
+
function q(e, t) {
|
|
646
|
+
return Ne({
|
|
647
647
|
activeRequestSeq: D.value,
|
|
648
648
|
requestSeq: t,
|
|
649
649
|
selectedUserKey: h.value,
|
|
650
650
|
recordId: e
|
|
651
651
|
});
|
|
652
652
|
}
|
|
653
|
-
function
|
|
654
|
-
return g.value = e, h.value = e.id, A.value =
|
|
655
|
-
}
|
|
656
|
-
function yt(e) {
|
|
657
|
-
g.value = e.selectedUser, h.value = e.selectedUser.id, p.value = e.tenant, A.value = e.draft, v.value = e.mode, N.value = e.password, P.value = e.resetPasswordResult, _.value = !0, y.value = !1, w.value = !1, D.value += 1;
|
|
653
|
+
function J(e, t = "view") {
|
|
654
|
+
return g.value = e, h.value = e.id, A.value = X(e), P.value = "", v.value = Pe(t), _.value = !0, y.value = !1, w.value = !1, D.value += 1, D.value;
|
|
658
655
|
}
|
|
659
656
|
function bt(e) {
|
|
660
|
-
|
|
657
|
+
g.value = e.selectedUser, h.value = e.selectedUser.id, p.value = e.tenant, A.value = e.draft, v.value = e.mode, P.value = e.password, F.value = e.resetPasswordResult, _.value = !0, y.value = !1, w.value = !1, D.value += 1;
|
|
661
658
|
}
|
|
662
|
-
function xt(e
|
|
663
|
-
return
|
|
659
|
+
function xt(e) {
|
|
660
|
+
return !e || a.can("revokeSession", e) !== !0 ? [] : R(e).records.filter((e) => !e.current);
|
|
664
661
|
}
|
|
665
|
-
function
|
|
662
|
+
function St(e, t) {
|
|
663
|
+
return !!e && !t.current && a.can("revokeSession", e) === !0;
|
|
664
|
+
}
|
|
665
|
+
function Y(e) {
|
|
666
666
|
return {
|
|
667
667
|
tenantId: e?.id,
|
|
668
668
|
enabled: !0
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function X(e) {
|
|
672
672
|
return {
|
|
673
673
|
...e,
|
|
674
674
|
password: void 0
|
|
675
675
|
};
|
|
676
676
|
}
|
|
677
|
-
function
|
|
678
|
-
return
|
|
677
|
+
function Ct(e, t, n, r) {
|
|
678
|
+
return ce(e, {
|
|
679
679
|
tenantId: t?.id ?? e.tenantId,
|
|
680
680
|
username: e.username?.trim(),
|
|
681
681
|
enabled: e.enabled !== !1,
|
|
682
682
|
password: n === "create" ? r.trim() : void 0
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function wt(e) {
|
|
686
686
|
for (let t of ["username"]) {
|
|
687
|
-
let n =
|
|
688
|
-
fields:
|
|
689
|
-
fallback:
|
|
687
|
+
let n = ne(t, {
|
|
688
|
+
fields: I.value,
|
|
689
|
+
fallback: Ye.value
|
|
690
690
|
});
|
|
691
691
|
if (n.visible && n.required && !e[t]) return `请填写${n.label}`;
|
|
692
692
|
}
|
|
693
693
|
if (v.value === "create" && !e.password) return "请填写初始密码";
|
|
694
|
-
if (v.value === "resetPassword" && !
|
|
694
|
+
if (v.value === "resetPassword" && !P.value.trim()) return "请填写新密码";
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function Tt(e) {
|
|
697
697
|
return e === "username" && v.value === "edit";
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function Et(e, t) {
|
|
700
700
|
A.value = {
|
|
701
701
|
...A.value,
|
|
702
702
|
[e]: t
|
|
703
703
|
};
|
|
704
704
|
}
|
|
705
|
-
function
|
|
705
|
+
function Dt(e) {
|
|
706
706
|
return e.enabled === !1 ? "enable" : "disable";
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function Z(e) {
|
|
709
709
|
return String(e?.username ?? e?.id ?? "用户");
|
|
710
710
|
}
|
|
711
|
-
function
|
|
712
|
-
return
|
|
711
|
+
function Q(e) {
|
|
712
|
+
return Z(e);
|
|
713
713
|
}
|
|
714
714
|
function Ot(e) {
|
|
715
715
|
let t = String(e?.employeeTitle ?? "").trim();
|
|
@@ -726,40 +726,40 @@ var Ie = /*#__PURE__*/ e(/* @__PURE__ */ D({
|
|
|
726
726
|
muted: e.enabled === !1
|
|
727
727
|
};
|
|
728
728
|
}
|
|
729
|
-
return (e, t) => (O(), C("section", { class: ye(["user-management-page", { "user-management-page--task":
|
|
730
|
-
!
|
|
729
|
+
return (e, t) => (O(), C("section", { class: ye(["user-management-page", { "user-management-page--task": z.value && !B.value }]) }, [
|
|
730
|
+
!z.value || B.value ? (O(), x(j(r), {
|
|
731
731
|
key: 0,
|
|
732
732
|
class: "user-scope-panel",
|
|
733
733
|
title: "租户",
|
|
734
734
|
"refresh-title": "刷新租户列表",
|
|
735
|
-
"search-keyword":
|
|
735
|
+
"search-keyword": c.value,
|
|
736
736
|
"search-placeholder": "搜索租户名称、alias 或 ID",
|
|
737
|
-
searchable:
|
|
738
|
-
onRefresh: t[2] ||= (e) =>
|
|
739
|
-
"onUpdate:searchKeyword": t[3] ||= (e) =>
|
|
737
|
+
searchable: V.value,
|
|
738
|
+
onRefresh: t[2] ||= (e) => V.value ? u.value += 1 : rt(),
|
|
739
|
+
"onUpdate:searchKeyword": t[3] ||= (e) => c.value = e
|
|
740
740
|
}, {
|
|
741
|
-
default:
|
|
741
|
+
default: N(() => [!V.value && H.value ? (O(), C("button", {
|
|
742
742
|
key: 0,
|
|
743
743
|
class: "user-scope-entry",
|
|
744
744
|
type: "button",
|
|
745
|
-
onClick: t[0] ||= (e) =>
|
|
746
|
-
}, [E(j(
|
|
747
|
-
title: $(
|
|
745
|
+
onClick: t[0] ||= (e) => it(H.value)
|
|
746
|
+
}, [E(j(le), {
|
|
747
|
+
title: $(H.value),
|
|
748
748
|
secondary: "当前租户",
|
|
749
749
|
clickable: "",
|
|
750
|
-
selected: p.value?.id ===
|
|
751
|
-
}, null, 8, ["title", "selected"])])) : S("v-if", !0),
|
|
750
|
+
selected: p.value?.id === H.value.id
|
|
751
|
+
}, null, 8, ["title", "selected"])])) : S("v-if", !0), V.value ? (O(), x(j(de), {
|
|
752
752
|
key: 1,
|
|
753
|
-
context:
|
|
753
|
+
context: Ie.value,
|
|
754
754
|
"selected-id": p.value?.id,
|
|
755
|
-
"reload-key":
|
|
756
|
-
keyword:
|
|
755
|
+
"reload-key": u.value,
|
|
756
|
+
keyword: c.value,
|
|
757
757
|
"empty-description": "暂无租户",
|
|
758
758
|
"loading-tip": "加载租户列表",
|
|
759
759
|
"fallback-title": "未命名租户",
|
|
760
760
|
"item-of": At,
|
|
761
|
-
onLoaded:
|
|
762
|
-
onSelect: t[1] ||= (e) =>
|
|
761
|
+
onLoaded: nt,
|
|
762
|
+
onSelect: t[1] ||= (e) => it(e)
|
|
763
763
|
}, null, 8, [
|
|
764
764
|
"context",
|
|
765
765
|
"selected-id",
|
|
@@ -768,39 +768,39 @@ var Ie = /*#__PURE__*/ e(/* @__PURE__ */ D({
|
|
|
768
768
|
])) : S("v-if", !0)]),
|
|
769
769
|
_: 1
|
|
770
770
|
}, 8, ["search-keyword", "searchable"])) : S("v-if", !0),
|
|
771
|
-
!
|
|
771
|
+
!z.value || B.value ? (O(), x(j(ue), {
|
|
772
772
|
key: 1,
|
|
773
773
|
class: "user-list-panel",
|
|
774
|
-
context:
|
|
775
|
-
title:
|
|
776
|
-
columns:
|
|
774
|
+
context: Re.value,
|
|
775
|
+
title: Ve.value,
|
|
776
|
+
columns: ze.value,
|
|
777
777
|
"standard-crud-actions": "",
|
|
778
778
|
"standard-crud-row-actions": "",
|
|
779
779
|
"selected-key": h.value,
|
|
780
|
-
"expanded-row-keys": j(
|
|
781
|
-
"cell-renderers": { onlineStatus: j(
|
|
780
|
+
"expanded-row-keys": j(Ce),
|
|
781
|
+
"cell-renderers": { onlineStatus: j(Fe) },
|
|
782
782
|
"reload-key": f.value,
|
|
783
|
-
ready:
|
|
783
|
+
ready: Be.value,
|
|
784
784
|
"quick-search-placeholder": "搜索账号",
|
|
785
785
|
"empty-description": "当前租户暂无账号",
|
|
786
786
|
"waiting-description": "请选择租户",
|
|
787
|
-
onAction:
|
|
788
|
-
onRowAction:
|
|
789
|
-
onRowDblclick:
|
|
790
|
-
onRowExpand: j(
|
|
791
|
-
onLoaded: j(
|
|
787
|
+
onAction: at,
|
|
788
|
+
onRowAction: ot,
|
|
789
|
+
onRowDblclick: st,
|
|
790
|
+
onRowExpand: j(Te),
|
|
791
|
+
onLoaded: j(we),
|
|
792
792
|
onSelect: t[4] ||= (e) => h.value = String(e.id ?? "")
|
|
793
793
|
}, {
|
|
794
|
-
expandedRow:
|
|
795
|
-
sessions: j(
|
|
796
|
-
loading: j(
|
|
797
|
-
error: j(
|
|
794
|
+
expandedRow: N(({ record: e }) => [E(j(pe), {
|
|
795
|
+
sessions: j(R)(String(e.id ?? "")).records,
|
|
796
|
+
loading: j(R)(String(e.id ?? "")).loading,
|
|
797
|
+
error: j(R)(String(e.id ?? "")).error,
|
|
798
798
|
"actions-disabled": T.value,
|
|
799
|
-
"can-revoke": (t) =>
|
|
800
|
-
"can-revoke-all":
|
|
801
|
-
onRefresh: (t) => j(
|
|
802
|
-
onRevoke: (t) =>
|
|
803
|
-
onRevokeAll: (t) =>
|
|
799
|
+
"can-revoke": (t) => St(String(e.id ?? ""), t),
|
|
800
|
+
"can-revoke-all": xt(String(e.id ?? "")).length > 1,
|
|
801
|
+
onRefresh: (t) => j(L)(String(e.id ?? "")),
|
|
802
|
+
onRevoke: (t) => gt(e, t),
|
|
803
|
+
onRevokeAll: (t) => _t(e)
|
|
804
804
|
}, null, 8, [
|
|
805
805
|
"sessions",
|
|
806
806
|
"loading",
|
|
@@ -825,38 +825,38 @@ var Ie = /*#__PURE__*/ e(/* @__PURE__ */ D({
|
|
|
825
825
|
"onRowExpand",
|
|
826
826
|
"onLoaded"
|
|
827
827
|
])) : S("v-if", !0),
|
|
828
|
-
|
|
828
|
+
Le.value ? (O(), x(j(ee), {
|
|
829
829
|
key: 2,
|
|
830
830
|
open: _.value,
|
|
831
|
-
title:
|
|
832
|
-
subtitle:
|
|
831
|
+
title: He.value,
|
|
832
|
+
subtitle: Ue.value,
|
|
833
833
|
"close-on-outside": v.value === "view",
|
|
834
834
|
promotion: j(Je),
|
|
835
|
-
onClose:
|
|
835
|
+
onClose: G
|
|
836
836
|
}, {
|
|
837
|
-
status:
|
|
837
|
+
status: N(() => [v.value === "view" && g.value ? (O(), x(j(oe), {
|
|
838
838
|
key: 0,
|
|
839
839
|
enabled: g.value.enabled !== !1,
|
|
840
|
-
disabled: T.value || !
|
|
840
|
+
disabled: T.value || !We.value,
|
|
841
841
|
loading: T.value,
|
|
842
842
|
"show-label": !1,
|
|
843
|
-
onChange:
|
|
843
|
+
onChange: vt
|
|
844
844
|
}, null, 8, [
|
|
845
845
|
"enabled",
|
|
846
846
|
"disabled",
|
|
847
847
|
"loading"
|
|
848
848
|
])) : S("v-if", !0)]),
|
|
849
|
-
operation:
|
|
850
|
-
context:
|
|
849
|
+
operation: N(() => [E(j(te), {
|
|
850
|
+
context: Re.value,
|
|
851
851
|
actions: Ke.value,
|
|
852
852
|
"record-id": g.value?.id,
|
|
853
|
-
onAction:
|
|
853
|
+
onAction: dt
|
|
854
854
|
}, null, 8, [
|
|
855
855
|
"context",
|
|
856
856
|
"actions",
|
|
857
857
|
"record-id"
|
|
858
858
|
])]),
|
|
859
|
-
default:
|
|
859
|
+
default: N(() => [E(Oe, {
|
|
860
860
|
mode: v.value,
|
|
861
861
|
draft: A.value,
|
|
862
862
|
"selected-user": g.value,
|
|
@@ -864,17 +864,17 @@ var Ie = /*#__PURE__*/ e(/* @__PURE__ */ D({
|
|
|
864
864
|
"load-failed": w.value,
|
|
865
865
|
saving: T.value || y.value,
|
|
866
866
|
"tenant-title": $(p.value),
|
|
867
|
-
fields:
|
|
868
|
-
fallback:
|
|
869
|
-
"field-names":
|
|
870
|
-
password:
|
|
871
|
-
"reset-password-result":
|
|
867
|
+
fields: I.value,
|
|
868
|
+
fallback: Ye.value,
|
|
869
|
+
"field-names": Xe.value,
|
|
870
|
+
password: P.value,
|
|
871
|
+
"reset-password-result": F.value,
|
|
872
872
|
"display-of": kt,
|
|
873
|
-
"disabled-of":
|
|
874
|
-
onRetry:
|
|
875
|
-
onSave:
|
|
876
|
-
"onUpdate:field":
|
|
877
|
-
"onUpdate:password": t[5] ||= (e) =>
|
|
873
|
+
"disabled-of": Tt,
|
|
874
|
+
onRetry: ft,
|
|
875
|
+
onSave: pt,
|
|
876
|
+
"onUpdate:field": Et,
|
|
877
|
+
"onUpdate:password": t[5] ||= (e) => P.value = e
|
|
878
878
|
}, null, 8, [
|
|
879
879
|
"mode",
|
|
880
880
|
"draft",
|
|
@@ -896,34 +896,34 @@ var Ie = /*#__PURE__*/ e(/* @__PURE__ */ D({
|
|
|
896
896
|
"subtitle",
|
|
897
897
|
"close-on-outside",
|
|
898
898
|
"promotion"
|
|
899
|
-
])) : (O(), x(j(
|
|
899
|
+
])) : (O(), x(j(ae), {
|
|
900
900
|
key: 3,
|
|
901
|
-
title:
|
|
902
|
-
subtitle:
|
|
901
|
+
title: He.value,
|
|
902
|
+
subtitle: Ue.value
|
|
903
903
|
}, {
|
|
904
|
-
status:
|
|
904
|
+
status: N(() => [v.value === "view" && g.value ? (O(), x(j(oe), {
|
|
905
905
|
key: 0,
|
|
906
906
|
enabled: g.value.enabled !== !1,
|
|
907
|
-
disabled: T.value || !
|
|
907
|
+
disabled: T.value || !We.value,
|
|
908
908
|
loading: T.value,
|
|
909
909
|
"show-label": !1,
|
|
910
|
-
onChange:
|
|
910
|
+
onChange: vt
|
|
911
911
|
}, null, 8, [
|
|
912
912
|
"enabled",
|
|
913
913
|
"disabled",
|
|
914
914
|
"loading"
|
|
915
915
|
])) : S("v-if", !0)]),
|
|
916
|
-
operation:
|
|
917
|
-
context: j(
|
|
916
|
+
operation: N(() => [E(j(te), {
|
|
917
|
+
context: j(a),
|
|
918
918
|
actions: qe.value,
|
|
919
919
|
"record-id": g.value?.id,
|
|
920
|
-
onAction:
|
|
920
|
+
onAction: dt
|
|
921
921
|
}, null, 8, [
|
|
922
922
|
"context",
|
|
923
923
|
"actions",
|
|
924
924
|
"record-id"
|
|
925
925
|
])]),
|
|
926
|
-
default:
|
|
926
|
+
default: N(() => [E(Oe, {
|
|
927
927
|
mode: v.value,
|
|
928
928
|
draft: A.value,
|
|
929
929
|
"selected-user": g.value,
|
|
@@ -931,17 +931,17 @@ var Ie = /*#__PURE__*/ e(/* @__PURE__ */ D({
|
|
|
931
931
|
"load-failed": w.value,
|
|
932
932
|
saving: T.value || y.value,
|
|
933
933
|
"tenant-title": $(p.value ?? { id: A.value.tenantId }),
|
|
934
|
-
fields:
|
|
935
|
-
fallback:
|
|
936
|
-
"field-names":
|
|
937
|
-
password:
|
|
938
|
-
"reset-password-result":
|
|
934
|
+
fields: I.value,
|
|
935
|
+
fallback: Ye.value,
|
|
936
|
+
"field-names": Xe.value,
|
|
937
|
+
password: P.value,
|
|
938
|
+
"reset-password-result": F.value,
|
|
939
939
|
"display-of": kt,
|
|
940
|
-
"disabled-of":
|
|
941
|
-
onRetry:
|
|
942
|
-
onSave:
|
|
943
|
-
"onUpdate:field":
|
|
944
|
-
"onUpdate:password": t[6] ||= (e) =>
|
|
940
|
+
"disabled-of": Tt,
|
|
941
|
+
onRetry: ft,
|
|
942
|
+
onSave: pt,
|
|
943
|
+
"onUpdate:field": Et,
|
|
944
|
+
"onUpdate:password": t[6] ||= (e) => P.value = e
|
|
945
945
|
}, null, 8, [
|
|
946
946
|
"mode",
|
|
947
947
|
"draft",
|
|
@@ -962,4 +962,4 @@ var Ie = /*#__PURE__*/ e(/* @__PURE__ */ D({
|
|
|
962
962
|
}
|
|
963
963
|
}), [["__scopeId", "data-v-9f0f413a"]]);
|
|
964
964
|
//#endregion
|
|
965
|
-
export {
|
|
965
|
+
export { Se as n, Fe as t };
|