@ximatai/muyun-web-app 0.26.7 → 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-DYJLlkSz.js → EmployeeDetailWorkspaceView-DswEDSxH.js} +1 -1
- package/dist/{EmployeeManagementView-taxWUa7g.js → EmployeeManagementView-C9STtw08.js} +385 -386
- package/dist/{MetadataOrchestrationView-B-CPudJl.js → MetadataOrchestrationView-DKYVGMzy.js} +95 -95
- package/dist/{ModuleActionManagementView-CmVj0e0C.js → ModuleActionManagementView-DiVzuPdu.js} +72 -72
- package/dist/{RoleAuthorizationView-q_6CsBYq.js → RoleAuthorizationView-C0s4Bog7.js} +47 -47
- package/dist/{RoleDetailWorkspaceView-DmJlJgAj.js → RoleDetailWorkspaceView-dqHxKVfd.js} +1 -1
- package/dist/{RoleManagementView-HCa9rH0f.js → RoleManagementView-D43pUCxi.js} +468 -469
- package/dist/{SystemUserDetailWorkspaceView-U6Ij0US1.js → SystemUserDetailWorkspaceView-CQ9WeLrR.js} +1 -1
- package/dist/SystemUserManagementView-D75_ylYk.js +758 -0
- package/dist/{UserDetailWorkspaceView-OPYvD6mH.js → UserDetailWorkspaceView-BCST01d2.js} +1 -1
- package/dist/UserManagementView-CcdvDo_y.js +964 -0
- package/dist/index.css +1 -1
- package/dist/index.js +2278 -4726
- package/dist/{pageRealtime-CzJlr9hs.js → pageRealtime-EAiGWKEo.js} +87 -85
- package/dist/{platform-components-DKKWbNrz.js → platform-components-CFU_zR7-.js} +2145 -1866
- package/dist/types/app/workbenchStartup.d.ts +6 -2
- package/dist/types/consumer/AppWorkbenchShell.vue.d.ts +2 -2
- package/dist/types/consumer/index.d.ts +4 -3
- 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 +38 -0
- 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/ManagementPanelHeader.vue.d.ts +5 -3
- 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 +8 -6
- package/dist/types/platform-components/RecordDetailPanel.vue.d.ts +7 -5
- 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/StaticManagementLayout.vue.d.ts +13 -7
- package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +3 -0
- package/dist/types/platform-components/index.d.ts +4 -2
- package/dist/types/platform-components/managementWorkspaceLayout.d.ts +14 -0
- package/dist/types/platform-components/recordFormFieldModel.d.ts +2 -2
- package/dist/types/platform-components/recycleBinState.d.ts +2 -0
- package/dist/types/platform-components/scopedTreeModuleContext.d.ts +11 -0
- package/dist/types/platform-workbench/index.d.ts +1 -0
- package/dist/types/platform-workbench/menuNavigation.d.ts +3 -0
- package/dist/types/platform-workbench/modulePageWorkspaceViews.d.ts +7 -0
- package/dist/types/platform-workbench/workbenchLayout.d.ts +36 -0
- package/dist/types/platform-workbench/workbenchNavigation.d.ts +2 -0
- package/dist/types/platform-workbench/workspaceViewHost.d.ts +2 -0
- package/dist/types/vue-ui-antdv/components/UiButton.vue.d.ts +1 -1
- 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/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/UiTreeSelect.vue.d.ts +7 -1
- package/dist/types/vue-ui-antdv/index.d.ts +1 -0
- package/dist/types/web-contracts/index.d.ts +110 -17
- package/dist/types/web-core/businessNotifications.d.ts +3 -0
- package/dist/types/web-core/index.d.ts +1 -0
- 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/{useUserSessionRows-CBHEzRFQ.js → useUserSessionRows-DCpUZCzN.js} +2 -2
- package/dist/workspaceViewSessions-Dj1LjdG1.js +4984 -0
- package/package.json +1 -1
- package/dist/SystemUserManagementView-C1CkKivH.js +0 -758
- package/dist/UserManagementView-gbCL9SnC.js +0 -965
- 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-DkB9myrq.js +0 -3252
|
@@ -1,40 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as we,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Fragment as Pe, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as b, createVNode as x, defineComponent as S, normalizeClass as Fe, onBeforeUnmount as Ie, onMounted as Le, openBlock as C, ref as w, renderList as Re, toDisplayString as T, unref as E, watch as ze, withCtx as D, withModifiers as O } from "vue";
|
|
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";
|
|
6
5
|
//#region src/views/employeeDetailStateModel.ts
|
|
7
|
-
function
|
|
6
|
+
function ze(e) {
|
|
8
7
|
return e.mode === "view" || e.loadingDetail || e.saving ? !0 : e.mode === "edit" && !e.selectedEmployeeId;
|
|
9
8
|
}
|
|
10
|
-
function
|
|
9
|
+
function Be(e) {
|
|
11
10
|
return e.activeRequestSeq === e.requestSeq && e.selectedEmployeeKey === e.recordId;
|
|
12
11
|
}
|
|
13
|
-
function
|
|
12
|
+
function Ve(e) {
|
|
14
13
|
return e.mode === "create" ? !0 : !e.loadingDetail && !e.loadFailed && !!e.selectedEmployeeId;
|
|
15
14
|
}
|
|
16
|
-
function
|
|
15
|
+
function He(e) {
|
|
17
16
|
return !e.saving;
|
|
18
17
|
}
|
|
19
|
-
function
|
|
18
|
+
function Ue(e) {
|
|
20
19
|
return e.mode !== "edit" || !e.selectedEmployeeId;
|
|
21
20
|
}
|
|
22
|
-
function
|
|
23
|
-
let t = e.filter((e) => e.visible && e.required && !
|
|
21
|
+
function We(e) {
|
|
22
|
+
let t = e.filter((e) => e.visible && e.required && !Ge(e.value)).map((e) => e.label);
|
|
24
23
|
return t.length > 0 ? `请填写${t.join("、")}` : void 0;
|
|
25
24
|
}
|
|
26
|
-
function
|
|
25
|
+
function Ge(e) {
|
|
27
26
|
return typeof e == "string" ? e.trim().length > 0 : e != null;
|
|
28
27
|
}
|
|
29
28
|
//#endregion
|
|
30
29
|
//#region src/views/EmployeeEmploymentDrawer.vue?vue&type=script&setup=true&lang.ts
|
|
31
|
-
var
|
|
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 = {
|
|
32
31
|
key: 2,
|
|
33
32
|
class: "employment-state"
|
|
34
33
|
}, F = {
|
|
35
34
|
key: 3,
|
|
36
35
|
class: "employment-empty"
|
|
37
|
-
}, Je = /*#__PURE__*/
|
|
36
|
+
}, Je = /*#__PURE__*/ r(/* @__PURE__ */ C({
|
|
38
37
|
name: "EmployeeEmploymentDrawer",
|
|
39
38
|
__name: "EmployeeEmploymentDrawer",
|
|
40
39
|
props: {
|
|
@@ -43,7 +42,7 @@ var qe = { class: "employment-drawer" }, k = { class: "employment-drawer-header"
|
|
|
43
42
|
},
|
|
44
43
|
emits: ["close", "saved"],
|
|
45
44
|
setup(e, { emit: t }) {
|
|
46
|
-
let
|
|
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 = [
|
|
47
46
|
{
|
|
48
47
|
key: "position",
|
|
49
48
|
title: "岗位",
|
|
@@ -64,95 +63,95 @@ var qe = { class: "employment-drawer" }, k = { class: "employment-drawer-header"
|
|
|
64
63
|
title: "主岗位",
|
|
65
64
|
width: 80
|
|
66
65
|
}
|
|
67
|
-
],
|
|
66
|
+
], f = g(() => `任职管理 - ${ve(r.employee)}`), me = g(() => te.value), he = g(() => oe(ee, {
|
|
68
67
|
scopeFieldName: "organizationId",
|
|
69
|
-
scopeValue:
|
|
68
|
+
scopeValue: d.value.organizationId,
|
|
70
69
|
treePath: "/iam.department/tree",
|
|
71
70
|
sortPath: "/iam.department/sort"
|
|
72
|
-
})),
|
|
73
|
-
let e =
|
|
74
|
-
return !!(e?.organizationId && e?.departmentId && e.organizationId ===
|
|
71
|
+
})), ge = g(() => {
|
|
72
|
+
let e = r.employee;
|
|
73
|
+
return !!(e?.organizationId && e?.departmentId && e.organizationId === d.value.organizationId && e.departmentId === d.value.departmentId);
|
|
75
74
|
});
|
|
76
|
-
|
|
77
|
-
e ?
|
|
75
|
+
Re(() => [r.open, r.employee?.id], ([e]) => {
|
|
76
|
+
e ? ye() : m();
|
|
78
77
|
}, { immediate: !0 });
|
|
79
|
-
function
|
|
78
|
+
function _e() {
|
|
80
79
|
return {
|
|
81
80
|
primaryPosition: !1,
|
|
82
81
|
enabled: !0
|
|
83
82
|
};
|
|
84
83
|
}
|
|
85
|
-
function
|
|
84
|
+
function ve(e) {
|
|
86
85
|
return String(e?.title ?? e?.employeeNo ?? e?.id ?? "职员");
|
|
87
86
|
}
|
|
88
|
-
async function
|
|
89
|
-
let e =
|
|
87
|
+
async function ye() {
|
|
88
|
+
let e = r.employee?.id;
|
|
90
89
|
if (e) {
|
|
91
|
-
|
|
90
|
+
ne.value = !0, re.value = !1;
|
|
92
91
|
try {
|
|
93
|
-
|
|
92
|
+
te.value = (await a.http.request({ path: `/iam.employee/${encodeURIComponent(e)}/employment-view` })).records;
|
|
94
93
|
} catch (e) {
|
|
95
|
-
|
|
94
|
+
re.value = !0, p(e, {
|
|
96
95
|
source: "employee-employment",
|
|
97
96
|
phase: "load"
|
|
98
97
|
});
|
|
99
98
|
} finally {
|
|
100
|
-
|
|
99
|
+
ne.value = !1;
|
|
101
100
|
}
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
|
-
function
|
|
105
|
-
|
|
103
|
+
function m() {
|
|
104
|
+
le.value = !1, d.value = _e();
|
|
106
105
|
}
|
|
107
|
-
function
|
|
108
|
-
|
|
109
|
-
organizationId:
|
|
110
|
-
departmentId:
|
|
106
|
+
function xe() {
|
|
107
|
+
d.value = {
|
|
108
|
+
organizationId: r.employee?.organizationId,
|
|
109
|
+
departmentId: r.employee?.departmentId,
|
|
111
110
|
primaryPosition: !1,
|
|
112
111
|
enabled: !0
|
|
113
|
-
},
|
|
112
|
+
}, le.value = !0;
|
|
114
113
|
}
|
|
115
|
-
function
|
|
116
|
-
|
|
114
|
+
function Se(e) {
|
|
115
|
+
d.value = { ...e }, le.value = !0;
|
|
117
116
|
}
|
|
118
|
-
function
|
|
119
|
-
let t = e !==
|
|
120
|
-
|
|
121
|
-
...
|
|
117
|
+
function Ce(e) {
|
|
118
|
+
let t = e !== d.value.organizationId;
|
|
119
|
+
d.value = {
|
|
120
|
+
...d.value,
|
|
122
121
|
organizationId: e,
|
|
123
|
-
departmentId: t ? void 0 :
|
|
124
|
-
primaryPosition: t ? !1 :
|
|
122
|
+
departmentId: t ? void 0 : d.value.departmentId,
|
|
123
|
+
primaryPosition: t ? !1 : d.value.primaryPosition
|
|
125
124
|
};
|
|
126
125
|
}
|
|
127
|
-
function
|
|
128
|
-
let t = !!(
|
|
129
|
-
|
|
130
|
-
...
|
|
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,
|
|
131
130
|
departmentId: e,
|
|
132
131
|
primaryPosition: t
|
|
133
132
|
};
|
|
134
133
|
}
|
|
135
|
-
function
|
|
136
|
-
if (e && !
|
|
137
|
-
|
|
134
|
+
function Te(e) {
|
|
135
|
+
if (e && !ge.value) {
|
|
136
|
+
pe("主岗必须与职员主机构、主部门一致", {
|
|
138
137
|
source: "employee-employment",
|
|
139
138
|
phase: "validation"
|
|
140
139
|
});
|
|
141
140
|
return;
|
|
142
141
|
}
|
|
143
|
-
|
|
144
|
-
...
|
|
142
|
+
d.value = {
|
|
143
|
+
...d.value,
|
|
145
144
|
primaryPosition: e
|
|
146
145
|
};
|
|
147
146
|
}
|
|
148
|
-
function
|
|
147
|
+
function Ee(e, t) {
|
|
149
148
|
let n = t;
|
|
150
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 ? "是" : "否" : "";
|
|
151
150
|
}
|
|
152
|
-
function
|
|
151
|
+
function De(e) {
|
|
153
152
|
return e.enabled === !1;
|
|
154
153
|
}
|
|
155
|
-
function
|
|
154
|
+
function Oe(e) {
|
|
156
155
|
return [
|
|
157
156
|
...e.primaryPosition ? [] : [{
|
|
158
157
|
key: "primary",
|
|
@@ -169,29 +168,29 @@ var qe = { class: "employment-drawer" }, k = { class: "employment-drawer-header"
|
|
|
169
168
|
}
|
|
170
169
|
];
|
|
171
170
|
}
|
|
172
|
-
function
|
|
173
|
-
(t === "primary" || t === "enable" || t === "disable" || t === "delete") &&
|
|
171
|
+
function ke(e, t) {
|
|
172
|
+
(t === "primary" || t === "enable" || t === "disable" || t === "delete") && je(e, t);
|
|
174
173
|
}
|
|
175
|
-
async function
|
|
176
|
-
let e =
|
|
177
|
-
if (!e || !
|
|
178
|
-
|
|
174
|
+
async function Ae() {
|
|
175
|
+
let e = r.employee?.id;
|
|
176
|
+
if (!e || !d.value.organizationId || !d.value.departmentId || !d.value.positionId) {
|
|
177
|
+
pe("请选择机构、部门和岗位", {
|
|
179
178
|
source: "employee-employment",
|
|
180
179
|
phase: "validation"
|
|
181
180
|
});
|
|
182
181
|
return;
|
|
183
182
|
}
|
|
184
|
-
|
|
183
|
+
u.value = !0;
|
|
185
184
|
try {
|
|
186
|
-
let t =
|
|
185
|
+
let t = d.value.id;
|
|
187
186
|
await a.http.request({
|
|
188
187
|
method: "POST",
|
|
189
188
|
path: t ? `/iam.employee/${encodeURIComponent(e)}/positions/${encodeURIComponent(t)}/update` : `/iam.employee/${encodeURIComponent(e)}/positions`,
|
|
190
189
|
body: {
|
|
191
|
-
...
|
|
190
|
+
...d.value,
|
|
192
191
|
employeeId: e
|
|
193
192
|
}
|
|
194
|
-
}),
|
|
193
|
+
}), m(), await ye(), i("saved", e), await ie({
|
|
195
194
|
success: !0,
|
|
196
195
|
message: "任职已保存"
|
|
197
196
|
}, {
|
|
@@ -199,181 +198,181 @@ var qe = { class: "employment-drawer" }, k = { class: "employment-drawer-header"
|
|
|
199
198
|
phase: "action"
|
|
200
199
|
});
|
|
201
200
|
} catch (e) {
|
|
202
|
-
|
|
201
|
+
p(e, {
|
|
203
202
|
source: "employee-employment",
|
|
204
203
|
phase: "action"
|
|
205
204
|
});
|
|
206
205
|
} finally {
|
|
207
|
-
|
|
206
|
+
u.value = !1;
|
|
208
207
|
}
|
|
209
208
|
}
|
|
210
|
-
async function
|
|
211
|
-
let
|
|
212
|
-
if (
|
|
209
|
+
async function je(e, t) {
|
|
210
|
+
let n = r.employee?.id;
|
|
211
|
+
if (n && !(t === "delete" && !await se({
|
|
213
212
|
title: "删除任职",
|
|
214
213
|
content: "确认删除该任职?",
|
|
215
214
|
okText: "删除",
|
|
216
215
|
danger: !0
|
|
217
216
|
}))) {
|
|
218
|
-
|
|
217
|
+
u.value = !0;
|
|
219
218
|
try {
|
|
220
219
|
await a.http.request({
|
|
221
220
|
method: "POST",
|
|
222
|
-
path: `/iam.employee/${encodeURIComponent(
|
|
223
|
-
}), await
|
|
221
|
+
path: `/iam.employee/${encodeURIComponent(n)}/positions/${encodeURIComponent(e.id)}/${t}`
|
|
222
|
+
}), await ye(), i("saved", n);
|
|
224
223
|
} catch (e) {
|
|
225
|
-
|
|
224
|
+
p(e, {
|
|
226
225
|
source: "employee-employment",
|
|
227
226
|
phase: "action"
|
|
228
227
|
});
|
|
229
228
|
} finally {
|
|
230
|
-
|
|
229
|
+
u.value = !1;
|
|
231
230
|
}
|
|
232
231
|
}
|
|
233
232
|
}
|
|
234
|
-
return (t,
|
|
233
|
+
return (t, r) => (w(), _(D(n), {
|
|
235
234
|
open: e.open,
|
|
236
|
-
title:
|
|
237
|
-
onClose:
|
|
235
|
+
title: f.value,
|
|
236
|
+
onClose: r[4] ||= (e) => i("close")
|
|
238
237
|
}, {
|
|
239
|
-
operation:
|
|
238
|
+
operation: O(() => [S(D(s), {
|
|
240
239
|
type: "text",
|
|
241
240
|
"icon-name": "reload",
|
|
242
|
-
disabled:
|
|
243
|
-
onClick:
|
|
241
|
+
disabled: ne.value || u.value,
|
|
242
|
+
onClick: ye
|
|
244
243
|
}, {
|
|
245
|
-
default:
|
|
244
|
+
default: O(() => [...r[5] ||= [x(" 刷新 ", -1)]]),
|
|
246
245
|
_: 1
|
|
247
246
|
}, 8, ["disabled"])]),
|
|
248
|
-
default:
|
|
249
|
-
|
|
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), {
|
|
250
249
|
type: "primary",
|
|
251
250
|
"icon-name": "plus",
|
|
252
|
-
disabled:
|
|
253
|
-
onClick:
|
|
251
|
+
disabled: u.value,
|
|
252
|
+
onClick: xe
|
|
254
253
|
}, {
|
|
255
|
-
default:
|
|
254
|
+
default: O(() => [...r[6] ||= [x("新增任职", -1)]]),
|
|
256
255
|
_: 1
|
|
257
256
|
}, 8, ["disabled"])]),
|
|
258
|
-
|
|
257
|
+
le.value ? (w(), y("form", {
|
|
259
258
|
key: 0,
|
|
260
259
|
class: "employment-editor",
|
|
261
|
-
onSubmit:
|
|
260
|
+
onSubmit: k(Ae, ["prevent"])
|
|
262
261
|
}, [
|
|
263
|
-
|
|
264
|
-
value:
|
|
265
|
-
context:
|
|
262
|
+
b("label", null, [r[8] ||= b("span", null, "机构", -1), S(D(ae), {
|
|
263
|
+
value: d.value.organizationId,
|
|
264
|
+
context: D(o),
|
|
266
265
|
placeholder: "请选择机构",
|
|
267
|
-
constraints: [
|
|
268
|
-
disabled:
|
|
269
|
-
"onUpdate:value":
|
|
266
|
+
constraints: [D(h)()],
|
|
267
|
+
disabled: u.value,
|
|
268
|
+
"onUpdate:value": Ce
|
|
270
269
|
}, null, 8, [
|
|
271
270
|
"value",
|
|
272
271
|
"context",
|
|
273
272
|
"constraints",
|
|
274
273
|
"disabled"
|
|
275
274
|
])]),
|
|
276
|
-
|
|
277
|
-
value:
|
|
278
|
-
context:
|
|
275
|
+
b("label", null, [r[9] ||= b("span", null, "部门", -1), S(D(ae), {
|
|
276
|
+
value: d.value.departmentId,
|
|
277
|
+
context: he.value,
|
|
279
278
|
placeholder: "请选择部门",
|
|
280
|
-
constraints: [
|
|
281
|
-
disabled:
|
|
282
|
-
"onUpdate:value":
|
|
279
|
+
constraints: [D(h)()],
|
|
280
|
+
disabled: u.value || !d.value.organizationId,
|
|
281
|
+
"onUpdate:value": we
|
|
283
282
|
}, null, 8, [
|
|
284
283
|
"value",
|
|
285
284
|
"context",
|
|
286
285
|
"constraints",
|
|
287
286
|
"disabled"
|
|
288
287
|
])]),
|
|
289
|
-
|
|
290
|
-
value:
|
|
291
|
-
context:
|
|
288
|
+
b("label", null, [r[10] ||= b("span", null, "岗位", -1), S(D(ae), {
|
|
289
|
+
value: d.value.positionId,
|
|
290
|
+
context: D(c),
|
|
292
291
|
mode: "list",
|
|
293
292
|
placeholder: "请选择岗位",
|
|
294
|
-
constraints: [
|
|
295
|
-
disabled:
|
|
296
|
-
"onUpdate:value":
|
|
293
|
+
constraints: [D(h)()],
|
|
294
|
+
disabled: u.value,
|
|
295
|
+
"onUpdate:value": r[0] ||= (e) => d.value.positionId = e ? String(e) : void 0
|
|
297
296
|
}, null, 8, [
|
|
298
297
|
"value",
|
|
299
298
|
"context",
|
|
300
299
|
"constraints",
|
|
301
300
|
"disabled"
|
|
302
301
|
])]),
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
302
|
+
b("label", A, [
|
|
303
|
+
r[12] ||= b("span", null, "主岗位", -1),
|
|
304
|
+
b("span", null, [b("input", {
|
|
306
305
|
type: "checkbox",
|
|
307
|
-
checked:
|
|
308
|
-
disabled:
|
|
309
|
-
onChange:
|
|
310
|
-
}, null, 40, j),
|
|
311
|
-
|
|
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, "主岗必须与职员主机构、主部门一致"))
|
|
312
311
|
]),
|
|
313
|
-
|
|
314
|
-
disabled:
|
|
315
|
-
onClick:
|
|
312
|
+
b("div", N, [S(D(s), {
|
|
313
|
+
disabled: u.value,
|
|
314
|
+
onClick: m
|
|
316
315
|
}, {
|
|
317
|
-
default:
|
|
316
|
+
default: O(() => [...r[13] ||= [x("取消", -1)]]),
|
|
318
317
|
_: 1
|
|
319
|
-
}, 8, ["disabled"]),
|
|
318
|
+
}, 8, ["disabled"]), S(D(s), {
|
|
320
319
|
type: "primary",
|
|
321
320
|
"html-type": "submit",
|
|
322
|
-
loading:
|
|
321
|
+
loading: u.value
|
|
323
322
|
}, {
|
|
324
|
-
default:
|
|
323
|
+
default: O(() => [...r[14] ||= [x("保存任职", -1)]]),
|
|
325
324
|
_: 1
|
|
326
325
|
}, 8, ["loading"])])
|
|
327
|
-
], 32)) :
|
|
328
|
-
|
|
326
|
+
], 32)) : v("v-if", !0),
|
|
327
|
+
ne.value ? (w(), _(D(ce), {
|
|
329
328
|
key: 1,
|
|
330
329
|
class: "employment-state",
|
|
331
330
|
tip: "加载任职"
|
|
332
|
-
})) :
|
|
331
|
+
})) : re.value ? (w(), y("div", P, [S(D(be), {
|
|
333
332
|
title: "任职信息加载失败",
|
|
334
333
|
message: "无法加载任职信息,请重试"
|
|
335
|
-
}),
|
|
334
|
+
}), S(D(s), {
|
|
336
335
|
type: "primary",
|
|
337
336
|
"icon-name": "reload",
|
|
338
|
-
onClick:
|
|
337
|
+
onClick: ye
|
|
339
338
|
}, {
|
|
340
|
-
default:
|
|
339
|
+
default: O(() => [...r[15] ||= [x("重试", -1)]]),
|
|
341
340
|
_: 1
|
|
342
|
-
})])) :
|
|
341
|
+
})])) : te.value.length === 0 ? (w(), y("p", F, "暂无任职信息")) : (w(), _(D(ue), {
|
|
343
342
|
key: 4,
|
|
344
343
|
class: "employment-table",
|
|
345
|
-
columns:
|
|
346
|
-
rows:
|
|
344
|
+
columns: fe,
|
|
345
|
+
rows: me.value,
|
|
347
346
|
"row-key": "id",
|
|
348
347
|
pagination: !1,
|
|
349
348
|
"horizontal-scroll": "",
|
|
350
349
|
"show-action-column": "",
|
|
351
350
|
"action-column-width": "92",
|
|
352
|
-
"row-muted":
|
|
351
|
+
"row-muted": De
|
|
353
352
|
}, {
|
|
354
|
-
cell:
|
|
355
|
-
rowActions:
|
|
353
|
+
cell: O(({ column: e, record: t }) => [x(E(Ee(e, t)), 1)]),
|
|
354
|
+
rowActions: O(({ record: e }) => [b("div", {
|
|
356
355
|
class: "employment-table-row-actions",
|
|
357
|
-
onClick:
|
|
358
|
-
onDblclick:
|
|
359
|
-
}, [
|
|
356
|
+
onClick: r[2] ||= k(() => {}, ["stop"]),
|
|
357
|
+
onDblclick: r[3] ||= k(() => {}, ["stop"])
|
|
358
|
+
}, [S(D(s), {
|
|
360
359
|
type: "text",
|
|
361
|
-
disabled:
|
|
362
|
-
onClick: (t) =>
|
|
360
|
+
disabled: u.value,
|
|
361
|
+
onClick: (t) => Se(e)
|
|
363
362
|
}, {
|
|
364
|
-
default:
|
|
363
|
+
default: O(() => [...r[16] ||= [x(" 编辑 ", -1)]]),
|
|
365
364
|
_: 1
|
|
366
|
-
}, 8, ["disabled", "onClick"]),
|
|
367
|
-
items:
|
|
365
|
+
}, 8, ["disabled", "onClick"]), S(D(de), {
|
|
366
|
+
items: Oe(e),
|
|
368
367
|
trigger: "hover",
|
|
369
|
-
onSelect: (t) =>
|
|
368
|
+
onSelect: (t) => ke(e, t)
|
|
370
369
|
}, {
|
|
371
|
-
default:
|
|
370
|
+
default: O(() => [S(D(s), {
|
|
372
371
|
type: "text",
|
|
373
372
|
"icon-name": "down",
|
|
374
373
|
title: "更多",
|
|
375
374
|
"aria-label": "更多",
|
|
376
|
-
disabled:
|
|
375
|
+
disabled: u.value
|
|
377
376
|
}, null, 8, ["disabled"])]),
|
|
378
377
|
_: 1
|
|
379
378
|
}, 8, ["items", "onSelect"])], 32)]),
|
|
@@ -398,7 +397,7 @@ var qe = { class: "employment-drawer" }, k = { class: "employment-drawer-header"
|
|
|
398
397
|
}, Ye = { class: "employee-account-status" }, Xe = { key: 0 }, U = { class: "employee-form-label" }, W = {
|
|
399
398
|
key: 0,
|
|
400
399
|
"aria-hidden": "true"
|
|
401
|
-
}, Ze = /*#__PURE__*/
|
|
400
|
+
}, Ze = /*#__PURE__*/ r(/* @__PURE__ */ C({
|
|
402
401
|
name: "EmployeeDetailContent",
|
|
403
402
|
__name: "EmployeeDetailContent",
|
|
404
403
|
props: {
|
|
@@ -445,29 +444,29 @@ var qe = { class: "employment-drawer" }, k = { class: "employment-drawer-header"
|
|
|
445
444
|
"removeAccount",
|
|
446
445
|
"updateAccountProvisionField"
|
|
447
446
|
],
|
|
448
|
-
setup(
|
|
449
|
-
let
|
|
450
|
-
return (
|
|
447
|
+
setup(e, { emit: t }) {
|
|
448
|
+
let n = e, r = t;
|
|
449
|
+
return (e, t) => n.loading ? (w(), _(D(ce), {
|
|
451
450
|
key: 0,
|
|
452
451
|
class: "employee-detail-state",
|
|
453
452
|
tip: "加载职员详情"
|
|
454
|
-
})) :
|
|
453
|
+
})) : n.loadFailed ? (w(), y("div", I, [S(D(be), {
|
|
455
454
|
title: "详情加载失败",
|
|
456
455
|
message: "无法加载职员详情,请重试"
|
|
457
|
-
}),
|
|
456
|
+
}), S(D(s), {
|
|
458
457
|
type: "primary",
|
|
459
458
|
"icon-name": "reload",
|
|
460
|
-
onClick:
|
|
459
|
+
onClick: t[0] ||= (e) => r("retry")
|
|
461
460
|
}, {
|
|
462
|
-
default:
|
|
461
|
+
default: O(() => [...t[12] ||= [x("重试", -1)]]),
|
|
463
462
|
_: 1
|
|
464
|
-
})])) :
|
|
465
|
-
|
|
466
|
-
record:
|
|
467
|
-
fields:
|
|
468
|
-
fallback:
|
|
469
|
-
"picker-configs":
|
|
470
|
-
"display-of":
|
|
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
|
|
471
470
|
}, null, 8, [
|
|
472
471
|
"record",
|
|
473
472
|
"fields",
|
|
@@ -475,98 +474,98 @@ var qe = { class: "employment-drawer" }, k = { class: "employment-drawer-header"
|
|
|
475
474
|
"picker-configs",
|
|
476
475
|
"display-of"
|
|
477
476
|
]),
|
|
478
|
-
|
|
477
|
+
b("section", L, [b("div", R, [t[14] ||= b("strong", null, "登录账号", -1), !n.account && !n.showAccountProvisionForm ? (w(), _(D(s), {
|
|
479
478
|
key: 0,
|
|
480
479
|
type: "primary",
|
|
481
480
|
"icon-name": "plus",
|
|
482
|
-
disabled: !
|
|
483
|
-
onClick:
|
|
481
|
+
disabled: !n.canManageAccounts,
|
|
482
|
+
onClick: t[1] ||= (e) => r("startAccountProvision")
|
|
484
483
|
}, {
|
|
485
|
-
default:
|
|
484
|
+
default: O(() => [...t[13] ||= [x(" 设置账号 ", -1)]]),
|
|
486
485
|
_: 1
|
|
487
|
-
}, 8, ["disabled"])) :
|
|
486
|
+
}, 8, ["disabled"])) : v("v-if", !0)]), n.loadingAccounts ? (w(), _(D(ce), {
|
|
488
487
|
key: 0,
|
|
489
488
|
class: "employee-account-state",
|
|
490
489
|
tip: "加载账号绑定"
|
|
491
|
-
})) :
|
|
490
|
+
})) : n.accountsLoadFailed ? (w(), y("div", z, [S(D(be), {
|
|
492
491
|
title: "账号绑定加载失败",
|
|
493
492
|
message: "无法加载职员账号绑定,请重试"
|
|
494
|
-
}),
|
|
493
|
+
}), S(D(s), {
|
|
495
494
|
"icon-name": "reload",
|
|
496
|
-
onClick:
|
|
495
|
+
onClick: t[2] ||= (e) => r("retryAccounts")
|
|
497
496
|
}, {
|
|
498
|
-
default:
|
|
497
|
+
default: O(() => [...t[15] ||= [x("重试", -1)]]),
|
|
499
498
|
_: 1
|
|
500
|
-
})])) :
|
|
499
|
+
})])) : n.showAccountProvisionForm ? (w(), y("form", {
|
|
501
500
|
key: 2,
|
|
502
501
|
class: "employee-account-form",
|
|
503
|
-
onSubmit:
|
|
502
|
+
onSubmit: t[6] ||= k((e) => r("provisionAccount"), ["prevent"])
|
|
504
503
|
}, [
|
|
505
|
-
|
|
506
|
-
value:
|
|
504
|
+
b("label", null, [t[16] ||= b("span", null, "账号", -1), S(D(he), {
|
|
505
|
+
value: n.accountProvisionDraft.username,
|
|
507
506
|
placeholder: "请输入登录账号",
|
|
508
|
-
disabled:
|
|
509
|
-
"onUpdate:value":
|
|
507
|
+
disabled: n.savingAccount,
|
|
508
|
+
"onUpdate:value": t[3] ||= (e) => r("updateAccountProvisionField", "username", e)
|
|
510
509
|
}, null, 8, ["value", "disabled"])]),
|
|
511
|
-
|
|
512
|
-
value:
|
|
510
|
+
b("label", null, [t[17] ||= b("span", null, "初始密码", -1), S(D(he), {
|
|
511
|
+
value: n.accountProvisionDraft.password,
|
|
513
512
|
type: "password",
|
|
514
513
|
placeholder: "请输入初始密码",
|
|
515
|
-
disabled:
|
|
516
|
-
"onUpdate:value":
|
|
514
|
+
disabled: n.savingAccount,
|
|
515
|
+
"onUpdate:value": t[4] ||= (e) => r("updateAccountProvisionField", "password", e)
|
|
517
516
|
}, null, 8, ["value", "disabled"])]),
|
|
518
|
-
|
|
519
|
-
disabled:
|
|
520
|
-
onClick:
|
|
517
|
+
b("div", B, [S(D(s), {
|
|
518
|
+
disabled: n.savingAccount,
|
|
519
|
+
onClick: t[5] ||= (e) => r("cancelAccountProvision")
|
|
521
520
|
}, {
|
|
522
|
-
default:
|
|
521
|
+
default: O(() => [...t[18] ||= [x("取消", -1)]]),
|
|
523
522
|
_: 1
|
|
524
|
-
}, 8, ["disabled"]),
|
|
523
|
+
}, 8, ["disabled"]), S(D(s), {
|
|
525
524
|
type: "primary",
|
|
526
525
|
"html-type": "submit",
|
|
527
526
|
"icon-name": "plus",
|
|
528
|
-
loading:
|
|
529
|
-
disabled: !
|
|
527
|
+
loading: n.savingAccount,
|
|
528
|
+
disabled: !n.canManageAccounts
|
|
530
529
|
}, {
|
|
531
|
-
default:
|
|
530
|
+
default: O(() => [...t[19] ||= [x(" 创建账号并绑定 ", -1)]]),
|
|
532
531
|
_: 1
|
|
533
532
|
}, 8, ["loading", "disabled"])])
|
|
534
|
-
], 32)) :
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
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), {
|
|
538
537
|
danger: "",
|
|
539
538
|
"icon-name": "delete",
|
|
540
|
-
disabled:
|
|
541
|
-
onClick:
|
|
539
|
+
disabled: n.savingAccount || !n.canManageAccounts,
|
|
540
|
+
onClick: t[7] ||= (e) => r("removeAccount")
|
|
542
541
|
}, {
|
|
543
|
-
default:
|
|
542
|
+
default: O(() => [...t[21] ||= [x(" 移除账户 ", -1)]]),
|
|
544
543
|
_: 1
|
|
545
544
|
}, 8, ["disabled"])
|
|
546
|
-
])) : (
|
|
547
|
-
|
|
548
|
-
record:
|
|
545
|
+
])) : (w(), y("div", V, [...t[20] ||= [b("span", null, "未设置登录账号", -1), b("small", null, "可从职员档案生成账号并自动完成一对一绑定。", -1)]]))]),
|
|
546
|
+
S(D(m), {
|
|
547
|
+
record: n.draft,
|
|
549
548
|
"show-sort-order": ""
|
|
550
549
|
}, null, 8, ["record"])
|
|
551
|
-
], 64)) : (
|
|
550
|
+
], 64)) : (w(), y(Ne, { key: 1 }, [n.externallyChanged ? (w(), _(D(c), {
|
|
552
551
|
key: 0,
|
|
553
|
-
onReload:
|
|
554
|
-
onDismiss:
|
|
555
|
-
})) :
|
|
552
|
+
onReload: t[8] ||= (e) => r("reloadExternal"),
|
|
553
|
+
onDismiss: t[9] ||= (e) => r("dismissExternal")
|
|
554
|
+
})) : v("v-if", !0), b("form", {
|
|
556
555
|
class: "employee-form",
|
|
557
|
-
onSubmit:
|
|
558
|
-
}, [
|
|
559
|
-
value:
|
|
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 ?? "-",
|
|
560
559
|
disabled: ""
|
|
561
|
-
}, null, 8, ["value"])])) :
|
|
562
|
-
record:
|
|
563
|
-
fields:
|
|
560
|
+
}, null, 8, ["value"])])) : v("v-if", !0), S(D(Se), {
|
|
561
|
+
record: n.draft,
|
|
562
|
+
fields: n.fields,
|
|
564
563
|
"exclude-field-names": ["organizationId"],
|
|
565
|
-
fallback:
|
|
566
|
-
"picker-configs":
|
|
567
|
-
disabled:
|
|
568
|
-
"option-context":
|
|
569
|
-
"onUpdate:field":
|
|
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)
|
|
570
569
|
}, null, 8, [
|
|
571
570
|
"record",
|
|
572
571
|
"fields",
|
|
@@ -574,13 +573,13 @@ var qe = { class: "employment-drawer" }, k = { class: "employment-drawer-header"
|
|
|
574
573
|
"picker-configs",
|
|
575
574
|
"disabled",
|
|
576
575
|
"option-context"
|
|
577
|
-
])], 32)], 64))], 64)) :
|
|
576
|
+
])], 32)], 64))], 64)) : v("v-if", !0);
|
|
578
577
|
}
|
|
579
578
|
}), [["__scopeId", "data-v-9c433254"]]);
|
|
580
579
|
//#endregion
|
|
581
580
|
//#region src/views/employeeDetailWorkspaceSession.ts
|
|
582
581
|
function Qe(e, t) {
|
|
583
|
-
return
|
|
582
|
+
return Oe(ke, e, {
|
|
584
583
|
...t,
|
|
585
584
|
selectedEmployee: { ...t.selectedEmployee },
|
|
586
585
|
draft: { ...t.draft },
|
|
@@ -592,34 +591,34 @@ function Qe(e, t) {
|
|
|
592
591
|
});
|
|
593
592
|
}
|
|
594
593
|
function $e(e, t) {
|
|
595
|
-
return
|
|
594
|
+
return Ee(ke, e, t);
|
|
596
595
|
}
|
|
597
596
|
function et(e) {
|
|
598
|
-
return
|
|
597
|
+
return De(ke, e);
|
|
599
598
|
}
|
|
600
599
|
//#endregion
|
|
601
600
|
//#region src/views/useEmployeeEmploymentRows.ts
|
|
602
601
|
function tt(e) {
|
|
603
|
-
let t =
|
|
602
|
+
let t = T([]), n = T({});
|
|
604
603
|
async function r(t) {
|
|
605
604
|
if (!(!t || e.context.can("employeePositions", t) === !1)) {
|
|
606
|
-
|
|
605
|
+
o(t, {
|
|
607
606
|
...a(t),
|
|
608
607
|
loading: !0,
|
|
609
608
|
error: void 0
|
|
610
609
|
});
|
|
611
610
|
try {
|
|
612
|
-
|
|
611
|
+
o(t, {
|
|
613
612
|
records: (await e.context.http.request({ path: e.pathOf?.(t) ?? `/iam.employee/${encodeURIComponent(t)}/employment-view` })).records,
|
|
614
613
|
loading: !1,
|
|
615
614
|
error: void 0
|
|
616
615
|
});
|
|
617
616
|
} catch (n) {
|
|
618
|
-
let r =
|
|
617
|
+
let r = p(n, {
|
|
619
618
|
source: `${e.source}-employment-rows`,
|
|
620
619
|
phase: "load"
|
|
621
620
|
});
|
|
622
|
-
|
|
621
|
+
o(t, {
|
|
623
622
|
...a(t),
|
|
624
623
|
loading: !1,
|
|
625
624
|
error: r.message
|
|
@@ -640,13 +639,13 @@ function tt(e) {
|
|
|
640
639
|
loading: !1
|
|
641
640
|
};
|
|
642
641
|
}
|
|
643
|
-
function
|
|
642
|
+
function o(e, t) {
|
|
644
643
|
n.value = {
|
|
645
644
|
...n.value,
|
|
646
645
|
[e]: t
|
|
647
646
|
};
|
|
648
647
|
}
|
|
649
|
-
function
|
|
648
|
+
function ee() {
|
|
650
649
|
t.value = [], n.value = {};
|
|
651
650
|
}
|
|
652
651
|
return {
|
|
@@ -654,7 +653,7 @@ function tt(e) {
|
|
|
654
653
|
employmentRowState: a,
|
|
655
654
|
handleEmployeeRowExpand: i,
|
|
656
655
|
loadEmployeeEmploymentRows: r,
|
|
657
|
-
resetEmployeeEmploymentRows:
|
|
656
|
+
resetEmployeeEmploymentRows: ee
|
|
658
657
|
};
|
|
659
658
|
}
|
|
660
659
|
//#endregion
|
|
@@ -662,36 +661,36 @@ function tt(e) {
|
|
|
662
661
|
var nt = { key: 0 }, rt = {
|
|
663
662
|
key: 1,
|
|
664
663
|
class: "employee-row-employment-list"
|
|
665
|
-
}, G = /*#__PURE__*/
|
|
664
|
+
}, G = /*#__PURE__*/ r(/* @__PURE__ */ C({
|
|
666
665
|
name: "EmployeeManagementView",
|
|
667
666
|
__name: "EmployeeManagementView",
|
|
668
667
|
props: {
|
|
669
668
|
recordId: {},
|
|
670
669
|
mode: {}
|
|
671
670
|
},
|
|
672
|
-
setup(
|
|
673
|
-
let
|
|
671
|
+
setup(r) {
|
|
672
|
+
let c = r, ae = [
|
|
674
673
|
"departmentId",
|
|
675
674
|
"employeeNo",
|
|
676
675
|
"title"
|
|
677
|
-
],
|
|
678
|
-
context: () =>
|
|
679
|
-
listReloadKey:
|
|
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,
|
|
680
679
|
canChange: X,
|
|
681
680
|
resetSelection: Yt
|
|
682
681
|
}), { expandedEmployeeKeys: at, employmentRowState: ot, handleEmployeeRowExpand: st, loadEmployeeEmploymentRows: ct, resetEmployeeEmploymentRows: lt } = tt({
|
|
683
|
-
context:
|
|
682
|
+
context: f,
|
|
684
683
|
source: "employee-management",
|
|
685
684
|
pathOf: (e) => it.active.value ? `/iam.employee/recycle-bin/${encodeURIComponent(e)}/employment-view` : `/iam.employee/${encodeURIComponent(e)}/employment-view`
|
|
686
|
-
}), J =
|
|
685
|
+
}), J = je({
|
|
687
686
|
moduleAlias: "iam.employee",
|
|
688
687
|
recordId: () => M.value?.id,
|
|
689
688
|
editing: () => P.value === "edit",
|
|
690
689
|
saving: () => L.value
|
|
691
|
-
}), ut =
|
|
690
|
+
}), ut = Ae({
|
|
692
691
|
delay: 80,
|
|
693
692
|
load: async (e) => {
|
|
694
|
-
|
|
693
|
+
k.value += 1;
|
|
695
694
|
let t = M.value?.id;
|
|
696
695
|
N.value && P.value === "view" && t && e.keys.includes(t) && await Z({
|
|
697
696
|
...z.value,
|
|
@@ -699,44 +698,44 @@ var nt = { key: 0 }, rt = {
|
|
|
699
698
|
}, "view");
|
|
700
699
|
}
|
|
701
700
|
});
|
|
702
|
-
|
|
701
|
+
Me({
|
|
703
702
|
moduleAlias: "iam.employee",
|
|
704
703
|
handler: (e, t) => {
|
|
705
704
|
let n = t.map((e) => e.recordId).filter((e) => !!e);
|
|
706
705
|
ut.enqueue(n.length > 0 ? n : "__collection__");
|
|
707
706
|
}
|
|
708
707
|
});
|
|
709
|
-
let dt =
|
|
708
|
+
let dt = g(() => Ht(f, qe.value)), ft = g(() => m?.value?.system === !0), pt = g(() => qe.value?.id), mt = g(() => oe(ue, {
|
|
710
709
|
scopeFieldName: "tenantId",
|
|
711
710
|
scopeValue: pt.value,
|
|
712
711
|
treePath: "/iam.organization/tree"
|
|
713
|
-
})), Y =
|
|
712
|
+
})), Y = g(() => A.value?.id), ht = g(() => oe(de, {
|
|
714
713
|
scopeFieldName: "organizationId",
|
|
715
714
|
scopeValue: Y.value,
|
|
716
715
|
treePath: "/iam.department/tree",
|
|
717
716
|
sortPath: "/iam.department/sort"
|
|
718
|
-
})), gt =
|
|
717
|
+
})), gt = g(() => ({ departmentId: {
|
|
719
718
|
context: ht.value,
|
|
720
|
-
reloadKey:
|
|
719
|
+
reloadKey: C.value,
|
|
721
720
|
placeholder: "请选择部门",
|
|
722
721
|
titleOf: (e) => Rn(e)
|
|
723
|
-
} })), _t =
|
|
722
|
+
} })), _t = g(() => {
|
|
724
723
|
let e = Y.value;
|
|
725
724
|
if (e) return { departmentScope: {
|
|
726
725
|
organizationId: e,
|
|
727
726
|
includeChildren: !0
|
|
728
727
|
} };
|
|
729
|
-
}), vt =
|
|
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({
|
|
730
729
|
mode: P.value,
|
|
731
730
|
loadingDetail: F.value,
|
|
732
731
|
saving: L.value,
|
|
733
732
|
selectedEmployeeId: M.value?.id
|
|
734
|
-
})), xt =
|
|
733
|
+
})), xt = g(() => Ve({
|
|
735
734
|
mode: P.value,
|
|
736
735
|
loadingDetail: F.value,
|
|
737
736
|
loadFailed: I.value,
|
|
738
737
|
selectedEmployeeId: M.value?.id
|
|
739
|
-
})), St =
|
|
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 ? [{
|
|
740
739
|
key: "edit",
|
|
741
740
|
actionCode: "update",
|
|
742
741
|
title: "编辑",
|
|
@@ -762,7 +761,7 @@ var nt = { key: 0 }, rt = {
|
|
|
762
761
|
primary: !0,
|
|
763
762
|
disabled: !St.value,
|
|
764
763
|
loading: L.value
|
|
765
|
-
}]), Et =
|
|
764
|
+
}]), Et = g(() => Tt.value), Dt = g(() => P.value === "view" ? M.value?.id ? [{
|
|
766
765
|
key: "edit",
|
|
767
766
|
actionCode: "update",
|
|
768
767
|
title: "编辑",
|
|
@@ -782,13 +781,13 @@ var nt = { key: 0 }, rt = {
|
|
|
782
781
|
loading: L.value,
|
|
783
782
|
disabled: !St.value
|
|
784
783
|
}] : []), Ot = we({
|
|
785
|
-
view:
|
|
786
|
-
input:
|
|
784
|
+
view: ke,
|
|
785
|
+
input: g(() => {
|
|
787
786
|
let e = M.value?.id, t = P.value;
|
|
788
787
|
return e && (t === "view" || t === "edit") ? { recordId: e } : void 0;
|
|
789
788
|
}),
|
|
790
|
-
title:
|
|
791
|
-
eligibility:
|
|
789
|
+
title: g(() => Dn(M.value)),
|
|
790
|
+
eligibility: g(() => ({
|
|
792
791
|
hasStableIdentity: !!M.value?.id && !F.value,
|
|
793
792
|
busy: L.value || W.value || U.value
|
|
794
793
|
})),
|
|
@@ -808,42 +807,42 @@ var nt = { key: 0 }, rt = {
|
|
|
808
807
|
},
|
|
809
808
|
onPromoted: an
|
|
810
809
|
});
|
|
811
|
-
|
|
812
|
-
!
|
|
810
|
+
Re(M, (e) => {
|
|
811
|
+
!Se.value || !e || ce?.setTitle(Dn(e));
|
|
813
812
|
}, { immediate: !0 });
|
|
814
813
|
let kt;
|
|
815
|
-
|
|
816
|
-
if (jt(), !ft.value &&
|
|
817
|
-
id:
|
|
818
|
-
title:
|
|
819
|
-
}), !
|
|
820
|
-
let e = { recordId:
|
|
821
|
-
|
|
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));
|
|
822
821
|
let t = et(e);
|
|
823
822
|
if (t) {
|
|
824
823
|
yn(t);
|
|
825
824
|
return;
|
|
826
825
|
}
|
|
827
|
-
Z({ id:
|
|
828
|
-
}),
|
|
829
|
-
A.value = void 0, Yt(),
|
|
830
|
-
}),
|
|
826
|
+
Z({ id: c.recordId }, c.mode ?? "view");
|
|
827
|
+
}), Re(pt, () => {
|
|
828
|
+
A.value = void 0, Yt(), C.value += 1;
|
|
829
|
+
}), Fe(() => kt?.());
|
|
831
830
|
function At(e) {
|
|
832
831
|
return P.value !== "view" || K.value ? !1 : (yn(e), !0);
|
|
833
832
|
}
|
|
834
833
|
async function jt() {
|
|
835
834
|
try {
|
|
836
|
-
|
|
835
|
+
h.value = ee((await f.runtime.ready).uiDescriptor);
|
|
837
836
|
} catch (e) {
|
|
838
|
-
|
|
837
|
+
p(e, {
|
|
839
838
|
source: "employee-management",
|
|
840
839
|
phase: "load"
|
|
841
840
|
});
|
|
842
841
|
}
|
|
843
842
|
}
|
|
844
843
|
function Mt(e) {
|
|
845
|
-
return
|
|
846
|
-
fields:
|
|
844
|
+
return o(e, {
|
|
845
|
+
fields: h.value,
|
|
847
846
|
fallback: Bn
|
|
848
847
|
});
|
|
849
848
|
}
|
|
@@ -857,7 +856,7 @@ var nt = { key: 0 }, rt = {
|
|
|
857
856
|
return Mt(e).visible;
|
|
858
857
|
}
|
|
859
858
|
function X() {
|
|
860
|
-
return
|
|
859
|
+
return He({ saving: L.value });
|
|
861
860
|
}
|
|
862
861
|
function It(e, t) {
|
|
863
862
|
z.value = {
|
|
@@ -882,7 +881,7 @@ var nt = { key: 0 }, rt = {
|
|
|
882
881
|
pt.value && !A.value && e.length > 0 && (A.value = e[0]);
|
|
883
882
|
}
|
|
884
883
|
function Bt(e) {
|
|
885
|
-
X() && (
|
|
884
|
+
X() && (qe.value = e);
|
|
886
885
|
}
|
|
887
886
|
function Vt(e) {
|
|
888
887
|
return {
|
|
@@ -915,7 +914,7 @@ var nt = { key: 0 }, rt = {
|
|
|
915
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());
|
|
916
915
|
}
|
|
917
916
|
function Gt() {
|
|
918
|
-
|
|
917
|
+
C.value += 1;
|
|
919
918
|
}
|
|
920
919
|
function Kt(e) {
|
|
921
920
|
if (!X()) return;
|
|
@@ -932,7 +931,7 @@ var nt = { key: 0 }, rt = {
|
|
|
932
931
|
lt(), j.value = void 0, M.value = void 0, an();
|
|
933
932
|
}
|
|
934
933
|
function Xt() {
|
|
935
|
-
|
|
934
|
+
k.value += 1;
|
|
936
935
|
}
|
|
937
936
|
function Zt(e, t) {
|
|
938
937
|
if (X()) {
|
|
@@ -957,15 +956,15 @@ var nt = { key: 0 }, rt = {
|
|
|
957
956
|
actionCode: "employeePositions",
|
|
958
957
|
title: "任职",
|
|
959
958
|
after: "edit",
|
|
960
|
-
visible: !!e.id &&
|
|
959
|
+
visible: !!e.id && f.can("employeePositions", String(e.id)) !== !1
|
|
961
960
|
}];
|
|
962
961
|
}
|
|
963
962
|
async function $t(e) {
|
|
964
963
|
let t = String(e.id ?? "");
|
|
965
964
|
if (t) try {
|
|
966
|
-
Xe.value = await
|
|
965
|
+
Xe.value = await f.crud.view(t), Ye.value = !0;
|
|
967
966
|
} catch (e) {
|
|
968
|
-
|
|
967
|
+
p(e, {
|
|
969
968
|
source: "employee-management",
|
|
970
969
|
phase: "load"
|
|
971
970
|
});
|
|
@@ -983,18 +982,18 @@ var nt = { key: 0 }, rt = {
|
|
|
983
982
|
function rn() {
|
|
984
983
|
if (X()) {
|
|
985
984
|
if (!Y.value) {
|
|
986
|
-
|
|
985
|
+
pe("请先选择机构", { phase: "validation" });
|
|
987
986
|
return;
|
|
988
987
|
}
|
|
989
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;
|
|
990
989
|
}
|
|
991
990
|
}
|
|
992
991
|
function an() {
|
|
993
|
-
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),
|
|
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());
|
|
994
993
|
}
|
|
995
994
|
function on() {
|
|
996
995
|
if (!L.value) {
|
|
997
|
-
if (
|
|
996
|
+
if (Ue({
|
|
998
997
|
mode: P.value,
|
|
999
998
|
selectedEmployeeId: M.value?.id
|
|
1000
999
|
})) {
|
|
@@ -1011,17 +1010,17 @@ var nt = { key: 0 }, rt = {
|
|
|
1011
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;
|
|
1012
1011
|
let r = R.value + 1;
|
|
1013
1012
|
R.value = r;
|
|
1014
|
-
let i = () =>
|
|
1013
|
+
let i = () => Be({
|
|
1015
1014
|
activeRequestSeq: R.value,
|
|
1016
1015
|
requestSeq: r,
|
|
1017
1016
|
selectedEmployeeKey: j.value,
|
|
1018
1017
|
recordId: n
|
|
1019
1018
|
});
|
|
1020
1019
|
try {
|
|
1021
|
-
let e = await
|
|
1020
|
+
let e = await f.crud.view(n);
|
|
1022
1021
|
if (!i()) return;
|
|
1023
1022
|
if (!e?.id) {
|
|
1024
|
-
I.value = !0,
|
|
1023
|
+
I.value = !0, pe("未找到指定职员", {
|
|
1025
1024
|
source: "employee-management",
|
|
1026
1025
|
phase: "load"
|
|
1027
1026
|
});
|
|
@@ -1029,7 +1028,7 @@ var nt = { key: 0 }, rt = {
|
|
|
1029
1028
|
}
|
|
1030
1029
|
M.value = e, z.value = hn(e), I.value = !1, await xn(e, r), await bn(e, r), Sn(e, r);
|
|
1031
1030
|
} catch (e) {
|
|
1032
|
-
i() && (I.value = !0,
|
|
1031
|
+
i() && (I.value = !0, p(e, {
|
|
1033
1032
|
source: "employee-management",
|
|
1034
1033
|
phase: "load"
|
|
1035
1034
|
}));
|
|
@@ -1073,7 +1072,7 @@ var nt = { key: 0 }, rt = {
|
|
|
1073
1072
|
}, "edit"));
|
|
1074
1073
|
}
|
|
1075
1074
|
async function un() {
|
|
1076
|
-
await
|
|
1075
|
+
await ve({
|
|
1077
1076
|
loading: L,
|
|
1078
1077
|
mode: P.value === "edit" ? "edit" : "create",
|
|
1079
1078
|
source: "employee-management",
|
|
@@ -1082,51 +1081,51 @@ var nt = { key: 0 }, rt = {
|
|
|
1082
1081
|
deniedMessage: "当前用户无权保存职员",
|
|
1083
1082
|
createRecord: () => gn(z.value, Y.value ?? ""),
|
|
1084
1083
|
validateRecord: _n,
|
|
1085
|
-
save: (e, t) => t === "edit" && M.value?.id ?
|
|
1086
|
-
actionErrorHandlers: [
|
|
1084
|
+
save: (e, t) => t === "edit" && M.value?.id ? f.crud.update(M.value.id, e) : f.crud.insert(e),
|
|
1085
|
+
actionErrorHandlers: [le({
|
|
1087
1086
|
resourceLabel: "职员",
|
|
1088
1087
|
onNavigateToRecycleBin: () => Jt("recycleBin")
|
|
1089
1088
|
}), {
|
|
1090
|
-
code:
|
|
1089
|
+
code: u.conflictVersion,
|
|
1091
1090
|
handle: (e, { mode: t, record: n }) => t === "edit" && J.markExternalRecordChanged(n.id)
|
|
1092
1091
|
}],
|
|
1093
1092
|
onSaved: ({ record: e }) => {
|
|
1094
1093
|
let t = vn(e);
|
|
1095
|
-
|
|
1094
|
+
k.value += 1, bn(e, t);
|
|
1096
1095
|
}
|
|
1097
1096
|
});
|
|
1098
1097
|
}
|
|
1099
1098
|
async function dn() {
|
|
1100
|
-
await
|
|
1099
|
+
await fe({
|
|
1101
1100
|
loading: L,
|
|
1102
1101
|
source: "employee-management",
|
|
1103
1102
|
record: () => M.value && M.value.id ? M.value : void 0,
|
|
1104
1103
|
canExecute: () => Ct.value,
|
|
1105
1104
|
deniedMessage: "当前用户无权变更职员启停状态",
|
|
1106
|
-
execute: (e) => e.enabled === !1 ?
|
|
1105
|
+
execute: (e) => e.enabled === !1 ? f.crud.enable(e.id, { version: e.version }) : f.crud.disable(e.id, { version: e.version }),
|
|
1107
1106
|
onExecuted: async (e, t) => {
|
|
1108
|
-
let n = await
|
|
1109
|
-
await bn(n, vn(n)),
|
|
1107
|
+
let n = await f.crud.view(t.id);
|
|
1108
|
+
await bn(n, vn(n)), k.value += 1;
|
|
1110
1109
|
}
|
|
1111
1110
|
});
|
|
1112
1111
|
}
|
|
1113
1112
|
async function fn(e) {
|
|
1114
|
-
await
|
|
1113
|
+
await fe({
|
|
1115
1114
|
loading: L,
|
|
1116
1115
|
source: "employee-management",
|
|
1117
1116
|
record: () => e?.id ? e : void 0,
|
|
1118
|
-
canExecute: () =>
|
|
1117
|
+
canExecute: () => f.can("delete") === !0,
|
|
1119
1118
|
deniedMessage: "当前用户无权删除职员",
|
|
1120
|
-
confirm: (e) =>
|
|
1119
|
+
confirm: (e) => se({
|
|
1121
1120
|
title: "删除职员",
|
|
1122
1121
|
content: `确认删除职员「${En(e)}」?`,
|
|
1123
1122
|
okText: "删除",
|
|
1124
1123
|
danger: !0
|
|
1125
1124
|
}),
|
|
1126
|
-
execute: (e) =>
|
|
1125
|
+
execute: (e) => f.crud.delete(String(e.id), { version: e.version }),
|
|
1127
1126
|
onExecuted: (e, t) => {
|
|
1128
1127
|
let n = String(t.id);
|
|
1129
|
-
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"),
|
|
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;
|
|
1130
1129
|
}
|
|
1131
1130
|
});
|
|
1132
1131
|
}
|
|
@@ -1148,7 +1147,7 @@ var nt = { key: 0 }, rt = {
|
|
|
1148
1147
|
return { ...e };
|
|
1149
1148
|
}
|
|
1150
1149
|
function gn(e, t) {
|
|
1151
|
-
return
|
|
1150
|
+
return ge(e, {
|
|
1152
1151
|
organizationId: t,
|
|
1153
1152
|
departmentId: e.departmentId?.trim(),
|
|
1154
1153
|
employeeNo: e.employeeNo?.trim(),
|
|
@@ -1160,7 +1159,7 @@ var nt = { key: 0 }, rt = {
|
|
|
1160
1159
|
});
|
|
1161
1160
|
}
|
|
1162
1161
|
function _n(e) {
|
|
1163
|
-
return
|
|
1162
|
+
return We(ae.map((t) => {
|
|
1164
1163
|
let n = Mt(t);
|
|
1165
1164
|
return {
|
|
1166
1165
|
fieldName: t,
|
|
@@ -1180,7 +1179,7 @@ var nt = { key: 0 }, rt = {
|
|
|
1180
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;
|
|
1181
1180
|
}
|
|
1182
1181
|
function Q(e, t) {
|
|
1183
|
-
return !!e &&
|
|
1182
|
+
return !!e && Be({
|
|
1184
1183
|
activeRequestSeq: R.value,
|
|
1185
1184
|
requestSeq: t,
|
|
1186
1185
|
selectedEmployeeKey: j.value,
|
|
@@ -1191,10 +1190,10 @@ var nt = { key: 0 }, rt = {
|
|
|
1191
1190
|
B.value = void 0;
|
|
1192
1191
|
let n = e.id, r = e.departmentId;
|
|
1193
1192
|
if (r) try {
|
|
1194
|
-
let e = await
|
|
1193
|
+
let e = await de.crud.view(r);
|
|
1195
1194
|
Q(n, t) && (B.value = e);
|
|
1196
1195
|
} catch (e) {
|
|
1197
|
-
Q(n, t) &&
|
|
1196
|
+
Q(n, t) && p(e, {
|
|
1198
1197
|
source: "employee-management",
|
|
1199
1198
|
phase: "load"
|
|
1200
1199
|
});
|
|
@@ -1203,10 +1202,10 @@ var nt = { key: 0 }, rt = {
|
|
|
1203
1202
|
async function xn(e, t = R.value) {
|
|
1204
1203
|
let n = e.id, r = e.organizationId;
|
|
1205
1204
|
if (r) try {
|
|
1206
|
-
let e = await
|
|
1205
|
+
let e = await ue.crud.view(r);
|
|
1207
1206
|
Q(n, t) && (A.value = e);
|
|
1208
1207
|
} catch (e) {
|
|
1209
|
-
Q(n, t) &&
|
|
1208
|
+
Q(n, t) && p(e, {
|
|
1210
1209
|
source: "employee-management",
|
|
1211
1210
|
phase: "load"
|
|
1212
1211
|
});
|
|
@@ -1220,11 +1219,11 @@ var nt = { key: 0 }, rt = {
|
|
|
1220
1219
|
}
|
|
1221
1220
|
U.value = !0, G.value = !1;
|
|
1222
1221
|
try {
|
|
1223
|
-
let e = await
|
|
1222
|
+
let e = await f.http.request({ path: `/iam.employee/${encodeURIComponent(n)}/account` });
|
|
1224
1223
|
if (!Q(n, t)) return;
|
|
1225
1224
|
V.value = e, await Cn(e, n, t);
|
|
1226
1225
|
} catch (e) {
|
|
1227
|
-
Q(n, t) && (G.value = !0,
|
|
1226
|
+
Q(n, t) && (G.value = !0, p(e, {
|
|
1228
1227
|
source: "employee-management",
|
|
1229
1228
|
phase: "load"
|
|
1230
1229
|
}));
|
|
@@ -1242,7 +1241,7 @@ var nt = { key: 0 }, rt = {
|
|
|
1242
1241
|
try {
|
|
1243
1242
|
i = await he.crud.view(r);
|
|
1244
1243
|
} catch (e) {
|
|
1245
|
-
|
|
1244
|
+
p(e, {
|
|
1246
1245
|
source: "employee-management",
|
|
1247
1246
|
phase: "load"
|
|
1248
1247
|
}), i = {
|
|
@@ -1255,9 +1254,9 @@ var nt = { key: 0 }, rt = {
|
|
|
1255
1254
|
async function wn() {
|
|
1256
1255
|
let e = M.value, t = In(q.value);
|
|
1257
1256
|
if (!e?.id || !wt.value) return;
|
|
1258
|
-
let
|
|
1259
|
-
if (
|
|
1260
|
-
|
|
1257
|
+
let n = Ln(t);
|
|
1258
|
+
if (n) {
|
|
1259
|
+
pe(n, {
|
|
1261
1260
|
source: "employee-management",
|
|
1262
1261
|
phase: "validation"
|
|
1263
1262
|
});
|
|
@@ -1265,17 +1264,17 @@ var nt = { key: 0 }, rt = {
|
|
|
1265
1264
|
}
|
|
1266
1265
|
W.value = !0;
|
|
1267
1266
|
try {
|
|
1268
|
-
let
|
|
1267
|
+
let n = await f.http.request({
|
|
1269
1268
|
method: "POST",
|
|
1270
1269
|
path: `/iam.employee/${encodeURIComponent(e.id)}/account/provision`,
|
|
1271
1270
|
body: t
|
|
1272
|
-
}),
|
|
1273
|
-
V.value =
|
|
1271
|
+
}), r = te(n);
|
|
1272
|
+
V.value = r.binding, H.value = r.user, K.value = !1, q.value = mn(e), await ie(n, {
|
|
1274
1273
|
source: "employee-management",
|
|
1275
1274
|
phase: "action"
|
|
1276
1275
|
});
|
|
1277
1276
|
} catch (e) {
|
|
1278
|
-
|
|
1277
|
+
p(e, {
|
|
1279
1278
|
source: "employee-management",
|
|
1280
1279
|
phase: "action"
|
|
1281
1280
|
});
|
|
@@ -1285,7 +1284,7 @@ var nt = { key: 0 }, rt = {
|
|
|
1285
1284
|
}
|
|
1286
1285
|
async function Tn() {
|
|
1287
1286
|
let e = M.value;
|
|
1288
|
-
if (!(!e?.id || !V.value?.id || !wt.value) && await
|
|
1287
|
+
if (!(!e?.id || !V.value?.id || !wt.value) && await se({
|
|
1289
1288
|
title: "移除账户",
|
|
1290
1289
|
content: `确认移除账户「${An()}」?该用户账号会同步删除。`,
|
|
1291
1290
|
okText: "移除",
|
|
@@ -1293,16 +1292,16 @@ var nt = { key: 0 }, rt = {
|
|
|
1293
1292
|
})) {
|
|
1294
1293
|
W.value = !0;
|
|
1295
1294
|
try {
|
|
1296
|
-
let t = await
|
|
1295
|
+
let t = await f.http.request({
|
|
1297
1296
|
method: "POST",
|
|
1298
1297
|
path: `/iam.employee/${encodeURIComponent(e.id)}/account/delete`
|
|
1299
1298
|
});
|
|
1300
|
-
await Sn(e, R.value), await
|
|
1299
|
+
await Sn(e, R.value), await ie(t, {
|
|
1301
1300
|
source: "employee-management",
|
|
1302
1301
|
phase: "action"
|
|
1303
1302
|
});
|
|
1304
1303
|
} catch (e) {
|
|
1305
|
-
|
|
1304
|
+
p(e, {
|
|
1306
1305
|
source: "employee-management",
|
|
1307
1306
|
phase: "action"
|
|
1308
1307
|
});
|
|
@@ -1426,30 +1425,30 @@ var nt = { key: 0 }, rt = {
|
|
|
1426
1425
|
controlType: "enabledStatus"
|
|
1427
1426
|
}
|
|
1428
1427
|
};
|
|
1429
|
-
return (
|
|
1428
|
+
return (r, o) => !Se.value || Ee.value ? (w(), _(D(ne), {
|
|
1430
1429
|
key: 0,
|
|
1431
1430
|
class: "employee-management-page",
|
|
1432
1431
|
"explorer-count": ft.value ? 2 : 1
|
|
1433
1432
|
}, {
|
|
1434
|
-
default:
|
|
1435
|
-
ft.value ? (
|
|
1436
|
-
default:
|
|
1437
|
-
"search-keyword":
|
|
1438
|
-
"onUpdate:searchKeyword":
|
|
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,
|
|
1439
1438
|
title: "租户",
|
|
1440
1439
|
"search-placeholder": "搜索租户",
|
|
1441
|
-
onRefresh:
|
|
1440
|
+
onRefresh: o[2] ||= (e) => Ke.value += 1
|
|
1442
1441
|
}, {
|
|
1443
|
-
default:
|
|
1444
|
-
context:
|
|
1445
|
-
"selected-id":
|
|
1446
|
-
"reload-key":
|
|
1447
|
-
keyword:
|
|
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,
|
|
1448
1447
|
"empty-description": "暂无租户",
|
|
1449
1448
|
"loading-tip": "加载租户",
|
|
1450
1449
|
"fallback-title": "未命名租户",
|
|
1451
1450
|
"item-of": (e) => Vt(e),
|
|
1452
|
-
onSelect:
|
|
1451
|
+
onSelect: o[0] ||= (e) => Bt(e)
|
|
1453
1452
|
}, null, 8, [
|
|
1454
1453
|
"context",
|
|
1455
1454
|
"selected-id",
|
|
@@ -1460,22 +1459,22 @@ var nt = { key: 0 }, rt = {
|
|
|
1460
1459
|
_: 1
|
|
1461
1460
|
}, 8, ["search-keyword"])]),
|
|
1462
1461
|
_: 1
|
|
1463
|
-
})) :
|
|
1464
|
-
|
|
1465
|
-
default:
|
|
1462
|
+
})) : v("v-if", !0),
|
|
1463
|
+
S(D(a), null, {
|
|
1464
|
+
default: O(() => [S(D(xe), {
|
|
1466
1465
|
class: "employee-scope-panel",
|
|
1467
1466
|
title: "机构树",
|
|
1468
1467
|
"refresh-title": "刷新机构树",
|
|
1469
|
-
"search-keyword":
|
|
1468
|
+
"search-keyword": Oe.value,
|
|
1470
1469
|
"search-placeholder": "搜索机构名称、编码或 ID",
|
|
1471
1470
|
onRefresh: Gt,
|
|
1472
|
-
"onUpdate:searchKeyword":
|
|
1471
|
+
"onUpdate:searchKeyword": o[3] ||= (e) => Oe.value = e
|
|
1473
1472
|
}, {
|
|
1474
|
-
default:
|
|
1473
|
+
default: O(() => [S(D(ye), {
|
|
1475
1474
|
context: mt.value,
|
|
1476
1475
|
"selected-id": A.value?.id,
|
|
1477
|
-
"reload-key":
|
|
1478
|
-
keyword:
|
|
1476
|
+
"reload-key": C.value,
|
|
1477
|
+
keyword: Oe.value,
|
|
1479
1478
|
"search-mode": "none",
|
|
1480
1479
|
"search-trigger": "external",
|
|
1481
1480
|
"empty-description": pt.value ? "暂无机构" : "请选择租户",
|
|
@@ -1497,17 +1496,17 @@ var nt = { key: 0 }, rt = {
|
|
|
1497
1496
|
}, 8, ["search-keyword"])]),
|
|
1498
1497
|
_: 1
|
|
1499
1498
|
}),
|
|
1500
|
-
|
|
1499
|
+
S(D(d), {
|
|
1501
1500
|
class: "employee-list-panel",
|
|
1502
1501
|
context: dt.value,
|
|
1503
|
-
title:
|
|
1504
|
-
mode:
|
|
1502
|
+
title: D(it).active.value ? "职员回收站" : "职员列表",
|
|
1503
|
+
mode: D(it).mode.value,
|
|
1505
1504
|
"standard-crud-actions": "",
|
|
1506
1505
|
"standard-crud-row-actions": "",
|
|
1507
1506
|
"extra-row-actions-of": Qt,
|
|
1508
1507
|
"selected-key": j.value,
|
|
1509
|
-
"expanded-row-keys":
|
|
1510
|
-
"reload-key":
|
|
1508
|
+
"expanded-row-keys": D(at),
|
|
1509
|
+
"reload-key": k.value,
|
|
1511
1510
|
ready: !!A.value?.id,
|
|
1512
1511
|
"external-query-values": _t.value,
|
|
1513
1512
|
"quick-search-placeholder": "搜索编号、姓名、手机号或邮箱",
|
|
@@ -1516,40 +1515,40 @@ var nt = { key: 0 }, rt = {
|
|
|
1516
1515
|
onAction: qt,
|
|
1517
1516
|
onRowAction: Zt,
|
|
1518
1517
|
onRowDblclick: nn,
|
|
1519
|
-
onRowExpand:
|
|
1518
|
+
onRowExpand: D(st),
|
|
1520
1519
|
onSelect: Kt,
|
|
1521
1520
|
onModeChange: Jt,
|
|
1522
1521
|
onRestored: Xt
|
|
1523
1522
|
}, {
|
|
1524
|
-
expandedRow:
|
|
1523
|
+
expandedRow: O(({ record: e }) => [S(D(t), {
|
|
1525
1524
|
title: "任职信息",
|
|
1526
|
-
loading:
|
|
1527
|
-
error:
|
|
1525
|
+
loading: D(ot)(String(e.id ?? "")).loading,
|
|
1526
|
+
error: D(ot)(String(e.id ?? "")).error,
|
|
1528
1527
|
"loading-tip": "加载任职信息",
|
|
1529
1528
|
"error-title": "任职信息加载失败"
|
|
1530
1529
|
}, {
|
|
1531
|
-
actions:
|
|
1530
|
+
actions: O(() => [S(D(s), {
|
|
1532
1531
|
type: "text",
|
|
1533
1532
|
"icon-name": "reload",
|
|
1534
|
-
disabled:
|
|
1535
|
-
onClick: (t) =>
|
|
1533
|
+
disabled: D(ot)(String(e.id ?? "")).loading,
|
|
1534
|
+
onClick: (t) => D(ct)(String(e.id ?? ""))
|
|
1536
1535
|
}, {
|
|
1537
|
-
default:
|
|
1536
|
+
default: O(() => [...o[6] ||= [x(" 刷新 ", -1)]]),
|
|
1538
1537
|
_: 1
|
|
1539
1538
|
}, 8, ["disabled", "onClick"])]),
|
|
1540
|
-
default:
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
], -1), (
|
|
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", {
|
|
1546
1545
|
key: e.id,
|
|
1547
|
-
class:
|
|
1546
|
+
class: Pe({ "is-disabled": e.enabled === !1 })
|
|
1548
1547
|
}, [
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
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)
|
|
1553
1552
|
], 2))), 128))]))]),
|
|
1554
1553
|
_: 2
|
|
1555
1554
|
}, 1032, ["loading", "error"])]),
|
|
@@ -1565,16 +1564,16 @@ var nt = { key: 0 }, rt = {
|
|
|
1565
1564
|
"external-query-values",
|
|
1566
1565
|
"onRowExpand"
|
|
1567
1566
|
]),
|
|
1568
|
-
|
|
1567
|
+
De.value ? (w(), _(D(n), {
|
|
1569
1568
|
key: 1,
|
|
1570
1569
|
open: N.value,
|
|
1571
1570
|
title: vt.value,
|
|
1572
1571
|
subtitle: yt.value,
|
|
1573
1572
|
"close-on-outside": P.value === "view",
|
|
1574
|
-
promotion:
|
|
1573
|
+
promotion: D(Ot),
|
|
1575
1574
|
onClose: an
|
|
1576
1575
|
}, {
|
|
1577
|
-
status:
|
|
1576
|
+
status: O(() => [P.value === "view" && M.value ? (w(), _(D(e), {
|
|
1578
1577
|
key: 0,
|
|
1579
1578
|
enabled: M.value.enabled !== !1,
|
|
1580
1579
|
disabled: L.value || !Ct.value,
|
|
@@ -1585,13 +1584,13 @@ var nt = { key: 0 }, rt = {
|
|
|
1585
1584
|
"enabled",
|
|
1586
1585
|
"disabled",
|
|
1587
1586
|
"loading"
|
|
1588
|
-
])) :
|
|
1589
|
-
operation:
|
|
1587
|
+
])) : v("v-if", !0)]),
|
|
1588
|
+
operation: O(() => [S(D(i), {
|
|
1590
1589
|
context: dt.value,
|
|
1591
1590
|
actions: Et.value,
|
|
1592
1591
|
onAction: sn
|
|
1593
1592
|
}, null, 8, ["context", "actions"])]),
|
|
1594
|
-
default:
|
|
1593
|
+
default: O(() => [S(Ze, {
|
|
1595
1594
|
mode: P.value,
|
|
1596
1595
|
draft: z.value,
|
|
1597
1596
|
"selected-employee": M.value,
|
|
@@ -1601,14 +1600,14 @@ var nt = { key: 0 }, rt = {
|
|
|
1601
1600
|
"load-failed": I.value,
|
|
1602
1601
|
"form-disabled": bt.value,
|
|
1603
1602
|
"show-content": xt.value,
|
|
1604
|
-
fields:
|
|
1603
|
+
fields: h.value,
|
|
1605
1604
|
fallback: Bn,
|
|
1606
1605
|
"picker-configs": gt.value,
|
|
1607
1606
|
"display-of": Rt,
|
|
1608
1607
|
"visible-of": Ft,
|
|
1609
1608
|
"label-of": Nt,
|
|
1610
1609
|
"required-of": Pt,
|
|
1611
|
-
"externally-changed":
|
|
1610
|
+
"externally-changed": D(J).externallyChanged.value,
|
|
1612
1611
|
account: V.value,
|
|
1613
1612
|
"account-user": H.value,
|
|
1614
1613
|
"loading-accounts": U.value,
|
|
@@ -1620,13 +1619,13 @@ var nt = { key: 0 }, rt = {
|
|
|
1620
1619
|
"account-user-title": An(),
|
|
1621
1620
|
"account-user-description": jn(),
|
|
1622
1621
|
"account-status-title": Mn(),
|
|
1623
|
-
"option-context":
|
|
1622
|
+
"option-context": D(f),
|
|
1624
1623
|
onRetry: cn,
|
|
1625
1624
|
onSave: un,
|
|
1626
1625
|
onReloadExternal: ln,
|
|
1627
|
-
onDismissExternal:
|
|
1626
|
+
onDismissExternal: D(J).clearExternalChanged,
|
|
1628
1627
|
onUpdateField: It,
|
|
1629
|
-
onRetryAccounts:
|
|
1628
|
+
onRetryAccounts: o[4] ||= (e) => Sn(),
|
|
1630
1629
|
onStartAccountProvision: Pn,
|
|
1631
1630
|
onCancelAccountProvision: Fn,
|
|
1632
1631
|
onProvisionAccount: wn,
|
|
@@ -1666,8 +1665,8 @@ var nt = { key: 0 }, rt = {
|
|
|
1666
1665
|
"subtitle",
|
|
1667
1666
|
"close-on-outside",
|
|
1668
1667
|
"promotion"
|
|
1669
|
-
])) :
|
|
1670
|
-
|
|
1668
|
+
])) : v("v-if", !0),
|
|
1669
|
+
S(Je, {
|
|
1671
1670
|
open: Ye.value,
|
|
1672
1671
|
employee: Xe.value,
|
|
1673
1672
|
onClose: en,
|
|
@@ -1675,12 +1674,12 @@ var nt = { key: 0 }, rt = {
|
|
|
1675
1674
|
}, null, 8, ["open", "employee"])
|
|
1676
1675
|
]),
|
|
1677
1676
|
_: 1
|
|
1678
|
-
}, 8, ["explorer-count"])) : (
|
|
1677
|
+
}, 8, ["explorer-count"])) : (w(), _(D(me), {
|
|
1679
1678
|
key: 1,
|
|
1680
1679
|
title: vt.value,
|
|
1681
1680
|
subtitle: yt.value
|
|
1682
1681
|
}, {
|
|
1683
|
-
status:
|
|
1682
|
+
status: O(() => [P.value === "view" && M.value ? (w(), _(D(e), {
|
|
1684
1683
|
key: 0,
|
|
1685
1684
|
enabled: M.value.enabled !== !1,
|
|
1686
1685
|
disabled: L.value || !Ct.value,
|
|
@@ -1691,9 +1690,9 @@ var nt = { key: 0 }, rt = {
|
|
|
1691
1690
|
"enabled",
|
|
1692
1691
|
"disabled",
|
|
1693
1692
|
"loading"
|
|
1694
|
-
])) :
|
|
1695
|
-
operation:
|
|
1696
|
-
context:
|
|
1693
|
+
])) : v("v-if", !0)]),
|
|
1694
|
+
operation: O(() => [S(D(i), {
|
|
1695
|
+
context: D(f),
|
|
1697
1696
|
actions: Dt.value,
|
|
1698
1697
|
"record-id": M.value?.id,
|
|
1699
1698
|
onAction: sn
|
|
@@ -1702,7 +1701,7 @@ var nt = { key: 0 }, rt = {
|
|
|
1702
1701
|
"actions",
|
|
1703
1702
|
"record-id"
|
|
1704
1703
|
])]),
|
|
1705
|
-
default:
|
|
1704
|
+
default: O(() => [S(Ze, {
|
|
1706
1705
|
mode: P.value,
|
|
1707
1706
|
draft: z.value,
|
|
1708
1707
|
"selected-employee": M.value,
|
|
@@ -1712,14 +1711,14 @@ var nt = { key: 0 }, rt = {
|
|
|
1712
1711
|
"load-failed": I.value,
|
|
1713
1712
|
"form-disabled": bt.value,
|
|
1714
1713
|
"show-content": xt.value,
|
|
1715
|
-
fields:
|
|
1714
|
+
fields: h.value,
|
|
1716
1715
|
fallback: Bn,
|
|
1717
1716
|
"picker-configs": gt.value,
|
|
1718
1717
|
"display-of": Rt,
|
|
1719
1718
|
"visible-of": Ft,
|
|
1720
1719
|
"label-of": Nt,
|
|
1721
1720
|
"required-of": Pt,
|
|
1722
|
-
"externally-changed":
|
|
1721
|
+
"externally-changed": D(J).externallyChanged.value,
|
|
1723
1722
|
account: V.value,
|
|
1724
1723
|
"account-user": H.value,
|
|
1725
1724
|
"loading-accounts": U.value,
|
|
@@ -1731,13 +1730,13 @@ var nt = { key: 0 }, rt = {
|
|
|
1731
1730
|
"account-user-title": An(),
|
|
1732
1731
|
"account-user-description": jn(),
|
|
1733
1732
|
"account-status-title": Mn(),
|
|
1734
|
-
"option-context":
|
|
1733
|
+
"option-context": D(f),
|
|
1735
1734
|
onRetry: cn,
|
|
1736
1735
|
onSave: un,
|
|
1737
1736
|
onReloadExternal: ln,
|
|
1738
|
-
onDismissExternal:
|
|
1737
|
+
onDismissExternal: D(J).clearExternalChanged,
|
|
1739
1738
|
onUpdateField: It,
|
|
1740
|
-
onRetryAccounts:
|
|
1739
|
+
onRetryAccounts: o[5] ||= (e) => Sn(),
|
|
1741
1740
|
onStartAccountProvision: Pn,
|
|
1742
1741
|
onCancelAccountProvision: Fn,
|
|
1743
1742
|
onProvisionAccount: wn,
|