@ximatai/muyun-web-app 0.26.3 → 0.26.5
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-mtdcsqgF.js → EmployeeDetailWorkspaceView-rm9ujeiQ.js} +1 -1
- package/dist/{EmployeeManagementView-CKKvQZaC.js → EmployeeManagementView-DyYMWQ64.js} +510 -510
- package/dist/{MetadataOrchestrationView-CprWBocy.js → MetadataOrchestrationView-DaPNQML7.js} +175 -175
- package/dist/{ModuleActionManagementView-DNuAQUPE.js → ModuleActionManagementView-BFoPGqzC.js} +197 -197
- package/dist/{RoleAuthorizationView-CQtSAJoJ.js → RoleAuthorizationView-qQvn7M75.js} +56 -56
- package/dist/{RoleDetailWorkspaceView-Dh8DXpyS.js → RoleDetailWorkspaceView-C-vaKeZM.js} +1 -1
- package/dist/{RoleManagementView-BrqaFV7y.js → RoleManagementView-C3nxfub2.js} +490 -490
- package/dist/{SystemUserDetailWorkspaceView-N-kvycAu.js → SystemUserDetailWorkspaceView-FIbfff00.js} +1 -1
- package/dist/{SystemUserManagementView-BVS5moV5.js → SystemUserManagementView-m6vwJDxI.js} +128 -128
- package/dist/{UserDetailWorkspaceView-Iek6xwix.js → UserDetailWorkspaceView-M--ndn6x.js} +1 -1
- package/dist/{UserManagementView-BR_Jz8O-.js → UserManagementView-MSXf4fno.js} +293 -293
- package/dist/index.css +1 -1
- package/dist/index.js +2250 -2250
- package/dist/{pageRealtime-sRtDYlQP.js → pageRealtime-4LXXvVW7.js} +10 -10
- package/dist/{platform-components-bC1gwhic.js → platform-components-_3KlZZf5.js} +1195 -1467
- package/dist/types/app/LoginView.vue.d.ts +2 -2
- package/dist/types/app/appWorkbenchStartup.d.ts +1 -1
- package/dist/types/app/platformMessage.d.ts +1 -1
- package/dist/types/app/query.d.ts +1 -1
- package/dist/types/app/workbenchStartup.d.ts +3 -3
- package/dist/types/consumer/PlatformAdminOutlet.vue.d.ts +1 -1
- package/dist/types/consumer/index.d.ts +1 -2
- package/dist/types/dynamic-page-runtime/DynamicModuleHost.vue.d.ts +1 -1
- package/dist/types/dynamic-page-runtime/DynamicModulePage.vue.d.ts +1 -1
- package/dist/types/dynamic-page-runtime/actionReactions.d.ts +1 -1
- package/dist/types/dynamic-page-runtime/dynamicModuleDetailStateModel.d.ts +12 -0
- package/dist/types/dynamic-page-runtime/mockDescriptor.d.ts +1 -1
- package/dist/types/main.d.ts +1 -1
- package/dist/types/platform-admin-runtime/PlatformAdminOutlet.vue.d.ts +1 -1
- package/dist/types/platform-admin-runtime/WorkspaceViewDrawer.vue.d.ts +1 -1
- package/dist/types/platform-admin-runtime/WorkspaceViewOutlet.vue.d.ts +1 -1
- package/dist/types/platform-admin-runtime/backendHttp.d.ts +1 -1
- package/dist/types/platform-admin-runtime/currentUserContext.d.ts +1 -1
- package/dist/types/platform-admin-runtime/moduleOpenApi.d.ts +2 -2
- package/dist/types/platform-admin-runtime/pageRealtime.d.ts +1 -1
- package/dist/types/platform-admin-runtime/platformAdminRoutes.d.ts +1 -1
- package/dist/types/platform-admin-runtime/realtime.d.ts +4 -4
- package/dist/types/platform-admin-runtime/sessionRecovery.d.ts +1 -1
- package/dist/types/platform-admin-runtime/useWorkspaceViewPromotion.d.ts +1 -1
- package/dist/types/platform-admin-runtime/workspaceViewContract.d.ts +1 -1
- package/dist/types/platform-admin-runtime/workspaceViews.d.ts +1 -1
- package/dist/types/platform-components/ApplicationScopeSwitcher.vue.d.ts +1 -1
- package/dist/types/platform-components/CrudRecordListExplorer.vue.d.ts +2 -2
- package/dist/types/platform-components/ModuleActionButton.vue.d.ts +2 -2
- package/dist/types/platform-components/RecordActionBar.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordDetailDrawer.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordFormFields.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordListExplorer.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordMetaSection.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordModeDrawer.vue.d.ts +15 -1
- package/dist/types/platform-components/RecordPicker.vue.d.ts +1 -1
- package/dist/types/platform-components/RecordQueryListPanel.vue.d.ts +1 -1
- package/dist/types/platform-components/TreeRecordExplorer.vue.d.ts +2 -2
- package/dist/types/platform-components/UserSessionExpandedSubtable.vue.d.ts +1 -1
- package/dist/types/platform-components/actionConfirmation.d.ts +1 -1
- package/dist/types/platform-components/index.d.ts +1 -0
- package/dist/types/platform-components/optionFieldOptions.d.ts +1 -1
- package/dist/types/platform-components/pageLayoutContext.d.ts +1 -1
- package/dist/types/platform-components/platformActionResultReactions.d.ts +1 -1
- package/dist/types/platform-components/platformErrorFeedback.d.ts +1 -1
- package/dist/types/platform-components/recordActionBarModel.d.ts +2 -2
- package/dist/types/platform-components/recordEditorSessionState.d.ts +1 -1
- package/dist/types/platform-components/recordExplorerItemModel.d.ts +1 -1
- package/dist/types/platform-components/recordFormFieldModel.d.ts +3 -3
- package/dist/types/platform-components/recycleBinState.d.ts +2 -2
- package/dist/types/platform-components/scopedResourceTreeModuleContext.d.ts +1 -1
- package/dist/types/platform-components/scopedTreeModuleContext.d.ts +1 -1
- package/dist/types/platform-components/softDeletedConflictHandler.d.ts +1 -1
- package/dist/types/platform-components/staticCrudManagementState.d.ts +2 -2
- package/dist/types/platform-components/staticFormActionFlow.d.ts +1 -1
- package/dist/types/platform-components/staticTreeResourceModuleContext.d.ts +1 -1
- package/dist/types/platform-components/treeRecordModel.d.ts +1 -1
- package/dist/types/platform-components/useRecycleBinExplorerMode.d.ts +1 -1
- package/dist/types/platform-components/userSessionPresentation.d.ts +1 -1
- package/dist/types/platform-workbench/Workbench.vue.d.ts +1 -1
- package/dist/types/platform-workbench/WorkbenchMenu.vue.d.ts +1 -1
- package/dist/types/platform-workbench/WorkbenchMenuTree.vue.d.ts +1 -1
- package/dist/types/platform-workbench/WorkbenchOutlet.vue.d.ts +1 -1
- package/dist/types/platform-workbench/hosts/BusinessRouteHost.vue.d.ts +1 -1
- package/dist/types/platform-workbench/hosts/ExternalPageHost.vue.d.ts +1 -1
- package/dist/types/platform-workbench/hosts/PlatformRouteHost.vue.d.ts +1 -1
- package/dist/types/platform-workbench/menuNavigation.d.ts +1 -1
- package/dist/types/platform-workbench/menuTreeModel.d.ts +1 -1
- package/dist/types/platform-workbench/pageHostRegistry.d.ts +1 -1
- package/dist/types/platform-workbench/workbenchNavigation.d.ts +1 -1
- package/dist/types/views/EmployeeDetailContent.vue.d.ts +3 -3
- package/dist/types/views/EmployeeEmploymentDrawer.vue.d.ts +1 -1
- package/dist/types/views/EmployeeEmploymentTable.vue.d.ts +1 -1
- package/dist/types/views/RoleAccountGrantDrawer.vue.d.ts +2 -2
- package/dist/types/views/RoleDetailWorkspaceView.vue.d.ts +1 -1
- package/dist/types/views/RoleEmploymentGrantDrawer.vue.d.ts +2 -2
- package/dist/types/views/RoleGroupMemberSelector.vue.d.ts +1 -1
- package/dist/types/views/RoleManagementView.vue.d.ts +1 -1
- package/dist/types/views/UserDetailContent.vue.d.ts +2 -2
- package/dist/types/views/applicationManagementState.d.ts +3 -3
- package/dist/types/views/departmentManagementState.d.ts +3 -3
- package/dist/types/views/dictionaryManagementState.d.ts +4 -4
- package/dist/types/views/employeeDetailWorkspaceSession.d.ts +1 -1
- package/dist/types/views/fieldSpecManagementState.d.ts +3 -3
- package/dist/types/views/fieldUiControlManagementState.d.ts +3 -3
- package/dist/types/views/menuManagementState.d.ts +7 -7
- package/dist/types/views/metadataOrchestrationState.d.ts +1 -1
- package/dist/types/views/moduleManagementState.d.ts +5 -5
- package/dist/types/views/organizationManagementState.d.ts +4 -4
- package/dist/types/views/positionManagementState.d.ts +4 -4
- package/dist/types/views/roleAuthorizationWorkspaceSession.d.ts +1 -1
- package/dist/types/views/roleDetailWorkspaceSession.d.ts +1 -1
- package/dist/types/views/roleDetailWorkspaceView.d.ts +1 -1
- package/dist/types/views/roleGrantClient.d.ts +2 -2
- package/dist/types/views/systemUserDetailWorkspaceSession.d.ts +1 -1
- package/dist/types/views/tenantManagementState.d.ts +3 -3
- package/dist/types/views/useEmployeeEmploymentRows.d.ts +2 -2
- package/dist/types/views/useUserSessionRows.d.ts +3 -3
- package/dist/types/views/userDetailWorkspaceSession.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/ActionBar.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/DictionarySelect.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/ReferenceSelect.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiForm.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiInput.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/UiTable.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/components/UiTreeSelect.vue.d.ts +1 -1
- package/dist/types/vue-ui-antdv/dictionaries.d.ts +1 -1
- package/dist/types/vue-ui-antdv/references.d.ts +1 -1
- package/dist/types/vue-ui-antdv/registry.d.ts +1 -1
- package/dist/types/web-core/actionResult.d.ts +1 -2
- package/dist/types/web-core/clients.d.ts +1 -1
- package/dist/types/web-core/dataChanges.d.ts +1 -1
- package/dist/types/web-core/errors.d.ts +1 -1
- package/dist/types/web-core/http.d.ts +1 -1
- package/dist/types/web-core/mock.d.ts +1 -1
- package/dist/types/web-core/module/runtimeContext.d.ts +1 -1
- package/dist/types/web-core/module/staticModuleClient.d.ts +1 -1
- package/dist/types/web-core/realtime.d.ts +1 -1
- package/dist/{useUserSessionRows-CLM0ZvAF.js → useUserSessionRows-iAqK_cUy.js} +2 -2
- package/dist/workspaceViewSessions-DW0wbyQ_.js +1448 -0
- package/package.json +1 -1
- package/dist/workspaceViewSessions-WsJU3OS7.js +0 -1578
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { $ as e,
|
|
2
|
-
import { g as
|
|
3
|
-
import { a as
|
|
4
|
-
import { Fragment as
|
|
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
5
|
//#region src/views/employeeDetailStateModel.ts
|
|
6
|
-
function
|
|
6
|
+
function Ie(e) {
|
|
7
7
|
return e.mode === "view" || e.loadingDetail || e.saving ? !0 : e.mode === "edit" && !e.selectedEmployeeId;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Le(e) {
|
|
10
10
|
return e.activeRequestSeq === e.requestSeq && e.selectedEmployeeKey === e.recordId;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function Re(e) {
|
|
13
13
|
return e.mode === "create" ? !0 : !e.loadingDetail && !e.loadFailed && !!e.selectedEmployeeId;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function ze(e) {
|
|
16
16
|
return !e.saving;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Be(e) {
|
|
19
19
|
return e.mode !== "edit" || !e.selectedEmployeeId;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
let t = e.filter((e) => e.visible && e.required && !
|
|
21
|
+
function Ve(e) {
|
|
22
|
+
let t = e.filter((e) => e.visible && e.required && !j(e.value)).map((e) => e.label);
|
|
23
23
|
return t.length > 0 ? `请填写${t.join("、")}` : void 0;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function j(e) {
|
|
26
26
|
return typeof e == "string" ? e.trim().length > 0 : e != null;
|
|
27
27
|
}
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region src/views/EmployeeEmploymentDrawer.vue?vue&type=script&setup=true&lang.ts
|
|
30
|
-
var
|
|
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
31
|
key: 2,
|
|
32
32
|
class: "employment-state"
|
|
33
|
-
},
|
|
33
|
+
}, z = {
|
|
34
34
|
key: 3,
|
|
35
35
|
class: "employment-empty"
|
|
36
|
-
},
|
|
36
|
+
}, He = /*#__PURE__*/ u(/* @__PURE__ */ w({
|
|
37
37
|
name: "EmployeeEmploymentDrawer",
|
|
38
38
|
__name: "EmployeeEmploymentDrawer",
|
|
39
39
|
props: {
|
|
@@ -41,8 +41,8 @@ var N = { class: "employment-drawer" }, P = { class: "employment-drawer-header"
|
|
|
41
41
|
employee: {}
|
|
42
42
|
},
|
|
43
43
|
emits: ["close", "saved"],
|
|
44
|
-
setup(
|
|
45
|
-
let
|
|
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
46
|
{
|
|
47
47
|
key: "position",
|
|
48
48
|
title: "岗位",
|
|
@@ -63,17 +63,17 @@ var N = { class: "employment-drawer" }, P = { class: "employment-drawer-header"
|
|
|
63
63
|
title: "主岗位",
|
|
64
64
|
width: 80
|
|
65
65
|
}
|
|
66
|
-
],
|
|
66
|
+
], d = _(() => `任职管理 - ${_e(r.employee)}`), fe = _(() => ae.value), pe = _(() => be(ne, {
|
|
67
67
|
scopeFieldName: "organizationId",
|
|
68
|
-
scopeValue:
|
|
68
|
+
scopeValue: u.value.organizationId,
|
|
69
69
|
treePath: "/iam.department/tree",
|
|
70
70
|
sortPath: "/iam.department/sort"
|
|
71
|
-
})),
|
|
72
|
-
let e =
|
|
73
|
-
return !!(e?.organizationId && e?.departmentId && e.organizationId ===
|
|
71
|
+
})), me = _(() => {
|
|
72
|
+
let e = r.employee;
|
|
73
|
+
return !!(e?.organizationId && e?.departmentId && e.organizationId === u.value.organizationId && e.departmentId === u.value.departmentId);
|
|
74
74
|
});
|
|
75
|
-
|
|
76
|
-
e ?
|
|
75
|
+
Fe(() => [r.open, r.employee?.id], ([e]) => {
|
|
76
|
+
e ? p() : m();
|
|
77
77
|
}, { immediate: !0 });
|
|
78
78
|
function ge() {
|
|
79
79
|
return {
|
|
@@ -81,77 +81,77 @@ var N = { class: "employment-drawer" }, P = { class: "employment-drawer-header"
|
|
|
81
81
|
enabled: !0
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function _e(e) {
|
|
85
85
|
return String(e?.title ?? e?.employeeNo ?? e?.id ?? "职员");
|
|
86
86
|
}
|
|
87
|
-
async function
|
|
88
|
-
let e =
|
|
87
|
+
async function p() {
|
|
88
|
+
let e = r.employee?.id;
|
|
89
89
|
if (e) {
|
|
90
|
-
|
|
90
|
+
oe.value = !0, c.value = !1;
|
|
91
91
|
try {
|
|
92
|
-
|
|
92
|
+
ae.value = (await a.http.request({ path: `/iam.employee/${encodeURIComponent(e)}/employment-view` })).records;
|
|
93
93
|
} catch (e) {
|
|
94
|
-
|
|
94
|
+
c.value = !0, o(e, {
|
|
95
95
|
source: "employee-employment",
|
|
96
96
|
phase: "load"
|
|
97
97
|
});
|
|
98
98
|
} finally {
|
|
99
|
-
|
|
99
|
+
oe.value = !1;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
|
|
103
|
+
function m() {
|
|
104
|
+
ue.value = !1, u.value = ge();
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
|
|
108
|
-
organizationId:
|
|
109
|
-
departmentId:
|
|
106
|
+
function h() {
|
|
107
|
+
u.value = {
|
|
108
|
+
organizationId: r.employee?.organizationId,
|
|
109
|
+
departmentId: r.employee?.departmentId,
|
|
110
110
|
primaryPosition: !1,
|
|
111
111
|
enabled: !0
|
|
112
|
-
},
|
|
113
|
-
}
|
|
114
|
-
function xe(e) {
|
|
115
|
-
p.value = { ...e }, d.value = !0;
|
|
112
|
+
}, ue.value = !0;
|
|
116
113
|
}
|
|
117
114
|
function Se(e) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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
121
|
organizationId: e,
|
|
122
|
-
departmentId: t ? void 0 :
|
|
123
|
-
primaryPosition: t ? !1 :
|
|
122
|
+
departmentId: t ? void 0 : u.value.departmentId,
|
|
123
|
+
primaryPosition: t ? !1 : u.value.primaryPosition
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
function
|
|
127
|
-
let t = !!(
|
|
128
|
-
|
|
129
|
-
...
|
|
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
130
|
departmentId: e,
|
|
131
131
|
primaryPosition: t
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
if (e && !
|
|
136
|
-
|
|
134
|
+
function Te(e) {
|
|
135
|
+
if (e && !me.value) {
|
|
136
|
+
ve("主岗必须与职员主机构、主部门一致", {
|
|
137
137
|
source: "employee-employment",
|
|
138
138
|
phase: "validation"
|
|
139
139
|
});
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
...
|
|
142
|
+
u.value = {
|
|
143
|
+
...u.value,
|
|
144
144
|
primaryPosition: e
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function Ee(e, t) {
|
|
148
148
|
let n = t;
|
|
149
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
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function g(e) {
|
|
152
152
|
return e.enabled === !1;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function De(e) {
|
|
155
155
|
return [
|
|
156
156
|
...e.primaryPosition ? [] : [{
|
|
157
157
|
key: "primary",
|
|
@@ -168,29 +168,29 @@ var N = { class: "employment-drawer" }, P = { class: "employment-drawer-header"
|
|
|
168
168
|
}
|
|
169
169
|
];
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
(t === "primary" || t === "enable" || t === "disable" || t === "delete") &&
|
|
171
|
+
function Oe(e, t) {
|
|
172
|
+
(t === "primary" || t === "enable" || t === "disable" || t === "delete") && Ae(e, t);
|
|
173
173
|
}
|
|
174
|
-
async function
|
|
175
|
-
let e =
|
|
176
|
-
if (!e || !
|
|
177
|
-
|
|
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
178
|
source: "employee-employment",
|
|
179
179
|
phase: "validation"
|
|
180
180
|
});
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
|
-
|
|
183
|
+
l.value = !0;
|
|
184
184
|
try {
|
|
185
|
-
let t =
|
|
186
|
-
await
|
|
185
|
+
let t = u.value.id;
|
|
186
|
+
await a.http.request({
|
|
187
187
|
method: "POST",
|
|
188
188
|
path: t ? `/iam.employee/${encodeURIComponent(e)}/positions/${encodeURIComponent(t)}/update` : `/iam.employee/${encodeURIComponent(e)}/positions`,
|
|
189
189
|
body: {
|
|
190
|
-
...
|
|
190
|
+
...u.value,
|
|
191
191
|
employeeId: e
|
|
192
192
|
}
|
|
193
|
-
}),
|
|
193
|
+
}), m(), await p(), i("saved", e), await se({
|
|
194
194
|
success: !0,
|
|
195
195
|
message: "任职已保存"
|
|
196
196
|
}, {
|
|
@@ -198,181 +198,181 @@ var N = { class: "employment-drawer" }, P = { class: "employment-drawer-header"
|
|
|
198
198
|
phase: "action"
|
|
199
199
|
});
|
|
200
200
|
} catch (e) {
|
|
201
|
-
|
|
201
|
+
o(e, {
|
|
202
202
|
source: "employee-employment",
|
|
203
203
|
phase: "action"
|
|
204
204
|
});
|
|
205
205
|
} finally {
|
|
206
|
-
|
|
206
|
+
l.value = !1;
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
async function
|
|
210
|
-
let n =
|
|
211
|
-
if (n && !(t === "delete" && !await
|
|
209
|
+
async function Ae(e, t) {
|
|
210
|
+
let n = r.employee?.id;
|
|
211
|
+
if (n && !(t === "delete" && !await ce({
|
|
212
212
|
title: "删除任职",
|
|
213
213
|
content: "确认删除该任职?",
|
|
214
214
|
okText: "删除",
|
|
215
215
|
danger: !0
|
|
216
216
|
}))) {
|
|
217
|
-
|
|
217
|
+
l.value = !0;
|
|
218
218
|
try {
|
|
219
|
-
await
|
|
219
|
+
await a.http.request({
|
|
220
220
|
method: "POST",
|
|
221
221
|
path: `/iam.employee/${encodeURIComponent(n)}/positions/${encodeURIComponent(e.id)}/${t}`
|
|
222
|
-
}), await
|
|
222
|
+
}), await p(), i("saved", n);
|
|
223
223
|
} catch (e) {
|
|
224
|
-
|
|
224
|
+
o(e, {
|
|
225
225
|
source: "employee-employment",
|
|
226
226
|
phase: "action"
|
|
227
227
|
});
|
|
228
228
|
} finally {
|
|
229
|
-
|
|
229
|
+
l.value = !1;
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
return (n, r) => (
|
|
234
|
-
open:
|
|
235
|
-
title:
|
|
236
|
-
onClose: r[4] ||= (e) =>
|
|
233
|
+
return (n, r) => (T(), v(O(ee), {
|
|
234
|
+
open: t.open,
|
|
235
|
+
title: d.value,
|
|
236
|
+
onClose: r[4] ||= (e) => i("close")
|
|
237
237
|
}, {
|
|
238
|
-
operation:
|
|
238
|
+
operation: k(() => [C(O(f), {
|
|
239
239
|
type: "text",
|
|
240
240
|
"icon-name": "reload",
|
|
241
|
-
disabled:
|
|
242
|
-
onClick:
|
|
241
|
+
disabled: oe.value || l.value,
|
|
242
|
+
onClick: p
|
|
243
243
|
}, {
|
|
244
|
-
default:
|
|
244
|
+
default: k(() => [...r[5] ||= [S(" 刷新 ", -1)]]),
|
|
245
245
|
_: 1
|
|
246
246
|
}, 8, ["disabled"])]),
|
|
247
|
-
default:
|
|
248
|
-
|
|
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
249
|
type: "primary",
|
|
250
250
|
"icon-name": "plus",
|
|
251
|
-
disabled:
|
|
252
|
-
onClick:
|
|
251
|
+
disabled: l.value,
|
|
252
|
+
onClick: h
|
|
253
253
|
}, {
|
|
254
|
-
default:
|
|
254
|
+
default: k(() => [...r[6] ||= [S("新增任职", -1)]]),
|
|
255
255
|
_: 1
|
|
256
256
|
}, 8, ["disabled"])]),
|
|
257
|
-
|
|
257
|
+
ue.value ? (T(), b("form", {
|
|
258
258
|
key: 0,
|
|
259
259
|
class: "employment-editor",
|
|
260
|
-
onSubmit:
|
|
260
|
+
onSubmit: A(ke, ["prevent"])
|
|
261
261
|
}, [
|
|
262
|
-
|
|
263
|
-
value:
|
|
264
|
-
context:
|
|
262
|
+
x("label", null, [r[8] ||= x("span", null, "机构", -1), C(O(xe), {
|
|
263
|
+
value: u.value.organizationId,
|
|
264
|
+
context: O(te),
|
|
265
265
|
placeholder: "请选择机构",
|
|
266
|
-
constraints: [
|
|
267
|
-
disabled:
|
|
268
|
-
"onUpdate:value":
|
|
266
|
+
constraints: [O(le)()],
|
|
267
|
+
disabled: l.value,
|
|
268
|
+
"onUpdate:value": Ce
|
|
269
269
|
}, null, 8, [
|
|
270
270
|
"value",
|
|
271
271
|
"context",
|
|
272
272
|
"constraints",
|
|
273
273
|
"disabled"
|
|
274
274
|
])]),
|
|
275
|
-
|
|
276
|
-
value:
|
|
277
|
-
context:
|
|
275
|
+
x("label", null, [r[9] ||= x("span", null, "部门", -1), C(O(xe), {
|
|
276
|
+
value: u.value.departmentId,
|
|
277
|
+
context: pe.value,
|
|
278
278
|
placeholder: "请选择部门",
|
|
279
|
-
constraints: [
|
|
280
|
-
disabled:
|
|
281
|
-
"onUpdate:value":
|
|
279
|
+
constraints: [O(le)()],
|
|
280
|
+
disabled: l.value || !u.value.organizationId,
|
|
281
|
+
"onUpdate:value": we
|
|
282
282
|
}, null, 8, [
|
|
283
283
|
"value",
|
|
284
284
|
"context",
|
|
285
285
|
"constraints",
|
|
286
286
|
"disabled"
|
|
287
287
|
])]),
|
|
288
|
-
|
|
289
|
-
value:
|
|
290
|
-
context:
|
|
288
|
+
x("label", null, [r[10] ||= x("span", null, "岗位", -1), C(O(xe), {
|
|
289
|
+
value: u.value.positionId,
|
|
290
|
+
context: O(ie),
|
|
291
291
|
mode: "list",
|
|
292
292
|
placeholder: "请选择岗位",
|
|
293
|
-
constraints: [
|
|
294
|
-
disabled:
|
|
295
|
-
"onUpdate:value": r[0] ||= (e) =>
|
|
293
|
+
constraints: [O(le)()],
|
|
294
|
+
disabled: l.value,
|
|
295
|
+
"onUpdate:value": r[0] ||= (e) => u.value.positionId = e ? String(e) : void 0
|
|
296
296
|
}, null, 8, [
|
|
297
297
|
"value",
|
|
298
298
|
"context",
|
|
299
299
|
"constraints",
|
|
300
300
|
"disabled"
|
|
301
301
|
])]),
|
|
302
|
-
|
|
303
|
-
r[12] ||=
|
|
304
|
-
|
|
302
|
+
x("label", P, [
|
|
303
|
+
r[12] ||= x("span", null, "主岗位", -1),
|
|
304
|
+
x("span", null, [x("input", {
|
|
305
305
|
type: "checkbox",
|
|
306
|
-
checked:
|
|
307
|
-
disabled:
|
|
308
|
-
onChange: r[1] ||= (e) =>
|
|
309
|
-
}, null, 40,
|
|
310
|
-
|
|
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
311
|
]),
|
|
312
|
-
|
|
313
|
-
disabled:
|
|
314
|
-
onClick:
|
|
312
|
+
x("div", L, [C(O(f), {
|
|
313
|
+
disabled: l.value,
|
|
314
|
+
onClick: m
|
|
315
315
|
}, {
|
|
316
|
-
default:
|
|
316
|
+
default: k(() => [...r[13] ||= [S("取消", -1)]]),
|
|
317
317
|
_: 1
|
|
318
|
-
}, 8, ["disabled"]),
|
|
318
|
+
}, 8, ["disabled"]), C(O(f), {
|
|
319
319
|
type: "primary",
|
|
320
320
|
"html-type": "submit",
|
|
321
|
-
loading:
|
|
321
|
+
loading: l.value
|
|
322
322
|
}, {
|
|
323
|
-
default:
|
|
323
|
+
default: k(() => [...r[14] ||= [S("保存任职", -1)]]),
|
|
324
324
|
_: 1
|
|
325
325
|
}, 8, ["loading"])])
|
|
326
|
-
], 32)) :
|
|
327
|
-
|
|
326
|
+
], 32)) : y("v-if", !0),
|
|
327
|
+
oe.value ? (T(), v(O(e), {
|
|
328
328
|
key: 1,
|
|
329
329
|
class: "employment-state",
|
|
330
330
|
tip: "加载任职"
|
|
331
|
-
})) :
|
|
331
|
+
})) : c.value ? (T(), b("div", R, [C(O(re), {
|
|
332
332
|
title: "任职信息加载失败",
|
|
333
333
|
message: "无法加载任职信息,请重试"
|
|
334
|
-
}),
|
|
334
|
+
}), C(O(f), {
|
|
335
335
|
type: "primary",
|
|
336
336
|
"icon-name": "reload",
|
|
337
|
-
onClick:
|
|
337
|
+
onClick: p
|
|
338
338
|
}, {
|
|
339
|
-
default:
|
|
339
|
+
default: k(() => [...r[15] ||= [S("重试", -1)]]),
|
|
340
340
|
_: 1
|
|
341
|
-
})])) :
|
|
341
|
+
})])) : ae.value.length === 0 ? (T(), b("p", z, "暂无任职信息")) : (T(), v(O(ye), {
|
|
342
342
|
key: 4,
|
|
343
343
|
class: "employment-table",
|
|
344
|
-
columns:
|
|
345
|
-
rows:
|
|
344
|
+
columns: de,
|
|
345
|
+
rows: fe.value,
|
|
346
346
|
"row-key": "id",
|
|
347
347
|
pagination: !1,
|
|
348
348
|
"horizontal-scroll": "",
|
|
349
349
|
"show-action-column": "",
|
|
350
350
|
"action-column-width": "92",
|
|
351
|
-
"row-muted":
|
|
351
|
+
"row-muted": g
|
|
352
352
|
}, {
|
|
353
|
-
cell:
|
|
354
|
-
rowActions:
|
|
353
|
+
cell: k(({ column: e, record: t }) => [S(D(Ee(e, t)), 1)]),
|
|
354
|
+
rowActions: k(({ record: e }) => [x("div", {
|
|
355
355
|
class: "employment-table-row-actions",
|
|
356
|
-
onClick: r[2] ||=
|
|
357
|
-
onDblclick: r[3] ||=
|
|
358
|
-
}, [
|
|
356
|
+
onClick: r[2] ||= A(() => {}, ["stop"]),
|
|
357
|
+
onDblclick: r[3] ||= A(() => {}, ["stop"])
|
|
358
|
+
}, [C(O(f), {
|
|
359
359
|
type: "text",
|
|
360
|
-
disabled:
|
|
361
|
-
onClick: (t) =>
|
|
360
|
+
disabled: l.value,
|
|
361
|
+
onClick: (t) => Se(e)
|
|
362
362
|
}, {
|
|
363
|
-
default:
|
|
363
|
+
default: k(() => [...r[16] ||= [S(" 编辑 ", -1)]]),
|
|
364
364
|
_: 1
|
|
365
|
-
}, 8, ["disabled", "onClick"]),
|
|
366
|
-
items:
|
|
365
|
+
}, 8, ["disabled", "onClick"]), C(O(he), {
|
|
366
|
+
items: De(e),
|
|
367
367
|
trigger: "hover",
|
|
368
|
-
onSelect: (t) =>
|
|
368
|
+
onSelect: (t) => Oe(e, t)
|
|
369
369
|
}, {
|
|
370
|
-
default:
|
|
370
|
+
default: k(() => [C(O(f), {
|
|
371
371
|
type: "text",
|
|
372
372
|
"icon-name": "down",
|
|
373
373
|
title: "更多",
|
|
374
374
|
"aria-label": "更多",
|
|
375
|
-
disabled:
|
|
375
|
+
disabled: l.value
|
|
376
376
|
}, null, 8, ["disabled"])]),
|
|
377
377
|
_: 1
|
|
378
378
|
}, 8, ["items", "onSelect"])], 32)]),
|
|
@@ -382,22 +382,22 @@ var N = { class: "employment-drawer" }, P = { class: "employment-drawer-header"
|
|
|
382
382
|
_: 1
|
|
383
383
|
}, 8, ["open", "title"]));
|
|
384
384
|
}
|
|
385
|
-
}), [["__scopeId", "data-v-fd7522f0"]]),
|
|
385
|
+
}), [["__scopeId", "data-v-fd7522f0"]]), B = {
|
|
386
386
|
key: 1,
|
|
387
387
|
class: "employee-detail-state"
|
|
388
|
-
},
|
|
388
|
+
}, V = { class: "employee-account-section" }, Ue = { class: "employee-account-header" }, We = {
|
|
389
389
|
key: 1,
|
|
390
390
|
class: "employee-account-state"
|
|
391
|
-
},
|
|
391
|
+
}, H = { class: "employee-account-form-actions" }, U = {
|
|
392
392
|
key: 3,
|
|
393
393
|
class: "employee-account-empty"
|
|
394
|
-
},
|
|
394
|
+
}, W = {
|
|
395
395
|
key: 4,
|
|
396
396
|
class: "employee-account-card"
|
|
397
|
-
},
|
|
397
|
+
}, G = { class: "employee-account-status" }, K = { key: 0 }, q = { class: "employee-form-label" }, Ge = {
|
|
398
398
|
key: 0,
|
|
399
399
|
"aria-hidden": "true"
|
|
400
|
-
}, Ke = /*#__PURE__*/
|
|
400
|
+
}, Ke = /*#__PURE__*/ u(/* @__PURE__ */ w({
|
|
401
401
|
name: "EmployeeDetailContent",
|
|
402
402
|
__name: "EmployeeDetailContent",
|
|
403
403
|
props: {
|
|
@@ -444,24 +444,24 @@ var N = { class: "employment-drawer" }, P = { class: "employment-drawer-header"
|
|
|
444
444
|
"removeAccount",
|
|
445
445
|
"updateAccountProvisionField"
|
|
446
446
|
],
|
|
447
|
-
setup(t, { emit:
|
|
448
|
-
let i = t, a =
|
|
449
|
-
return (t,
|
|
447
|
+
setup(t, { emit: n }) {
|
|
448
|
+
let i = t, a = n;
|
|
449
|
+
return (t, n) => i.loading ? (T(), v(O(e), {
|
|
450
450
|
key: 0,
|
|
451
451
|
class: "employee-detail-state",
|
|
452
452
|
tip: "加载职员详情"
|
|
453
|
-
})) : i.loadFailed ? (
|
|
453
|
+
})) : i.loadFailed ? (T(), b("div", B, [C(O(re), {
|
|
454
454
|
title: "详情加载失败",
|
|
455
455
|
message: "无法加载职员详情,请重试"
|
|
456
|
-
}),
|
|
456
|
+
}), C(O(f), {
|
|
457
457
|
type: "primary",
|
|
458
458
|
"icon-name": "reload",
|
|
459
|
-
onClick:
|
|
459
|
+
onClick: n[0] ||= (e) => a("retry")
|
|
460
460
|
}, {
|
|
461
|
-
default:
|
|
461
|
+
default: k(() => [...n[12] ||= [S("重试", -1)]]),
|
|
462
462
|
_: 1
|
|
463
|
-
})])) : i.showContent ? (
|
|
464
|
-
|
|
463
|
+
})])) : i.showContent ? (T(), b(Ae, { key: 2 }, [i.mode === "view" ? (T(), b(Ae, { key: 0 }, [
|
|
464
|
+
C(O(r), {
|
|
465
465
|
record: i.draft,
|
|
466
466
|
fields: i.fields,
|
|
467
467
|
fallback: i.fallback,
|
|
@@ -474,90 +474,90 @@ var N = { class: "employment-drawer" }, P = { class: "employment-drawer-header"
|
|
|
474
474
|
"picker-configs",
|
|
475
475
|
"display-of"
|
|
476
476
|
]),
|
|
477
|
-
|
|
477
|
+
x("section", V, [x("div", Ue, [n[14] ||= x("strong", null, "登录账号", -1), !i.account && !i.showAccountProvisionForm ? (T(), v(O(f), {
|
|
478
478
|
key: 0,
|
|
479
479
|
type: "primary",
|
|
480
480
|
"icon-name": "plus",
|
|
481
481
|
disabled: !i.canManageAccounts,
|
|
482
|
-
onClick:
|
|
482
|
+
onClick: n[1] ||= (e) => a("startAccountProvision")
|
|
483
483
|
}, {
|
|
484
|
-
default:
|
|
484
|
+
default: k(() => [...n[13] ||= [S(" 设置账号 ", -1)]]),
|
|
485
485
|
_: 1
|
|
486
|
-
}, 8, ["disabled"])) :
|
|
486
|
+
}, 8, ["disabled"])) : y("v-if", !0)]), i.loadingAccounts ? (T(), v(O(e), {
|
|
487
487
|
key: 0,
|
|
488
488
|
class: "employee-account-state",
|
|
489
489
|
tip: "加载账号绑定"
|
|
490
|
-
})) : i.accountsLoadFailed ? (
|
|
490
|
+
})) : i.accountsLoadFailed ? (T(), b("div", We, [C(O(re), {
|
|
491
491
|
title: "账号绑定加载失败",
|
|
492
492
|
message: "无法加载职员账号绑定,请重试"
|
|
493
|
-
}),
|
|
493
|
+
}), C(O(f), {
|
|
494
494
|
"icon-name": "reload",
|
|
495
|
-
onClick:
|
|
495
|
+
onClick: n[2] ||= (e) => a("retryAccounts")
|
|
496
496
|
}, {
|
|
497
|
-
default:
|
|
497
|
+
default: k(() => [...n[15] ||= [S("重试", -1)]]),
|
|
498
498
|
_: 1
|
|
499
|
-
})])) : i.showAccountProvisionForm ? (
|
|
499
|
+
})])) : i.showAccountProvisionForm ? (T(), b("form", {
|
|
500
500
|
key: 2,
|
|
501
501
|
class: "employee-account-form",
|
|
502
|
-
onSubmit:
|
|
502
|
+
onSubmit: n[6] ||= A((e) => a("provisionAccount"), ["prevent"])
|
|
503
503
|
}, [
|
|
504
|
-
|
|
504
|
+
x("label", null, [n[16] ||= x("span", null, "账号", -1), C(O(m), {
|
|
505
505
|
value: i.accountProvisionDraft.username,
|
|
506
506
|
placeholder: "请输入登录账号",
|
|
507
507
|
disabled: i.savingAccount,
|
|
508
|
-
"onUpdate:value":
|
|
508
|
+
"onUpdate:value": n[3] ||= (e) => a("updateAccountProvisionField", "username", e)
|
|
509
509
|
}, null, 8, ["value", "disabled"])]),
|
|
510
|
-
|
|
510
|
+
x("label", null, [n[17] ||= x("span", null, "初始密码", -1), C(O(m), {
|
|
511
511
|
value: i.accountProvisionDraft.password,
|
|
512
512
|
type: "password",
|
|
513
513
|
placeholder: "请输入初始密码",
|
|
514
514
|
disabled: i.savingAccount,
|
|
515
|
-
"onUpdate:value":
|
|
515
|
+
"onUpdate:value": n[4] ||= (e) => a("updateAccountProvisionField", "password", e)
|
|
516
516
|
}, null, 8, ["value", "disabled"])]),
|
|
517
|
-
|
|
517
|
+
x("div", H, [C(O(f), {
|
|
518
518
|
disabled: i.savingAccount,
|
|
519
|
-
onClick:
|
|
519
|
+
onClick: n[5] ||= (e) => a("cancelAccountProvision")
|
|
520
520
|
}, {
|
|
521
|
-
default:
|
|
521
|
+
default: k(() => [...n[18] ||= [S("取消", -1)]]),
|
|
522
522
|
_: 1
|
|
523
|
-
}, 8, ["disabled"]),
|
|
523
|
+
}, 8, ["disabled"]), C(O(f), {
|
|
524
524
|
type: "primary",
|
|
525
525
|
"html-type": "submit",
|
|
526
526
|
"icon-name": "plus",
|
|
527
527
|
loading: i.savingAccount,
|
|
528
528
|
disabled: !i.canManageAccounts
|
|
529
529
|
}, {
|
|
530
|
-
default:
|
|
530
|
+
default: k(() => [...n[19] ||= [S(" 创建账号并绑定 ", -1)]]),
|
|
531
531
|
_: 1
|
|
532
532
|
}, 8, ["loading", "disabled"])])
|
|
533
|
-
], 32)) : i.account ? (
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
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
537
|
danger: "",
|
|
538
538
|
"icon-name": "delete",
|
|
539
539
|
disabled: i.savingAccount || !i.canManageAccounts,
|
|
540
|
-
onClick:
|
|
540
|
+
onClick: n[7] ||= (e) => a("removeAccount")
|
|
541
541
|
}, {
|
|
542
|
-
default:
|
|
542
|
+
default: k(() => [...n[21] ||= [S(" 移除账户 ", -1)]]),
|
|
543
543
|
_: 1
|
|
544
544
|
}, 8, ["disabled"])
|
|
545
|
-
])) : (
|
|
546
|
-
|
|
545
|
+
])) : (T(), b("div", U, [...n[20] ||= [x("span", null, "未设置登录账号", -1), x("small", null, "可从职员档案生成账号并自动完成一对一绑定。", -1)]]))]),
|
|
546
|
+
C(O(c), {
|
|
547
547
|
record: i.draft,
|
|
548
548
|
"show-sort-order": ""
|
|
549
549
|
}, null, 8, ["record"])
|
|
550
|
-
], 64)) : (
|
|
550
|
+
], 64)) : (T(), b(Ae, { key: 1 }, [i.externallyChanged ? (T(), v(O(d), {
|
|
551
551
|
key: 0,
|
|
552
|
-
onReload:
|
|
553
|
-
onDismiss:
|
|
554
|
-
})) :
|
|
552
|
+
onReload: n[8] ||= (e) => a("reloadExternal"),
|
|
553
|
+
onDismiss: n[9] ||= (e) => a("dismissExternal")
|
|
554
|
+
})) : y("v-if", !0), x("form", {
|
|
555
555
|
class: "employee-form",
|
|
556
|
-
onSubmit:
|
|
557
|
-
}, [i.visibleOf("organizationId") ? (
|
|
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
558
|
value: i.selectedOrganization?.title ?? i.selectedOrganization?.id ?? "-",
|
|
559
559
|
disabled: ""
|
|
560
|
-
}, null, 8, ["value"])])) :
|
|
560
|
+
}, null, 8, ["value"])])) : y("v-if", !0), C(O(h), {
|
|
561
561
|
record: i.draft,
|
|
562
562
|
fields: i.fields,
|
|
563
563
|
"exclude-field-names": ["organizationId"],
|
|
@@ -565,7 +565,7 @@ var N = { class: "employment-drawer" }, P = { class: "employment-drawer-header"
|
|
|
565
565
|
"picker-configs": i.pickerConfigs,
|
|
566
566
|
disabled: i.formDisabled,
|
|
567
567
|
"option-context": i.optionContext,
|
|
568
|
-
"onUpdate:field":
|
|
568
|
+
"onUpdate:field": n[10] ||= (e, t) => a("updateField", e, t)
|
|
569
569
|
}, null, 8, [
|
|
570
570
|
"record",
|
|
571
571
|
"fields",
|
|
@@ -573,13 +573,13 @@ var N = { class: "employment-drawer" }, P = { class: "employment-drawer-header"
|
|
|
573
573
|
"picker-configs",
|
|
574
574
|
"disabled",
|
|
575
575
|
"option-context"
|
|
576
|
-
])], 32)], 64))], 64)) :
|
|
576
|
+
])], 32)], 64))], 64)) : y("v-if", !0);
|
|
577
577
|
}
|
|
578
578
|
}), [["__scopeId", "data-v-1e08bd36"]]);
|
|
579
579
|
//#endregion
|
|
580
580
|
//#region src/views/employeeDetailWorkspaceSession.ts
|
|
581
581
|
function qe(e, t) {
|
|
582
|
-
return
|
|
582
|
+
return g(Te, e, {
|
|
583
583
|
...t,
|
|
584
584
|
selectedEmployee: { ...t.selectedEmployee },
|
|
585
585
|
draft: { ...t.draft },
|
|
@@ -591,46 +591,46 @@ function qe(e, t) {
|
|
|
591
591
|
});
|
|
592
592
|
}
|
|
593
593
|
function Je(e, t) {
|
|
594
|
-
return
|
|
594
|
+
return we(Te, e, t);
|
|
595
595
|
}
|
|
596
596
|
function Ye(e) {
|
|
597
|
-
return Te
|
|
597
|
+
return Ee(Te, e);
|
|
598
598
|
}
|
|
599
599
|
//#endregion
|
|
600
600
|
//#region src/views/useEmployeeEmploymentRows.ts
|
|
601
601
|
function Xe(e) {
|
|
602
|
-
let t =
|
|
602
|
+
let t = E([]), n = E({});
|
|
603
603
|
async function r(t) {
|
|
604
604
|
if (!(!t || e.context.can("employeePositions", t) === !1)) {
|
|
605
|
-
|
|
606
|
-
...
|
|
605
|
+
ee(t, {
|
|
606
|
+
...a(t),
|
|
607
607
|
loading: !0,
|
|
608
608
|
error: void 0
|
|
609
609
|
});
|
|
610
610
|
try {
|
|
611
|
-
|
|
611
|
+
ee(t, {
|
|
612
612
|
records: (await e.context.http.request({ path: e.pathOf?.(t) ?? `/iam.employee/${encodeURIComponent(t)}/employment-view` })).records,
|
|
613
613
|
loading: !1,
|
|
614
614
|
error: void 0
|
|
615
615
|
});
|
|
616
616
|
} catch (n) {
|
|
617
|
-
let r =
|
|
617
|
+
let r = o(n, {
|
|
618
618
|
source: `${e.source}-employment-rows`,
|
|
619
619
|
phase: "load"
|
|
620
620
|
});
|
|
621
|
-
|
|
622
|
-
...
|
|
621
|
+
ee(t, {
|
|
622
|
+
...a(t),
|
|
623
623
|
loading: !1,
|
|
624
624
|
error: r.message
|
|
625
625
|
});
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function i(e, n) {
|
|
630
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 &&
|
|
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
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function a(e) {
|
|
634
634
|
return e ? n.value[e] ?? {
|
|
635
635
|
records: [],
|
|
636
636
|
loading: !1
|
|
@@ -639,21 +639,21 @@ function Xe(e) {
|
|
|
639
639
|
loading: !1
|
|
640
640
|
};
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function ee(e, t) {
|
|
643
643
|
n.value = {
|
|
644
644
|
...n.value,
|
|
645
645
|
[e]: t
|
|
646
646
|
};
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function te() {
|
|
649
649
|
t.value = [], n.value = {};
|
|
650
650
|
}
|
|
651
651
|
return {
|
|
652
652
|
expandedEmployeeKeys: t,
|
|
653
|
-
employmentRowState:
|
|
654
|
-
handleEmployeeRowExpand:
|
|
653
|
+
employmentRowState: a,
|
|
654
|
+
handleEmployeeRowExpand: i,
|
|
655
655
|
loadEmployeeEmploymentRows: r,
|
|
656
|
-
resetEmployeeEmploymentRows:
|
|
656
|
+
resetEmployeeEmploymentRows: te
|
|
657
657
|
};
|
|
658
658
|
}
|
|
659
659
|
//#endregion
|
|
@@ -661,7 +661,7 @@ function Xe(e) {
|
|
|
661
661
|
var Ze = { key: 0 }, Qe = {
|
|
662
662
|
key: 1,
|
|
663
663
|
class: "employee-row-employment-list"
|
|
664
|
-
}, $e = /*#__PURE__*/
|
|
664
|
+
}, $e = /*#__PURE__*/ u(/* @__PURE__ */ w({
|
|
665
665
|
name: "EmployeeManagementView",
|
|
666
666
|
__name: "EmployeeManagementView",
|
|
667
667
|
props: {
|
|
@@ -669,171 +669,171 @@ var Ze = { key: 0 }, Qe = {
|
|
|
669
669
|
mode: {}
|
|
670
670
|
},
|
|
671
671
|
setup(e) {
|
|
672
|
-
let
|
|
672
|
+
let r = e, re = [
|
|
673
673
|
"departmentId",
|
|
674
674
|
"employeeNo",
|
|
675
675
|
"title"
|
|
676
|
-
],
|
|
677
|
-
context: () =>
|
|
678
|
-
listReloadKey:
|
|
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
679
|
canChange: X,
|
|
680
680
|
resetSelection: Ft
|
|
681
681
|
}), { expandedEmployeeKeys: Ge, employmentRowState: $e, handleEmployeeRowExpand: et, loadEmployeeEmploymentRows: tt, resetEmployeeEmploymentRows: nt } = Xe({
|
|
682
|
-
context:
|
|
682
|
+
context: d,
|
|
683
683
|
source: "employee-management",
|
|
684
|
-
pathOf: (e) =>
|
|
685
|
-
}), J =
|
|
684
|
+
pathOf: (e) => q.active.value ? `/iam.employee/recycle-bin/${encodeURIComponent(e)}/employment-view` : `/iam.employee/${encodeURIComponent(e)}/employment-view`
|
|
685
|
+
}), J = Oe({
|
|
686
686
|
moduleAlias: "iam.employee",
|
|
687
|
-
recordId: () =>
|
|
688
|
-
editing: () =>
|
|
689
|
-
saving: () =>
|
|
690
|
-
}), rt =
|
|
687
|
+
recordId: () => j.value?.id,
|
|
688
|
+
editing: () => N.value === "edit",
|
|
689
|
+
saving: () => I.value
|
|
690
|
+
}), rt = De({
|
|
691
691
|
delay: 80,
|
|
692
692
|
load: async (e) => {
|
|
693
|
-
|
|
694
|
-
let t =
|
|
695
|
-
|
|
696
|
-
...
|
|
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
697
|
id: t
|
|
698
698
|
}, "view");
|
|
699
699
|
}
|
|
700
700
|
});
|
|
701
|
-
|
|
701
|
+
ke({
|
|
702
702
|
moduleAlias: "iam.employee",
|
|
703
703
|
handler: (e, t) => {
|
|
704
704
|
let n = t.map((e) => e.recordId).filter((e) => !!e);
|
|
705
705
|
rt.enqueue(n.length > 0 ? n : "__collection__");
|
|
706
706
|
}
|
|
707
707
|
});
|
|
708
|
-
let it =
|
|
708
|
+
let it = _(() => d), Y = _(() => w.value?.id), at = _(() => be(u, {
|
|
709
709
|
scopeFieldName: "organizationId",
|
|
710
710
|
scopeValue: Y.value,
|
|
711
711
|
treePath: "/iam.department/tree",
|
|
712
712
|
sortPath: "/iam.department/sort"
|
|
713
|
-
})), ot =
|
|
713
|
+
})), ot = _(() => ({ departmentId: {
|
|
714
714
|
context: at.value,
|
|
715
|
-
reloadKey:
|
|
715
|
+
reloadKey: Ee.value,
|
|
716
716
|
placeholder: "请选择部门",
|
|
717
717
|
titleOf: (e) => wn(e)
|
|
718
|
-
} })), st =
|
|
718
|
+
} })), st = _(() => {
|
|
719
719
|
let e = Y.value;
|
|
720
720
|
if (e) return { departmentScope: {
|
|
721
721
|
organizationId: e,
|
|
722
722
|
includeChildren: !0
|
|
723
723
|
} };
|
|
724
|
-
}), ct =
|
|
725
|
-
mode:
|
|
726
|
-
loadingDetail:
|
|
727
|
-
saving:
|
|
728
|
-
selectedEmployeeId:
|
|
729
|
-
})), dt =
|
|
730
|
-
mode:
|
|
731
|
-
loadingDetail:
|
|
732
|
-
loadFailed:
|
|
733
|
-
selectedEmployeeId:
|
|
734
|
-
})), ft =
|
|
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
735
|
key: "edit",
|
|
736
736
|
actionCode: "update",
|
|
737
737
|
title: "编辑",
|
|
738
738
|
iconName: "edit",
|
|
739
|
-
disabled:
|
|
739
|
+
disabled: I.value
|
|
740
740
|
}, {
|
|
741
741
|
key: "delete",
|
|
742
742
|
actionCode: "delete",
|
|
743
743
|
title: "删除",
|
|
744
744
|
iconName: "delete",
|
|
745
745
|
danger: !0,
|
|
746
|
-
disabled:
|
|
746
|
+
disabled: I.value
|
|
747
747
|
}] : [] : [{
|
|
748
748
|
key: "cancel",
|
|
749
749
|
title: "取消",
|
|
750
750
|
iconName: "close",
|
|
751
|
-
disabled:
|
|
751
|
+
disabled: I.value
|
|
752
752
|
}, {
|
|
753
753
|
key: "save",
|
|
754
|
-
actionCode:
|
|
754
|
+
actionCode: N.value === "create" ? "create" : "update",
|
|
755
755
|
title: "保存",
|
|
756
756
|
iconName: "save",
|
|
757
757
|
primary: !0,
|
|
758
758
|
disabled: !ft.value,
|
|
759
|
-
loading:
|
|
760
|
-
}]), gt =
|
|
759
|
+
loading: I.value
|
|
760
|
+
}]), gt = _(() => ht.value), _t = _(() => N.value === "view" ? j.value?.id ? [{
|
|
761
761
|
key: "edit",
|
|
762
762
|
actionCode: "update",
|
|
763
763
|
title: "编辑",
|
|
764
764
|
iconName: "edit",
|
|
765
|
-
disabled:
|
|
766
|
-
}] : [] :
|
|
765
|
+
disabled: I.value
|
|
766
|
+
}] : [] : N.value === "edit" ? [{
|
|
767
767
|
key: "cancel",
|
|
768
768
|
title: "取消",
|
|
769
769
|
iconName: "close",
|
|
770
|
-
disabled:
|
|
770
|
+
disabled: I.value
|
|
771
771
|
}, {
|
|
772
772
|
key: "save",
|
|
773
773
|
actionCode: "update",
|
|
774
774
|
title: "保存",
|
|
775
775
|
iconName: "save",
|
|
776
776
|
primary: !0,
|
|
777
|
-
loading:
|
|
777
|
+
loading: I.value,
|
|
778
778
|
disabled: !ft.value
|
|
779
|
-
}] : []), vt =
|
|
780
|
-
view:
|
|
781
|
-
input:
|
|
782
|
-
let e =
|
|
779
|
+
}] : []), vt = Ce({
|
|
780
|
+
view: Te,
|
|
781
|
+
input: _(() => {
|
|
782
|
+
let e = j.value?.id, t = N.value;
|
|
783
783
|
return e && (t === "view" || t === "edit") ? { recordId: e } : void 0;
|
|
784
784
|
}),
|
|
785
|
-
title:
|
|
786
|
-
eligibility:
|
|
787
|
-
hasStableIdentity: !!
|
|
788
|
-
busy:
|
|
785
|
+
title: _(() => pn(j.value)),
|
|
786
|
+
eligibility: _(() => ({
|
|
787
|
+
hasStableIdentity: !!j.value?.id && !P.value,
|
|
788
|
+
busy: I.value || U.value || H.value
|
|
789
789
|
})),
|
|
790
790
|
beforePromote: async (e) => {
|
|
791
|
-
let t =
|
|
791
|
+
let t = j.value;
|
|
792
792
|
if (t) return await qe(e, {
|
|
793
793
|
selectedEmployee: t,
|
|
794
|
-
draft:
|
|
795
|
-
organization:
|
|
796
|
-
department:
|
|
797
|
-
account:
|
|
798
|
-
accountUser:
|
|
799
|
-
showAccountProvisionForm:
|
|
800
|
-
accountProvisionDraft:
|
|
801
|
-
mode:
|
|
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
802
|
}) === "accepted";
|
|
803
803
|
},
|
|
804
804
|
onPromoted: Wt
|
|
805
805
|
});
|
|
806
|
-
|
|
807
|
-
!
|
|
806
|
+
Fe(j, (e) => {
|
|
807
|
+
!m.value || !e || c?.setTitle(pn(e));
|
|
808
808
|
}, { immediate: !0 });
|
|
809
809
|
let yt;
|
|
810
|
-
|
|
811
|
-
if (xt(), !
|
|
812
|
-
let e = { recordId:
|
|
810
|
+
Ne(() => {
|
|
811
|
+
if (xt(), !r.recordId) return;
|
|
812
|
+
let e = { recordId: r.recordId };
|
|
813
813
|
h.value || (yt = Je(e, bt));
|
|
814
|
-
let
|
|
815
|
-
if (
|
|
816
|
-
an(
|
|
814
|
+
let t = Ye(e);
|
|
815
|
+
if (t) {
|
|
816
|
+
an(t);
|
|
817
817
|
return;
|
|
818
818
|
}
|
|
819
|
-
Z({ id:
|
|
820
|
-
}),
|
|
819
|
+
Z({ id: r.recordId }, r.mode ?? "view");
|
|
820
|
+
}), Me(() => yt?.());
|
|
821
821
|
function bt(e) {
|
|
822
|
-
return
|
|
822
|
+
return N.value !== "view" || G.value ? !1 : (an(e), !0);
|
|
823
823
|
}
|
|
824
824
|
async function xt() {
|
|
825
825
|
try {
|
|
826
|
-
|
|
826
|
+
ye.value = t((await d.runtime.ready).uiDescriptor);
|
|
827
827
|
} catch (e) {
|
|
828
|
-
|
|
828
|
+
o(e, {
|
|
829
829
|
source: "employee-management",
|
|
830
830
|
phase: "load"
|
|
831
831
|
});
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
834
|
function St(e) {
|
|
835
|
-
return
|
|
836
|
-
fields:
|
|
835
|
+
return fe(e, {
|
|
836
|
+
fields: ye.value,
|
|
837
837
|
fallback: En
|
|
838
838
|
});
|
|
839
839
|
}
|
|
@@ -847,52 +847,52 @@ var Ze = { key: 0 }, Qe = {
|
|
|
847
847
|
return St(e).visible;
|
|
848
848
|
}
|
|
849
849
|
function X() {
|
|
850
|
-
return
|
|
850
|
+
return ze({ saving: I.value });
|
|
851
851
|
}
|
|
852
852
|
function Et(e, t) {
|
|
853
|
-
|
|
854
|
-
...
|
|
853
|
+
R.value = {
|
|
854
|
+
...R.value,
|
|
855
855
|
[e]: t
|
|
856
856
|
};
|
|
857
857
|
}
|
|
858
858
|
function Dt(e, t) {
|
|
859
|
-
|
|
860
|
-
...
|
|
859
|
+
K.value = {
|
|
860
|
+
...K.value,
|
|
861
861
|
[e]: t
|
|
862
862
|
};
|
|
863
863
|
}
|
|
864
864
|
function Ot(e, t) {
|
|
865
|
-
if (e === "organizationId") return
|
|
865
|
+
if (e === "organizationId") return w.value?.title ?? w.value?.id ?? String(t ?? "");
|
|
866
866
|
if (e === "departmentId") {
|
|
867
|
-
let e =
|
|
867
|
+
let e = z.value;
|
|
868
868
|
return e && e.id === t ? wn(e) : void 0;
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
871
|
function kt(e) {
|
|
872
|
-
!
|
|
872
|
+
!w.value && e.length > 0 && (w.value = e[0]);
|
|
873
873
|
}
|
|
874
874
|
function At(e) {
|
|
875
|
-
X() && (
|
|
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
876
|
}
|
|
877
877
|
function jt() {
|
|
878
|
-
|
|
878
|
+
Ee.value += 1;
|
|
879
879
|
}
|
|
880
880
|
function Mt(e) {
|
|
881
881
|
if (!X()) return;
|
|
882
|
-
let t = String(e.id ?? ""), n = String(
|
|
883
|
-
|
|
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
884
|
}
|
|
885
885
|
function Nt(e) {
|
|
886
886
|
X() && e.key === "create" && Ut();
|
|
887
887
|
}
|
|
888
888
|
function Pt(e) {
|
|
889
|
-
e === "recycleBin" ?
|
|
889
|
+
e === "recycleBin" ? q.enter() : q.leave();
|
|
890
890
|
}
|
|
891
891
|
function Ft() {
|
|
892
|
-
nt(),
|
|
892
|
+
nt(), A.value = void 0, j.value = void 0, Wt();
|
|
893
893
|
}
|
|
894
894
|
function It() {
|
|
895
|
-
|
|
895
|
+
g.value += 1;
|
|
896
896
|
}
|
|
897
897
|
function Lt(e, t) {
|
|
898
898
|
if (X()) {
|
|
@@ -917,22 +917,22 @@ var Ze = { key: 0 }, Qe = {
|
|
|
917
917
|
actionCode: "employeePositions",
|
|
918
918
|
title: "任职",
|
|
919
919
|
after: "edit",
|
|
920
|
-
visible: !!e.id &&
|
|
920
|
+
visible: !!e.id && d.can("employeePositions", String(e.id)) !== !1
|
|
921
921
|
}];
|
|
922
922
|
}
|
|
923
923
|
async function zt(e) {
|
|
924
924
|
let t = String(e.id ?? "");
|
|
925
925
|
if (t) try {
|
|
926
|
-
|
|
926
|
+
We.value = await d.crud.view(t), Ue.value = !0;
|
|
927
927
|
} catch (e) {
|
|
928
|
-
|
|
928
|
+
o(e, {
|
|
929
929
|
source: "employee-management",
|
|
930
930
|
phase: "load"
|
|
931
931
|
});
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
934
|
function Bt() {
|
|
935
|
-
|
|
935
|
+
Ue.value = !1;
|
|
936
936
|
}
|
|
937
937
|
function Vt(e) {
|
|
938
938
|
Ge.value.includes(e) && tt(e);
|
|
@@ -943,58 +943,58 @@ var Ze = { key: 0 }, Qe = {
|
|
|
943
943
|
function Ut() {
|
|
944
944
|
if (X()) {
|
|
945
945
|
if (!Y.value) {
|
|
946
|
-
|
|
946
|
+
ve("请先选择机构", { phase: "validation" });
|
|
947
947
|
return;
|
|
948
948
|
}
|
|
949
|
-
|
|
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
950
|
}
|
|
951
951
|
}
|
|
952
952
|
function Wt() {
|
|
953
|
-
|
|
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
954
|
}
|
|
955
955
|
function Gt() {
|
|
956
|
-
if (!
|
|
957
|
-
if (
|
|
958
|
-
mode:
|
|
959
|
-
selectedEmployeeId:
|
|
956
|
+
if (!I.value) {
|
|
957
|
+
if (Be({
|
|
958
|
+
mode: N.value,
|
|
959
|
+
selectedEmployeeId: j.value?.id
|
|
960
960
|
})) {
|
|
961
961
|
Wt();
|
|
962
962
|
return;
|
|
963
963
|
}
|
|
964
|
-
|
|
964
|
+
R.value = en(j.value), J.clearExternalChanged(), N.value = "view", P.value = !1, F.value = !1;
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
967
|
async function Z(e, t) {
|
|
968
968
|
if (!X()) return;
|
|
969
969
|
let n = String(e.id ?? "");
|
|
970
970
|
if (!n) return;
|
|
971
|
-
|
|
972
|
-
let
|
|
973
|
-
|
|
974
|
-
let
|
|
975
|
-
activeRequestSeq:
|
|
976
|
-
requestSeq:
|
|
977
|
-
selectedEmployeeKey:
|
|
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
978
|
recordId: n
|
|
979
979
|
});
|
|
980
980
|
try {
|
|
981
|
-
let e = await
|
|
982
|
-
if (!
|
|
981
|
+
let e = await d.crud.view(n);
|
|
982
|
+
if (!i()) return;
|
|
983
983
|
if (!e?.id) {
|
|
984
|
-
|
|
984
|
+
F.value = !0, ve("未找到指定职员", {
|
|
985
985
|
source: "employee-management",
|
|
986
986
|
phase: "load"
|
|
987
987
|
});
|
|
988
988
|
return;
|
|
989
989
|
}
|
|
990
|
-
|
|
990
|
+
j.value = e, R.value = en(e), F.value = !1, await sn(e, r), await on(e, r), cn(e, r);
|
|
991
991
|
} catch (e) {
|
|
992
|
-
|
|
992
|
+
i() && (F.value = !0, o(e, {
|
|
993
993
|
source: "employee-management",
|
|
994
994
|
phase: "load"
|
|
995
995
|
}));
|
|
996
996
|
} finally {
|
|
997
|
-
|
|
997
|
+
i() && (P.value = !1);
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
1000
|
function Kt(e) {
|
|
@@ -1008,85 +1008,85 @@ var Ze = { key: 0 }, Qe = {
|
|
|
1008
1008
|
}
|
|
1009
1009
|
if (X()) {
|
|
1010
1010
|
if (e.key === "edit") {
|
|
1011
|
-
if (!
|
|
1012
|
-
|
|
1011
|
+
if (!j.value || P.value) return;
|
|
1012
|
+
R.value = en(j.value), J.clearExternalChanged(), N.value = "edit";
|
|
1013
1013
|
return;
|
|
1014
1014
|
}
|
|
1015
|
-
e.key === "delete" && Zt(
|
|
1015
|
+
e.key === "delete" && Zt(j.value);
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
1018
|
function qt() {
|
|
1019
1019
|
if (!X()) return;
|
|
1020
|
-
let e = String(
|
|
1020
|
+
let e = String(R.value.id ?? A.value ?? "");
|
|
1021
1021
|
if (!e) return;
|
|
1022
|
-
let t =
|
|
1022
|
+
let t = N.value === "create" ? "view" : N.value;
|
|
1023
1023
|
Z({
|
|
1024
|
-
...
|
|
1024
|
+
...R.value,
|
|
1025
1025
|
id: e
|
|
1026
1026
|
}, t);
|
|
1027
1027
|
}
|
|
1028
1028
|
function Jt() {
|
|
1029
|
-
let e = String(J.externalChangedRecordId.value ??
|
|
1029
|
+
let e = String(J.externalChangedRecordId.value ?? R.value.id ?? A.value ?? "");
|
|
1030
1030
|
e && (J.clearExternalChanged(), Z({
|
|
1031
|
-
...
|
|
1031
|
+
...R.value,
|
|
1032
1032
|
id: e
|
|
1033
1033
|
}, "edit"));
|
|
1034
1034
|
}
|
|
1035
1035
|
async function Yt() {
|
|
1036
|
-
await
|
|
1037
|
-
loading:
|
|
1038
|
-
mode:
|
|
1036
|
+
await p({
|
|
1037
|
+
loading: I,
|
|
1038
|
+
mode: N.value === "edit" ? "edit" : "create",
|
|
1039
1039
|
source: "employee-management",
|
|
1040
1040
|
validateContext: () => Y.value ? void 0 : "请先选择机构",
|
|
1041
1041
|
canSave: () => ft.value,
|
|
1042
1042
|
deniedMessage: "当前用户无权保存职员",
|
|
1043
|
-
createRecord: () => tn(
|
|
1043
|
+
createRecord: () => tn(R.value, Y.value ?? ""),
|
|
1044
1044
|
validateRecord: nn,
|
|
1045
|
-
save: (e, t) => t === "edit" &&
|
|
1046
|
-
actionErrorHandlers: [
|
|
1045
|
+
save: (e, t) => t === "edit" && j.value?.id ? d.crud.update(j.value.id, e) : d.crud.insert(e),
|
|
1046
|
+
actionErrorHandlers: [ue({
|
|
1047
1047
|
resourceLabel: "职员",
|
|
1048
1048
|
onNavigateToRecycleBin: () => Pt("recycleBin")
|
|
1049
1049
|
}), {
|
|
1050
|
-
code:
|
|
1050
|
+
code: ae.conflictVersion,
|
|
1051
1051
|
handle: (e, { mode: t, record: n }) => t === "edit" && J.markExternalRecordChanged(n.id)
|
|
1052
1052
|
}],
|
|
1053
1053
|
onSaved: ({ record: e }) => {
|
|
1054
1054
|
let t = rn(e);
|
|
1055
|
-
|
|
1055
|
+
g.value += 1, on(e, t);
|
|
1056
1056
|
}
|
|
1057
1057
|
});
|
|
1058
1058
|
}
|
|
1059
1059
|
async function Xt() {
|
|
1060
|
-
await
|
|
1061
|
-
loading:
|
|
1060
|
+
await de({
|
|
1061
|
+
loading: I,
|
|
1062
1062
|
source: "employee-management",
|
|
1063
|
-
record: () =>
|
|
1063
|
+
record: () => j.value && j.value.id ? j.value : void 0,
|
|
1064
1064
|
canExecute: () => pt.value,
|
|
1065
1065
|
deniedMessage: "当前用户无权变更职员启停状态",
|
|
1066
|
-
execute: (e) => e.enabled === !1 ?
|
|
1066
|
+
execute: (e) => e.enabled === !1 ? d.crud.enable(e.id, { version: e.version }) : d.crud.disable(e.id, { version: e.version }),
|
|
1067
1067
|
onExecuted: async (e, t) => {
|
|
1068
|
-
let n = await
|
|
1069
|
-
await on(n, rn(n)),
|
|
1068
|
+
let n = await d.crud.view(t.id);
|
|
1069
|
+
await on(n, rn(n)), g.value += 1;
|
|
1070
1070
|
}
|
|
1071
1071
|
});
|
|
1072
1072
|
}
|
|
1073
1073
|
async function Zt(e) {
|
|
1074
|
-
await
|
|
1075
|
-
loading:
|
|
1074
|
+
await de({
|
|
1075
|
+
loading: I,
|
|
1076
1076
|
source: "employee-management",
|
|
1077
1077
|
record: () => e?.id ? e : void 0,
|
|
1078
|
-
canExecute: () =>
|
|
1078
|
+
canExecute: () => d.can("delete") === !0,
|
|
1079
1079
|
deniedMessage: "当前用户无权删除职员",
|
|
1080
|
-
confirm: (e) =>
|
|
1080
|
+
confirm: (e) => ce({
|
|
1081
1081
|
title: "删除职员",
|
|
1082
1082
|
content: `确认删除职员「${fn(e)}」?`,
|
|
1083
1083
|
okText: "删除",
|
|
1084
1084
|
danger: !0
|
|
1085
1085
|
}),
|
|
1086
|
-
execute: (e) =>
|
|
1086
|
+
execute: (e) => d.crud.delete(String(e.id), { version: e.version }),
|
|
1087
1087
|
onExecuted: (e, t) => {
|
|
1088
1088
|
let n = String(t.id);
|
|
1089
|
-
|
|
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
1090
|
}
|
|
1091
1091
|
});
|
|
1092
1092
|
}
|
|
@@ -1108,7 +1108,7 @@ var Ze = { key: 0 }, Qe = {
|
|
|
1108
1108
|
return { ...e };
|
|
1109
1109
|
}
|
|
1110
1110
|
function tn(e, t) {
|
|
1111
|
-
return
|
|
1111
|
+
return l(e, {
|
|
1112
1112
|
organizationId: t,
|
|
1113
1113
|
departmentId: e.departmentId?.trim(),
|
|
1114
1114
|
employeeNo: e.employeeNo?.trim(),
|
|
@@ -1120,7 +1120,7 @@ var Ze = { key: 0 }, Qe = {
|
|
|
1120
1120
|
});
|
|
1121
1121
|
}
|
|
1122
1122
|
function nn(e) {
|
|
1123
|
-
return
|
|
1123
|
+
return Ve(re.map((t) => {
|
|
1124
1124
|
let n = St(t);
|
|
1125
1125
|
return {
|
|
1126
1126
|
fieldName: t,
|
|
@@ -1132,147 +1132,147 @@ var Ze = { key: 0 }, Qe = {
|
|
|
1132
1132
|
}));
|
|
1133
1133
|
}
|
|
1134
1134
|
function rn(e) {
|
|
1135
|
-
|
|
1136
|
-
let t =
|
|
1137
|
-
return
|
|
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
1138
|
}
|
|
1139
1139
|
function an(e) {
|
|
1140
|
-
|
|
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
1141
|
}
|
|
1142
1142
|
function Q(e, t) {
|
|
1143
|
-
return !!e &&
|
|
1144
|
-
activeRequestSeq:
|
|
1143
|
+
return !!e && Le({
|
|
1144
|
+
activeRequestSeq: L.value,
|
|
1145
1145
|
requestSeq: t,
|
|
1146
|
-
selectedEmployeeKey:
|
|
1146
|
+
selectedEmployeeKey: A.value,
|
|
1147
1147
|
recordId: e ?? ""
|
|
1148
1148
|
});
|
|
1149
1149
|
}
|
|
1150
|
-
async function on(e, t =
|
|
1151
|
-
|
|
1150
|
+
async function on(e, t = L.value) {
|
|
1151
|
+
z.value = void 0;
|
|
1152
1152
|
let n = e.id, r = e.departmentId;
|
|
1153
1153
|
if (r) try {
|
|
1154
|
-
let e = await
|
|
1155
|
-
Q(n, t) && (
|
|
1154
|
+
let e = await u.crud.view(r);
|
|
1155
|
+
Q(n, t) && (z.value = e);
|
|
1156
1156
|
} catch (e) {
|
|
1157
|
-
Q(n, t) &&
|
|
1157
|
+
Q(n, t) && o(e, {
|
|
1158
1158
|
source: "employee-management",
|
|
1159
1159
|
phase: "load"
|
|
1160
1160
|
});
|
|
1161
1161
|
}
|
|
1162
1162
|
}
|
|
1163
|
-
async function sn(e, t =
|
|
1163
|
+
async function sn(e, t = L.value) {
|
|
1164
1164
|
let n = e.id, r = e.organizationId;
|
|
1165
1165
|
if (r) try {
|
|
1166
|
-
let e = await
|
|
1167
|
-
Q(n, t) && (
|
|
1166
|
+
let e = await le.crud.view(r);
|
|
1167
|
+
Q(n, t) && (w.value = e);
|
|
1168
1168
|
} catch (e) {
|
|
1169
|
-
Q(n, t) &&
|
|
1169
|
+
Q(n, t) && o(e, {
|
|
1170
1170
|
source: "employee-management",
|
|
1171
1171
|
phase: "load"
|
|
1172
1172
|
});
|
|
1173
1173
|
}
|
|
1174
1174
|
}
|
|
1175
|
-
async function cn(e =
|
|
1175
|
+
async function cn(e = j.value ?? R.value, t = L.value) {
|
|
1176
1176
|
let n = e.id;
|
|
1177
1177
|
if (!n) {
|
|
1178
1178
|
$();
|
|
1179
1179
|
return;
|
|
1180
1180
|
}
|
|
1181
|
-
|
|
1181
|
+
H.value = !0, W.value = !1;
|
|
1182
1182
|
try {
|
|
1183
|
-
let e = await
|
|
1183
|
+
let e = await d.http.request({ path: `/iam.employee/${encodeURIComponent(n)}/account` });
|
|
1184
1184
|
if (!Q(n, t)) return;
|
|
1185
|
-
|
|
1185
|
+
B.value = e, await ln(e, n, t);
|
|
1186
1186
|
} catch (e) {
|
|
1187
|
-
Q(n, t) && (
|
|
1187
|
+
Q(n, t) && (W.value = !0, o(e, {
|
|
1188
1188
|
source: "employee-management",
|
|
1189
1189
|
phase: "load"
|
|
1190
1190
|
}));
|
|
1191
1191
|
} finally {
|
|
1192
|
-
Q(n, t) && (
|
|
1192
|
+
Q(n, t) && (H.value = !1);
|
|
1193
1193
|
}
|
|
1194
1194
|
}
|
|
1195
1195
|
async function ln(e, t, n) {
|
|
1196
1196
|
let r = e?.userId;
|
|
1197
1197
|
if (!r) {
|
|
1198
|
-
Q(t, n) && (
|
|
1198
|
+
Q(t, n) && (V.value = void 0);
|
|
1199
1199
|
return;
|
|
1200
1200
|
}
|
|
1201
|
-
let
|
|
1201
|
+
let i;
|
|
1202
1202
|
try {
|
|
1203
|
-
|
|
1203
|
+
i = await he.crud.view(r);
|
|
1204
1204
|
} catch (e) {
|
|
1205
|
-
|
|
1205
|
+
o(e, {
|
|
1206
1206
|
source: "employee-management",
|
|
1207
1207
|
phase: "load"
|
|
1208
|
-
}),
|
|
1208
|
+
}), i = {
|
|
1209
1209
|
id: r,
|
|
1210
1210
|
username: r
|
|
1211
1211
|
};
|
|
1212
1212
|
}
|
|
1213
|
-
Q(t, n) && (
|
|
1213
|
+
Q(t, n) && (V.value = i);
|
|
1214
1214
|
}
|
|
1215
1215
|
async function un() {
|
|
1216
|
-
let e =
|
|
1216
|
+
let e = j.value, t = Sn(K.value);
|
|
1217
1217
|
if (!e?.id || !mt.value) return;
|
|
1218
1218
|
let n = Cn(t);
|
|
1219
1219
|
if (n) {
|
|
1220
|
-
|
|
1220
|
+
ve(n, {
|
|
1221
1221
|
source: "employee-management",
|
|
1222
1222
|
phase: "validation"
|
|
1223
1223
|
});
|
|
1224
1224
|
return;
|
|
1225
1225
|
}
|
|
1226
|
-
|
|
1226
|
+
U.value = !0;
|
|
1227
1227
|
try {
|
|
1228
|
-
let n = await
|
|
1228
|
+
let n = await d.http.request({
|
|
1229
1229
|
method: "POST",
|
|
1230
1230
|
path: `/iam.employee/${encodeURIComponent(e.id)}/account/provision`,
|
|
1231
1231
|
body: t
|
|
1232
|
-
}), r =
|
|
1233
|
-
|
|
1232
|
+
}), r = ge(n);
|
|
1233
|
+
B.value = r.binding, V.value = r.user, G.value = !1, K.value = $t(e), await se(n, {
|
|
1234
1234
|
source: "employee-management",
|
|
1235
1235
|
phase: "action"
|
|
1236
1236
|
});
|
|
1237
1237
|
} catch (e) {
|
|
1238
|
-
|
|
1238
|
+
o(e, {
|
|
1239
1239
|
source: "employee-management",
|
|
1240
1240
|
phase: "action"
|
|
1241
1241
|
});
|
|
1242
1242
|
} finally {
|
|
1243
|
-
|
|
1243
|
+
U.value = !1;
|
|
1244
1244
|
}
|
|
1245
1245
|
}
|
|
1246
1246
|
async function dn() {
|
|
1247
|
-
let e =
|
|
1248
|
-
if (!(!e?.id || !
|
|
1247
|
+
let e = j.value;
|
|
1248
|
+
if (!(!e?.id || !B.value?.id || !mt.value) && await ce({
|
|
1249
1249
|
title: "移除账户",
|
|
1250
1250
|
content: `确认移除账户「${gn()}」?该用户账号会同步删除。`,
|
|
1251
1251
|
okText: "移除",
|
|
1252
1252
|
danger: !0
|
|
1253
1253
|
})) {
|
|
1254
|
-
|
|
1254
|
+
U.value = !0;
|
|
1255
1255
|
try {
|
|
1256
|
-
let t = await
|
|
1256
|
+
let t = await d.http.request({
|
|
1257
1257
|
method: "POST",
|
|
1258
1258
|
path: `/iam.employee/${encodeURIComponent(e.id)}/account/delete`
|
|
1259
1259
|
});
|
|
1260
|
-
await cn(e,
|
|
1260
|
+
await cn(e, L.value), await se(t, {
|
|
1261
1261
|
source: "employee-management",
|
|
1262
1262
|
phase: "action"
|
|
1263
1263
|
});
|
|
1264
1264
|
} catch (e) {
|
|
1265
|
-
|
|
1265
|
+
o(e, {
|
|
1266
1266
|
source: "employee-management",
|
|
1267
1267
|
phase: "action"
|
|
1268
1268
|
});
|
|
1269
1269
|
} finally {
|
|
1270
|
-
|
|
1270
|
+
U.value = !1;
|
|
1271
1271
|
}
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
1274
|
function $() {
|
|
1275
|
-
|
|
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
1276
|
}
|
|
1277
1277
|
function fn(e) {
|
|
1278
1278
|
return String(e?.title ?? e?.employeeNo ?? e?.id ?? "职员档案");
|
|
@@ -1288,24 +1288,24 @@ var Ze = { key: 0 }, Qe = {
|
|
|
1288
1288
|
return e.enabled === !1 ? "enable" : "disable";
|
|
1289
1289
|
}
|
|
1290
1290
|
function gn() {
|
|
1291
|
-
let e =
|
|
1291
|
+
let e = B.value, t = V.value;
|
|
1292
1292
|
return String(t?.username ?? e?.userId ?? "未设置账号");
|
|
1293
1293
|
}
|
|
1294
1294
|
function _n() {
|
|
1295
|
-
let e =
|
|
1295
|
+
let e = V.value;
|
|
1296
1296
|
return e?.id ? `账号ID ${e.id}` : "-";
|
|
1297
1297
|
}
|
|
1298
1298
|
function vn() {
|
|
1299
|
-
return
|
|
1299
|
+
return V.value?.enabled === !1 ? "停用" : "启用";
|
|
1300
1300
|
}
|
|
1301
1301
|
function yn(e) {
|
|
1302
1302
|
return String(e?.employeeNo ?? e?.mobile ?? "").trim().toLowerCase();
|
|
1303
1303
|
}
|
|
1304
1304
|
function bn() {
|
|
1305
|
-
|
|
1305
|
+
K.value = $t(j.value ?? R.value), G.value = !0;
|
|
1306
1306
|
}
|
|
1307
1307
|
function xn() {
|
|
1308
|
-
|
|
1308
|
+
G.value = !1, K.value = $t(j.value ?? R.value);
|
|
1309
1309
|
}
|
|
1310
1310
|
function Sn(e) {
|
|
1311
1311
|
return {
|
|
@@ -1386,26 +1386,26 @@ var Ze = { key: 0 }, Qe = {
|
|
|
1386
1386
|
controlType: "enabledStatus"
|
|
1387
1387
|
}
|
|
1388
1388
|
};
|
|
1389
|
-
return (e, t) => !
|
|
1389
|
+
return (e, t) => !m.value || h.value ? (T(), v(O(a), {
|
|
1390
1390
|
key: 0,
|
|
1391
1391
|
class: "employee-management-page"
|
|
1392
1392
|
}, {
|
|
1393
|
-
default:
|
|
1394
|
-
|
|
1395
|
-
default:
|
|
1393
|
+
default: k(() => [
|
|
1394
|
+
C(O(ne), null, {
|
|
1395
|
+
default: k(() => [C(O(n), {
|
|
1396
1396
|
class: "employee-scope-panel",
|
|
1397
1397
|
title: "机构树",
|
|
1398
1398
|
"refresh-title": "刷新机构树",
|
|
1399
|
-
"search-keyword":
|
|
1399
|
+
"search-keyword": we.value,
|
|
1400
1400
|
"search-placeholder": "搜索机构名称、编码或 ID",
|
|
1401
1401
|
onRefresh: jt,
|
|
1402
|
-
"onUpdate:searchKeyword": t[0] ||= (e) =>
|
|
1402
|
+
"onUpdate:searchKeyword": t[0] ||= (e) => we.value = e
|
|
1403
1403
|
}, {
|
|
1404
|
-
default:
|
|
1405
|
-
context:
|
|
1406
|
-
"selected-id":
|
|
1407
|
-
"reload-key":
|
|
1408
|
-
keyword:
|
|
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
1409
|
"search-mode": "none",
|
|
1410
1410
|
"search-trigger": "external",
|
|
1411
1411
|
"empty-description": "暂无机构",
|
|
@@ -1425,18 +1425,18 @@ var Ze = { key: 0 }, Qe = {
|
|
|
1425
1425
|
}, 8, ["search-keyword"])]),
|
|
1426
1426
|
_: 1
|
|
1427
1427
|
}),
|
|
1428
|
-
|
|
1428
|
+
C(O(me), {
|
|
1429
1429
|
class: "employee-list-panel",
|
|
1430
1430
|
context: it.value,
|
|
1431
|
-
title:
|
|
1432
|
-
mode:
|
|
1431
|
+
title: O(q).active.value ? "职员回收站" : "职员列表",
|
|
1432
|
+
mode: O(q).mode.value,
|
|
1433
1433
|
"standard-crud-actions": "",
|
|
1434
1434
|
"standard-crud-row-actions": "",
|
|
1435
1435
|
"extra-row-actions-of": Rt,
|
|
1436
|
-
"selected-key":
|
|
1437
|
-
"expanded-row-keys":
|
|
1438
|
-
"reload-key":
|
|
1439
|
-
ready: !!
|
|
1436
|
+
"selected-key": A.value,
|
|
1437
|
+
"expanded-row-keys": O(Ge),
|
|
1438
|
+
"reload-key": g.value,
|
|
1439
|
+
ready: !!w.value?.id,
|
|
1440
1440
|
"external-query-values": st.value,
|
|
1441
1441
|
"quick-search-placeholder": "搜索编号、姓名、手机号或邮箱",
|
|
1442
1442
|
"empty-description": "当前机构暂无职员",
|
|
@@ -1444,40 +1444,40 @@ var Ze = { key: 0 }, Qe = {
|
|
|
1444
1444
|
onAction: Nt,
|
|
1445
1445
|
onRowAction: Lt,
|
|
1446
1446
|
onRowDblclick: Ht,
|
|
1447
|
-
onRowExpand:
|
|
1447
|
+
onRowExpand: O(et),
|
|
1448
1448
|
onSelect: Mt,
|
|
1449
1449
|
onModeChange: Pt,
|
|
1450
1450
|
onRestored: It
|
|
1451
1451
|
}, {
|
|
1452
|
-
expandedRow:
|
|
1452
|
+
expandedRow: k(({ record: e }) => [C(O(oe), {
|
|
1453
1453
|
title: "任职信息",
|
|
1454
|
-
loading:
|
|
1455
|
-
error:
|
|
1454
|
+
loading: O($e)(String(e.id ?? "")).loading,
|
|
1455
|
+
error: O($e)(String(e.id ?? "")).error,
|
|
1456
1456
|
"loading-tip": "加载任职信息",
|
|
1457
1457
|
"error-title": "任职信息加载失败"
|
|
1458
1458
|
}, {
|
|
1459
|
-
actions:
|
|
1459
|
+
actions: k(() => [C(O(f), {
|
|
1460
1460
|
type: "text",
|
|
1461
1461
|
"icon-name": "reload",
|
|
1462
|
-
disabled:
|
|
1463
|
-
onClick: (t) =>
|
|
1462
|
+
disabled: O($e)(String(e.id ?? "")).loading,
|
|
1463
|
+
onClick: (t) => O(tt)(String(e.id ?? ""))
|
|
1464
1464
|
}, {
|
|
1465
|
-
default:
|
|
1465
|
+
default: k(() => [...t[3] ||= [S(" 刷新 ", -1)]]),
|
|
1466
1466
|
_: 1
|
|
1467
1467
|
}, 8, ["disabled", "onClick"])]),
|
|
1468
|
-
default:
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
], -1), (
|
|
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
1474
|
key: e.id,
|
|
1475
|
-
class:
|
|
1475
|
+
class: je({ "is-disabled": e.enabled === !1 })
|
|
1476
1476
|
}, [
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
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
1481
|
], 2))), 128))]))]),
|
|
1482
1482
|
_: 2
|
|
1483
1483
|
}, 1032, ["loading", "error"])]),
|
|
@@ -1493,66 +1493,66 @@ var Ze = { key: 0 }, Qe = {
|
|
|
1493
1493
|
"external-query-values",
|
|
1494
1494
|
"onRowExpand"
|
|
1495
1495
|
]),
|
|
1496
|
-
|
|
1496
|
+
xe.value ? (T(), v(O(ee), {
|
|
1497
1497
|
key: 0,
|
|
1498
|
-
open:
|
|
1498
|
+
open: M.value,
|
|
1499
1499
|
title: ct.value,
|
|
1500
1500
|
subtitle: lt.value,
|
|
1501
|
-
"close-on-outside":
|
|
1502
|
-
promotion:
|
|
1501
|
+
"close-on-outside": N.value === "view",
|
|
1502
|
+
promotion: O(vt),
|
|
1503
1503
|
onClose: Wt
|
|
1504
1504
|
}, {
|
|
1505
|
-
status:
|
|
1505
|
+
status: k(() => [N.value === "view" && j.value ? (T(), v(O(ie), {
|
|
1506
1506
|
key: 0,
|
|
1507
|
-
enabled:
|
|
1508
|
-
disabled:
|
|
1509
|
-
loading:
|
|
1507
|
+
enabled: j.value.enabled !== !1,
|
|
1508
|
+
disabled: I.value || !pt.value,
|
|
1509
|
+
loading: I.value,
|
|
1510
1510
|
"show-label": !1,
|
|
1511
1511
|
onChange: Xt
|
|
1512
1512
|
}, null, 8, [
|
|
1513
1513
|
"enabled",
|
|
1514
1514
|
"disabled",
|
|
1515
1515
|
"loading"
|
|
1516
|
-
])) :
|
|
1517
|
-
operation:
|
|
1516
|
+
])) : y("v-if", !0)]),
|
|
1517
|
+
operation: k(() => [C(O(te), {
|
|
1518
1518
|
context: it.value,
|
|
1519
1519
|
actions: gt.value,
|
|
1520
1520
|
onAction: Kt
|
|
1521
1521
|
}, null, 8, ["context", "actions"])]),
|
|
1522
|
-
default:
|
|
1523
|
-
mode:
|
|
1524
|
-
draft:
|
|
1525
|
-
"selected-employee":
|
|
1526
|
-
"selected-organization":
|
|
1527
|
-
"detail-department":
|
|
1528
|
-
loading:
|
|
1529
|
-
"load-failed":
|
|
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
1530
|
"form-disabled": ut.value,
|
|
1531
1531
|
"show-content": dt.value,
|
|
1532
|
-
fields:
|
|
1532
|
+
fields: ye.value,
|
|
1533
1533
|
fallback: En,
|
|
1534
1534
|
"picker-configs": ot.value,
|
|
1535
1535
|
"display-of": Ot,
|
|
1536
1536
|
"visible-of": Tt,
|
|
1537
1537
|
"label-of": Ct,
|
|
1538
1538
|
"required-of": wt,
|
|
1539
|
-
"externally-changed":
|
|
1540
|
-
account:
|
|
1541
|
-
"account-user":
|
|
1542
|
-
"loading-accounts":
|
|
1543
|
-
"accounts-load-failed":
|
|
1544
|
-
"saving-account":
|
|
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
1545
|
"can-manage-accounts": mt.value,
|
|
1546
|
-
"show-account-provision-form":
|
|
1547
|
-
"account-provision-draft":
|
|
1546
|
+
"show-account-provision-form": G.value,
|
|
1547
|
+
"account-provision-draft": K.value,
|
|
1548
1548
|
"account-user-title": gn(),
|
|
1549
1549
|
"account-user-description": _n(),
|
|
1550
1550
|
"account-status-title": vn(),
|
|
1551
|
-
"option-context":
|
|
1551
|
+
"option-context": O(d),
|
|
1552
1552
|
onRetry: qt,
|
|
1553
1553
|
onSave: Yt,
|
|
1554
1554
|
onReloadExternal: Jt,
|
|
1555
|
-
onDismissExternal:
|
|
1555
|
+
onDismissExternal: O(J).clearExternalChanged,
|
|
1556
1556
|
onUpdateField: Et,
|
|
1557
1557
|
onRetryAccounts: t[1] ||= (e) => cn(),
|
|
1558
1558
|
onStartAccountProvision: bn,
|
|
@@ -1594,76 +1594,76 @@ var Ze = { key: 0 }, Qe = {
|
|
|
1594
1594
|
"subtitle",
|
|
1595
1595
|
"close-on-outside",
|
|
1596
1596
|
"promotion"
|
|
1597
|
-
])) :
|
|
1598
|
-
|
|
1599
|
-
open:
|
|
1600
|
-
employee:
|
|
1597
|
+
])) : y("v-if", !0),
|
|
1598
|
+
C(He, {
|
|
1599
|
+
open: Ue.value,
|
|
1600
|
+
employee: We.value,
|
|
1601
1601
|
onClose: Bt,
|
|
1602
1602
|
onSaved: Vt
|
|
1603
1603
|
}, null, 8, ["open", "employee"])
|
|
1604
1604
|
]),
|
|
1605
1605
|
_: 1
|
|
1606
|
-
})) : (
|
|
1606
|
+
})) : (T(), v(O(i), {
|
|
1607
1607
|
key: 1,
|
|
1608
1608
|
title: ct.value,
|
|
1609
1609
|
subtitle: lt.value
|
|
1610
1610
|
}, {
|
|
1611
|
-
status:
|
|
1611
|
+
status: k(() => [N.value === "view" && j.value ? (T(), v(O(ie), {
|
|
1612
1612
|
key: 0,
|
|
1613
|
-
enabled:
|
|
1614
|
-
disabled:
|
|
1615
|
-
loading:
|
|
1613
|
+
enabled: j.value.enabled !== !1,
|
|
1614
|
+
disabled: I.value || !pt.value,
|
|
1615
|
+
loading: I.value,
|
|
1616
1616
|
"show-label": !1,
|
|
1617
1617
|
onChange: Xt
|
|
1618
1618
|
}, null, 8, [
|
|
1619
1619
|
"enabled",
|
|
1620
1620
|
"disabled",
|
|
1621
1621
|
"loading"
|
|
1622
|
-
])) :
|
|
1623
|
-
operation:
|
|
1624
|
-
context:
|
|
1622
|
+
])) : y("v-if", !0)]),
|
|
1623
|
+
operation: k(() => [C(O(te), {
|
|
1624
|
+
context: O(d),
|
|
1625
1625
|
actions: _t.value,
|
|
1626
|
-
"record-id":
|
|
1626
|
+
"record-id": j.value?.id,
|
|
1627
1627
|
onAction: Kt
|
|
1628
1628
|
}, null, 8, [
|
|
1629
1629
|
"context",
|
|
1630
1630
|
"actions",
|
|
1631
1631
|
"record-id"
|
|
1632
1632
|
])]),
|
|
1633
|
-
default:
|
|
1634
|
-
mode:
|
|
1635
|
-
draft:
|
|
1636
|
-
"selected-employee":
|
|
1637
|
-
"selected-organization":
|
|
1638
|
-
"detail-department":
|
|
1639
|
-
loading:
|
|
1640
|
-
"load-failed":
|
|
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
1641
|
"form-disabled": ut.value,
|
|
1642
1642
|
"show-content": dt.value,
|
|
1643
|
-
fields:
|
|
1643
|
+
fields: ye.value,
|
|
1644
1644
|
fallback: En,
|
|
1645
1645
|
"picker-configs": ot.value,
|
|
1646
1646
|
"display-of": Ot,
|
|
1647
1647
|
"visible-of": Tt,
|
|
1648
1648
|
"label-of": Ct,
|
|
1649
1649
|
"required-of": wt,
|
|
1650
|
-
"externally-changed":
|
|
1651
|
-
account:
|
|
1652
|
-
"account-user":
|
|
1653
|
-
"loading-accounts":
|
|
1654
|
-
"accounts-load-failed":
|
|
1655
|
-
"saving-account":
|
|
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
1656
|
"can-manage-accounts": mt.value,
|
|
1657
|
-
"show-account-provision-form":
|
|
1658
|
-
"account-provision-draft":
|
|
1657
|
+
"show-account-provision-form": G.value,
|
|
1658
|
+
"account-provision-draft": K.value,
|
|
1659
1659
|
"account-user-title": gn(),
|
|
1660
1660
|
"account-user-description": _n(),
|
|
1661
1661
|
"account-status-title": vn(),
|
|
1662
|
-
"option-context":
|
|
1662
|
+
"option-context": O(d),
|
|
1663
1663
|
onRetry: qt,
|
|
1664
1664
|
onSave: Yt,
|
|
1665
1665
|
onReloadExternal: Jt,
|
|
1666
|
-
onDismissExternal:
|
|
1666
|
+
onDismissExternal: O(J).clearExternalChanged,
|
|
1667
1667
|
onUpdateField: Et,
|
|
1668
1668
|
onRetryAccounts: t[2] ||= (e) => cn(),
|
|
1669
1669
|
onStartAccountProvision: bn,
|