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