@ximatai/muyun-web-app 0.26.6 → 0.26.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{EmployeeDetailWorkspaceView-DHZ4arBj.js → EmployeeDetailWorkspaceView-DswEDSxH.js} +1 -1
- package/dist/EmployeeManagementView-C9STtw08.js +1777 -0
- package/dist/{MetadataOrchestrationView-BLxigKBh.js → MetadataOrchestrationView-DKYVGMzy.js} +195 -195
- package/dist/{ModuleActionManagementView-ByJzNkQs.js → ModuleActionManagementView-DiVzuPdu.js} +122 -122
- package/dist/RoleAuthorizationView-C0s4Bog7.js +592 -0
- package/dist/{RoleDetailWorkspaceView-Dfdigf04.js → RoleDetailWorkspaceView-dqHxKVfd.js} +1 -1
- package/dist/{RoleManagementView-D0e9nLwW.js → RoleManagementView-D43pUCxi.js} +542 -543
- package/dist/{SystemUserDetailWorkspaceView-D-UPhCmD.js → SystemUserDetailWorkspaceView-CQ9WeLrR.js} +1 -1
- package/dist/SystemUserManagementView-D75_ylYk.js +758 -0
- package/dist/{UserDetailWorkspaceView-BCSCLNSz.js → UserDetailWorkspaceView-BCST01d2.js} +1 -1
- package/dist/{UserManagementView-aY2AeeWK.js → UserManagementView-CcdvDo_y.js} +211 -212
- package/dist/index.css +1 -1
- package/dist/index.js +4293 -5694
- package/dist/{pageRealtime-Be2xkeKK.js → pageRealtime-EAiGWKEo.js} +87 -85
- package/dist/{platform-components-DuAohqJO.js → platform-components-CFU_zR7-.js} +3828 -2331
- package/dist/types/app/CurrentUserProfileDialog.vue.d.ts +33 -0
- package/dist/types/app/LoginView.vue.d.ts +4 -1
- package/dist/types/app/ThemeSkinPreferencesDialog.vue.d.ts +20 -0
- package/dist/types/app/lockedTabPreference.d.ts +6 -0
- package/dist/types/app/themeSkinPreference.d.ts +11 -0
- package/dist/types/app/workbenchStartup.d.ts +18 -1
- package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +43 -0
- package/dist/types/consumer/index.d.ts +17 -2
- package/dist/types/consumer/userPreferencePersistence.d.ts +7 -0
- package/dist/types/consumer/workbenchNavigation.d.ts +8 -0
- package/dist/types/dynamic-page-runtime/DynamicModuleWorkspaceDetailView.vue.d.ts +10 -0
- package/dist/types/dynamic-page-runtime/DynamicRecordDetailActions.vue.d.ts +38 -0
- package/dist/types/dynamic-page-runtime/NavigatorManagementEditor.vue.d.ts +25 -0
- package/dist/types/dynamic-page-runtime/PageNavigatorExplorer.vue.d.ts +43 -0
- package/dist/types/dynamic-page-runtime/detailSurfacePreference.d.ts +10 -0
- package/dist/types/dynamic-page-runtime/index.d.ts +2 -1
- package/dist/types/dynamic-page-runtime/modulePageEnhancements.d.ts +57 -1
- package/dist/types/dynamic-page-runtime/modulePageNavigation.d.ts +1 -1
- package/dist/types/dynamic-page-runtime/pageContextRuntime.d.ts +6 -0
- package/dist/types/dynamic-page-runtime/recordDetailController.d.ts +27 -0
- package/dist/types/platform-admin-runtime/index.d.ts +1 -1
- package/dist/types/platform-admin-runtime/platformAdminRoutes.d.ts +5 -0
- package/dist/types/platform-admin-runtime/realtime.d.ts +2 -1
- package/dist/types/platform-components/BusinessNotificationPanel.vue.d.ts +12 -0
- package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +6 -0
- package/dist/types/platform-components/FileTransferUploader.vue.d.ts +20 -1
- package/dist/types/platform-components/ManagementPanelHeader.vue.d.ts +32 -0
- package/dist/types/platform-components/ManagementWorkspace.vue.d.ts +8 -2
- package/dist/types/platform-components/RecordActionBar.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordDetailDrawer.vue.d.ts +4 -1
- package/dist/types/platform-components/RecordDetailLayout.vue.d.ts +11 -7
- package/dist/types/platform-components/RecordDetailPanel.vue.d.ts +7 -5
- package/dist/types/platform-components/RecordExplorerPanel.vue.d.ts +6 -6
- package/dist/types/platform-components/RecordFileReferenceTransfer.vue.d.ts +10 -0
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +5 -1
- package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +4 -1
- 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 +1 -1
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +9 -2
- package/dist/types/platform-components/RecordStatusSwitch.vue.d.ts +3 -0
- package/dist/types/platform-components/SingleImageFileReferenceField.vue.d.ts +23 -0
- package/dist/types/platform-components/StaticManagementLayout.vue.d.ts +13 -7
- package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +3 -0
- package/dist/types/platform-components/fileReferenceTransfer.d.ts +8 -0
- package/dist/types/platform-components/index.d.ts +5 -2
- package/dist/types/platform-components/managementWorkspaceLayout.d.ts +14 -0
- package/dist/types/platform-components/platformErrorFeedback.d.ts +2 -0
- package/dist/types/platform-components/recordActionBarModel.d.ts +6 -0
- package/dist/types/platform-components/recordFormFieldModel.d.ts +6 -3
- package/dist/types/platform-components/recycleBinState.d.ts +2 -0
- package/dist/types/platform-components/scopedTreeModuleContext.d.ts +12 -1
- package/dist/types/platform-components/staticCrudManagementState.d.ts +1 -1
- package/dist/types/platform-workbench/Workbench.vue.d.ts +12 -2
- package/dist/types/platform-workbench/WorkbenchBrandControl.vue.d.ts +22 -2
- package/dist/types/platform-workbench/WorkbenchMenu.vue.d.ts +24 -0
- package/dist/types/platform-workbench/WorkbenchSidebarMenuEntry.vue.d.ts +19 -0
- package/dist/types/platform-workbench/index.d.ts +1 -0
- package/dist/types/platform-workbench/menuHoverClickIntent.d.ts +10 -0
- package/dist/types/platform-workbench/menuNavigation.d.ts +3 -0
- package/dist/types/platform-workbench/menuPointerAim.d.ts +1 -1
- package/dist/types/platform-workbench/modulePageWorkspaceViews.d.ts +7 -0
- package/dist/types/platform-workbench/workbenchLayout.d.ts +39 -0
- package/dist/types/platform-workbench/workbenchNavigation.d.ts +2 -0
- package/dist/types/platform-workbench/workspaceViewHost.d.ts +2 -0
- package/dist/types/views/fieldUiControlManagementState.d.ts +1 -1
- package/dist/types/views/tenantManagementState.d.ts +11 -1
- package/dist/types/vue-ui-antdv/components/UiButton.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiDataTable.vue.d.ts +2 -2
- package/dist/types/vue-ui-antdv/components/UiIcon.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiModal.vue.d.ts +1 -1
- 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/UiThemeProvider.vue.d.ts +21 -0
- package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +7 -1
- package/dist/types/vue-ui-antdv/index.d.ts +4 -0
- package/dist/types/vue-ui-antdv/theme.d.ts +58 -0
- package/dist/types/vue-ui-antdv/themeGlobalScope.d.ts +2 -0
- package/dist/types/vue-ui-antdv/types.d.ts +1 -0
- package/dist/types/web-contracts/index.d.ts +168 -17
- package/dist/types/web-core/businessNotifications.d.ts +3 -0
- package/dist/types/web-core/clients.d.ts +9 -1
- package/dist/types/web-core/index.d.ts +3 -0
- package/dist/types/web-core/mock.d.ts +3 -1
- package/dist/types/web-core/module/moduleContext.d.ts +1 -0
- package/dist/types/web-core/module/runtimeContext.d.ts +3 -1
- package/dist/types/web-core/module/staticModuleClient.d.ts +8 -1
- package/dist/types/web-core/realtime.d.ts +5 -1
- package/dist/types/web-core/userPreferences.d.ts +24 -0
- package/dist/{useUserSessionRows-DX9qYU5r.js → useUserSessionRows-DCpUZCzN.js} +2 -2
- package/dist/workspaceViewSessions-Dj1LjdG1.js +4984 -0
- package/package.json +1 -1
- package/dist/EmployeeManagementView-BfGb_ssB.js +0 -1706
- package/dist/RoleAuthorizationView-DJSWY3fu.js +0 -592
- package/dist/SystemUserManagementView-DNKRvmDk.js +0 -761
- package/dist/currentUserContext-B1lj1WgF.js +0 -11
- package/dist/types/views/ApplicationManagementView.vue.d.ts +0 -3
- package/dist/types/views/DepartmentManagementView.vue.d.ts +0 -3
- package/dist/types/views/FieldSpecManagementView.vue.d.ts +0 -3
- package/dist/types/views/OrganizationManagementView.vue.d.ts +0 -3
- package/dist/types/views/applicationManagementState.d.ts +0 -64
- package/dist/types/views/departmentManagementState.d.ts +0 -137
- package/dist/types/views/fieldSpecManagementState.d.ts +0 -80
- package/dist/types/views/organizationManagementState.d.ts +0 -64
- package/dist/workspaceViewSessions-C3GP1UGp.js +0 -2639
|
@@ -0,0 +1,1777 @@
|
|
|
1
|
+
import { C as e, E as t, F as n, Ft as r, I as i, L as a, M as o, N as ee, Nt as s, P as c, Pn as te, R as ne, Vt as l, X as re, Z as ie, Zn as u, b as ae, c as oe, ct as se, dt as ce, f as le, gt as ue, h as d, ht as de, i as fe, it as pe, j as f, k as me, kt as he, l as ge, m as _e, nt as p, r as ve, u as ye, ut as be, v as m, w as xe, x as h, y as Se } from "./platform-components-CFU_zR7-.js";
|
|
2
|
+
import { S as Ce, i as we, j as Te, n as Ee, r as De, t as Oe, u as ke } from "./workspaceViewSessions-Dj1LjdG1.js";
|
|
3
|
+
import { a as Ae, i as je, r as Me } from "./pageRealtime-EAiGWKEo.js";
|
|
4
|
+
import { Fragment as Ne, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createTextVNode as x, createVNode as S, defineComponent as C, normalizeClass as Pe, onBeforeUnmount as Fe, onMounted as Ie, openBlock as w, ref as T, renderList as Le, toDisplayString as E, unref as D, watch as Re, withCtx as O, withModifiers as k } from "vue";
|
|
5
|
+
//#region src/views/employeeDetailStateModel.ts
|
|
6
|
+
function ze(e) {
|
|
7
|
+
return e.mode === "view" || e.loadingDetail || e.saving ? !0 : e.mode === "edit" && !e.selectedEmployeeId;
|
|
8
|
+
}
|
|
9
|
+
function Be(e) {
|
|
10
|
+
return e.activeRequestSeq === e.requestSeq && e.selectedEmployeeKey === e.recordId;
|
|
11
|
+
}
|
|
12
|
+
function Ve(e) {
|
|
13
|
+
return e.mode === "create" ? !0 : !e.loadingDetail && !e.loadFailed && !!e.selectedEmployeeId;
|
|
14
|
+
}
|
|
15
|
+
function He(e) {
|
|
16
|
+
return !e.saving;
|
|
17
|
+
}
|
|
18
|
+
function Ue(e) {
|
|
19
|
+
return e.mode !== "edit" || !e.selectedEmployeeId;
|
|
20
|
+
}
|
|
21
|
+
function We(e) {
|
|
22
|
+
let t = e.filter((e) => e.visible && e.required && !Ge(e.value)).map((e) => e.label);
|
|
23
|
+
return t.length > 0 ? `请填写${t.join("、")}` : void 0;
|
|
24
|
+
}
|
|
25
|
+
function Ge(e) {
|
|
26
|
+
return typeof e == "string" ? e.trim().length > 0 : e != null;
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/views/EmployeeEmploymentDrawer.vue?vue&type=script&setup=true&lang.ts
|
|
30
|
+
var Ke = { class: "employment-drawer" }, qe = { class: "employment-drawer-header" }, A = { class: "employment-primary-field" }, j = ["checked", "disabled"], M = { key: 0 }, N = { class: "employment-editor-actions" }, P = {
|
|
31
|
+
key: 2,
|
|
32
|
+
class: "employment-state"
|
|
33
|
+
}, F = {
|
|
34
|
+
key: 3,
|
|
35
|
+
class: "employment-empty"
|
|
36
|
+
}, Je = /*#__PURE__*/ r(/* @__PURE__ */ C({
|
|
37
|
+
name: "EmployeeEmploymentDrawer",
|
|
38
|
+
__name: "EmployeeEmploymentDrawer",
|
|
39
|
+
props: {
|
|
40
|
+
open: { type: Boolean },
|
|
41
|
+
employee: {}
|
|
42
|
+
},
|
|
43
|
+
emits: ["close", "saved"],
|
|
44
|
+
setup(e, { emit: t }) {
|
|
45
|
+
let r = e, i = t, a = l({ moduleAlias: "iam.employee" }), o = l({ moduleAlias: "iam.organization" }), ee = l({ moduleAlias: "iam.department" }), c = l({ moduleAlias: "iam.position" }), te = T([]), ne = T(!1), re = T(!1), u = T(!1), le = T(!1), d = T(_e()), fe = [
|
|
46
|
+
{
|
|
47
|
+
key: "position",
|
|
48
|
+
title: "岗位",
|
|
49
|
+
width: 150
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: "organization",
|
|
53
|
+
title: "机构",
|
|
54
|
+
width: 140
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
key: "department",
|
|
58
|
+
title: "部门",
|
|
59
|
+
width: 140
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
key: "primaryPosition",
|
|
63
|
+
title: "主岗位",
|
|
64
|
+
width: 80
|
|
65
|
+
}
|
|
66
|
+
], f = g(() => `任职管理 - ${ve(r.employee)}`), me = g(() => te.value), he = g(() => oe(ee, {
|
|
67
|
+
scopeFieldName: "organizationId",
|
|
68
|
+
scopeValue: d.value.organizationId,
|
|
69
|
+
treePath: "/iam.department/tree",
|
|
70
|
+
sortPath: "/iam.department/sort"
|
|
71
|
+
})), ge = g(() => {
|
|
72
|
+
let e = r.employee;
|
|
73
|
+
return !!(e?.organizationId && e?.departmentId && e.organizationId === d.value.organizationId && e.departmentId === d.value.departmentId);
|
|
74
|
+
});
|
|
75
|
+
Re(() => [r.open, r.employee?.id], ([e]) => {
|
|
76
|
+
e ? ye() : m();
|
|
77
|
+
}, { immediate: !0 });
|
|
78
|
+
function _e() {
|
|
79
|
+
return {
|
|
80
|
+
primaryPosition: !1,
|
|
81
|
+
enabled: !0
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function ve(e) {
|
|
85
|
+
return String(e?.title ?? e?.employeeNo ?? e?.id ?? "职员");
|
|
86
|
+
}
|
|
87
|
+
async function ye() {
|
|
88
|
+
let e = r.employee?.id;
|
|
89
|
+
if (e) {
|
|
90
|
+
ne.value = !0, re.value = !1;
|
|
91
|
+
try {
|
|
92
|
+
te.value = (await a.http.request({ path: `/iam.employee/${encodeURIComponent(e)}/employment-view` })).records;
|
|
93
|
+
} catch (e) {
|
|
94
|
+
re.value = !0, p(e, {
|
|
95
|
+
source: "employee-employment",
|
|
96
|
+
phase: "load"
|
|
97
|
+
});
|
|
98
|
+
} finally {
|
|
99
|
+
ne.value = !1;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function m() {
|
|
104
|
+
le.value = !1, d.value = _e();
|
|
105
|
+
}
|
|
106
|
+
function xe() {
|
|
107
|
+
d.value = {
|
|
108
|
+
organizationId: r.employee?.organizationId,
|
|
109
|
+
departmentId: r.employee?.departmentId,
|
|
110
|
+
primaryPosition: !1,
|
|
111
|
+
enabled: !0
|
|
112
|
+
}, le.value = !0;
|
|
113
|
+
}
|
|
114
|
+
function Se(e) {
|
|
115
|
+
d.value = { ...e }, le.value = !0;
|
|
116
|
+
}
|
|
117
|
+
function Ce(e) {
|
|
118
|
+
let t = e !== d.value.organizationId;
|
|
119
|
+
d.value = {
|
|
120
|
+
...d.value,
|
|
121
|
+
organizationId: e,
|
|
122
|
+
departmentId: t ? void 0 : d.value.departmentId,
|
|
123
|
+
primaryPosition: t ? !1 : d.value.primaryPosition
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function we(e) {
|
|
127
|
+
let t = !!(d.value.primaryPosition && r.employee?.organizationId === d.value.organizationId && r.employee?.departmentId === e);
|
|
128
|
+
d.value = {
|
|
129
|
+
...d.value,
|
|
130
|
+
departmentId: e,
|
|
131
|
+
primaryPosition: t
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function Te(e) {
|
|
135
|
+
if (e && !ge.value) {
|
|
136
|
+
pe("主岗必须与职员主机构、主部门一致", {
|
|
137
|
+
source: "employee-employment",
|
|
138
|
+
phase: "validation"
|
|
139
|
+
});
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
d.value = {
|
|
143
|
+
...d.value,
|
|
144
|
+
primaryPosition: e
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function Ee(e, t) {
|
|
148
|
+
let n = t;
|
|
149
|
+
return e.key === "position" ? n.positionTitle ?? n.positionId : e.key === "organization" ? n.organizationTitle ?? n.organizationId : e.key === "department" ? n.departmentTitle ?? n.departmentId : e.key === "primaryPosition" ? n.primaryPosition ? "是" : "否" : "";
|
|
150
|
+
}
|
|
151
|
+
function De(e) {
|
|
152
|
+
return e.enabled === !1;
|
|
153
|
+
}
|
|
154
|
+
function Oe(e) {
|
|
155
|
+
return [
|
|
156
|
+
...e.primaryPosition ? [] : [{
|
|
157
|
+
key: "primary",
|
|
158
|
+
title: "设为主岗"
|
|
159
|
+
}],
|
|
160
|
+
{
|
|
161
|
+
key: e.enabled === !1 ? "enable" : "disable",
|
|
162
|
+
title: e.enabled === !1 ? "启用" : "停用"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
key: "delete",
|
|
166
|
+
title: "删除",
|
|
167
|
+
danger: !0
|
|
168
|
+
}
|
|
169
|
+
];
|
|
170
|
+
}
|
|
171
|
+
function ke(e, t) {
|
|
172
|
+
(t === "primary" || t === "enable" || t === "disable" || t === "delete") && je(e, t);
|
|
173
|
+
}
|
|
174
|
+
async function Ae() {
|
|
175
|
+
let e = r.employee?.id;
|
|
176
|
+
if (!e || !d.value.organizationId || !d.value.departmentId || !d.value.positionId) {
|
|
177
|
+
pe("请选择机构、部门和岗位", {
|
|
178
|
+
source: "employee-employment",
|
|
179
|
+
phase: "validation"
|
|
180
|
+
});
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
u.value = !0;
|
|
184
|
+
try {
|
|
185
|
+
let t = d.value.id;
|
|
186
|
+
await a.http.request({
|
|
187
|
+
method: "POST",
|
|
188
|
+
path: t ? `/iam.employee/${encodeURIComponent(e)}/positions/${encodeURIComponent(t)}/update` : `/iam.employee/${encodeURIComponent(e)}/positions`,
|
|
189
|
+
body: {
|
|
190
|
+
...d.value,
|
|
191
|
+
employeeId: e
|
|
192
|
+
}
|
|
193
|
+
}), m(), await ye(), i("saved", e), await ie({
|
|
194
|
+
success: !0,
|
|
195
|
+
message: "任职已保存"
|
|
196
|
+
}, {
|
|
197
|
+
source: "employee-employment",
|
|
198
|
+
phase: "action"
|
|
199
|
+
});
|
|
200
|
+
} catch (e) {
|
|
201
|
+
p(e, {
|
|
202
|
+
source: "employee-employment",
|
|
203
|
+
phase: "action"
|
|
204
|
+
});
|
|
205
|
+
} finally {
|
|
206
|
+
u.value = !1;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
async function je(e, t) {
|
|
210
|
+
let n = r.employee?.id;
|
|
211
|
+
if (n && !(t === "delete" && !await se({
|
|
212
|
+
title: "删除任职",
|
|
213
|
+
content: "确认删除该任职?",
|
|
214
|
+
okText: "删除",
|
|
215
|
+
danger: !0
|
|
216
|
+
}))) {
|
|
217
|
+
u.value = !0;
|
|
218
|
+
try {
|
|
219
|
+
await a.http.request({
|
|
220
|
+
method: "POST",
|
|
221
|
+
path: `/iam.employee/${encodeURIComponent(n)}/positions/${encodeURIComponent(e.id)}/${t}`
|
|
222
|
+
}), await ye(), i("saved", n);
|
|
223
|
+
} catch (e) {
|
|
224
|
+
p(e, {
|
|
225
|
+
source: "employee-employment",
|
|
226
|
+
phase: "action"
|
|
227
|
+
});
|
|
228
|
+
} finally {
|
|
229
|
+
u.value = !1;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return (t, r) => (w(), _(D(n), {
|
|
234
|
+
open: e.open,
|
|
235
|
+
title: f.value,
|
|
236
|
+
onClose: r[4] ||= (e) => i("close")
|
|
237
|
+
}, {
|
|
238
|
+
operation: O(() => [S(D(s), {
|
|
239
|
+
type: "text",
|
|
240
|
+
"icon-name": "reload",
|
|
241
|
+
disabled: ne.value || u.value,
|
|
242
|
+
onClick: ye
|
|
243
|
+
}, {
|
|
244
|
+
default: O(() => [...r[5] ||= [x(" 刷新 ", -1)]]),
|
|
245
|
+
_: 1
|
|
246
|
+
}, 8, ["disabled"])]),
|
|
247
|
+
default: O(() => [b("div", Ke, [
|
|
248
|
+
b("div", qe, [r[7] ||= b("div", null, [b("strong", null, "任职信息"), b("span", null, "角色授权按具体任职生效")], -1), S(D(s), {
|
|
249
|
+
type: "primary",
|
|
250
|
+
"icon-name": "plus",
|
|
251
|
+
disabled: u.value,
|
|
252
|
+
onClick: xe
|
|
253
|
+
}, {
|
|
254
|
+
default: O(() => [...r[6] ||= [x("新增任职", -1)]]),
|
|
255
|
+
_: 1
|
|
256
|
+
}, 8, ["disabled"])]),
|
|
257
|
+
le.value ? (w(), y("form", {
|
|
258
|
+
key: 0,
|
|
259
|
+
class: "employment-editor",
|
|
260
|
+
onSubmit: k(Ae, ["prevent"])
|
|
261
|
+
}, [
|
|
262
|
+
b("label", null, [r[8] ||= b("span", null, "机构", -1), S(D(ae), {
|
|
263
|
+
value: d.value.organizationId,
|
|
264
|
+
context: D(o),
|
|
265
|
+
placeholder: "请选择机构",
|
|
266
|
+
constraints: [D(h)()],
|
|
267
|
+
disabled: u.value,
|
|
268
|
+
"onUpdate:value": Ce
|
|
269
|
+
}, null, 8, [
|
|
270
|
+
"value",
|
|
271
|
+
"context",
|
|
272
|
+
"constraints",
|
|
273
|
+
"disabled"
|
|
274
|
+
])]),
|
|
275
|
+
b("label", null, [r[9] ||= b("span", null, "部门", -1), S(D(ae), {
|
|
276
|
+
value: d.value.departmentId,
|
|
277
|
+
context: he.value,
|
|
278
|
+
placeholder: "请选择部门",
|
|
279
|
+
constraints: [D(h)()],
|
|
280
|
+
disabled: u.value || !d.value.organizationId,
|
|
281
|
+
"onUpdate:value": we
|
|
282
|
+
}, null, 8, [
|
|
283
|
+
"value",
|
|
284
|
+
"context",
|
|
285
|
+
"constraints",
|
|
286
|
+
"disabled"
|
|
287
|
+
])]),
|
|
288
|
+
b("label", null, [r[10] ||= b("span", null, "岗位", -1), S(D(ae), {
|
|
289
|
+
value: d.value.positionId,
|
|
290
|
+
context: D(c),
|
|
291
|
+
mode: "list",
|
|
292
|
+
placeholder: "请选择岗位",
|
|
293
|
+
constraints: [D(h)()],
|
|
294
|
+
disabled: u.value,
|
|
295
|
+
"onUpdate:value": r[0] ||= (e) => d.value.positionId = e ? String(e) : void 0
|
|
296
|
+
}, null, 8, [
|
|
297
|
+
"value",
|
|
298
|
+
"context",
|
|
299
|
+
"constraints",
|
|
300
|
+
"disabled"
|
|
301
|
+
])]),
|
|
302
|
+
b("label", A, [
|
|
303
|
+
r[12] ||= b("span", null, "主岗位", -1),
|
|
304
|
+
b("span", null, [b("input", {
|
|
305
|
+
type: "checkbox",
|
|
306
|
+
checked: d.value.primaryPosition === !0,
|
|
307
|
+
disabled: u.value || !ge.value,
|
|
308
|
+
onChange: r[1] ||= (e) => Te(e.target.checked)
|
|
309
|
+
}, null, 40, j), r[11] ||= x(" 设为主岗 ", -1)]),
|
|
310
|
+
ge.value ? v("v-if", !0) : (w(), y("small", M, "主岗必须与职员主机构、主部门一致"))
|
|
311
|
+
]),
|
|
312
|
+
b("div", N, [S(D(s), {
|
|
313
|
+
disabled: u.value,
|
|
314
|
+
onClick: m
|
|
315
|
+
}, {
|
|
316
|
+
default: O(() => [...r[13] ||= [x("取消", -1)]]),
|
|
317
|
+
_: 1
|
|
318
|
+
}, 8, ["disabled"]), S(D(s), {
|
|
319
|
+
type: "primary",
|
|
320
|
+
"html-type": "submit",
|
|
321
|
+
loading: u.value
|
|
322
|
+
}, {
|
|
323
|
+
default: O(() => [...r[14] ||= [x("保存任职", -1)]]),
|
|
324
|
+
_: 1
|
|
325
|
+
}, 8, ["loading"])])
|
|
326
|
+
], 32)) : v("v-if", !0),
|
|
327
|
+
ne.value ? (w(), _(D(ce), {
|
|
328
|
+
key: 1,
|
|
329
|
+
class: "employment-state",
|
|
330
|
+
tip: "加载任职"
|
|
331
|
+
})) : re.value ? (w(), y("div", P, [S(D(be), {
|
|
332
|
+
title: "任职信息加载失败",
|
|
333
|
+
message: "无法加载任职信息,请重试"
|
|
334
|
+
}), S(D(s), {
|
|
335
|
+
type: "primary",
|
|
336
|
+
"icon-name": "reload",
|
|
337
|
+
onClick: ye
|
|
338
|
+
}, {
|
|
339
|
+
default: O(() => [...r[15] ||= [x("重试", -1)]]),
|
|
340
|
+
_: 1
|
|
341
|
+
})])) : te.value.length === 0 ? (w(), y("p", F, "暂无任职信息")) : (w(), _(D(ue), {
|
|
342
|
+
key: 4,
|
|
343
|
+
class: "employment-table",
|
|
344
|
+
columns: fe,
|
|
345
|
+
rows: me.value,
|
|
346
|
+
"row-key": "id",
|
|
347
|
+
pagination: !1,
|
|
348
|
+
"horizontal-scroll": "",
|
|
349
|
+
"show-action-column": "",
|
|
350
|
+
"action-column-width": "92",
|
|
351
|
+
"row-muted": De
|
|
352
|
+
}, {
|
|
353
|
+
cell: O(({ column: e, record: t }) => [x(E(Ee(e, t)), 1)]),
|
|
354
|
+
rowActions: O(({ record: e }) => [b("div", {
|
|
355
|
+
class: "employment-table-row-actions",
|
|
356
|
+
onClick: r[2] ||= k(() => {}, ["stop"]),
|
|
357
|
+
onDblclick: r[3] ||= k(() => {}, ["stop"])
|
|
358
|
+
}, [S(D(s), {
|
|
359
|
+
type: "text",
|
|
360
|
+
disabled: u.value,
|
|
361
|
+
onClick: (t) => Se(e)
|
|
362
|
+
}, {
|
|
363
|
+
default: O(() => [...r[16] ||= [x(" 编辑 ", -1)]]),
|
|
364
|
+
_: 1
|
|
365
|
+
}, 8, ["disabled", "onClick"]), S(D(de), {
|
|
366
|
+
items: Oe(e),
|
|
367
|
+
trigger: "hover",
|
|
368
|
+
onSelect: (t) => ke(e, t)
|
|
369
|
+
}, {
|
|
370
|
+
default: O(() => [S(D(s), {
|
|
371
|
+
type: "text",
|
|
372
|
+
"icon-name": "down",
|
|
373
|
+
title: "更多",
|
|
374
|
+
"aria-label": "更多",
|
|
375
|
+
disabled: u.value
|
|
376
|
+
}, null, 8, ["disabled"])]),
|
|
377
|
+
_: 1
|
|
378
|
+
}, 8, ["items", "onSelect"])], 32)]),
|
|
379
|
+
_: 1
|
|
380
|
+
}, 8, ["rows"]))
|
|
381
|
+
])]),
|
|
382
|
+
_: 1
|
|
383
|
+
}, 8, ["open", "title"]));
|
|
384
|
+
}
|
|
385
|
+
}), [["__scopeId", "data-v-fd7522f0"]]), I = {
|
|
386
|
+
key: 1,
|
|
387
|
+
class: "employee-detail-state"
|
|
388
|
+
}, L = { class: "employee-account-section" }, R = { class: "employee-account-header" }, z = {
|
|
389
|
+
key: 1,
|
|
390
|
+
class: "employee-account-state"
|
|
391
|
+
}, B = { class: "employee-account-form-actions" }, V = {
|
|
392
|
+
key: 3,
|
|
393
|
+
class: "employee-account-empty"
|
|
394
|
+
}, H = {
|
|
395
|
+
key: 4,
|
|
396
|
+
class: "employee-account-card"
|
|
397
|
+
}, Ye = { class: "employee-account-status" }, Xe = { key: 0 }, U = { class: "employee-form-label" }, W = {
|
|
398
|
+
key: 0,
|
|
399
|
+
"aria-hidden": "true"
|
|
400
|
+
}, Ze = /*#__PURE__*/ r(/* @__PURE__ */ C({
|
|
401
|
+
name: "EmployeeDetailContent",
|
|
402
|
+
__name: "EmployeeDetailContent",
|
|
403
|
+
props: {
|
|
404
|
+
mode: {},
|
|
405
|
+
draft: {},
|
|
406
|
+
selectedEmployee: {},
|
|
407
|
+
selectedOrganization: {},
|
|
408
|
+
detailDepartment: {},
|
|
409
|
+
loading: { type: Boolean },
|
|
410
|
+
loadFailed: { type: Boolean },
|
|
411
|
+
formDisabled: { type: Boolean },
|
|
412
|
+
showContent: { type: Boolean },
|
|
413
|
+
fields: {},
|
|
414
|
+
fallback: {},
|
|
415
|
+
pickerConfigs: {},
|
|
416
|
+
displayOf: { type: Function },
|
|
417
|
+
visibleOf: { type: Function },
|
|
418
|
+
labelOf: { type: Function },
|
|
419
|
+
requiredOf: { type: Function },
|
|
420
|
+
externallyChanged: { type: Boolean },
|
|
421
|
+
account: {},
|
|
422
|
+
accountUser: {},
|
|
423
|
+
loadingAccounts: { type: Boolean },
|
|
424
|
+
accountsLoadFailed: { type: Boolean },
|
|
425
|
+
savingAccount: { type: Boolean },
|
|
426
|
+
canManageAccounts: { type: Boolean },
|
|
427
|
+
showAccountProvisionForm: { type: Boolean },
|
|
428
|
+
accountProvisionDraft: {},
|
|
429
|
+
accountUserTitle: {},
|
|
430
|
+
accountUserDescription: {},
|
|
431
|
+
accountStatusTitle: {},
|
|
432
|
+
optionContext: {}
|
|
433
|
+
},
|
|
434
|
+
emits: [
|
|
435
|
+
"retry",
|
|
436
|
+
"save",
|
|
437
|
+
"reloadExternal",
|
|
438
|
+
"dismissExternal",
|
|
439
|
+
"updateField",
|
|
440
|
+
"retryAccounts",
|
|
441
|
+
"startAccountProvision",
|
|
442
|
+
"cancelAccountProvision",
|
|
443
|
+
"provisionAccount",
|
|
444
|
+
"removeAccount",
|
|
445
|
+
"updateAccountProvisionField"
|
|
446
|
+
],
|
|
447
|
+
setup(e, { emit: t }) {
|
|
448
|
+
let n = e, r = t;
|
|
449
|
+
return (e, t) => n.loading ? (w(), _(D(ce), {
|
|
450
|
+
key: 0,
|
|
451
|
+
class: "employee-detail-state",
|
|
452
|
+
tip: "加载职员详情"
|
|
453
|
+
})) : n.loadFailed ? (w(), y("div", I, [S(D(be), {
|
|
454
|
+
title: "详情加载失败",
|
|
455
|
+
message: "无法加载职员详情,请重试"
|
|
456
|
+
}), S(D(s), {
|
|
457
|
+
type: "primary",
|
|
458
|
+
"icon-name": "reload",
|
|
459
|
+
onClick: t[0] ||= (e) => r("retry")
|
|
460
|
+
}, {
|
|
461
|
+
default: O(() => [...t[12] ||= [x("重试", -1)]]),
|
|
462
|
+
_: 1
|
|
463
|
+
})])) : n.showContent ? (w(), y(Ne, { key: 2 }, [n.mode === "view" ? (w(), y(Ne, { key: 0 }, [
|
|
464
|
+
S(D(f), {
|
|
465
|
+
record: n.draft,
|
|
466
|
+
fields: n.fields,
|
|
467
|
+
fallback: n.fallback,
|
|
468
|
+
"picker-configs": n.pickerConfigs,
|
|
469
|
+
"display-of": n.displayOf
|
|
470
|
+
}, null, 8, [
|
|
471
|
+
"record",
|
|
472
|
+
"fields",
|
|
473
|
+
"fallback",
|
|
474
|
+
"picker-configs",
|
|
475
|
+
"display-of"
|
|
476
|
+
]),
|
|
477
|
+
b("section", L, [b("div", R, [t[14] ||= b("strong", null, "登录账号", -1), !n.account && !n.showAccountProvisionForm ? (w(), _(D(s), {
|
|
478
|
+
key: 0,
|
|
479
|
+
type: "primary",
|
|
480
|
+
"icon-name": "plus",
|
|
481
|
+
disabled: !n.canManageAccounts,
|
|
482
|
+
onClick: t[1] ||= (e) => r("startAccountProvision")
|
|
483
|
+
}, {
|
|
484
|
+
default: O(() => [...t[13] ||= [x(" 设置账号 ", -1)]]),
|
|
485
|
+
_: 1
|
|
486
|
+
}, 8, ["disabled"])) : v("v-if", !0)]), n.loadingAccounts ? (w(), _(D(ce), {
|
|
487
|
+
key: 0,
|
|
488
|
+
class: "employee-account-state",
|
|
489
|
+
tip: "加载账号绑定"
|
|
490
|
+
})) : n.accountsLoadFailed ? (w(), y("div", z, [S(D(be), {
|
|
491
|
+
title: "账号绑定加载失败",
|
|
492
|
+
message: "无法加载职员账号绑定,请重试"
|
|
493
|
+
}), S(D(s), {
|
|
494
|
+
"icon-name": "reload",
|
|
495
|
+
onClick: t[2] ||= (e) => r("retryAccounts")
|
|
496
|
+
}, {
|
|
497
|
+
default: O(() => [...t[15] ||= [x("重试", -1)]]),
|
|
498
|
+
_: 1
|
|
499
|
+
})])) : n.showAccountProvisionForm ? (w(), y("form", {
|
|
500
|
+
key: 2,
|
|
501
|
+
class: "employee-account-form",
|
|
502
|
+
onSubmit: t[6] ||= k((e) => r("provisionAccount"), ["prevent"])
|
|
503
|
+
}, [
|
|
504
|
+
b("label", null, [t[16] ||= b("span", null, "账号", -1), S(D(he), {
|
|
505
|
+
value: n.accountProvisionDraft.username,
|
|
506
|
+
placeholder: "请输入登录账号",
|
|
507
|
+
disabled: n.savingAccount,
|
|
508
|
+
"onUpdate:value": t[3] ||= (e) => r("updateAccountProvisionField", "username", e)
|
|
509
|
+
}, null, 8, ["value", "disabled"])]),
|
|
510
|
+
b("label", null, [t[17] ||= b("span", null, "初始密码", -1), S(D(he), {
|
|
511
|
+
value: n.accountProvisionDraft.password,
|
|
512
|
+
type: "password",
|
|
513
|
+
placeholder: "请输入初始密码",
|
|
514
|
+
disabled: n.savingAccount,
|
|
515
|
+
"onUpdate:value": t[4] ||= (e) => r("updateAccountProvisionField", "password", e)
|
|
516
|
+
}, null, 8, ["value", "disabled"])]),
|
|
517
|
+
b("div", B, [S(D(s), {
|
|
518
|
+
disabled: n.savingAccount,
|
|
519
|
+
onClick: t[5] ||= (e) => r("cancelAccountProvision")
|
|
520
|
+
}, {
|
|
521
|
+
default: O(() => [...t[18] ||= [x("取消", -1)]]),
|
|
522
|
+
_: 1
|
|
523
|
+
}, 8, ["disabled"]), S(D(s), {
|
|
524
|
+
type: "primary",
|
|
525
|
+
"html-type": "submit",
|
|
526
|
+
"icon-name": "plus",
|
|
527
|
+
loading: n.savingAccount,
|
|
528
|
+
disabled: !n.canManageAccounts
|
|
529
|
+
}, {
|
|
530
|
+
default: O(() => [...t[19] ||= [x(" 创建账号并绑定 ", -1)]]),
|
|
531
|
+
_: 1
|
|
532
|
+
}, 8, ["loading", "disabled"])])
|
|
533
|
+
], 32)) : n.account ? (w(), y("div", H, [
|
|
534
|
+
b("div", null, [b("strong", null, E(n.accountUserTitle), 1), b("span", null, E(n.accountUserDescription), 1)]),
|
|
535
|
+
b("span", Ye, E(n.accountStatusTitle), 1),
|
|
536
|
+
S(D(s), {
|
|
537
|
+
danger: "",
|
|
538
|
+
"icon-name": "delete",
|
|
539
|
+
disabled: n.savingAccount || !n.canManageAccounts,
|
|
540
|
+
onClick: t[7] ||= (e) => r("removeAccount")
|
|
541
|
+
}, {
|
|
542
|
+
default: O(() => [...t[21] ||= [x(" 移除账户 ", -1)]]),
|
|
543
|
+
_: 1
|
|
544
|
+
}, 8, ["disabled"])
|
|
545
|
+
])) : (w(), y("div", V, [...t[20] ||= [b("span", null, "未设置登录账号", -1), b("small", null, "可从职员档案生成账号并自动完成一对一绑定。", -1)]]))]),
|
|
546
|
+
S(D(m), {
|
|
547
|
+
record: n.draft,
|
|
548
|
+
"show-sort-order": ""
|
|
549
|
+
}, null, 8, ["record"])
|
|
550
|
+
], 64)) : (w(), y(Ne, { key: 1 }, [n.externallyChanged ? (w(), _(D(c), {
|
|
551
|
+
key: 0,
|
|
552
|
+
onReload: t[8] ||= (e) => r("reloadExternal"),
|
|
553
|
+
onDismiss: t[9] ||= (e) => r("dismissExternal")
|
|
554
|
+
})) : v("v-if", !0), b("form", {
|
|
555
|
+
class: "employee-form",
|
|
556
|
+
onSubmit: t[11] ||= k((e) => r("save"), ["prevent"])
|
|
557
|
+
}, [n.visibleOf("organizationId") ? (w(), y("label", Xe, [b("span", U, [x(E(n.labelOf("organizationId")) + " ", 1), n.requiredOf("organizationId") ? (w(), y("strong", W, "*")) : v("v-if", !0)]), S(D(he), {
|
|
558
|
+
value: n.selectedOrganization?.title ?? n.selectedOrganization?.id ?? "-",
|
|
559
|
+
disabled: ""
|
|
560
|
+
}, null, 8, ["value"])])) : v("v-if", !0), S(D(Se), {
|
|
561
|
+
record: n.draft,
|
|
562
|
+
fields: n.fields,
|
|
563
|
+
"exclude-field-names": ["organizationId"],
|
|
564
|
+
fallback: n.fallback,
|
|
565
|
+
"picker-configs": n.pickerConfigs,
|
|
566
|
+
disabled: n.formDisabled,
|
|
567
|
+
"option-context": n.optionContext,
|
|
568
|
+
"onUpdate:field": t[10] ||= (e, t) => r("updateField", e, t)
|
|
569
|
+
}, null, 8, [
|
|
570
|
+
"record",
|
|
571
|
+
"fields",
|
|
572
|
+
"fallback",
|
|
573
|
+
"picker-configs",
|
|
574
|
+
"disabled",
|
|
575
|
+
"option-context"
|
|
576
|
+
])], 32)], 64))], 64)) : v("v-if", !0);
|
|
577
|
+
}
|
|
578
|
+
}), [["__scopeId", "data-v-9c433254"]]);
|
|
579
|
+
//#endregion
|
|
580
|
+
//#region src/views/employeeDetailWorkspaceSession.ts
|
|
581
|
+
function Qe(e, t) {
|
|
582
|
+
return Oe(ke, e, {
|
|
583
|
+
...t,
|
|
584
|
+
selectedEmployee: { ...t.selectedEmployee },
|
|
585
|
+
draft: { ...t.draft },
|
|
586
|
+
organization: t.organization ? { ...t.organization } : void 0,
|
|
587
|
+
department: t.department ? { ...t.department } : void 0,
|
|
588
|
+
account: t.account ? { ...t.account } : void 0,
|
|
589
|
+
accountUser: t.accountUser ? { ...t.accountUser } : void 0,
|
|
590
|
+
accountProvisionDraft: { ...t.accountProvisionDraft }
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
function $e(e, t) {
|
|
594
|
+
return Ee(ke, e, t);
|
|
595
|
+
}
|
|
596
|
+
function et(e) {
|
|
597
|
+
return De(ke, e);
|
|
598
|
+
}
|
|
599
|
+
//#endregion
|
|
600
|
+
//#region src/views/useEmployeeEmploymentRows.ts
|
|
601
|
+
function tt(e) {
|
|
602
|
+
let t = T([]), n = T({});
|
|
603
|
+
async function r(t) {
|
|
604
|
+
if (!(!t || e.context.can("employeePositions", t) === !1)) {
|
|
605
|
+
o(t, {
|
|
606
|
+
...a(t),
|
|
607
|
+
loading: !0,
|
|
608
|
+
error: void 0
|
|
609
|
+
});
|
|
610
|
+
try {
|
|
611
|
+
o(t, {
|
|
612
|
+
records: (await e.context.http.request({ path: e.pathOf?.(t) ?? `/iam.employee/${encodeURIComponent(t)}/employment-view` })).records,
|
|
613
|
+
loading: !1,
|
|
614
|
+
error: void 0
|
|
615
|
+
});
|
|
616
|
+
} catch (n) {
|
|
617
|
+
let r = p(n, {
|
|
618
|
+
source: `${e.source}-employment-rows`,
|
|
619
|
+
phase: "load"
|
|
620
|
+
});
|
|
621
|
+
o(t, {
|
|
622
|
+
...a(t),
|
|
623
|
+
loading: !1,
|
|
624
|
+
error: r.message
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
function i(e, n) {
|
|
630
|
+
let i = String(e.id ?? "");
|
|
631
|
+
i && (t.value = n ? Array.from(new Set([...t.value, i])) : t.value.filter((e) => e !== i), n && a(i).records.length === 0 && r(i));
|
|
632
|
+
}
|
|
633
|
+
function a(e) {
|
|
634
|
+
return e ? n.value[e] ?? {
|
|
635
|
+
records: [],
|
|
636
|
+
loading: !1
|
|
637
|
+
} : {
|
|
638
|
+
records: [],
|
|
639
|
+
loading: !1
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
function o(e, t) {
|
|
643
|
+
n.value = {
|
|
644
|
+
...n.value,
|
|
645
|
+
[e]: t
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
function ee() {
|
|
649
|
+
t.value = [], n.value = {};
|
|
650
|
+
}
|
|
651
|
+
return {
|
|
652
|
+
expandedEmployeeKeys: t,
|
|
653
|
+
employmentRowState: a,
|
|
654
|
+
handleEmployeeRowExpand: i,
|
|
655
|
+
loadEmployeeEmploymentRows: r,
|
|
656
|
+
resetEmployeeEmploymentRows: ee
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
//#endregion
|
|
660
|
+
//#region src/views/EmployeeManagementView.vue?vue&type=script&setup=true&lang.ts
|
|
661
|
+
var nt = { key: 0 }, rt = {
|
|
662
|
+
key: 1,
|
|
663
|
+
class: "employee-row-employment-list"
|
|
664
|
+
}, G = /*#__PURE__*/ r(/* @__PURE__ */ C({
|
|
665
|
+
name: "EmployeeManagementView",
|
|
666
|
+
__name: "EmployeeManagementView",
|
|
667
|
+
props: {
|
|
668
|
+
recordId: {},
|
|
669
|
+
mode: {}
|
|
670
|
+
},
|
|
671
|
+
setup(r) {
|
|
672
|
+
let c = r, ae = [
|
|
673
|
+
"departmentId",
|
|
674
|
+
"employeeNo",
|
|
675
|
+
"title"
|
|
676
|
+
], ce = Ce(), ue = l({ moduleAlias: "iam.organization" }), de = l({ moduleAlias: "iam.department" }), f = l({ moduleAlias: "iam.employee" }), he = l({ moduleAlias: "iam.user" }), be = l({ moduleAlias: "iam.tenant" }), m = Te(), h = T(ee(void 0)), Se = g(() => !!c.recordId), Ee = g(() => Se.value && ce?.presentation === "drawer"), De = g(() => !Se.value || Ee.value), Oe = T(""), C = T(0), k = T(0), Ge = T(""), Ke = T(0), qe = T(), A = T(), j = T(), M = T(), N = T(!1), P = T("view"), F = T(!1), I = T(!1), L = T(!1), R = T(0), z = T(pn(void 0)), B = T(), V = T(), H = T(), Ye = T(!1), Xe = T(), U = T(!1), W = T(!1), G = T(!1), K = T(!1), q = T(mn(void 0)), it = _e({
|
|
677
|
+
context: () => f,
|
|
678
|
+
listReloadKey: k,
|
|
679
|
+
canChange: X,
|
|
680
|
+
resetSelection: Yt
|
|
681
|
+
}), { expandedEmployeeKeys: at, employmentRowState: ot, handleEmployeeRowExpand: st, loadEmployeeEmploymentRows: ct, resetEmployeeEmploymentRows: lt } = tt({
|
|
682
|
+
context: f,
|
|
683
|
+
source: "employee-management",
|
|
684
|
+
pathOf: (e) => it.active.value ? `/iam.employee/recycle-bin/${encodeURIComponent(e)}/employment-view` : `/iam.employee/${encodeURIComponent(e)}/employment-view`
|
|
685
|
+
}), J = je({
|
|
686
|
+
moduleAlias: "iam.employee",
|
|
687
|
+
recordId: () => M.value?.id,
|
|
688
|
+
editing: () => P.value === "edit",
|
|
689
|
+
saving: () => L.value
|
|
690
|
+
}), ut = Ae({
|
|
691
|
+
delay: 80,
|
|
692
|
+
load: async (e) => {
|
|
693
|
+
k.value += 1;
|
|
694
|
+
let t = M.value?.id;
|
|
695
|
+
N.value && P.value === "view" && t && e.keys.includes(t) && await Z({
|
|
696
|
+
...z.value,
|
|
697
|
+
id: t
|
|
698
|
+
}, "view");
|
|
699
|
+
}
|
|
700
|
+
});
|
|
701
|
+
Me({
|
|
702
|
+
moduleAlias: "iam.employee",
|
|
703
|
+
handler: (e, t) => {
|
|
704
|
+
let n = t.map((e) => e.recordId).filter((e) => !!e);
|
|
705
|
+
ut.enqueue(n.length > 0 ? n : "__collection__");
|
|
706
|
+
}
|
|
707
|
+
});
|
|
708
|
+
let dt = g(() => Ht(f, qe.value)), ft = g(() => m?.value?.system === !0), pt = g(() => qe.value?.id), mt = g(() => oe(ue, {
|
|
709
|
+
scopeFieldName: "tenantId",
|
|
710
|
+
scopeValue: pt.value,
|
|
711
|
+
treePath: "/iam.organization/tree"
|
|
712
|
+
})), Y = g(() => A.value?.id), ht = g(() => oe(de, {
|
|
713
|
+
scopeFieldName: "organizationId",
|
|
714
|
+
scopeValue: Y.value,
|
|
715
|
+
treePath: "/iam.department/tree",
|
|
716
|
+
sortPath: "/iam.department/sort"
|
|
717
|
+
})), gt = g(() => ({ departmentId: {
|
|
718
|
+
context: ht.value,
|
|
719
|
+
reloadKey: C.value,
|
|
720
|
+
placeholder: "请选择部门",
|
|
721
|
+
titleOf: (e) => Rn(e)
|
|
722
|
+
} })), _t = g(() => {
|
|
723
|
+
let e = Y.value;
|
|
724
|
+
if (e) return { departmentScope: {
|
|
725
|
+
organizationId: e,
|
|
726
|
+
includeChildren: !0
|
|
727
|
+
} };
|
|
728
|
+
}), vt = g(() => P.value === "create" ? "新建职员" : Dn(M.value ?? z.value)), yt = g(() => P.value === "create" ? void 0 : On(M.value ?? z.value)), bt = g(() => ze({
|
|
729
|
+
mode: P.value,
|
|
730
|
+
loadingDetail: F.value,
|
|
731
|
+
saving: L.value,
|
|
732
|
+
selectedEmployeeId: M.value?.id
|
|
733
|
+
})), xt = g(() => Ve({
|
|
734
|
+
mode: P.value,
|
|
735
|
+
loadingDetail: F.value,
|
|
736
|
+
loadFailed: I.value,
|
|
737
|
+
selectedEmployeeId: M.value?.id
|
|
738
|
+
})), St = g(() => F.value ? !1 : P.value === "create" ? !!Y.value && f.can("create") === !0 : !!M.value?.id && f.can("update") === !0), Ct = g(() => F.value || !M.value?.id ? !1 : f.can(kn(M.value)) === !0), wt = g(() => !M.value?.id || F.value || L.value ? !1 : f.can("employeeAccounts", M.value.id) !== !1), Tt = g(() => P.value === "view" ? M.value?.id ? [{
|
|
739
|
+
key: "edit",
|
|
740
|
+
actionCode: "update",
|
|
741
|
+
title: "编辑",
|
|
742
|
+
iconName: "edit",
|
|
743
|
+
disabled: L.value
|
|
744
|
+
}, {
|
|
745
|
+
key: "delete",
|
|
746
|
+
actionCode: "delete",
|
|
747
|
+
title: "删除",
|
|
748
|
+
iconName: "delete",
|
|
749
|
+
danger: !0,
|
|
750
|
+
disabled: L.value
|
|
751
|
+
}] : [] : [{
|
|
752
|
+
key: "cancel",
|
|
753
|
+
title: "取消",
|
|
754
|
+
iconName: "close",
|
|
755
|
+
disabled: L.value
|
|
756
|
+
}, {
|
|
757
|
+
key: "save",
|
|
758
|
+
actionCode: P.value === "create" ? "create" : "update",
|
|
759
|
+
title: "保存",
|
|
760
|
+
iconName: "save",
|
|
761
|
+
primary: !0,
|
|
762
|
+
disabled: !St.value,
|
|
763
|
+
loading: L.value
|
|
764
|
+
}]), Et = g(() => Tt.value), Dt = g(() => P.value === "view" ? M.value?.id ? [{
|
|
765
|
+
key: "edit",
|
|
766
|
+
actionCode: "update",
|
|
767
|
+
title: "编辑",
|
|
768
|
+
iconName: "edit",
|
|
769
|
+
disabled: L.value
|
|
770
|
+
}] : [] : P.value === "edit" ? [{
|
|
771
|
+
key: "cancel",
|
|
772
|
+
title: "取消",
|
|
773
|
+
iconName: "close",
|
|
774
|
+
disabled: L.value
|
|
775
|
+
}, {
|
|
776
|
+
key: "save",
|
|
777
|
+
actionCode: "update",
|
|
778
|
+
title: "保存",
|
|
779
|
+
iconName: "save",
|
|
780
|
+
primary: !0,
|
|
781
|
+
loading: L.value,
|
|
782
|
+
disabled: !St.value
|
|
783
|
+
}] : []), Ot = we({
|
|
784
|
+
view: ke,
|
|
785
|
+
input: g(() => {
|
|
786
|
+
let e = M.value?.id, t = P.value;
|
|
787
|
+
return e && (t === "view" || t === "edit") ? { recordId: e } : void 0;
|
|
788
|
+
}),
|
|
789
|
+
title: g(() => Dn(M.value)),
|
|
790
|
+
eligibility: g(() => ({
|
|
791
|
+
hasStableIdentity: !!M.value?.id && !F.value,
|
|
792
|
+
busy: L.value || W.value || U.value
|
|
793
|
+
})),
|
|
794
|
+
beforePromote: async (e) => {
|
|
795
|
+
let t = M.value;
|
|
796
|
+
if (t) return await Qe(e, {
|
|
797
|
+
selectedEmployee: t,
|
|
798
|
+
draft: z.value,
|
|
799
|
+
organization: A.value,
|
|
800
|
+
department: B.value,
|
|
801
|
+
account: V.value,
|
|
802
|
+
accountUser: H.value,
|
|
803
|
+
showAccountProvisionForm: K.value,
|
|
804
|
+
accountProvisionDraft: q.value,
|
|
805
|
+
mode: P.value === "edit" ? "edit" : "view"
|
|
806
|
+
}) === "accepted";
|
|
807
|
+
},
|
|
808
|
+
onPromoted: an
|
|
809
|
+
});
|
|
810
|
+
Re(M, (e) => {
|
|
811
|
+
!Se.value || !e || ce?.setTitle(Dn(e));
|
|
812
|
+
}, { immediate: !0 });
|
|
813
|
+
let kt;
|
|
814
|
+
Ie(() => {
|
|
815
|
+
if (jt(), !ft.value && m?.value?.tenantId && (qe.value = {
|
|
816
|
+
id: m.value.tenantId,
|
|
817
|
+
title: m.value.tenantId
|
|
818
|
+
}), !c.recordId) return;
|
|
819
|
+
let e = { recordId: c.recordId };
|
|
820
|
+
Ee.value || (kt = $e(e, At));
|
|
821
|
+
let t = et(e);
|
|
822
|
+
if (t) {
|
|
823
|
+
yn(t);
|
|
824
|
+
return;
|
|
825
|
+
}
|
|
826
|
+
Z({ id: c.recordId }, c.mode ?? "view");
|
|
827
|
+
}), Re(pt, () => {
|
|
828
|
+
A.value = void 0, Yt(), C.value += 1;
|
|
829
|
+
}), Fe(() => kt?.());
|
|
830
|
+
function At(e) {
|
|
831
|
+
return P.value !== "view" || K.value ? !1 : (yn(e), !0);
|
|
832
|
+
}
|
|
833
|
+
async function jt() {
|
|
834
|
+
try {
|
|
835
|
+
h.value = ee((await f.runtime.ready).uiDescriptor);
|
|
836
|
+
} catch (e) {
|
|
837
|
+
p(e, {
|
|
838
|
+
source: "employee-management",
|
|
839
|
+
phase: "load"
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
function Mt(e) {
|
|
844
|
+
return o(e, {
|
|
845
|
+
fields: h.value,
|
|
846
|
+
fallback: Bn
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
function Nt(e) {
|
|
850
|
+
return Mt(e).label;
|
|
851
|
+
}
|
|
852
|
+
function Pt(e) {
|
|
853
|
+
return Mt(e).required;
|
|
854
|
+
}
|
|
855
|
+
function Ft(e) {
|
|
856
|
+
return Mt(e).visible;
|
|
857
|
+
}
|
|
858
|
+
function X() {
|
|
859
|
+
return He({ saving: L.value });
|
|
860
|
+
}
|
|
861
|
+
function It(e, t) {
|
|
862
|
+
z.value = {
|
|
863
|
+
...z.value,
|
|
864
|
+
[e]: t
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
function Lt(e, t) {
|
|
868
|
+
q.value = {
|
|
869
|
+
...q.value,
|
|
870
|
+
[e]: t
|
|
871
|
+
};
|
|
872
|
+
}
|
|
873
|
+
function Rt(e, t) {
|
|
874
|
+
if (e === "organizationId") return A.value?.title ?? A.value?.id ?? String(t ?? "");
|
|
875
|
+
if (e === "departmentId") {
|
|
876
|
+
let e = B.value;
|
|
877
|
+
return e && e.id === t ? Rn(e) : void 0;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
function zt(e) {
|
|
881
|
+
pt.value && !A.value && e.length > 0 && (A.value = e[0]);
|
|
882
|
+
}
|
|
883
|
+
function Bt(e) {
|
|
884
|
+
X() && (qe.value = e);
|
|
885
|
+
}
|
|
886
|
+
function Vt(e) {
|
|
887
|
+
return {
|
|
888
|
+
title: e.title ?? e.alias ?? e.id ?? "未命名租户",
|
|
889
|
+
secondary: e.alias ?? e.id,
|
|
890
|
+
muted: e.enabled === !1
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
function Ht(e, t) {
|
|
894
|
+
return {
|
|
895
|
+
...e,
|
|
896
|
+
crud: {
|
|
897
|
+
...e.crud,
|
|
898
|
+
query: (n) => e.crud.query(Ut(n, t))
|
|
899
|
+
}
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
function Ut(e, t) {
|
|
903
|
+
let n = [...e?.conditions ?? []];
|
|
904
|
+
return t?.id && n.push({
|
|
905
|
+
fieldName: "tenantId",
|
|
906
|
+
operator: "EQ",
|
|
907
|
+
values: [t.id]
|
|
908
|
+
}), {
|
|
909
|
+
...e,
|
|
910
|
+
conditions: n
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
function Wt(e) {
|
|
914
|
+
X() && (A.value = e, j.value = void 0, M.value = void 0, J.clearExternalChanged(), F.value = !1, I.value = !1, B.value = void 0, $(), lt(), an());
|
|
915
|
+
}
|
|
916
|
+
function Gt() {
|
|
917
|
+
C.value += 1;
|
|
918
|
+
}
|
|
919
|
+
function Kt(e) {
|
|
920
|
+
if (!X()) return;
|
|
921
|
+
let t = String(e.id ?? ""), n = String(M.value?.id ?? z.value.id ?? "");
|
|
922
|
+
j.value = t, N.value && n !== t && (R.value += 1, F.value = !1, I.value = !1, B.value = void 0, $(), M.value = void 0, z.value = pn(Y.value), J.clearExternalChanged(), N.value = !1, P.value = "view");
|
|
923
|
+
}
|
|
924
|
+
function qt(e) {
|
|
925
|
+
X() && e.key === "create" && rn();
|
|
926
|
+
}
|
|
927
|
+
function Jt(e) {
|
|
928
|
+
e === "recycleBin" ? it.enter() : it.leave();
|
|
929
|
+
}
|
|
930
|
+
function Yt() {
|
|
931
|
+
lt(), j.value = void 0, M.value = void 0, an();
|
|
932
|
+
}
|
|
933
|
+
function Xt() {
|
|
934
|
+
k.value += 1;
|
|
935
|
+
}
|
|
936
|
+
function Zt(e, t) {
|
|
937
|
+
if (X()) {
|
|
938
|
+
if (e.key === "employment") {
|
|
939
|
+
$t(t);
|
|
940
|
+
return;
|
|
941
|
+
}
|
|
942
|
+
if (e.key === "view") {
|
|
943
|
+
Z(t, "view");
|
|
944
|
+
return;
|
|
945
|
+
}
|
|
946
|
+
if (e.key === "edit") {
|
|
947
|
+
Z(t, "edit");
|
|
948
|
+
return;
|
|
949
|
+
}
|
|
950
|
+
e.key === "delete" && fn(t);
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
function Qt(e) {
|
|
954
|
+
return [{
|
|
955
|
+
key: "employment",
|
|
956
|
+
actionCode: "employeePositions",
|
|
957
|
+
title: "任职",
|
|
958
|
+
after: "edit",
|
|
959
|
+
visible: !!e.id && f.can("employeePositions", String(e.id)) !== !1
|
|
960
|
+
}];
|
|
961
|
+
}
|
|
962
|
+
async function $t(e) {
|
|
963
|
+
let t = String(e.id ?? "");
|
|
964
|
+
if (t) try {
|
|
965
|
+
Xe.value = await f.crud.view(t), Ye.value = !0;
|
|
966
|
+
} catch (e) {
|
|
967
|
+
p(e, {
|
|
968
|
+
source: "employee-management",
|
|
969
|
+
phase: "load"
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
function en() {
|
|
974
|
+
Ye.value = !1;
|
|
975
|
+
}
|
|
976
|
+
function tn(e) {
|
|
977
|
+
at.value.includes(e) && ct(e);
|
|
978
|
+
}
|
|
979
|
+
function nn(e) {
|
|
980
|
+
X() && Z(e, "view");
|
|
981
|
+
}
|
|
982
|
+
function rn() {
|
|
983
|
+
if (X()) {
|
|
984
|
+
if (!Y.value) {
|
|
985
|
+
pe("请先选择机构", { phase: "validation" });
|
|
986
|
+
return;
|
|
987
|
+
}
|
|
988
|
+
z.value = pn(Y.value), M.value = void 0, j.value = void 0, J.clearExternalChanged(), P.value = "create", F.value = !1, I.value = !1, R.value += 1, B.value = void 0, $(), N.value = !0;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
function an() {
|
|
992
|
+
L.value || (R.value += 1, F.value = !1, I.value = !1, N.value = !1, P.value = "view", B.value = void 0, J.clearExternalChanged(), $(), z.value = M.value ? hn(M.value) : pn(Y.value), Ee.value && ce?.dismiss());
|
|
993
|
+
}
|
|
994
|
+
function on() {
|
|
995
|
+
if (!L.value) {
|
|
996
|
+
if (Ue({
|
|
997
|
+
mode: P.value,
|
|
998
|
+
selectedEmployeeId: M.value?.id
|
|
999
|
+
})) {
|
|
1000
|
+
an();
|
|
1001
|
+
return;
|
|
1002
|
+
}
|
|
1003
|
+
z.value = hn(M.value), J.clearExternalChanged(), P.value = "view", F.value = !1, I.value = !1;
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
async function Z(e, t) {
|
|
1007
|
+
if (!X()) return;
|
|
1008
|
+
let n = String(e.id ?? "");
|
|
1009
|
+
if (!n) return;
|
|
1010
|
+
j.value = n, J.clearExternalChanged(), N.value = !0, P.value = t, M.value = void 0, z.value = hn(e), B.value = void 0, $(), F.value = !0, I.value = !1;
|
|
1011
|
+
let r = R.value + 1;
|
|
1012
|
+
R.value = r;
|
|
1013
|
+
let i = () => Be({
|
|
1014
|
+
activeRequestSeq: R.value,
|
|
1015
|
+
requestSeq: r,
|
|
1016
|
+
selectedEmployeeKey: j.value,
|
|
1017
|
+
recordId: n
|
|
1018
|
+
});
|
|
1019
|
+
try {
|
|
1020
|
+
let e = await f.crud.view(n);
|
|
1021
|
+
if (!i()) return;
|
|
1022
|
+
if (!e?.id) {
|
|
1023
|
+
I.value = !0, pe("未找到指定职员", {
|
|
1024
|
+
source: "employee-management",
|
|
1025
|
+
phase: "load"
|
|
1026
|
+
});
|
|
1027
|
+
return;
|
|
1028
|
+
}
|
|
1029
|
+
M.value = e, z.value = hn(e), I.value = !1, await xn(e, r), await bn(e, r), Sn(e, r);
|
|
1030
|
+
} catch (e) {
|
|
1031
|
+
i() && (I.value = !0, p(e, {
|
|
1032
|
+
source: "employee-management",
|
|
1033
|
+
phase: "load"
|
|
1034
|
+
}));
|
|
1035
|
+
} finally {
|
|
1036
|
+
i() && (F.value = !1);
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
function sn(e) {
|
|
1040
|
+
if (e.key === "cancel") {
|
|
1041
|
+
on();
|
|
1042
|
+
return;
|
|
1043
|
+
}
|
|
1044
|
+
if (e.key === "save") {
|
|
1045
|
+
un();
|
|
1046
|
+
return;
|
|
1047
|
+
}
|
|
1048
|
+
if (X()) {
|
|
1049
|
+
if (e.key === "edit") {
|
|
1050
|
+
if (!M.value || F.value) return;
|
|
1051
|
+
z.value = hn(M.value), J.clearExternalChanged(), P.value = "edit";
|
|
1052
|
+
return;
|
|
1053
|
+
}
|
|
1054
|
+
e.key === "delete" && fn(M.value);
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
function cn() {
|
|
1058
|
+
if (!X()) return;
|
|
1059
|
+
let e = String(z.value.id ?? j.value ?? "");
|
|
1060
|
+
if (!e) return;
|
|
1061
|
+
let t = P.value === "create" ? "view" : P.value;
|
|
1062
|
+
Z({
|
|
1063
|
+
...z.value,
|
|
1064
|
+
id: e
|
|
1065
|
+
}, t);
|
|
1066
|
+
}
|
|
1067
|
+
function ln() {
|
|
1068
|
+
let e = String(J.externalChangedRecordId.value ?? z.value.id ?? j.value ?? "");
|
|
1069
|
+
e && (J.clearExternalChanged(), Z({
|
|
1070
|
+
...z.value,
|
|
1071
|
+
id: e
|
|
1072
|
+
}, "edit"));
|
|
1073
|
+
}
|
|
1074
|
+
async function un() {
|
|
1075
|
+
await ve({
|
|
1076
|
+
loading: L,
|
|
1077
|
+
mode: P.value === "edit" ? "edit" : "create",
|
|
1078
|
+
source: "employee-management",
|
|
1079
|
+
validateContext: () => Y.value ? void 0 : "请先选择机构",
|
|
1080
|
+
canSave: () => St.value,
|
|
1081
|
+
deniedMessage: "当前用户无权保存职员",
|
|
1082
|
+
createRecord: () => gn(z.value, Y.value ?? ""),
|
|
1083
|
+
validateRecord: _n,
|
|
1084
|
+
save: (e, t) => t === "edit" && M.value?.id ? f.crud.update(M.value.id, e) : f.crud.insert(e),
|
|
1085
|
+
actionErrorHandlers: [le({
|
|
1086
|
+
resourceLabel: "职员",
|
|
1087
|
+
onNavigateToRecycleBin: () => Jt("recycleBin")
|
|
1088
|
+
}), {
|
|
1089
|
+
code: u.conflictVersion,
|
|
1090
|
+
handle: (e, { mode: t, record: n }) => t === "edit" && J.markExternalRecordChanged(n.id)
|
|
1091
|
+
}],
|
|
1092
|
+
onSaved: ({ record: e }) => {
|
|
1093
|
+
let t = vn(e);
|
|
1094
|
+
k.value += 1, bn(e, t);
|
|
1095
|
+
}
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
async function dn() {
|
|
1099
|
+
await fe({
|
|
1100
|
+
loading: L,
|
|
1101
|
+
source: "employee-management",
|
|
1102
|
+
record: () => M.value && M.value.id ? M.value : void 0,
|
|
1103
|
+
canExecute: () => Ct.value,
|
|
1104
|
+
deniedMessage: "当前用户无权变更职员启停状态",
|
|
1105
|
+
execute: (e) => e.enabled === !1 ? f.crud.enable(e.id, { version: e.version }) : f.crud.disable(e.id, { version: e.version }),
|
|
1106
|
+
onExecuted: async (e, t) => {
|
|
1107
|
+
let n = await f.crud.view(t.id);
|
|
1108
|
+
await bn(n, vn(n)), k.value += 1;
|
|
1109
|
+
}
|
|
1110
|
+
});
|
|
1111
|
+
}
|
|
1112
|
+
async function fn(e) {
|
|
1113
|
+
await fe({
|
|
1114
|
+
loading: L,
|
|
1115
|
+
source: "employee-management",
|
|
1116
|
+
record: () => e?.id ? e : void 0,
|
|
1117
|
+
canExecute: () => f.can("delete") === !0,
|
|
1118
|
+
deniedMessage: "当前用户无权删除职员",
|
|
1119
|
+
confirm: (e) => se({
|
|
1120
|
+
title: "删除职员",
|
|
1121
|
+
content: `确认删除职员「${En(e)}」?`,
|
|
1122
|
+
okText: "删除",
|
|
1123
|
+
danger: !0
|
|
1124
|
+
}),
|
|
1125
|
+
execute: (e) => f.crud.delete(String(e.id), { version: e.version }),
|
|
1126
|
+
onExecuted: (e, t) => {
|
|
1127
|
+
let n = String(t.id);
|
|
1128
|
+
j.value === n && (j.value = void 0, M.value = void 0, z.value = pn(Y.value), J.clearExternalChanged(), F.value = !1, I.value = !1, R.value += 1, B.value = void 0, $(), N.value = !1, P.value = "view"), k.value += 1;
|
|
1129
|
+
}
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
function pn(e) {
|
|
1133
|
+
return {
|
|
1134
|
+
organizationId: e,
|
|
1135
|
+
enabled: !0,
|
|
1136
|
+
sortOrder: 100
|
|
1137
|
+
};
|
|
1138
|
+
}
|
|
1139
|
+
function mn(e) {
|
|
1140
|
+
return {
|
|
1141
|
+
username: Nn(e),
|
|
1142
|
+
password: "",
|
|
1143
|
+
enabled: !0
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
function hn(e) {
|
|
1147
|
+
return { ...e };
|
|
1148
|
+
}
|
|
1149
|
+
function gn(e, t) {
|
|
1150
|
+
return ge(e, {
|
|
1151
|
+
organizationId: t,
|
|
1152
|
+
departmentId: e.departmentId?.trim(),
|
|
1153
|
+
employeeNo: e.employeeNo?.trim(),
|
|
1154
|
+
title: e.title?.trim(),
|
|
1155
|
+
gender: e.gender?.trim() || void 0,
|
|
1156
|
+
mobile: e.mobile?.trim() || void 0,
|
|
1157
|
+
email: e.email?.trim() || void 0,
|
|
1158
|
+
enabled: e.enabled !== !1
|
|
1159
|
+
});
|
|
1160
|
+
}
|
|
1161
|
+
function _n(e) {
|
|
1162
|
+
return We(ae.map((t) => {
|
|
1163
|
+
let n = Mt(t);
|
|
1164
|
+
return {
|
|
1165
|
+
fieldName: t,
|
|
1166
|
+
label: n.label,
|
|
1167
|
+
required: n.required,
|
|
1168
|
+
visible: n.visible,
|
|
1169
|
+
value: e[t]
|
|
1170
|
+
};
|
|
1171
|
+
}));
|
|
1172
|
+
}
|
|
1173
|
+
function vn(e) {
|
|
1174
|
+
M.value = e, z.value = hn(e), j.value = e.id, P.value = "view", J.clearExternalChanged(), N.value = !0, F.value = !1, I.value = !1;
|
|
1175
|
+
let t = R.value + 1;
|
|
1176
|
+
return R.value = t, t;
|
|
1177
|
+
}
|
|
1178
|
+
function yn(e) {
|
|
1179
|
+
M.value = e.selectedEmployee, j.value = e.selectedEmployee.id, A.value = e.organization, B.value = e.department, z.value = e.draft, P.value = e.mode, V.value = e.account, H.value = e.accountUser, K.value = e.showAccountProvisionForm, q.value = e.accountProvisionDraft, N.value = !0, F.value = !1, I.value = !1, G.value = !1, R.value += 1;
|
|
1180
|
+
}
|
|
1181
|
+
function Q(e, t) {
|
|
1182
|
+
return !!e && Be({
|
|
1183
|
+
activeRequestSeq: R.value,
|
|
1184
|
+
requestSeq: t,
|
|
1185
|
+
selectedEmployeeKey: j.value,
|
|
1186
|
+
recordId: e ?? ""
|
|
1187
|
+
});
|
|
1188
|
+
}
|
|
1189
|
+
async function bn(e, t = R.value) {
|
|
1190
|
+
B.value = void 0;
|
|
1191
|
+
let n = e.id, r = e.departmentId;
|
|
1192
|
+
if (r) try {
|
|
1193
|
+
let e = await de.crud.view(r);
|
|
1194
|
+
Q(n, t) && (B.value = e);
|
|
1195
|
+
} catch (e) {
|
|
1196
|
+
Q(n, t) && p(e, {
|
|
1197
|
+
source: "employee-management",
|
|
1198
|
+
phase: "load"
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
async function xn(e, t = R.value) {
|
|
1203
|
+
let n = e.id, r = e.organizationId;
|
|
1204
|
+
if (r) try {
|
|
1205
|
+
let e = await ue.crud.view(r);
|
|
1206
|
+
Q(n, t) && (A.value = e);
|
|
1207
|
+
} catch (e) {
|
|
1208
|
+
Q(n, t) && p(e, {
|
|
1209
|
+
source: "employee-management",
|
|
1210
|
+
phase: "load"
|
|
1211
|
+
});
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
async function Sn(e = M.value ?? z.value, t = R.value) {
|
|
1215
|
+
let n = e.id;
|
|
1216
|
+
if (!n) {
|
|
1217
|
+
$();
|
|
1218
|
+
return;
|
|
1219
|
+
}
|
|
1220
|
+
U.value = !0, G.value = !1;
|
|
1221
|
+
try {
|
|
1222
|
+
let e = await f.http.request({ path: `/iam.employee/${encodeURIComponent(n)}/account` });
|
|
1223
|
+
if (!Q(n, t)) return;
|
|
1224
|
+
V.value = e, await Cn(e, n, t);
|
|
1225
|
+
} catch (e) {
|
|
1226
|
+
Q(n, t) && (G.value = !0, p(e, {
|
|
1227
|
+
source: "employee-management",
|
|
1228
|
+
phase: "load"
|
|
1229
|
+
}));
|
|
1230
|
+
} finally {
|
|
1231
|
+
Q(n, t) && (U.value = !1);
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
async function Cn(e, t, n) {
|
|
1235
|
+
let r = e?.userId;
|
|
1236
|
+
if (!r) {
|
|
1237
|
+
Q(t, n) && (H.value = void 0);
|
|
1238
|
+
return;
|
|
1239
|
+
}
|
|
1240
|
+
let i;
|
|
1241
|
+
try {
|
|
1242
|
+
i = await he.crud.view(r);
|
|
1243
|
+
} catch (e) {
|
|
1244
|
+
p(e, {
|
|
1245
|
+
source: "employee-management",
|
|
1246
|
+
phase: "load"
|
|
1247
|
+
}), i = {
|
|
1248
|
+
id: r,
|
|
1249
|
+
username: r
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
Q(t, n) && (H.value = i);
|
|
1253
|
+
}
|
|
1254
|
+
async function wn() {
|
|
1255
|
+
let e = M.value, t = In(q.value);
|
|
1256
|
+
if (!e?.id || !wt.value) return;
|
|
1257
|
+
let n = Ln(t);
|
|
1258
|
+
if (n) {
|
|
1259
|
+
pe(n, {
|
|
1260
|
+
source: "employee-management",
|
|
1261
|
+
phase: "validation"
|
|
1262
|
+
});
|
|
1263
|
+
return;
|
|
1264
|
+
}
|
|
1265
|
+
W.value = !0;
|
|
1266
|
+
try {
|
|
1267
|
+
let n = await f.http.request({
|
|
1268
|
+
method: "POST",
|
|
1269
|
+
path: `/iam.employee/${encodeURIComponent(e.id)}/account/provision`,
|
|
1270
|
+
body: t
|
|
1271
|
+
}), r = te(n);
|
|
1272
|
+
V.value = r.binding, H.value = r.user, K.value = !1, q.value = mn(e), await ie(n, {
|
|
1273
|
+
source: "employee-management",
|
|
1274
|
+
phase: "action"
|
|
1275
|
+
});
|
|
1276
|
+
} catch (e) {
|
|
1277
|
+
p(e, {
|
|
1278
|
+
source: "employee-management",
|
|
1279
|
+
phase: "action"
|
|
1280
|
+
});
|
|
1281
|
+
} finally {
|
|
1282
|
+
W.value = !1;
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
async function Tn() {
|
|
1286
|
+
let e = M.value;
|
|
1287
|
+
if (!(!e?.id || !V.value?.id || !wt.value) && await se({
|
|
1288
|
+
title: "移除账户",
|
|
1289
|
+
content: `确认移除账户「${An()}」?该用户账号会同步删除。`,
|
|
1290
|
+
okText: "移除",
|
|
1291
|
+
danger: !0
|
|
1292
|
+
})) {
|
|
1293
|
+
W.value = !0;
|
|
1294
|
+
try {
|
|
1295
|
+
let t = await f.http.request({
|
|
1296
|
+
method: "POST",
|
|
1297
|
+
path: `/iam.employee/${encodeURIComponent(e.id)}/account/delete`
|
|
1298
|
+
});
|
|
1299
|
+
await Sn(e, R.value), await ie(t, {
|
|
1300
|
+
source: "employee-management",
|
|
1301
|
+
phase: "action"
|
|
1302
|
+
});
|
|
1303
|
+
} catch (e) {
|
|
1304
|
+
p(e, {
|
|
1305
|
+
source: "employee-management",
|
|
1306
|
+
phase: "action"
|
|
1307
|
+
});
|
|
1308
|
+
} finally {
|
|
1309
|
+
W.value = !1;
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
function $() {
|
|
1314
|
+
V.value = void 0, H.value = void 0, U.value = !1, W.value = !1, G.value = !1, K.value = !1, q.value = mn(M.value ?? z.value);
|
|
1315
|
+
}
|
|
1316
|
+
function En(e) {
|
|
1317
|
+
return String(e?.title ?? e?.employeeNo ?? e?.id ?? "职员档案");
|
|
1318
|
+
}
|
|
1319
|
+
function Dn(e) {
|
|
1320
|
+
return En(e);
|
|
1321
|
+
}
|
|
1322
|
+
function On(e) {
|
|
1323
|
+
let t = String(e?.employeeNo ?? "").trim();
|
|
1324
|
+
return t ? `工号:${t}` : void 0;
|
|
1325
|
+
}
|
|
1326
|
+
function kn(e) {
|
|
1327
|
+
return e.enabled === !1 ? "enable" : "disable";
|
|
1328
|
+
}
|
|
1329
|
+
function An() {
|
|
1330
|
+
let e = V.value, t = H.value;
|
|
1331
|
+
return String(t?.username ?? e?.userId ?? "未设置账号");
|
|
1332
|
+
}
|
|
1333
|
+
function jn() {
|
|
1334
|
+
let e = H.value;
|
|
1335
|
+
return e?.id ? `账号ID ${e.id}` : "-";
|
|
1336
|
+
}
|
|
1337
|
+
function Mn() {
|
|
1338
|
+
return H.value?.enabled === !1 ? "停用" : "启用";
|
|
1339
|
+
}
|
|
1340
|
+
function Nn(e) {
|
|
1341
|
+
return String(e?.employeeNo ?? e?.mobile ?? "").trim().toLowerCase();
|
|
1342
|
+
}
|
|
1343
|
+
function Pn() {
|
|
1344
|
+
q.value = mn(M.value ?? z.value), K.value = !0;
|
|
1345
|
+
}
|
|
1346
|
+
function Fn() {
|
|
1347
|
+
K.value = !1, q.value = mn(M.value ?? z.value);
|
|
1348
|
+
}
|
|
1349
|
+
function In(e) {
|
|
1350
|
+
return {
|
|
1351
|
+
...e,
|
|
1352
|
+
username: e.username?.trim(),
|
|
1353
|
+
password: e.password?.trim(),
|
|
1354
|
+
enabled: !0
|
|
1355
|
+
};
|
|
1356
|
+
}
|
|
1357
|
+
function Ln(e) {
|
|
1358
|
+
if (!e.username) return "请输入账号";
|
|
1359
|
+
if (!e.password) return "请输入初始密码";
|
|
1360
|
+
}
|
|
1361
|
+
function Rn(e) {
|
|
1362
|
+
return e.title ?? e.code ?? e.id ?? "未命名部门";
|
|
1363
|
+
}
|
|
1364
|
+
function zn(e) {
|
|
1365
|
+
return {
|
|
1366
|
+
title: e.title ?? e.code ?? e.id ?? "未命名机构",
|
|
1367
|
+
secondary: e.code ?? e.id,
|
|
1368
|
+
muted: e.enabled === !1
|
|
1369
|
+
};
|
|
1370
|
+
}
|
|
1371
|
+
let Bn = {
|
|
1372
|
+
organizationId: {
|
|
1373
|
+
label: "所属机构",
|
|
1374
|
+
required: !0,
|
|
1375
|
+
readOnly: !0,
|
|
1376
|
+
visible: !0
|
|
1377
|
+
},
|
|
1378
|
+
departmentId: {
|
|
1379
|
+
label: "所属部门",
|
|
1380
|
+
required: !0,
|
|
1381
|
+
readOnly: !1,
|
|
1382
|
+
visible: !0,
|
|
1383
|
+
controlType: "recordPicker"
|
|
1384
|
+
},
|
|
1385
|
+
employeeNo: {
|
|
1386
|
+
label: "职员编号",
|
|
1387
|
+
required: !0,
|
|
1388
|
+
readOnly: !1,
|
|
1389
|
+
visible: !0,
|
|
1390
|
+
placeholder: "请输入职员编号"
|
|
1391
|
+
},
|
|
1392
|
+
title: {
|
|
1393
|
+
label: "职员姓名",
|
|
1394
|
+
required: !0,
|
|
1395
|
+
readOnly: !1,
|
|
1396
|
+
visible: !0,
|
|
1397
|
+
placeholder: "请输入职员姓名"
|
|
1398
|
+
},
|
|
1399
|
+
gender: {
|
|
1400
|
+
label: "性别",
|
|
1401
|
+
required: !1,
|
|
1402
|
+
readOnly: !1,
|
|
1403
|
+
visible: !0,
|
|
1404
|
+
placeholder: "请输入性别"
|
|
1405
|
+
},
|
|
1406
|
+
mobile: {
|
|
1407
|
+
label: "手机号",
|
|
1408
|
+
required: !1,
|
|
1409
|
+
readOnly: !1,
|
|
1410
|
+
visible: !0,
|
|
1411
|
+
placeholder: "请输入手机号"
|
|
1412
|
+
},
|
|
1413
|
+
email: {
|
|
1414
|
+
label: "邮箱",
|
|
1415
|
+
required: !1,
|
|
1416
|
+
readOnly: !1,
|
|
1417
|
+
visible: !0,
|
|
1418
|
+
placeholder: "请输入邮箱"
|
|
1419
|
+
},
|
|
1420
|
+
enabled: {
|
|
1421
|
+
label: "启用状态",
|
|
1422
|
+
required: !1,
|
|
1423
|
+
readOnly: !1,
|
|
1424
|
+
visible: !0,
|
|
1425
|
+
controlType: "enabledStatus"
|
|
1426
|
+
}
|
|
1427
|
+
};
|
|
1428
|
+
return (r, o) => !Se.value || Ee.value ? (w(), _(D(ne), {
|
|
1429
|
+
key: 0,
|
|
1430
|
+
class: "employee-management-page",
|
|
1431
|
+
"explorer-count": ft.value ? 2 : 1
|
|
1432
|
+
}, {
|
|
1433
|
+
default: O(() => [
|
|
1434
|
+
ft.value ? (w(), _(D(a), { key: 0 }, {
|
|
1435
|
+
default: O(() => [S(D(xe), {
|
|
1436
|
+
"search-keyword": Ge.value,
|
|
1437
|
+
"onUpdate:searchKeyword": o[1] ||= (e) => Ge.value = e,
|
|
1438
|
+
title: "租户",
|
|
1439
|
+
"search-placeholder": "搜索租户",
|
|
1440
|
+
onRefresh: o[2] ||= (e) => Ke.value += 1
|
|
1441
|
+
}, {
|
|
1442
|
+
default: O(() => [S(D(re), {
|
|
1443
|
+
context: D(be),
|
|
1444
|
+
"selected-id": qe.value?.id,
|
|
1445
|
+
"reload-key": Ke.value,
|
|
1446
|
+
keyword: Ge.value,
|
|
1447
|
+
"empty-description": "暂无租户",
|
|
1448
|
+
"loading-tip": "加载租户",
|
|
1449
|
+
"fallback-title": "未命名租户",
|
|
1450
|
+
"item-of": (e) => Vt(e),
|
|
1451
|
+
onSelect: o[0] ||= (e) => Bt(e)
|
|
1452
|
+
}, null, 8, [
|
|
1453
|
+
"context",
|
|
1454
|
+
"selected-id",
|
|
1455
|
+
"reload-key",
|
|
1456
|
+
"keyword",
|
|
1457
|
+
"item-of"
|
|
1458
|
+
])]),
|
|
1459
|
+
_: 1
|
|
1460
|
+
}, 8, ["search-keyword"])]),
|
|
1461
|
+
_: 1
|
|
1462
|
+
})) : v("v-if", !0),
|
|
1463
|
+
S(D(a), null, {
|
|
1464
|
+
default: O(() => [S(D(xe), {
|
|
1465
|
+
class: "employee-scope-panel",
|
|
1466
|
+
title: "机构树",
|
|
1467
|
+
"refresh-title": "刷新机构树",
|
|
1468
|
+
"search-keyword": Oe.value,
|
|
1469
|
+
"search-placeholder": "搜索机构名称、编码或 ID",
|
|
1470
|
+
onRefresh: Gt,
|
|
1471
|
+
"onUpdate:searchKeyword": o[3] ||= (e) => Oe.value = e
|
|
1472
|
+
}, {
|
|
1473
|
+
default: O(() => [S(D(ye), {
|
|
1474
|
+
context: mt.value,
|
|
1475
|
+
"selected-id": A.value?.id,
|
|
1476
|
+
"reload-key": C.value,
|
|
1477
|
+
keyword: Oe.value,
|
|
1478
|
+
"search-mode": "none",
|
|
1479
|
+
"search-trigger": "external",
|
|
1480
|
+
"empty-description": pt.value ? "暂无机构" : "请选择租户",
|
|
1481
|
+
"loading-tip": pt.value ? "加载机构树" : "等待选择租户",
|
|
1482
|
+
"fallback-title": "未命名机构",
|
|
1483
|
+
"item-of": (e) => zn(e),
|
|
1484
|
+
onLoaded: zt,
|
|
1485
|
+
onSelect: Wt
|
|
1486
|
+
}, null, 8, [
|
|
1487
|
+
"context",
|
|
1488
|
+
"selected-id",
|
|
1489
|
+
"reload-key",
|
|
1490
|
+
"keyword",
|
|
1491
|
+
"empty-description",
|
|
1492
|
+
"loading-tip",
|
|
1493
|
+
"item-of"
|
|
1494
|
+
])]),
|
|
1495
|
+
_: 1
|
|
1496
|
+
}, 8, ["search-keyword"])]),
|
|
1497
|
+
_: 1
|
|
1498
|
+
}),
|
|
1499
|
+
S(D(d), {
|
|
1500
|
+
class: "employee-list-panel",
|
|
1501
|
+
context: dt.value,
|
|
1502
|
+
title: D(it).active.value ? "职员回收站" : "职员列表",
|
|
1503
|
+
mode: D(it).mode.value,
|
|
1504
|
+
"standard-crud-actions": "",
|
|
1505
|
+
"standard-crud-row-actions": "",
|
|
1506
|
+
"extra-row-actions-of": Qt,
|
|
1507
|
+
"selected-key": j.value,
|
|
1508
|
+
"expanded-row-keys": D(at),
|
|
1509
|
+
"reload-key": k.value,
|
|
1510
|
+
ready: !!A.value?.id,
|
|
1511
|
+
"external-query-values": _t.value,
|
|
1512
|
+
"quick-search-placeholder": "搜索编号、姓名、手机号或邮箱",
|
|
1513
|
+
"empty-description": "当前机构暂无职员",
|
|
1514
|
+
"waiting-description": "请选择机构",
|
|
1515
|
+
onAction: qt,
|
|
1516
|
+
onRowAction: Zt,
|
|
1517
|
+
onRowDblclick: nn,
|
|
1518
|
+
onRowExpand: D(st),
|
|
1519
|
+
onSelect: Kt,
|
|
1520
|
+
onModeChange: Jt,
|
|
1521
|
+
onRestored: Xt
|
|
1522
|
+
}, {
|
|
1523
|
+
expandedRow: O(({ record: e }) => [S(D(t), {
|
|
1524
|
+
title: "任职信息",
|
|
1525
|
+
loading: D(ot)(String(e.id ?? "")).loading,
|
|
1526
|
+
error: D(ot)(String(e.id ?? "")).error,
|
|
1527
|
+
"loading-tip": "加载任职信息",
|
|
1528
|
+
"error-title": "任职信息加载失败"
|
|
1529
|
+
}, {
|
|
1530
|
+
actions: O(() => [S(D(s), {
|
|
1531
|
+
type: "text",
|
|
1532
|
+
"icon-name": "reload",
|
|
1533
|
+
disabled: D(ot)(String(e.id ?? "")).loading,
|
|
1534
|
+
onClick: (t) => D(ct)(String(e.id ?? ""))
|
|
1535
|
+
}, {
|
|
1536
|
+
default: O(() => [...o[6] ||= [x(" 刷新 ", -1)]]),
|
|
1537
|
+
_: 1
|
|
1538
|
+
}, 8, ["disabled", "onClick"])]),
|
|
1539
|
+
default: O(() => [D(ot)(String(e.id ?? "")).records.length === 0 ? (w(), y("p", nt, "暂无任职信息")) : (w(), y("div", rt, [o[7] ||= b("header", { class: "employee-row-employment-table-header" }, [
|
|
1540
|
+
b("span", null, "岗位"),
|
|
1541
|
+
b("span", null, "机构"),
|
|
1542
|
+
b("span", null, "部门"),
|
|
1543
|
+
b("span", null, "主岗位")
|
|
1544
|
+
], -1), (w(!0), y(Ne, null, Le(D(ot)(String(e.id ?? "")).records, (e) => (w(), y("article", {
|
|
1545
|
+
key: e.id,
|
|
1546
|
+
class: Pe({ "is-disabled": e.enabled === !1 })
|
|
1547
|
+
}, [
|
|
1548
|
+
b("strong", null, E(e.positionTitle ?? e.positionId), 1),
|
|
1549
|
+
b("span", null, E(e.organizationTitle ?? e.organizationId), 1),
|
|
1550
|
+
b("span", null, E(e.departmentTitle ?? e.departmentId), 1),
|
|
1551
|
+
b("span", null, E(e.primaryPosition ? "是" : "否"), 1)
|
|
1552
|
+
], 2))), 128))]))]),
|
|
1553
|
+
_: 2
|
|
1554
|
+
}, 1032, ["loading", "error"])]),
|
|
1555
|
+
_: 1
|
|
1556
|
+
}, 8, [
|
|
1557
|
+
"context",
|
|
1558
|
+
"title",
|
|
1559
|
+
"mode",
|
|
1560
|
+
"selected-key",
|
|
1561
|
+
"expanded-row-keys",
|
|
1562
|
+
"reload-key",
|
|
1563
|
+
"ready",
|
|
1564
|
+
"external-query-values",
|
|
1565
|
+
"onRowExpand"
|
|
1566
|
+
]),
|
|
1567
|
+
De.value ? (w(), _(D(n), {
|
|
1568
|
+
key: 1,
|
|
1569
|
+
open: N.value,
|
|
1570
|
+
title: vt.value,
|
|
1571
|
+
subtitle: yt.value,
|
|
1572
|
+
"close-on-outside": P.value === "view",
|
|
1573
|
+
promotion: D(Ot),
|
|
1574
|
+
onClose: an
|
|
1575
|
+
}, {
|
|
1576
|
+
status: O(() => [P.value === "view" && M.value ? (w(), _(D(e), {
|
|
1577
|
+
key: 0,
|
|
1578
|
+
enabled: M.value.enabled !== !1,
|
|
1579
|
+
disabled: L.value || !Ct.value,
|
|
1580
|
+
loading: L.value,
|
|
1581
|
+
"show-label": !1,
|
|
1582
|
+
onChange: dn
|
|
1583
|
+
}, null, 8, [
|
|
1584
|
+
"enabled",
|
|
1585
|
+
"disabled",
|
|
1586
|
+
"loading"
|
|
1587
|
+
])) : v("v-if", !0)]),
|
|
1588
|
+
operation: O(() => [S(D(i), {
|
|
1589
|
+
context: dt.value,
|
|
1590
|
+
actions: Et.value,
|
|
1591
|
+
onAction: sn
|
|
1592
|
+
}, null, 8, ["context", "actions"])]),
|
|
1593
|
+
default: O(() => [S(Ze, {
|
|
1594
|
+
mode: P.value,
|
|
1595
|
+
draft: z.value,
|
|
1596
|
+
"selected-employee": M.value,
|
|
1597
|
+
"selected-organization": A.value,
|
|
1598
|
+
"detail-department": B.value,
|
|
1599
|
+
loading: F.value,
|
|
1600
|
+
"load-failed": I.value,
|
|
1601
|
+
"form-disabled": bt.value,
|
|
1602
|
+
"show-content": xt.value,
|
|
1603
|
+
fields: h.value,
|
|
1604
|
+
fallback: Bn,
|
|
1605
|
+
"picker-configs": gt.value,
|
|
1606
|
+
"display-of": Rt,
|
|
1607
|
+
"visible-of": Ft,
|
|
1608
|
+
"label-of": Nt,
|
|
1609
|
+
"required-of": Pt,
|
|
1610
|
+
"externally-changed": D(J).externallyChanged.value,
|
|
1611
|
+
account: V.value,
|
|
1612
|
+
"account-user": H.value,
|
|
1613
|
+
"loading-accounts": U.value,
|
|
1614
|
+
"accounts-load-failed": G.value,
|
|
1615
|
+
"saving-account": W.value,
|
|
1616
|
+
"can-manage-accounts": wt.value,
|
|
1617
|
+
"show-account-provision-form": K.value,
|
|
1618
|
+
"account-provision-draft": q.value,
|
|
1619
|
+
"account-user-title": An(),
|
|
1620
|
+
"account-user-description": jn(),
|
|
1621
|
+
"account-status-title": Mn(),
|
|
1622
|
+
"option-context": D(f),
|
|
1623
|
+
onRetry: cn,
|
|
1624
|
+
onSave: un,
|
|
1625
|
+
onReloadExternal: ln,
|
|
1626
|
+
onDismissExternal: D(J).clearExternalChanged,
|
|
1627
|
+
onUpdateField: It,
|
|
1628
|
+
onRetryAccounts: o[4] ||= (e) => Sn(),
|
|
1629
|
+
onStartAccountProvision: Pn,
|
|
1630
|
+
onCancelAccountProvision: Fn,
|
|
1631
|
+
onProvisionAccount: wn,
|
|
1632
|
+
onRemoveAccount: Tn,
|
|
1633
|
+
onUpdateAccountProvisionField: Lt
|
|
1634
|
+
}, null, 8, [
|
|
1635
|
+
"mode",
|
|
1636
|
+
"draft",
|
|
1637
|
+
"selected-employee",
|
|
1638
|
+
"selected-organization",
|
|
1639
|
+
"detail-department",
|
|
1640
|
+
"loading",
|
|
1641
|
+
"load-failed",
|
|
1642
|
+
"form-disabled",
|
|
1643
|
+
"show-content",
|
|
1644
|
+
"fields",
|
|
1645
|
+
"picker-configs",
|
|
1646
|
+
"externally-changed",
|
|
1647
|
+
"account",
|
|
1648
|
+
"account-user",
|
|
1649
|
+
"loading-accounts",
|
|
1650
|
+
"accounts-load-failed",
|
|
1651
|
+
"saving-account",
|
|
1652
|
+
"can-manage-accounts",
|
|
1653
|
+
"show-account-provision-form",
|
|
1654
|
+
"account-provision-draft",
|
|
1655
|
+
"account-user-title",
|
|
1656
|
+
"account-user-description",
|
|
1657
|
+
"account-status-title",
|
|
1658
|
+
"option-context",
|
|
1659
|
+
"onDismissExternal"
|
|
1660
|
+
])]),
|
|
1661
|
+
_: 1
|
|
1662
|
+
}, 8, [
|
|
1663
|
+
"open",
|
|
1664
|
+
"title",
|
|
1665
|
+
"subtitle",
|
|
1666
|
+
"close-on-outside",
|
|
1667
|
+
"promotion"
|
|
1668
|
+
])) : v("v-if", !0),
|
|
1669
|
+
S(Je, {
|
|
1670
|
+
open: Ye.value,
|
|
1671
|
+
employee: Xe.value,
|
|
1672
|
+
onClose: en,
|
|
1673
|
+
onSaved: tn
|
|
1674
|
+
}, null, 8, ["open", "employee"])
|
|
1675
|
+
]),
|
|
1676
|
+
_: 1
|
|
1677
|
+
}, 8, ["explorer-count"])) : (w(), _(D(me), {
|
|
1678
|
+
key: 1,
|
|
1679
|
+
title: vt.value,
|
|
1680
|
+
subtitle: yt.value
|
|
1681
|
+
}, {
|
|
1682
|
+
status: O(() => [P.value === "view" && M.value ? (w(), _(D(e), {
|
|
1683
|
+
key: 0,
|
|
1684
|
+
enabled: M.value.enabled !== !1,
|
|
1685
|
+
disabled: L.value || !Ct.value,
|
|
1686
|
+
loading: L.value,
|
|
1687
|
+
"show-label": !1,
|
|
1688
|
+
onChange: dn
|
|
1689
|
+
}, null, 8, [
|
|
1690
|
+
"enabled",
|
|
1691
|
+
"disabled",
|
|
1692
|
+
"loading"
|
|
1693
|
+
])) : v("v-if", !0)]),
|
|
1694
|
+
operation: O(() => [S(D(i), {
|
|
1695
|
+
context: D(f),
|
|
1696
|
+
actions: Dt.value,
|
|
1697
|
+
"record-id": M.value?.id,
|
|
1698
|
+
onAction: sn
|
|
1699
|
+
}, null, 8, [
|
|
1700
|
+
"context",
|
|
1701
|
+
"actions",
|
|
1702
|
+
"record-id"
|
|
1703
|
+
])]),
|
|
1704
|
+
default: O(() => [S(Ze, {
|
|
1705
|
+
mode: P.value,
|
|
1706
|
+
draft: z.value,
|
|
1707
|
+
"selected-employee": M.value,
|
|
1708
|
+
"selected-organization": A.value,
|
|
1709
|
+
"detail-department": B.value,
|
|
1710
|
+
loading: F.value,
|
|
1711
|
+
"load-failed": I.value,
|
|
1712
|
+
"form-disabled": bt.value,
|
|
1713
|
+
"show-content": xt.value,
|
|
1714
|
+
fields: h.value,
|
|
1715
|
+
fallback: Bn,
|
|
1716
|
+
"picker-configs": gt.value,
|
|
1717
|
+
"display-of": Rt,
|
|
1718
|
+
"visible-of": Ft,
|
|
1719
|
+
"label-of": Nt,
|
|
1720
|
+
"required-of": Pt,
|
|
1721
|
+
"externally-changed": D(J).externallyChanged.value,
|
|
1722
|
+
account: V.value,
|
|
1723
|
+
"account-user": H.value,
|
|
1724
|
+
"loading-accounts": U.value,
|
|
1725
|
+
"accounts-load-failed": G.value,
|
|
1726
|
+
"saving-account": W.value,
|
|
1727
|
+
"can-manage-accounts": wt.value,
|
|
1728
|
+
"show-account-provision-form": K.value,
|
|
1729
|
+
"account-provision-draft": q.value,
|
|
1730
|
+
"account-user-title": An(),
|
|
1731
|
+
"account-user-description": jn(),
|
|
1732
|
+
"account-status-title": Mn(),
|
|
1733
|
+
"option-context": D(f),
|
|
1734
|
+
onRetry: cn,
|
|
1735
|
+
onSave: un,
|
|
1736
|
+
onReloadExternal: ln,
|
|
1737
|
+
onDismissExternal: D(J).clearExternalChanged,
|
|
1738
|
+
onUpdateField: It,
|
|
1739
|
+
onRetryAccounts: o[5] ||= (e) => Sn(),
|
|
1740
|
+
onStartAccountProvision: Pn,
|
|
1741
|
+
onCancelAccountProvision: Fn,
|
|
1742
|
+
onProvisionAccount: wn,
|
|
1743
|
+
onRemoveAccount: Tn,
|
|
1744
|
+
onUpdateAccountProvisionField: Lt
|
|
1745
|
+
}, null, 8, [
|
|
1746
|
+
"mode",
|
|
1747
|
+
"draft",
|
|
1748
|
+
"selected-employee",
|
|
1749
|
+
"selected-organization",
|
|
1750
|
+
"detail-department",
|
|
1751
|
+
"loading",
|
|
1752
|
+
"load-failed",
|
|
1753
|
+
"form-disabled",
|
|
1754
|
+
"show-content",
|
|
1755
|
+
"fields",
|
|
1756
|
+
"picker-configs",
|
|
1757
|
+
"externally-changed",
|
|
1758
|
+
"account",
|
|
1759
|
+
"account-user",
|
|
1760
|
+
"loading-accounts",
|
|
1761
|
+
"accounts-load-failed",
|
|
1762
|
+
"saving-account",
|
|
1763
|
+
"can-manage-accounts",
|
|
1764
|
+
"show-account-provision-form",
|
|
1765
|
+
"account-provision-draft",
|
|
1766
|
+
"account-user-title",
|
|
1767
|
+
"account-user-description",
|
|
1768
|
+
"account-status-title",
|
|
1769
|
+
"option-context",
|
|
1770
|
+
"onDismissExternal"
|
|
1771
|
+
])]),
|
|
1772
|
+
_: 1
|
|
1773
|
+
}, 8, ["title", "subtitle"]));
|
|
1774
|
+
}
|
|
1775
|
+
}), [["__scopeId", "data-v-d9dc0112"]]);
|
|
1776
|
+
//#endregion
|
|
1777
|
+
export { G as t };
|