Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hr-admin-view
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
anjia-hr
hr-admin-view
Commits
f6ca7471
Commit
f6ca7471
authored
Nov 21, 2025
by
刘斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 增加左侧部门选择
parent
60fc2adf
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
239 additions
and
80 deletions
+239
-80
employeeInfo.ts
apps/web-antd/src/api/hr/employeeInfo.ts
+9
-0
employeeModel.d.ts
apps/web-antd/src/api/hr/employeeModel.d.ts
+1
-1
list.vue
...web-antd/src/views/hr/contractExpirationReminder/list.vue
+29
-2
data.ts
apps/web-antd/src/views/hr/employeeInfo/data.ts
+20
-20
employee-detail-drawer.vue
...antd/src/views/hr/employeeInfo/employee-detail-drawer.vue
+3
-0
form.vue
apps/web-antd/src/views/hr/employeeInfo/form.vue
+13
-8
list.vue
apps/web-antd/src/views/hr/employeeInfo/list.vue
+35
-3
data.ts
apps/web-antd/src/views/hr/phoneBook/data.ts
+20
-20
list.vue
apps/web-antd/src/views/hr/phoneBook/list.vue
+30
-2
list.vue
apps/web-antd/src/views/hr/regularReminder/list.vue
+29
-2
data.ts
apps/web-antd/src/views/hr/resignEmployee/data.ts
+20
-20
list.vue
apps/web-antd/src/views/hr/resignEmployee/list.vue
+30
-2
No files found.
apps/web-antd/src/api/hr/employeeInfo.ts
View file @
f6ca7471
...
...
@@ -100,6 +100,15 @@ export function applyRenewalContract(
)
{
return
requestClient
.
post
(
'/employee/info/applyRenewalContract'
,
data
);
}
/**
* 人事专用 - 获取部门树
* @returns 部门树
*/
export
function
employeeDeptTreeSelect
()
{
return
requestClient
.
get
(
'/employee/info/deptTree'
);
}
/**
* 下载用户导入模板
* @returns blob
...
...
apps/web-antd/src/api/hr/employeeModel.d.ts
View file @
f6ca7471
...
...
@@ -26,7 +26,7 @@ export namespace EmployeeInfoApi {
/**
* 工号
*/
employee
Id
?:
number
;
employee
No
?:
number
;
/**
* 职级
...
...
apps/web-antd/src/views/hr/contractExpirationReminder/list.vue
View file @
f6ca7471
...
...
@@ -4,12 +4,15 @@ import type { VbenFormProps } from '@vben/common-ui';
import
type
{
VxeTableGridOptions
}
from
'#/adapter/vxe-table'
;
import
type
{
ContractExpirationReminderApi
}
from
'#/api/hr/contractExpirationReminder'
;
import
{
ref
}
from
'vue'
;
import
{
Page
,
useVbenDrawer
,
useVbenModal
}
from
'@vben/common-ui'
;
import
{
Button
,
Space
}
from
'ant-design-vue'
;
import
{
useVbenVxeGrid
}
from
'#/adapter/vxe-table'
;
import
{
apiExport
,
apiPage
}
from
'#/api/hr/contractExpirationReminder'
;
import
{
employeeDeptTreeSelect
}
from
'#/api/hr/employeeInfo'
;
import
{
GhostButton
}
from
'#/components/global/button'
;
import
{
commonDownloadExcel
}
from
'#/utils/file/download'
;
...
...
@@ -18,6 +21,8 @@ import applyRenewalContractModel from './apply-renewal_contract-model.vue';
import
{
querySchema
,
useColumns
}
from
'./data'
;
// import Form from './form.vue';
// 左边部门用
const
selectDeptId
=
ref
<
number
[]
>
([]);
const
formOptions
:
VbenFormProps
=
{
commonConfig
:
{
labelWidth
:
80
,
...
...
@@ -40,6 +45,15 @@ const formOptions: VbenFormProps = {
[
'YYYY-MM-DD 00:00:00'
,
'YYYY-MM-DD 23:59:59'
],
],
],
handleReset
:
async
()
=>
{
selectDeptId
.
value
=
[];
const
{
formApi
,
reload
}
=
gridApi
;
await
formApi
.
resetForm
();
const
formValues
=
formApi
.
form
.
values
;
formApi
.
setLatestSubmissionValues
(
formValues
);
await
reload
(
formValues
);
},
};
const
[
EmployeeDetailDrawer
,
employeeDetailDrawerApi
]
=
useVbenDrawer
({
...
...
@@ -61,6 +75,12 @@ const [Grid, gridApi] = useVbenVxeGrid({
proxyConfig
:
{
ajax
:
{
query
:
async
({
page
},
formValues
=
{})
=>
{
// 部门树选择处理
if
(
selectDeptId
.
value
.
length
===
1
)
{
formValues
.
belongDeptId
=
selectDeptId
.
value
[
0
];
}
else
{
Reflect
.
deleteProperty
(
formValues
,
'belongDeptId'
);
}
return
await
apiPage
({
pageNo
:
page
.
currentPage
,
pageSize
:
page
.
pageSize
,
...
...
@@ -134,9 +154,16 @@ function handleDownloadExcel() {
}
</
script
>
<
template
>
<Page
auto-content-height
>
<Page
auto-content-height
content-class=
"flex gap-[8px] w-full"
>
<EmployeeDetailDrawer
/>
<Grid
table-title=
"员工合同续签提醒列表"
>
<DeptTree
v-model:select-dept-id=
"selectDeptId"
:api=
"employeeDeptTreeSelect"
class=
"w-[260px]"
@
reload=
"() => gridApi.reload()"
@
select=
"() => gridApi.reload()"
/>
<Grid
class=
"flex-1 overflow-hidden"
table-title=
"员工合同续签提醒列表"
>
<template
#
toolbar-tools
>
<Space>
<Button
...
...
apps/web-antd/src/views/hr/employeeInfo/data.ts
View file @
f6ca7471
...
...
@@ -7,26 +7,26 @@ import { getDictOptions } from '#/utils/dict';
import
{
HrDictEnum
}
from
'../dict-enum'
;
export
const
querySchema
:
VbenFormSchema
[]
=
[
{
component
:
'Input'
,
fieldName
:
'plate'
,
label
:
'板块'
,
},
{
component
:
'Input'
,
fieldName
:
'firstLevelDepartment'
,
label
:
'一级部门'
,
},
{
component
:
'Input'
,
fieldName
:
'secondLevelDepartment'
,
label
:
'二级部门'
,
},
{
component
:
'Input'
,
fieldName
:
'thirdLevelDepartment'
,
label
:
'三级部门'
,
},
//
{
//
component: 'Input',
//
fieldName: 'plate',
//
label: '板块',
//
},
//
{
//
component: 'Input',
//
fieldName: 'firstLevelDepartment',
//
label: '一级部门',
//
},
//
{
//
component: 'Input',
//
fieldName: 'secondLevelDepartment',
//
label: '二级部门',
//
},
//
{
//
component: 'Input',
//
fieldName: 'thirdLevelDepartment',
//
label: '三级部门',
//
},
{
component
:
'Input'
,
fieldName
:
'employeeNo'
,
...
...
apps/web-antd/src/views/hr/employeeInfo/employee-detail-drawer.vue
View file @
f6ca7471
...
...
@@ -165,6 +165,9 @@ async function handleOpenChange(open: boolean) {
<DescriptionsItem
label=
"年龄"
>
{{ currentEmployee.age }}
</DescriptionsItem>
<DescriptionsItem
label=
"年龄组"
>
{{ currentEmployee.ageGroupName }}
</DescriptionsItem>
<DescriptionsItem
label=
"籍贯"
>
{{ currentEmployee.nativePlace }}
</DescriptionsItem>
...
...
apps/web-antd/src/views/hr/employeeInfo/form.vue
View file @
f6ca7471
...
...
@@ -22,7 +22,6 @@ import { HrDictEnum } from '../dict-enum';
const
emit
=
defineEmits
<
{
success
:
[];
}
>
();
const
formData
=
ref
<
EmployeeInfoApi
.
Employee
>
();
const
loading
=
ref
(
false
);
const
isUpdate
=
ref
(
false
);
...
...
@@ -46,6 +45,15 @@ const isUpdate = ref(false);
// }
const
formSchema
:
VbenFormSchema
[]
=
[
{
component
:
'Input'
,
dependencies
:
{
show
:
()
=>
false
,
triggerFields
:
[
''
],
},
fieldName
:
'id'
,
label
:
'id'
,
},
{
component
:
'Divider'
,
componentProps
:
{
...
...
@@ -792,10 +800,9 @@ const [Drawer, drawerApi] = useVbenDrawer({
// 初始化
await
setupDeptSelect
();
// console.log('[id]', id);
if
(
id
)
{
if
(
i
sUpdate
.
value
&&
i
d
)
{
const
data
=
await
apiDetail
(
id
);
formData
.
value
=
data
;
await
formApi
.
setValues
(
formData
.
value
!
);
await
formApi
.
setValues
(
data
);
// await setupDeptLevel2Options(data.firstLevelDepartment);
}
else
{
formApi
.
resetForm
();
...
...
@@ -828,9 +835,7 @@ async function onSubmit() {
const
data
=
await
formApi
.
getValues
<
EmployeeInfoApi
.
Employee
>
();
// console.log('[data]', data);
try
{
await
(
formData
.
value
?.
id
?
apiUpdate
({
id
:
formData
.
value
.
id
,
...
data
})
:
apiAdd
(
data
));
await
(
isUpdate
.
value
?
apiUpdate
(
data
)
:
apiAdd
(
data
));
resetInitialized
();
emit
(
'success'
);
drawerApi
.
close
();
...
...
@@ -846,7 +851,7 @@ async function handleClosed() {
}
const
getDrawerTitle
=
computed
(()
=>
formData
.
value
?.
id
?
'修改员工信息'
:
'新增员工信息'
,
isUpdate
.
value
?
'修改员工信息'
:
'新增员工信息'
,
);
</
script
>
<
template
>
...
...
apps/web-antd/src/views/hr/employeeInfo/list.vue
View file @
f6ca7471
...
...
@@ -4,6 +4,8 @@ import type { VbenFormProps } from '@vben/common-ui';
import
type
{
VxeTableGridOptions
}
from
'#/adapter/vxe-table'
;
import
type
{
EmployeeInfoApi
}
from
'#/api/hr/employeeModel'
;
import
{
ref
}
from
'vue'
;
import
{
Page
,
useVbenDrawer
,
useVbenModal
}
from
'@vben/common-ui'
;
import
{
...
...
@@ -14,9 +16,15 @@ import {
import
{
Button
,
Space
}
from
'ant-design-vue'
;
import
{
useVbenVxeGrid
}
from
'#/adapter/vxe-table'
;
import
{
apiExport
,
apiPage
,
exportEmployeeList
}
from
'#/api/hr/employeeInfo'
;
import
{
apiExport
,
apiPage
,
employeeDeptTreeSelect
,
exportEmployeeList
,
}
from
'#/api/hr/employeeInfo'
;
import
{
GhostButton
}
from
'#/components/global/button'
;
import
{
commonDownloadExcel
}
from
'#/utils/file/download'
;
import
DeptTree
from
'#/views/auth/user/deptTree.vue'
;
import
applyEntryModel
from
'./apply-entry-model.vue'
;
import
applyResignModel
from
'./apply-resign-model.vue'
;
...
...
@@ -46,6 +54,8 @@ const [ApplyResignModel, applyResignModelApi] = useVbenModal({
connectedComponent
:
applyResignModel
,
});
// 左边部门用
const
selectDeptId
=
ref
<
number
[]
>
([]);
const
formOptions
:
VbenFormProps
=
{
commonConfig
:
{
labelWidth
:
80
,
...
...
@@ -63,6 +73,15 @@ const formOptions: VbenFormProps = {
[
'YYYY-MM-DD 00:00:00'
,
'YYYY-MM-DD 23:59:59'
],
],
],
handleReset
:
async
()
=>
{
selectDeptId
.
value
=
[];
const
{
formApi
,
reload
}
=
gridApi
;
await
formApi
.
resetForm
();
const
formValues
=
formApi
.
form
.
values
;
formApi
.
setLatestSubmissionValues
(
formValues
);
await
reload
(
formValues
);
},
};
const
[
FormDrawer
,
formDrawerApi
]
=
useVbenDrawer
({
...
...
@@ -84,6 +103,12 @@ const [Grid, gridApi] = useVbenVxeGrid({
proxyConfig
:
{
ajax
:
{
query
:
async
({
page
},
formValues
=
{})
=>
{
// 部门树选择处理
if
(
selectDeptId
.
value
.
length
===
1
)
{
formValues
.
belongDeptId
=
selectDeptId
.
value
[
0
];
}
else
{
Reflect
.
deleteProperty
(
formValues
,
'belongDeptId'
);
}
return
await
apiPage
({
pageNo
:
page
.
currentPage
,
pageSize
:
page
.
pageSize
,
...
...
@@ -133,10 +158,17 @@ function handleDownloadEmployeeList() {
}
</
script
>
<
template
>
<Page
auto-content-height
>
<Page
auto-content-height
content-class=
"flex gap-[8px] w-full"
>
<FormDrawer
@
success=
"onRefresh"
/>
<EmployeeDetailDrawer
/>
<Grid
table-title=
"员工信息列表"
>
<DeptTree
v-model:select-dept-id=
"selectDeptId"
:api=
"employeeDeptTreeSelect"
class=
"w-[260px]"
@
reload=
"() => gridApi.reload()"
@
select=
"() => gridApi.reload()"
/>
<Grid
class=
"flex-1 overflow-hidden"
table-title=
"员工信息列表"
>
<template
#
toolbar-tools
>
<Space>
<Button
...
...
apps/web-antd/src/views/hr/phoneBook/data.ts
View file @
f6ca7471
...
...
@@ -3,26 +3,26 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import
type
{
PhoneBookApi
}
from
'#/api/hr/phoneBook'
;
export
const
querySchema
:
VbenFormSchema
[]
=
[
{
component
:
'Input'
,
fieldName
:
'plate'
,
label
:
'板块'
,
},
{
component
:
'Input'
,
fieldName
:
'firstLevelDepartment'
,
label
:
'一级部门'
,
},
{
component
:
'Input'
,
fieldName
:
'secondLevelDepartment'
,
label
:
'二级部门'
,
},
{
component
:
'Input'
,
fieldName
:
'thirdLevelDepartment'
,
label
:
'三级部门'
,
},
//
{
//
component: 'Input',
//
fieldName: 'plate',
//
label: '板块',
//
},
//
{
//
component: 'Input',
//
fieldName: 'firstLevelDepartment',
//
label: '一级部门',
//
},
//
{
//
component: 'Input',
//
fieldName: 'secondLevelDepartment',
//
label: '二级部门',
//
},
//
{
//
component: 'Input',
//
fieldName: 'thirdLevelDepartment',
//
label: '三级部门',
//
},
// {
// component: 'Input',
// fieldName: 'deptId',
...
...
apps/web-antd/src/views/hr/phoneBook/list.vue
View file @
f6ca7471
...
...
@@ -3,17 +3,23 @@ import type { VbenFormProps } from '@vben/common-ui';
import
type
{
VxeTableGridOptions
}
from
'#/adapter/vxe-table'
;
import
{
ref
}
from
'vue'
;
import
{
Page
}
from
'@vben/common-ui'
;
import
{
Button
,
Space
}
from
'ant-design-vue'
;
import
{
useVbenVxeGrid
}
from
'#/adapter/vxe-table'
;
import
{
employeeDeptTreeSelect
}
from
'#/api/hr/employeeInfo'
;
import
{
apiExport
,
apiPage
}
from
'#/api/hr/phoneBook'
;
import
{
commonDownloadExcel
}
from
'#/utils/file/download'
;
import
DeptTree
from
'#/views/auth/user/deptTree.vue'
;
import
{
querySchema
,
useColumns
}
from
'./data'
;
// import Form from './form.vue';
// 左边部门用
const
selectDeptId
=
ref
<
number
[]
>
([]);
const
formOptions
:
VbenFormProps
=
{
commonConfig
:
{
labelWidth
:
80
,
...
...
@@ -23,6 +29,15 @@ const formOptions: VbenFormProps = {
},
schema
:
querySchema
,
wrapperClass
:
'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4'
,
handleReset
:
async
()
=>
{
selectDeptId
.
value
=
[];
const
{
formApi
,
reload
}
=
gridApi
;
await
formApi
.
resetForm
();
const
formValues
=
formApi
.
form
.
values
;
formApi
.
setLatestSubmissionValues
(
formValues
);
await
reload
(
formValues
);
},
};
// const [FormDrawer, formDrawerApi] = useVbenDrawer({
...
...
@@ -41,6 +56,12 @@ const [Grid, gridApi] = useVbenVxeGrid({
proxyConfig
:
{
ajax
:
{
query
:
async
({
page
},
formValues
=
{})
=>
{
// 部门树选择处理
if
(
selectDeptId
.
value
.
length
===
1
)
{
formValues
.
belongDeptId
=
selectDeptId
.
value
[
0
];
}
else
{
Reflect
.
deleteProperty
(
formValues
,
'belongDeptId'
);
}
return
await
apiPage
({
pageNo
:
page
.
currentPage
,
pageSize
:
page
.
pageSize
,
...
...
@@ -105,9 +126,16 @@ function handleDownloadExcel() {
}
</
script
>
<
template
>
<Page
auto-content-height
>
<Page
auto-content-height
content-class=
"flex gap-[8px] w-full"
>
<!--
<FormDrawer
@
success=
"onRefresh"
/>
-->
<Grid
table-title=
"电话本"
>
<DeptTree
v-model:select-dept-id=
"selectDeptId"
:api=
"employeeDeptTreeSelect"
class=
"w-[260px]"
@
reload=
"() => gridApi.reload()"
@
select=
"() => gridApi.reload()"
/>
<Grid
class=
"flex-1 overflow-hidden"
table-title=
"电话本"
>
<template
#
toolbar-tools
>
<Space>
<Button
...
...
apps/web-antd/src/views/hr/regularReminder/list.vue
View file @
f6ca7471
...
...
@@ -4,11 +4,14 @@ import type { VbenFormProps } from '@vben/common-ui';
import
type
{
VxeTableGridOptions
}
from
'#/adapter/vxe-table'
;
import
type
{
EmployeeRegularReminderApi
}
from
'#/api/hr/regularReminder'
;
import
{
ref
}
from
'vue'
;
import
{
Page
,
useVbenDrawer
,
useVbenModal
}
from
'@vben/common-ui'
;
import
{
Button
,
Space
}
from
'ant-design-vue'
;
import
{
useVbenVxeGrid
}
from
'#/adapter/vxe-table'
;
import
{
employeeDeptTreeSelect
}
from
'#/api/hr/employeeInfo'
;
import
{
apiExport
,
apiPage
}
from
'#/api/hr/regularReminder'
;
import
{
GhostButton
}
from
'#/components/global/button'
;
import
{
commonDownloadExcel
}
from
'#/utils/file/download'
;
...
...
@@ -18,6 +21,8 @@ import applyRegularModel from './apply-regular-model.vue';
import
{
querySchema
,
useColumns
}
from
'./data'
;
// import Form from './form.vue';
// 左边部门用
const
selectDeptId
=
ref
<
number
[]
>
([]);
const
formOptions
:
VbenFormProps
=
{
commonConfig
:
{
labelWidth
:
80
,
...
...
@@ -40,6 +45,15 @@ const formOptions: VbenFormProps = {
[
'YYYY-MM-DD 00:00:00'
,
'YYYY-MM-DD 23:59:59'
],
],
],
handleReset
:
async
()
=>
{
selectDeptId
.
value
=
[];
const
{
formApi
,
reload
}
=
gridApi
;
await
formApi
.
resetForm
();
const
formValues
=
formApi
.
form
.
values
;
formApi
.
setLatestSubmissionValues
(
formValues
);
await
reload
(
formValues
);
},
};
const
[
EmployeeDetailDrawer
,
employeeDetailDrawerApi
]
=
useVbenDrawer
({
...
...
@@ -61,6 +75,12 @@ const [Grid, gridApi] = useVbenVxeGrid({
proxyConfig
:
{
ajax
:
{
query
:
async
({
page
},
formValues
=
{})
=>
{
// 部门树选择处理
if
(
selectDeptId
.
value
.
length
===
1
)
{
formValues
.
belongDeptId
=
selectDeptId
.
value
[
0
];
}
else
{
Reflect
.
deleteProperty
(
formValues
,
'belongDeptId'
);
}
return
await
apiPage
({
pageNo
:
page
.
currentPage
,
pageSize
:
page
.
pageSize
,
...
...
@@ -130,9 +150,16 @@ function handleDownloadExcel() {
}
</
script
>
<
template
>
<Page
auto-content-height
>
<Page
auto-content-height
content-class=
"flex gap-[8px] w-full"
>
<EmployeeDetailDrawer
/>
<Grid
table-title=
"转正提醒列表"
>
<DeptTree
v-model:select-dept-id=
"selectDeptId"
:api=
"employeeDeptTreeSelect"
class=
"w-[260px]"
@
reload=
"() => gridApi.reload()"
@
select=
"() => gridApi.reload()"
/>
<Grid
class=
"flex-1 overflow-hidden"
table-title=
"转正提醒列表"
>
<template
#
toolbar-tools
>
<Space>
<Button
...
...
apps/web-antd/src/views/hr/resignEmployee/data.ts
View file @
f6ca7471
...
...
@@ -7,26 +7,26 @@ import { getDictOptions } from '#/utils/dict';
import
{
HrDictEnum
}
from
'../dict-enum'
;
export
const
querySchema
:
VbenFormSchema
[]
=
[
{
component
:
'Input'
,
fieldName
:
'plate'
,
label
:
'板块'
,
},
{
component
:
'Input'
,
fieldName
:
'firstLevelDepartment'
,
label
:
'一级部门'
,
},
{
component
:
'Input'
,
fieldName
:
'secondLevelDepartment'
,
label
:
'二级部门'
,
},
{
component
:
'Input'
,
fieldName
:
'thirdLevelDepartment'
,
label
:
'三级部门'
,
},
//
{
//
component: 'Input',
//
fieldName: 'plate',
//
label: '板块',
//
},
//
{
//
component: 'Input',
//
fieldName: 'firstLevelDepartment',
//
label: '一级部门',
//
},
//
{
//
component: 'Input',
//
fieldName: 'secondLevelDepartment',
//
label: '二级部门',
//
},
//
{
//
component: 'Input',
//
fieldName: 'thirdLevelDepartment',
//
label: '三级部门',
//
},
{
component
:
'Input'
,
fieldName
:
'employeeNo'
,
...
...
apps/web-antd/src/views/hr/resignEmployee/list.vue
View file @
f6ca7471
...
...
@@ -4,15 +4,19 @@ import type { VbenFormProps } from '@vben/common-ui';
import
type
{
VxeTableGridOptions
}
from
'#/adapter/vxe-table'
;
import
type
{
EmployeeInfoApi
}
from
'#/api/hr/employeeModel'
;
import
{
ref
}
from
'vue'
;
import
{
Page
,
useVbenDrawer
,
useVbenModal
}
from
'@vben/common-ui'
;
import
{
ExportOutlined
,
UploadOutlined
}
from
'@ant-design/icons-vue'
;
import
{
Button
,
Space
}
from
'ant-design-vue'
;
import
{
useVbenVxeGrid
}
from
'#/adapter/vxe-table'
;
import
{
employeeDeptTreeSelect
}
from
'#/api/hr/employeeInfo'
;
import
{
apiPage
,
exportEmployeeList
}
from
'#/api/hr/resignEmployee'
;
import
{
GhostButton
}
from
'#/components/global/button'
;
import
{
commonDownloadExcel
}
from
'#/utils/file/download'
;
import
DeptTree
from
'#/views/auth/user/deptTree.vue'
;
import
employeeDetailDrawer
from
'../employeeInfo/employee-detail-drawer.vue'
;
import
{
querySchema
,
useColumns
}
from
'./data'
;
...
...
@@ -28,6 +32,8 @@ function handleImport() {
resignEmployeeImportModalApi
.
open
();
}
// 左边部门用
const
selectDeptId
=
ref
<
number
[]
>
([]);
const
formOptions
:
VbenFormProps
=
{
commonConfig
:
{
labelWidth
:
80
,
...
...
@@ -45,6 +51,15 @@ const formOptions: VbenFormProps = {
[
'YYYY-MM-DD 00:00:00'
,
'YYYY-MM-DD 23:59:59'
],
],
],
handleReset
:
async
()
=>
{
selectDeptId
.
value
=
[];
const
{
formApi
,
reload
}
=
gridApi
;
await
formApi
.
resetForm
();
const
formValues
=
formApi
.
form
.
values
;
formApi
.
setLatestSubmissionValues
(
formValues
);
await
reload
(
formValues
);
},
};
const
[
EmployeeDetailDrawer
,
employeeDetailDrawerApi
]
=
useVbenDrawer
({
...
...
@@ -63,6 +78,12 @@ const [Grid, gridApi] = useVbenVxeGrid({
proxyConfig
:
{
ajax
:
{
query
:
async
({
page
},
formValues
=
{})
=>
{
// 部门树选择处理
if
(
selectDeptId
.
value
.
length
===
1
)
{
formValues
.
belongDeptId
=
selectDeptId
.
value
[
0
];
}
else
{
Reflect
.
deleteProperty
(
formValues
,
'belongDeptId'
);
}
return
await
apiPage
({
pageNo
:
page
.
currentPage
,
pageSize
:
page
.
pageSize
,
...
...
@@ -95,9 +116,16 @@ function handleDownloadEmployeeList() {
}
</
script
>
<
template
>
<Page
auto-content-height
>
<Page
auto-content-height
content-class=
"flex gap-[8px] w-full"
>
<EmployeeDetailDrawer
/>
<Grid
table-title=
"离职员工列表"
>
<DeptTree
v-model:select-dept-id=
"selectDeptId"
:api=
"employeeDeptTreeSelect"
class=
"w-[260px]"
@
reload=
"() => gridApi.reload()"
@
select=
"() => gridApi.reload()"
/>
<Grid
class=
"flex-1 overflow-hidden"
table-title=
"离职员工列表"
>
<template
#
toolbar-tools
>
<Space>
<Button
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment