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