@ximatai/muyun-web-app 0.26.5 → 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-rm9ujeiQ.js → EmployeeDetailWorkspaceView-DYJLlkSz.js} +1 -1
- package/dist/EmployeeManagementView-taxWUa7g.js +1778 -0
- package/dist/{MetadataOrchestrationView-DaPNQML7.js → MetadataOrchestrationView-B-CPudJl.js} +151 -151
- package/dist/ModuleActionManagementView-CmVj0e0C.js +597 -0
- package/dist/{RoleAuthorizationView-qQvn7M75.js → RoleAuthorizationView-q_6CsBYq.js} +194 -194
- package/dist/{RoleDetailWorkspaceView-C-vaKeZM.js → RoleDetailWorkspaceView-DmJlJgAj.js} +1 -1
- package/dist/{RoleManagementView-C3nxfub2.js → RoleManagementView-HCa9rH0f.js} +466 -466
- package/dist/{SystemUserDetailWorkspaceView-FIbfff00.js → SystemUserDetailWorkspaceView-U6Ij0US1.js} +1 -1
- package/dist/SystemUserManagementView-C1CkKivH.js +758 -0
- package/dist/{UserDetailWorkspaceView-M--ndn6x.js → UserDetailWorkspaceView-OPYvD6mH.js} +1 -1
- package/dist/{UserManagementView-MSXf4fno.js → UserManagementView-gbCL9SnC.js} +226 -226
- package/dist/index.css +1 -1
- package/dist/index.js +3309 -2288
- package/dist/pageRealtime-CzJlr9hs.js +225 -0
- package/dist/{platform-components-_3KlZZf5.js → platform-components-DKKWbNrz.js} +4196 -1790
- 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/workbenchRouteSync.d.ts +13 -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 +24 -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/DynamicModuleHost.vue.d.ts +8 -1
- package/dist/types/dynamic-page-runtime/index.d.ts +5 -0
- package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +144 -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 +70 -0
- package/dist/types/platform-components/ManagementPanelHeader.vue.d.ts +30 -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/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 +29 -0
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +8 -0
- package/dist/types/platform-components/RecordListExplorer.vue.d.ts +2 -2
- package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +1 -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/SingleImageFileReferenceField.vue.d.ts +23 -0
- package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +2 -2
- package/dist/types/platform-components/fileReferenceTransfer.d.ts +25 -0
- package/dist/types/platform-components/fileTransferUpload.d.ts +43 -0
- package/dist/types/platform-components/index.d.ts +15 -1
- package/dist/types/platform-components/platformErrorFeedback.d.ts +4 -0
- package/dist/types/platform-components/platformFileSize.d.ts +10 -0
- package/dist/types/platform-components/recordActionBarModel.d.ts +12 -1
- package/dist/types/platform-components/recordFormFieldModel.d.ts +24 -3
- 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 +41 -0
- package/dist/types/platform-workbench/WorkbenchMenu.vue.d.ts +39 -1
- package/dist/types/platform-workbench/WorkbenchMenuTree.vue.d.ts +2 -0
- package/dist/types/platform-workbench/WorkbenchSidebarMenuEntry.vue.d.ts +19 -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/menuHoverClickIntent.d.ts +10 -0
- package/dist/types/platform-workbench/menuPointerAim.d.ts +11 -0
- package/dist/types/platform-workbench/workbenchLayout.d.ts +4 -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/applicationManagementState.d.ts +1 -1
- package/dist/types/views/employeeDetailWorkspaceView.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/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/tenantManagementState.d.ts +11 -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/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/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/UiTabs.vue.d.ts +6 -0
- package/dist/types/vue-ui-antdv/components/UiTagList.vue.d.ts +17 -0
- package/dist/types/vue-ui-antdv/components/UiThemeProvider.vue.d.ts +21 -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 +6 -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 +4 -9
- package/dist/types/web-contracts/index.d.ts +168 -0
- package/dist/types/web-core/clients.d.ts +14 -1
- package/dist/types/web-core/http.d.ts +12 -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/module/staticModuleClient.d.ts +1 -0
- package/dist/types/web-core/userPreferences.d.ts +24 -0
- package/dist/{useUserSessionRows-iAqK_cUy.js → useUserSessionRows-CBHEzRFQ.js} +2 -2
- package/dist/workspaceViewSessions-DkB9myrq.js +3252 -0
- package/package.json +1 -1
- package/dist/EmployeeManagementView-DyYMWQ64.js +0 -1706
- package/dist/ModuleActionManagementView-BFoPGqzC.js +0 -597
- package/dist/SystemUserManagementView-m6vwJDxI.js +0 -761
- package/dist/pageRealtime-4LXXvVW7.js +0 -140
- package/dist/workspaceViewSessions-DW0wbyQ_.js +0 -1448
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import { n as
|
|
5
|
-
import { t as
|
|
6
|
-
import { Fragment as
|
|
1
|
+
import { A as e, C as t, Dt as n, F as r, I as i, M as a, Mt as ee, N as te, O as ne, S as re, Y as ie, _ as o, c as ae, i as s, jt as c, lt as l, m as oe, q as u, r as se, rt as d, st as f, tt as ce, ut as p, v as m, vt as le, w as ue, zn as h, zt as de } from "./platform-components-DKKWbNrz.js";
|
|
2
|
+
import { d as g, i as fe, n as _, r as v, t as y, x as pe } from "./workspaceViewSessions-DkB9myrq.js";
|
|
3
|
+
import { n as me } from "./currentUserContext-B1lj1WgF.js";
|
|
4
|
+
import { f as b, n as he } from "./pageRealtime-CzJlr9hs.js";
|
|
5
|
+
import { t as ge } from "./useUserSessionRows-CBHEzRFQ.js";
|
|
6
|
+
import { Fragment as x, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createTextVNode as D, createVNode as O, defineComponent as k, normalizeClass as _e, onBeforeUnmount as ve, onMounted as ye, openBlock as A, ref as j, toDisplayString as M, unref as N, watch as be, withCtx as P, withModifiers as F } from "vue";
|
|
7
7
|
//#region src/platform-admin-runtime/sessionRecovery.ts
|
|
8
8
|
var I;
|
|
9
9
|
function L(e, t) {
|
|
@@ -12,9 +12,9 @@ function L(e, t) {
|
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/platform-admin-runtime/backendHttp.ts
|
|
14
14
|
function xe(e = {}) {
|
|
15
|
-
return
|
|
15
|
+
return h({
|
|
16
16
|
baseUrl: void 0,
|
|
17
|
-
token: e.withAuth === !1 ? void 0 :
|
|
17
|
+
token: e.withAuth === !1 ? void 0 : b(void 0),
|
|
18
18
|
credentials: Se(void 0),
|
|
19
19
|
onAuthenticationRequired: e.withAuth === !1 ? void 0 : (e, t) => L(e, t)
|
|
20
20
|
});
|
|
@@ -30,7 +30,7 @@ var Ce = {
|
|
|
30
30
|
}, we = {
|
|
31
31
|
key: 1,
|
|
32
32
|
class: "user-password-reset-result"
|
|
33
|
-
}, Te = { key: 0 }, R = { key: 1 }, Ee = { class: "user-form-label" }, De = /*#__PURE__*/
|
|
33
|
+
}, Te = { key: 0 }, R = { key: 1 }, Ee = { class: "user-form-label" }, De = /*#__PURE__*/ ee(/* @__PURE__ */ k({
|
|
34
34
|
name: "UserDetailContent",
|
|
35
35
|
__name: "UserDetailContent",
|
|
36
36
|
props: {
|
|
@@ -55,24 +55,24 @@ var Ce = {
|
|
|
55
55
|
"update:field",
|
|
56
56
|
"update:password"
|
|
57
57
|
],
|
|
58
|
-
setup(t, { emit:
|
|
59
|
-
let
|
|
60
|
-
return (
|
|
58
|
+
setup(t, { emit: r }) {
|
|
59
|
+
let i = r;
|
|
60
|
+
return (r, a) => t.loading ? (A(), C(N(p), {
|
|
61
61
|
key: 0,
|
|
62
62
|
class: "user-detail-state",
|
|
63
63
|
tip: "加载用户详情"
|
|
64
|
-
})) : t.loadFailed ? (
|
|
64
|
+
})) : t.loadFailed ? (A(), T("div", Ce, [O(N(l), {
|
|
65
65
|
title: "详情加载失败",
|
|
66
66
|
message: "无法加载用户详情,请重试"
|
|
67
|
-
}),
|
|
67
|
+
}), O(N(c), {
|
|
68
68
|
type: "primary",
|
|
69
69
|
"icon-name": "reload",
|
|
70
|
-
onClick: a[0] ||= (e) =>
|
|
70
|
+
onClick: a[0] ||= (e) => i("retry")
|
|
71
71
|
}, {
|
|
72
|
-
default: P(() => [...a[4] ||= [
|
|
72
|
+
default: P(() => [...a[4] ||= [D("重试", -1)]]),
|
|
73
73
|
_: 1
|
|
74
|
-
})])) : t.mode === "view" || t.mode === "create" || t.selectedUser ? (
|
|
75
|
-
t.mode === "view" ? (
|
|
74
|
+
})])) : t.mode === "view" || t.mode === "create" || t.selectedUser ? (A(), T(x, { key: 2 }, [
|
|
75
|
+
t.mode === "view" ? (A(), C(N(e), {
|
|
76
76
|
key: 0,
|
|
77
77
|
record: t.draft,
|
|
78
78
|
fields: t.fields,
|
|
@@ -83,25 +83,25 @@ var Ce = {
|
|
|
83
83
|
"fields",
|
|
84
84
|
"fallback",
|
|
85
85
|
"display-of"
|
|
86
|
-
])) :
|
|
87
|
-
t.mode === "view" && t.resetPasswordResult?.temporaryPassword ? (
|
|
88
|
-
a[6] ||=
|
|
89
|
-
|
|
86
|
+
])) : w("v-if", !0),
|
|
87
|
+
t.mode === "view" && t.resetPasswordResult?.temporaryPassword ? (A(), T("div", we, [
|
|
88
|
+
a[6] ||= E("span", null, "临时密码", -1),
|
|
89
|
+
O(N(n), {
|
|
90
90
|
value: t.resetPasswordResult.temporaryPassword,
|
|
91
91
|
disabled: ""
|
|
92
92
|
}, null, 8, ["value"]),
|
|
93
|
-
t.resetPasswordResult.expiresAt ? (
|
|
94
|
-
])) :
|
|
95
|
-
t.mode === "view" ?
|
|
93
|
+
t.resetPasswordResult.expiresAt ? (A(), T("small", Te, [a[5] ||= D(" 有效期至 ", -1), O(N(u), { value: t.resetPasswordResult.expiresAt }, null, 8, ["value"])])) : w("v-if", !0)
|
|
94
|
+
])) : w("v-if", !0),
|
|
95
|
+
t.mode === "view" ? w("v-if", !0) : (A(), T("form", {
|
|
96
96
|
key: 2,
|
|
97
97
|
class: "user-form",
|
|
98
|
-
onSubmit: a[3] ||= F((e) =>
|
|
98
|
+
onSubmit: a[3] ||= F((e) => i("save"), ["prevent"])
|
|
99
99
|
}, [
|
|
100
|
-
|
|
100
|
+
E("label", null, [a[7] ||= E("span", { class: "user-form-label" }, "当前租户", -1), O(N(n), {
|
|
101
101
|
value: t.tenantTitle,
|
|
102
102
|
disabled: ""
|
|
103
103
|
}, null, 8, ["value"])]),
|
|
104
|
-
t.mode === "resetPassword" ?
|
|
104
|
+
t.mode === "resetPassword" ? w("v-if", !0) : (A(), C(N(m), {
|
|
105
105
|
key: 0,
|
|
106
106
|
record: t.draft,
|
|
107
107
|
"field-names": t.fieldNames,
|
|
@@ -109,7 +109,7 @@ var Ce = {
|
|
|
109
109
|
fallback: t.fallback,
|
|
110
110
|
disabled: t.saving,
|
|
111
111
|
"disabled-of": t.disabledOf,
|
|
112
|
-
"onUpdate:field": a[1] ||= (e, t) =>
|
|
112
|
+
"onUpdate:field": a[1] ||= (e, t) => i("update:field", e, t)
|
|
113
113
|
}, null, 8, [
|
|
114
114
|
"record",
|
|
115
115
|
"field-names",
|
|
@@ -118,26 +118,26 @@ var Ce = {
|
|
|
118
118
|
"disabled",
|
|
119
119
|
"disabled-of"
|
|
120
120
|
])),
|
|
121
|
-
t.mode === "create" || t.mode === "resetPassword" ? (
|
|
121
|
+
t.mode === "create" || t.mode === "resetPassword" ? (A(), T("label", R, [E("span", Ee, M(t.mode === "create" ? "初始密码" : "新密码"), 1), O(N(n), {
|
|
122
122
|
value: t.password,
|
|
123
123
|
type: "password",
|
|
124
124
|
disabled: t.saving,
|
|
125
125
|
placeholder: "请输入密码",
|
|
126
126
|
"allow-clear": "",
|
|
127
|
-
"onUpdate:value": a[2] ||= (e) =>
|
|
128
|
-
}, null, 8, ["value", "disabled"])])) :
|
|
127
|
+
"onUpdate:value": a[2] ||= (e) => i("update:password", e)
|
|
128
|
+
}, null, 8, ["value", "disabled"])])) : w("v-if", !0)
|
|
129
129
|
], 32)),
|
|
130
|
-
t.mode !== "create" && t.mode !== "resetPassword" ? (
|
|
130
|
+
t.mode !== "create" && t.mode !== "resetPassword" ? (A(), C(N(o), {
|
|
131
131
|
key: 3,
|
|
132
132
|
record: t.draft
|
|
133
|
-
}, null, 8, ["record"])) :
|
|
134
|
-
], 64)) :
|
|
133
|
+
}, null, 8, ["record"])) : w("v-if", !0)
|
|
134
|
+
], 64)) : w("v-if", !0);
|
|
135
135
|
}
|
|
136
136
|
}), [["__scopeId", "data-v-621edc75"]]);
|
|
137
137
|
//#endregion
|
|
138
138
|
//#region src/views/userDetailWorkspaceSession.ts
|
|
139
139
|
function Oe(e, t) {
|
|
140
|
-
return
|
|
140
|
+
return y(g, e, {
|
|
141
141
|
...t,
|
|
142
142
|
selectedUser: { ...t.selectedUser },
|
|
143
143
|
draft: { ...t.draft },
|
|
@@ -145,10 +145,10 @@ function Oe(e, t) {
|
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
147
|
function ke(e, t) {
|
|
148
|
-
return g
|
|
148
|
+
return _(g, e, t);
|
|
149
149
|
}
|
|
150
150
|
function Ae(e) {
|
|
151
|
-
return
|
|
151
|
+
return v(g, e);
|
|
152
152
|
}
|
|
153
153
|
//#endregion
|
|
154
154
|
//#region src/views/userDetailStateModel.ts
|
|
@@ -163,7 +163,7 @@ function Ne(e) {
|
|
|
163
163
|
}
|
|
164
164
|
//#endregion
|
|
165
165
|
//#region src/views/UserManagementView.vue
|
|
166
|
-
var Pe = /*#__PURE__*/
|
|
166
|
+
var Pe = /*#__PURE__*/ ee(/* @__PURE__ */ k({
|
|
167
167
|
name: "UserManagementView",
|
|
168
168
|
__name: "UserManagementView",
|
|
169
169
|
props: {
|
|
@@ -171,18 +171,18 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
171
171
|
mode: {}
|
|
172
172
|
},
|
|
173
173
|
setup(e) {
|
|
174
|
-
let
|
|
174
|
+
let n = e, ee = de({ moduleAlias: "iam.tenant" }), o = de({ moduleAlias: "iam.user" }), c = me(), l = pe(), u = j(""), p = j(0), m = j(0), h = j(), _ = j(), v = j(), y = j(!1), b = j("view"), x = j(!1), E = j(!1), D = j(!1), k = j(0), M = j(X(void 0)), F = j(""), I = j(), L = j(te(void 0)), { expandedUserKeys: Se, handleUserListLoaded: Ce, handleUserRowExpand: we, handleUserSessionBusinessEvent: Te, loadUserSessions: R, resetUserSessionRows: Ee, userOnlineStatusTitle: Pe, userSessionState: z } = ge({
|
|
175
175
|
context: o,
|
|
176
176
|
source: "user-management"
|
|
177
|
-
}), Fe =
|
|
178
|
-
let e =
|
|
179
|
-
if (!(
|
|
177
|
+
}), Fe = S(() => ee), B = S(() => !!n.recordId), V = S(() => B.value && l?.presentation === "drawer"), Ie = S(() => !B.value || V.value), H = S(() => c?.value?.system === !0), U = S(() => {
|
|
178
|
+
let e = c?.value?.tenantId;
|
|
179
|
+
if (!(c?.value?.system === !0 || !e)) return {
|
|
180
180
|
id: e,
|
|
181
181
|
title: e,
|
|
182
182
|
alias: e,
|
|
183
183
|
enabled: !0
|
|
184
184
|
};
|
|
185
|
-
}), Le =
|
|
185
|
+
}), Le = S(() => $e(o, h.value)), Re = S(() => [
|
|
186
186
|
{
|
|
187
187
|
key: "username",
|
|
188
188
|
title: "账号",
|
|
@@ -222,38 +222,38 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
222
222
|
type: "datetime",
|
|
223
223
|
width: "180px"
|
|
224
224
|
}
|
|
225
|
-
]), ze =
|
|
226
|
-
if (
|
|
227
|
-
}), W =
|
|
228
|
-
if (
|
|
229
|
-
if (
|
|
230
|
-
if (
|
|
231
|
-
if (
|
|
232
|
-
let e =
|
|
225
|
+
]), ze = S(() => !!h.value?.id), Be = S(() => h.value ? `用户列表 - ${$(h.value)}` : "用户列表"), Ve = S(() => b.value === "create" ? "新建用户" : Dt(v.value ?? M.value)), He = S(() => {
|
|
226
|
+
if (b.value !== "create") return Ot(v.value ?? M.value);
|
|
227
|
+
}), W = S(() => {
|
|
228
|
+
if (x.value) return !1;
|
|
229
|
+
if (b.value === "create") return !!h.value?.id && o.can("create") === !0;
|
|
230
|
+
if (b.value === "edit") return !!v.value?.id && o.can("update") === !0;
|
|
231
|
+
if (b.value === "resetPassword") {
|
|
232
|
+
let e = v.value?.id;
|
|
233
233
|
return !!e && o.can("changePassword", e) === !0;
|
|
234
234
|
}
|
|
235
235
|
return !1;
|
|
236
|
-
}), Ue =
|
|
236
|
+
}), Ue = S(() => !v.value?.id || x.value ? !1 : o.can(Et(v.value)) === !0), We = S(() => b.value === "view" ? v.value?.id ? [
|
|
237
237
|
{
|
|
238
238
|
key: "edit",
|
|
239
239
|
actionCode: "update",
|
|
240
240
|
title: "编辑",
|
|
241
241
|
iconName: "edit",
|
|
242
|
-
disabled:
|
|
242
|
+
disabled: D.value
|
|
243
243
|
},
|
|
244
244
|
{
|
|
245
245
|
key: "resetPassword",
|
|
246
246
|
actionCode: "changePassword",
|
|
247
247
|
title: "修改密码",
|
|
248
248
|
iconName: "lock",
|
|
249
|
-
disabled:
|
|
249
|
+
disabled: D.value
|
|
250
250
|
},
|
|
251
251
|
{
|
|
252
252
|
key: "resetGeneratedPassword",
|
|
253
253
|
actionCode: "resetPassword",
|
|
254
254
|
title: "重置密码",
|
|
255
255
|
iconName: "reload",
|
|
256
|
-
disabled:
|
|
256
|
+
disabled: D.value
|
|
257
257
|
},
|
|
258
258
|
{
|
|
259
259
|
key: "delete",
|
|
@@ -261,68 +261,68 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
261
261
|
title: "删除",
|
|
262
262
|
iconName: "delete",
|
|
263
263
|
danger: !0,
|
|
264
|
-
disabled:
|
|
264
|
+
disabled: D.value
|
|
265
265
|
}
|
|
266
266
|
] : [] : [{
|
|
267
267
|
key: "cancel",
|
|
268
268
|
title: "取消",
|
|
269
269
|
iconName: "close",
|
|
270
|
-
disabled:
|
|
270
|
+
disabled: D.value
|
|
271
271
|
}, {
|
|
272
272
|
key: "save",
|
|
273
|
-
actionCode:
|
|
273
|
+
actionCode: b.value === "create" ? "create" : b.value === "resetPassword" ? "changePassword" : "update",
|
|
274
274
|
title: "保存",
|
|
275
275
|
iconName: "save",
|
|
276
276
|
primary: !0,
|
|
277
|
-
loading:
|
|
277
|
+
loading: D.value,
|
|
278
278
|
disabled: !W.value
|
|
279
|
-
}]), Ge =
|
|
279
|
+
}]), Ge = S(() => We.value), Ke = S(() => b.value === "view" ? v.value?.id ? [{
|
|
280
280
|
key: "edit",
|
|
281
281
|
actionCode: "update",
|
|
282
282
|
title: "编辑",
|
|
283
283
|
iconName: "edit",
|
|
284
|
-
disabled:
|
|
285
|
-
}] : [] :
|
|
284
|
+
disabled: D.value
|
|
285
|
+
}] : [] : b.value === "edit" ? [{
|
|
286
286
|
key: "cancel",
|
|
287
287
|
title: "取消",
|
|
288
288
|
iconName: "close",
|
|
289
|
-
disabled:
|
|
289
|
+
disabled: D.value
|
|
290
290
|
}, {
|
|
291
291
|
key: "save",
|
|
292
292
|
actionCode: "update",
|
|
293
293
|
title: "保存",
|
|
294
294
|
iconName: "save",
|
|
295
295
|
primary: !0,
|
|
296
|
-
loading:
|
|
296
|
+
loading: D.value,
|
|
297
297
|
disabled: !W.value
|
|
298
|
-
}] : []), qe =
|
|
299
|
-
view:
|
|
300
|
-
input:
|
|
301
|
-
let e =
|
|
298
|
+
}] : []), qe = fe({
|
|
299
|
+
view: g,
|
|
300
|
+
input: S(() => {
|
|
301
|
+
let e = v.value?.id, t = b.value;
|
|
302
302
|
return e && (t === "view" || t === "edit") ? { recordId: e } : void 0;
|
|
303
303
|
}),
|
|
304
|
-
title:
|
|
305
|
-
eligibility:
|
|
306
|
-
hasStableIdentity: !!
|
|
307
|
-
busy:
|
|
304
|
+
title: S(() => Dt(v.value)),
|
|
305
|
+
eligibility: S(() => ({
|
|
306
|
+
hasStableIdentity: !!v.value?.id && !x.value,
|
|
307
|
+
busy: D.value
|
|
308
308
|
})),
|
|
309
309
|
beforePromote: async (e) => {
|
|
310
|
-
let t =
|
|
310
|
+
let t = v.value;
|
|
311
311
|
if (t) return await Oe(e, {
|
|
312
312
|
selectedUser: t,
|
|
313
|
-
draft:
|
|
314
|
-
tenant:
|
|
315
|
-
mode:
|
|
313
|
+
draft: M.value,
|
|
314
|
+
tenant: h.value,
|
|
315
|
+
mode: b.value === "edit" ? "edit" : "view",
|
|
316
316
|
password: F.value,
|
|
317
317
|
resetPasswordResult: I.value
|
|
318
318
|
}) === "accepted";
|
|
319
319
|
},
|
|
320
320
|
onPromoted: K
|
|
321
321
|
});
|
|
322
|
-
|
|
323
|
-
!B.value || !e ||
|
|
322
|
+
be(v, (e) => {
|
|
323
|
+
!B.value || !e || l?.setTitle(Dt(e));
|
|
324
324
|
}, { immediate: !0 });
|
|
325
|
-
let Je =
|
|
325
|
+
let Je = S(() => ({
|
|
326
326
|
username: {
|
|
327
327
|
label: "账号",
|
|
328
328
|
required: !0,
|
|
@@ -334,30 +334,30 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
334
334
|
visible: !0,
|
|
335
335
|
controlType: "enabledStatus"
|
|
336
336
|
}
|
|
337
|
-
})), Ye =
|
|
338
|
-
|
|
339
|
-
if (Qe(),
|
|
340
|
-
let e = { recordId:
|
|
337
|
+
})), Ye = S(() => ["username", "enabled"]), Xe;
|
|
338
|
+
ye(() => {
|
|
339
|
+
if (Qe(), n.recordId) {
|
|
340
|
+
let e = { recordId: n.recordId };
|
|
341
341
|
V.value || (Xe = ke(e, Ze));
|
|
342
342
|
let t = Ae(e);
|
|
343
343
|
if (t) {
|
|
344
344
|
yt(t);
|
|
345
345
|
return;
|
|
346
346
|
}
|
|
347
|
-
G({ id:
|
|
347
|
+
G({ id: n.recordId }, n.mode ?? "view");
|
|
348
348
|
}
|
|
349
|
-
}),
|
|
349
|
+
}), ve(() => Xe?.());
|
|
350
350
|
function Ze(e) {
|
|
351
|
-
return
|
|
351
|
+
return b.value === "view" ? (yt(e), !0) : !1;
|
|
352
352
|
}
|
|
353
|
-
he(Te),
|
|
354
|
-
B.value || (
|
|
353
|
+
he(Te), be(U, nt, { immediate: !0 }), be(h, () => {
|
|
354
|
+
B.value || (_.value = void 0, v.value = void 0, Ee(), M.value = X(h.value), K(), m.value += 1);
|
|
355
355
|
});
|
|
356
356
|
async function Qe() {
|
|
357
357
|
try {
|
|
358
|
-
L.value =
|
|
358
|
+
L.value = te((await o.runtime.ready).uiDescriptor);
|
|
359
359
|
} catch (e) {
|
|
360
|
-
|
|
360
|
+
ce(e, {
|
|
361
361
|
source: "user-management",
|
|
362
362
|
phase: "load"
|
|
363
363
|
});
|
|
@@ -384,13 +384,13 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
386
|
function tt(e) {
|
|
387
|
-
!H.value ||
|
|
387
|
+
!H.value || h.value || e.length > 0 && rt(e[0]);
|
|
388
388
|
}
|
|
389
389
|
function nt(e = U.value) {
|
|
390
|
-
B.value || !e || H.value ||
|
|
390
|
+
B.value || !e || H.value || h.value || (h.value = e);
|
|
391
391
|
}
|
|
392
392
|
function rt(e) {
|
|
393
|
-
q() && (
|
|
393
|
+
q() && (h.value = e);
|
|
394
394
|
}
|
|
395
395
|
function it(e) {
|
|
396
396
|
e.key === "create" && st();
|
|
@@ -413,25 +413,25 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
413
413
|
}
|
|
414
414
|
function st() {
|
|
415
415
|
if (q()) {
|
|
416
|
-
if (!
|
|
416
|
+
if (!h.value?.id) {
|
|
417
417
|
d("请先选择租户", { phase: "validation" });
|
|
418
418
|
return;
|
|
419
419
|
}
|
|
420
|
-
|
|
420
|
+
v.value = void 0, _.value = void 0, M.value = X(h.value), F.value = "", b.value = "create", x.value = !1, E.value = !1, k.value += 1, y.value = !0;
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
async function G(e, t) {
|
|
424
424
|
if (!q()) return;
|
|
425
425
|
let n = String(e.id ?? "");
|
|
426
426
|
if (!n) return;
|
|
427
|
-
|
|
428
|
-
let r =
|
|
429
|
-
|
|
427
|
+
_.value = n, y.value = !0, b.value = t, v.value = void 0, M.value = Z(e), F.value = "", I.value = void 0, x.value = !0, E.value = !1;
|
|
428
|
+
let r = k.value + 1;
|
|
429
|
+
k.value = r;
|
|
430
430
|
try {
|
|
431
431
|
let e = await o.crud.view(n);
|
|
432
432
|
if (!J(n, r)) return;
|
|
433
433
|
if (!e?.id) {
|
|
434
|
-
|
|
434
|
+
E.value = !0, d("未找到指定用户", {
|
|
435
435
|
source: "user-management",
|
|
436
436
|
phase: "load"
|
|
437
437
|
});
|
|
@@ -444,27 +444,27 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
444
444
|
...i
|
|
445
445
|
}, t);
|
|
446
446
|
} catch (e) {
|
|
447
|
-
J(n, r) && (
|
|
447
|
+
J(n, r) && (E.value = !0, ce(e, {
|
|
448
448
|
source: "user-management",
|
|
449
449
|
phase: "load"
|
|
450
450
|
}));
|
|
451
451
|
} finally {
|
|
452
|
-
J(n, r) && (
|
|
452
|
+
J(n, r) && (x.value = !1);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
function ct(e) {
|
|
456
456
|
return xe().request({ path: `/iam.user/${encodeURIComponent(e)}/employee-binding` });
|
|
457
457
|
}
|
|
458
458
|
function K() {
|
|
459
|
-
|
|
459
|
+
D.value || (k.value += 1, x.value = !1, E.value = !1, y.value = !1, b.value = "view", F.value = "", I.value = void 0, M.value = v.value ? Z(v.value) : X(h.value), V.value && l?.dismiss());
|
|
460
460
|
}
|
|
461
461
|
function lt() {
|
|
462
|
-
if (!
|
|
463
|
-
if (!
|
|
462
|
+
if (!D.value) {
|
|
463
|
+
if (!v.value?.id || b.value === "create") {
|
|
464
464
|
K();
|
|
465
465
|
return;
|
|
466
466
|
}
|
|
467
|
-
|
|
467
|
+
M.value = Z(v.value), F.value = "", I.value = void 0, b.value = "view", x.value = !1, E.value = !1;
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
function ut(e) {
|
|
@@ -477,55 +477,55 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
477
477
|
return;
|
|
478
478
|
}
|
|
479
479
|
if (q()) {
|
|
480
|
-
if (e.key === "edit" &&
|
|
481
|
-
|
|
480
|
+
if (e.key === "edit" && v.value) {
|
|
481
|
+
M.value = Z(v.value), b.value = "edit";
|
|
482
482
|
return;
|
|
483
483
|
}
|
|
484
|
-
if (e.key === "resetPassword" &&
|
|
485
|
-
F.value = "", I.value = void 0,
|
|
484
|
+
if (e.key === "resetPassword" && v.value) {
|
|
485
|
+
F.value = "", I.value = void 0, b.value = "resetPassword";
|
|
486
486
|
return;
|
|
487
487
|
}
|
|
488
|
-
if (e.key === "resetGeneratedPassword" &&
|
|
488
|
+
if (e.key === "resetGeneratedPassword" && v.value) {
|
|
489
489
|
mt();
|
|
490
490
|
return;
|
|
491
491
|
}
|
|
492
|
-
e.key === "delete" && vt(
|
|
492
|
+
e.key === "delete" && vt(v.value);
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
495
|
function dt() {
|
|
496
|
-
let e = String(
|
|
496
|
+
let e = String(M.value.id ?? _.value ?? "");
|
|
497
497
|
if (!e) return;
|
|
498
|
-
let t =
|
|
498
|
+
let t = b.value === "create" ? "view" : b.value;
|
|
499
499
|
G({
|
|
500
|
-
...
|
|
500
|
+
...M.value,
|
|
501
501
|
id: e
|
|
502
502
|
}, t);
|
|
503
503
|
}
|
|
504
504
|
async function ft() {
|
|
505
|
-
if (
|
|
505
|
+
if (b.value === "resetPassword") {
|
|
506
506
|
await pt();
|
|
507
507
|
return;
|
|
508
508
|
}
|
|
509
|
-
await
|
|
510
|
-
loading:
|
|
511
|
-
mode:
|
|
509
|
+
await se({
|
|
510
|
+
loading: D,
|
|
511
|
+
mode: b.value === "edit" ? "edit" : "create",
|
|
512
512
|
source: "user-management",
|
|
513
|
-
validateContext: () =>
|
|
513
|
+
validateContext: () => b.value === "create" && !h.value?.id ? "请先选择租户" : void 0,
|
|
514
514
|
canSave: () => W.value,
|
|
515
515
|
deniedMessage: "当前用户无权保存用户",
|
|
516
|
-
createRecord: () => St(
|
|
516
|
+
createRecord: () => St(M.value, h.value, b.value, F.value),
|
|
517
517
|
validateRecord: Ct,
|
|
518
|
-
save: (e, t) => t === "edit" &&
|
|
518
|
+
save: (e, t) => t === "edit" && v.value?.id ? o.crud.update(v.value.id, e) : o.crud.insert(e),
|
|
519
519
|
onSaved: ({ record: e }) => {
|
|
520
|
-
Y(e),
|
|
520
|
+
Y(e), m.value += 1;
|
|
521
521
|
}
|
|
522
522
|
});
|
|
523
523
|
}
|
|
524
524
|
async function pt() {
|
|
525
|
-
await
|
|
526
|
-
loading:
|
|
525
|
+
await s({
|
|
526
|
+
loading: D,
|
|
527
527
|
source: "user-management",
|
|
528
|
-
record: () =>
|
|
528
|
+
record: () => v.value?.id ? v.value : void 0,
|
|
529
529
|
canExecute: () => W.value,
|
|
530
530
|
deniedMessage: "当前用户无权重置用户密码",
|
|
531
531
|
execute: (e) => o.http.request({
|
|
@@ -534,15 +534,15 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
534
534
|
body: { password: F.value }
|
|
535
535
|
}),
|
|
536
536
|
onExecuted: async (e, t) => {
|
|
537
|
-
Y(await o.crud.view(t.id)),
|
|
537
|
+
Y(await o.crud.view(t.id)), m.value += 1;
|
|
538
538
|
}
|
|
539
539
|
});
|
|
540
540
|
}
|
|
541
541
|
async function mt() {
|
|
542
|
-
await
|
|
543
|
-
loading:
|
|
542
|
+
await s({
|
|
543
|
+
loading: D,
|
|
544
544
|
source: "user-management",
|
|
545
|
-
record: () =>
|
|
545
|
+
record: () => v.value?.id ? v.value : void 0,
|
|
546
546
|
canExecute: (e) => o.can("resetPassword", e.id) === !0,
|
|
547
547
|
deniedMessage: "当前用户无权重置用户密码",
|
|
548
548
|
execute: (e) => o.http.request({
|
|
@@ -550,18 +550,18 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
550
550
|
path: `/iam.user/resetPassword/${encodeURIComponent(e.id)}`
|
|
551
551
|
}),
|
|
552
552
|
onExecuted: async (e, t) => {
|
|
553
|
-
Y(await o.crud.view(t.id)), I.value = e,
|
|
553
|
+
Y(await o.crud.view(t.id)), I.value = e, m.value += 1;
|
|
554
554
|
}
|
|
555
555
|
});
|
|
556
556
|
}
|
|
557
557
|
async function ht(e, t) {
|
|
558
|
-
await
|
|
559
|
-
loading:
|
|
558
|
+
await s({
|
|
559
|
+
loading: D,
|
|
560
560
|
source: "user-management",
|
|
561
561
|
record: () => e?.id ? e : void 0,
|
|
562
562
|
canExecute: (e) => o.can("revokeSession", e.id) === !0 && !t.current,
|
|
563
563
|
deniedMessage: "当前用户无权下线该登录会话",
|
|
564
|
-
confirm: (e) =>
|
|
564
|
+
confirm: (e) => f({
|
|
565
565
|
title: "下线登录会话",
|
|
566
566
|
content: `确认下线用户「${Q(e)}」的该登录会话?`,
|
|
567
567
|
okText: "下线",
|
|
@@ -572,7 +572,7 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
572
572
|
path: `/iam.user/${encodeURIComponent(e.id)}/sessions/${encodeURIComponent(t.id)}/revoke`
|
|
573
573
|
}),
|
|
574
574
|
onExecuted: (e, t) => {
|
|
575
|
-
R(t.id),
|
|
575
|
+
R(t.id), m.value += 1;
|
|
576
576
|
}
|
|
577
577
|
});
|
|
578
578
|
}
|
|
@@ -585,13 +585,13 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
585
585
|
});
|
|
586
586
|
return;
|
|
587
587
|
}
|
|
588
|
-
await
|
|
589
|
-
loading:
|
|
588
|
+
await s({
|
|
589
|
+
loading: D,
|
|
590
590
|
source: "user-management",
|
|
591
591
|
record: () => e?.id ? e : void 0,
|
|
592
592
|
canExecute: (e) => o.can("revokeSessions", e.id) === !0,
|
|
593
593
|
deniedMessage: "当前用户无权批量下线登录会话",
|
|
594
|
-
confirm: (e) =>
|
|
594
|
+
confirm: (e) => f({
|
|
595
595
|
title: "批量下线登录会话",
|
|
596
596
|
content: `确认下线用户「${Q(e)}」的 ${t.length} 个登录会话?`,
|
|
597
597
|
okText: "全部下线",
|
|
@@ -603,31 +603,31 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
603
603
|
body: { sessionIds: t }
|
|
604
604
|
}),
|
|
605
605
|
onExecuted: (e, t) => {
|
|
606
|
-
R(t.id),
|
|
606
|
+
R(t.id), m.value += 1;
|
|
607
607
|
}
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
610
|
async function _t() {
|
|
611
|
-
await
|
|
612
|
-
loading:
|
|
611
|
+
await s({
|
|
612
|
+
loading: D,
|
|
613
613
|
source: "user-management",
|
|
614
|
-
record: () =>
|
|
614
|
+
record: () => v.value?.id ? v.value : void 0,
|
|
615
615
|
canExecute: () => Ue.value,
|
|
616
616
|
deniedMessage: "当前用户无权变更用户启停状态",
|
|
617
617
|
execute: (e) => e.enabled === !1 ? o.crud.enable(e.id, { version: e.version }) : o.crud.disable(e.id, { version: e.version }),
|
|
618
618
|
onExecuted: async (e, t) => {
|
|
619
|
-
Y(await o.crud.view(t.id)),
|
|
619
|
+
Y(await o.crud.view(t.id)), m.value += 1;
|
|
620
620
|
}
|
|
621
621
|
});
|
|
622
622
|
}
|
|
623
623
|
async function vt(e) {
|
|
624
|
-
await
|
|
625
|
-
loading:
|
|
624
|
+
await s({
|
|
625
|
+
loading: D,
|
|
626
626
|
source: "user-management",
|
|
627
627
|
record: () => e?.id ? e : void 0,
|
|
628
628
|
canExecute: () => o.can("delete") === !0,
|
|
629
629
|
deniedMessage: "当前用户无权删除用户",
|
|
630
|
-
confirm: (e) =>
|
|
630
|
+
confirm: (e) => f({
|
|
631
631
|
title: "删除用户",
|
|
632
632
|
content: `确认删除用户「${Q(e)}」?`,
|
|
633
633
|
okText: "删除",
|
|
@@ -635,26 +635,26 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
635
635
|
}),
|
|
636
636
|
execute: (e) => o.crud.delete(String(e.id), { version: e.version }),
|
|
637
637
|
onExecuted: (e, t) => {
|
|
638
|
-
|
|
638
|
+
_.value === String(t.id) && (_.value = void 0, v.value = void 0, M.value = X(h.value), y.value = !1, b.value = "view", x.value = !1, E.value = !1, k.value += 1), m.value += 1;
|
|
639
639
|
}
|
|
640
640
|
});
|
|
641
641
|
}
|
|
642
642
|
function q() {
|
|
643
|
-
return je(
|
|
643
|
+
return je(D.value);
|
|
644
644
|
}
|
|
645
645
|
function J(e, t) {
|
|
646
646
|
return Me({
|
|
647
|
-
activeRequestSeq:
|
|
647
|
+
activeRequestSeq: k.value,
|
|
648
648
|
requestSeq: t,
|
|
649
|
-
selectedUserKey:
|
|
649
|
+
selectedUserKey: _.value,
|
|
650
650
|
recordId: e
|
|
651
651
|
});
|
|
652
652
|
}
|
|
653
653
|
function Y(e, t = "view") {
|
|
654
|
-
return
|
|
654
|
+
return v.value = e, _.value = e.id, M.value = Z(e), F.value = "", b.value = Ne(t), y.value = !0, x.value = !1, E.value = !1, k.value += 1, k.value;
|
|
655
655
|
}
|
|
656
656
|
function yt(e) {
|
|
657
|
-
|
|
657
|
+
v.value = e.selectedUser, _.value = e.selectedUser.id, h.value = e.tenant, M.value = e.draft, b.value = e.mode, F.value = e.password, I.value = e.resetPasswordResult, y.value = !0, x.value = !1, E.value = !1, k.value += 1;
|
|
658
658
|
}
|
|
659
659
|
function bt(e) {
|
|
660
660
|
return !e || o.can("revokeSession", e) !== !0 ? [] : z(e).records.filter((e) => !e.current);
|
|
@@ -675,7 +675,7 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
675
675
|
};
|
|
676
676
|
}
|
|
677
677
|
function St(e, t, n, r) {
|
|
678
|
-
return
|
|
678
|
+
return ae(e, {
|
|
679
679
|
tenantId: t?.id ?? e.tenantId,
|
|
680
680
|
username: e.username?.trim(),
|
|
681
681
|
enabled: e.enabled !== !1,
|
|
@@ -684,21 +684,21 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
684
684
|
}
|
|
685
685
|
function Ct(e) {
|
|
686
686
|
for (let t of ["username"]) {
|
|
687
|
-
let n =
|
|
687
|
+
let n = a(t, {
|
|
688
688
|
fields: L.value,
|
|
689
689
|
fallback: Je.value
|
|
690
690
|
});
|
|
691
691
|
if (n.visible && n.required && !e[t]) return `请填写${n.label}`;
|
|
692
692
|
}
|
|
693
|
-
if (
|
|
694
|
-
if (
|
|
693
|
+
if (b.value === "create" && !e.password) return "请填写初始密码";
|
|
694
|
+
if (b.value === "resetPassword" && !F.value.trim()) return "请填写新密码";
|
|
695
695
|
}
|
|
696
696
|
function wt(e) {
|
|
697
|
-
return e === "username" &&
|
|
697
|
+
return e === "username" && b.value === "edit";
|
|
698
698
|
}
|
|
699
699
|
function Tt(e, t) {
|
|
700
|
-
|
|
701
|
-
...
|
|
700
|
+
M.value = {
|
|
701
|
+
...M.value,
|
|
702
702
|
[e]: t
|
|
703
703
|
};
|
|
704
704
|
}
|
|
@@ -726,8 +726,8 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
726
726
|
muted: e.enabled === !1
|
|
727
727
|
};
|
|
728
728
|
}
|
|
729
|
-
return (e,
|
|
730
|
-
!B.value || V.value ? (
|
|
729
|
+
return (e, n) => (A(), T("section", { class: _e(["user-management-page", { "user-management-page--task": B.value && !V.value }]) }, [
|
|
730
|
+
!B.value || V.value ? (A(), C(N(t), {
|
|
731
731
|
key: 0,
|
|
732
732
|
class: "user-scope-panel",
|
|
733
733
|
title: "租户",
|
|
@@ -735,40 +735,40 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
735
735
|
"search-keyword": u.value,
|
|
736
736
|
"search-placeholder": "搜索租户名称、alias 或 ID",
|
|
737
737
|
searchable: H.value,
|
|
738
|
-
onRefresh:
|
|
739
|
-
"onUpdate:searchKeyword":
|
|
738
|
+
onRefresh: n[2] ||= (e) => H.value ? p.value += 1 : nt(),
|
|
739
|
+
"onUpdate:searchKeyword": n[3] ||= (e) => u.value = e
|
|
740
740
|
}, {
|
|
741
|
-
default: P(() => [!H.value && U.value ? (
|
|
741
|
+
default: P(() => [!H.value && U.value ? (A(), T("button", {
|
|
742
742
|
key: 0,
|
|
743
743
|
class: "user-scope-entry",
|
|
744
744
|
type: "button",
|
|
745
|
-
onClick:
|
|
746
|
-
}, [
|
|
745
|
+
onClick: n[0] ||= (e) => rt(U.value)
|
|
746
|
+
}, [O(N(le), {
|
|
747
747
|
title: $(U.value),
|
|
748
748
|
secondary: "当前租户",
|
|
749
749
|
clickable: "",
|
|
750
|
-
selected:
|
|
751
|
-
}, null, 8, ["title", "selected"])])) :
|
|
750
|
+
selected: h.value?.id === U.value.id
|
|
751
|
+
}, null, 8, ["title", "selected"])])) : w("v-if", !0), H.value ? (A(), C(N(ie), {
|
|
752
752
|
key: 1,
|
|
753
753
|
context: Fe.value,
|
|
754
|
-
"selected-id":
|
|
755
|
-
"reload-key":
|
|
754
|
+
"selected-id": h.value?.id,
|
|
755
|
+
"reload-key": p.value,
|
|
756
756
|
keyword: u.value,
|
|
757
757
|
"empty-description": "暂无租户",
|
|
758
758
|
"loading-tip": "加载租户列表",
|
|
759
759
|
"fallback-title": "未命名租户",
|
|
760
760
|
"item-of": At,
|
|
761
761
|
onLoaded: tt,
|
|
762
|
-
onSelect:
|
|
762
|
+
onSelect: n[1] ||= (e) => rt(e)
|
|
763
763
|
}, null, 8, [
|
|
764
764
|
"context",
|
|
765
765
|
"selected-id",
|
|
766
766
|
"reload-key",
|
|
767
767
|
"keyword"
|
|
768
|
-
])) :
|
|
768
|
+
])) : w("v-if", !0)]),
|
|
769
769
|
_: 1
|
|
770
|
-
}, 8, ["search-keyword", "searchable"])) :
|
|
771
|
-
!B.value || V.value ? (
|
|
770
|
+
}, 8, ["search-keyword", "searchable"])) : w("v-if", !0),
|
|
771
|
+
!B.value || V.value ? (A(), C(N(oe), {
|
|
772
772
|
key: 1,
|
|
773
773
|
class: "user-list-panel",
|
|
774
774
|
context: Le.value,
|
|
@@ -776,10 +776,10 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
776
776
|
columns: Re.value,
|
|
777
777
|
"standard-crud-actions": "",
|
|
778
778
|
"standard-crud-row-actions": "",
|
|
779
|
-
"selected-key":
|
|
780
|
-
"expanded-row-keys":
|
|
781
|
-
"cell-renderers": { onlineStatus:
|
|
782
|
-
"reload-key":
|
|
779
|
+
"selected-key": _.value,
|
|
780
|
+
"expanded-row-keys": N(Se),
|
|
781
|
+
"cell-renderers": { onlineStatus: N(Pe) },
|
|
782
|
+
"reload-key": m.value,
|
|
783
783
|
ready: ze.value,
|
|
784
784
|
"quick-search-placeholder": "搜索账号",
|
|
785
785
|
"empty-description": "当前租户暂无账号",
|
|
@@ -787,18 +787,18 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
787
787
|
onAction: it,
|
|
788
788
|
onRowAction: at,
|
|
789
789
|
onRowDblclick: ot,
|
|
790
|
-
onRowExpand:
|
|
791
|
-
onLoaded:
|
|
792
|
-
onSelect:
|
|
790
|
+
onRowExpand: N(we),
|
|
791
|
+
onLoaded: N(Ce),
|
|
792
|
+
onSelect: n[4] ||= (e) => _.value = String(e.id ?? "")
|
|
793
793
|
}, {
|
|
794
|
-
expandedRow: P(({ record: e }) => [
|
|
795
|
-
sessions:
|
|
796
|
-
loading:
|
|
797
|
-
error:
|
|
798
|
-
"actions-disabled":
|
|
794
|
+
expandedRow: P(({ record: e }) => [O(N(ue), {
|
|
795
|
+
sessions: N(z)(String(e.id ?? "")).records,
|
|
796
|
+
loading: N(z)(String(e.id ?? "")).loading,
|
|
797
|
+
error: N(z)(String(e.id ?? "")).error,
|
|
798
|
+
"actions-disabled": D.value,
|
|
799
799
|
"can-revoke": (t) => xt(String(e.id ?? ""), t),
|
|
800
800
|
"can-revoke-all": bt(String(e.id ?? "")).length > 1,
|
|
801
|
-
onRefresh: (t) =>
|
|
801
|
+
onRefresh: (t) => N(R)(String(e.id ?? "")),
|
|
802
802
|
onRevoke: (t) => ht(e, t),
|
|
803
803
|
onRevokeAll: (t) => gt(e)
|
|
804
804
|
}, null, 8, [
|
|
@@ -824,46 +824,46 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
824
824
|
"ready",
|
|
825
825
|
"onRowExpand",
|
|
826
826
|
"onLoaded"
|
|
827
|
-
])) :
|
|
828
|
-
Ie.value ? (
|
|
827
|
+
])) : w("v-if", !0),
|
|
828
|
+
Ie.value ? (A(), C(N(r), {
|
|
829
829
|
key: 2,
|
|
830
|
-
open:
|
|
830
|
+
open: y.value,
|
|
831
831
|
title: Ve.value,
|
|
832
832
|
subtitle: He.value,
|
|
833
|
-
"close-on-outside":
|
|
834
|
-
promotion:
|
|
833
|
+
"close-on-outside": b.value === "view",
|
|
834
|
+
promotion: N(qe),
|
|
835
835
|
onClose: K
|
|
836
836
|
}, {
|
|
837
|
-
status: P(() => [
|
|
837
|
+
status: P(() => [b.value === "view" && v.value ? (A(), C(N(re), {
|
|
838
838
|
key: 0,
|
|
839
|
-
enabled:
|
|
840
|
-
disabled:
|
|
841
|
-
loading:
|
|
839
|
+
enabled: v.value.enabled !== !1,
|
|
840
|
+
disabled: D.value || !Ue.value,
|
|
841
|
+
loading: D.value,
|
|
842
842
|
"show-label": !1,
|
|
843
843
|
onChange: _t
|
|
844
844
|
}, null, 8, [
|
|
845
845
|
"enabled",
|
|
846
846
|
"disabled",
|
|
847
847
|
"loading"
|
|
848
|
-
])) :
|
|
849
|
-
operation: P(() => [
|
|
848
|
+
])) : w("v-if", !0)]),
|
|
849
|
+
operation: P(() => [O(N(i), {
|
|
850
850
|
context: Le.value,
|
|
851
851
|
actions: Ge.value,
|
|
852
|
-
"record-id":
|
|
852
|
+
"record-id": v.value?.id,
|
|
853
853
|
onAction: ut
|
|
854
854
|
}, null, 8, [
|
|
855
855
|
"context",
|
|
856
856
|
"actions",
|
|
857
857
|
"record-id"
|
|
858
858
|
])]),
|
|
859
|
-
default: P(() => [
|
|
860
|
-
mode:
|
|
861
|
-
draft:
|
|
862
|
-
"selected-user":
|
|
863
|
-
loading:
|
|
864
|
-
"load-failed":
|
|
865
|
-
saving:
|
|
866
|
-
"tenant-title": $(
|
|
859
|
+
default: P(() => [O(De, {
|
|
860
|
+
mode: b.value,
|
|
861
|
+
draft: M.value,
|
|
862
|
+
"selected-user": v.value,
|
|
863
|
+
loading: x.value,
|
|
864
|
+
"load-failed": E.value,
|
|
865
|
+
saving: D.value || x.value,
|
|
866
|
+
"tenant-title": $(h.value),
|
|
867
867
|
fields: L.value,
|
|
868
868
|
fallback: Je.value,
|
|
869
869
|
"field-names": Ye.value,
|
|
@@ -874,7 +874,7 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
874
874
|
onRetry: dt,
|
|
875
875
|
onSave: ft,
|
|
876
876
|
"onUpdate:field": Tt,
|
|
877
|
-
"onUpdate:password":
|
|
877
|
+
"onUpdate:password": n[5] ||= (e) => F.value = e
|
|
878
878
|
}, null, 8, [
|
|
879
879
|
"mode",
|
|
880
880
|
"draft",
|
|
@@ -896,41 +896,41 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
896
896
|
"subtitle",
|
|
897
897
|
"close-on-outside",
|
|
898
898
|
"promotion"
|
|
899
|
-
])) : (
|
|
899
|
+
])) : (A(), C(N(ne), {
|
|
900
900
|
key: 3,
|
|
901
901
|
title: Ve.value,
|
|
902
902
|
subtitle: He.value
|
|
903
903
|
}, {
|
|
904
|
-
status: P(() => [
|
|
904
|
+
status: P(() => [b.value === "view" && v.value ? (A(), C(N(re), {
|
|
905
905
|
key: 0,
|
|
906
|
-
enabled:
|
|
907
|
-
disabled:
|
|
908
|
-
loading:
|
|
906
|
+
enabled: v.value.enabled !== !1,
|
|
907
|
+
disabled: D.value || !Ue.value,
|
|
908
|
+
loading: D.value,
|
|
909
909
|
"show-label": !1,
|
|
910
910
|
onChange: _t
|
|
911
911
|
}, null, 8, [
|
|
912
912
|
"enabled",
|
|
913
913
|
"disabled",
|
|
914
914
|
"loading"
|
|
915
|
-
])) :
|
|
916
|
-
operation: P(() => [
|
|
917
|
-
context:
|
|
915
|
+
])) : w("v-if", !0)]),
|
|
916
|
+
operation: P(() => [O(N(i), {
|
|
917
|
+
context: N(o),
|
|
918
918
|
actions: Ke.value,
|
|
919
|
-
"record-id":
|
|
919
|
+
"record-id": v.value?.id,
|
|
920
920
|
onAction: ut
|
|
921
921
|
}, null, 8, [
|
|
922
922
|
"context",
|
|
923
923
|
"actions",
|
|
924
924
|
"record-id"
|
|
925
925
|
])]),
|
|
926
|
-
default: P(() => [
|
|
927
|
-
mode:
|
|
928
|
-
draft:
|
|
929
|
-
"selected-user":
|
|
930
|
-
loading:
|
|
931
|
-
"load-failed":
|
|
932
|
-
saving:
|
|
933
|
-
"tenant-title": $(
|
|
926
|
+
default: P(() => [O(De, {
|
|
927
|
+
mode: b.value,
|
|
928
|
+
draft: M.value,
|
|
929
|
+
"selected-user": v.value,
|
|
930
|
+
loading: x.value,
|
|
931
|
+
"load-failed": E.value,
|
|
932
|
+
saving: D.value || x.value,
|
|
933
|
+
"tenant-title": $(h.value ?? { id: M.value.tenantId }),
|
|
934
934
|
fields: L.value,
|
|
935
935
|
fallback: Je.value,
|
|
936
936
|
"field-names": Ye.value,
|
|
@@ -941,7 +941,7 @@ var Pe = /*#__PURE__*/ c(/* @__PURE__ */ O({
|
|
|
941
941
|
onRetry: dt,
|
|
942
942
|
onSave: ft,
|
|
943
943
|
"onUpdate:field": Tt,
|
|
944
|
-
"onUpdate:password":
|
|
944
|
+
"onUpdate:password": n[6] ||= (e) => F.value = e
|
|
945
945
|
}, null, 8, [
|
|
946
946
|
"mode",
|
|
947
947
|
"draft",
|