|
@@ -1,9 +1,7 @@
|
|
|
import React, { useState } from 'react'
|
|
import React, { useState } from 'react'
|
|
|
import consts from '@/consts'
|
|
import consts from '@/consts'
|
|
|
-import { message } from 'antd'
|
|
|
|
|
import RoleMenu from '@/pages/Hr/Employee/components/RoleMenu'
|
|
import RoleMenu from '@/pages/Hr/Employee/components/RoleMenu'
|
|
|
import { queryStaff } from '@/services/staff'
|
|
import { queryStaff } from '@/services/staff'
|
|
|
-import { connect } from 'umi'
|
|
|
|
|
import BasicTable from '@/components/Table'
|
|
import BasicTable from '@/components/Table'
|
|
|
import { useModal } from '@/components/ModalStore'
|
|
import { useModal } from '@/components/ModalStore'
|
|
|
|
|
|
|
@@ -19,18 +17,17 @@ const Employee = props => {
|
|
|
title: '工号',
|
|
title: '工号',
|
|
|
dataIndex: 'jobNumber',
|
|
dataIndex: 'jobNumber',
|
|
|
search: false,
|
|
search: false,
|
|
|
- width: 50
|
|
|
|
|
|
|
+ width: 100
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '姓名',
|
|
title: '姓名',
|
|
|
dataIndex: 'username',
|
|
dataIndex: 'username',
|
|
|
search: false,
|
|
search: false,
|
|
|
- width: 50,
|
|
|
|
|
|
|
+ width: 80,
|
|
|
render: (username, record) => (
|
|
render: (username, record) => (
|
|
|
<span
|
|
<span
|
|
|
onClick={() => dispatchModal('D_EMPLOYEE_DETAIL', { dataId: record.id })}
|
|
onClick={() => dispatchModal('D_EMPLOYEE_DETAIL', { dataId: record.id })}
|
|
|
- className="text-primary cursor-pointer hover:text-[#967bbd]"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
{username}
|
|
{username}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
@@ -39,43 +36,43 @@ const Employee = props => {
|
|
|
title: '手机',
|
|
title: '手机',
|
|
|
dataIndex: 'telephone',
|
|
dataIndex: 'telephone',
|
|
|
search: false,
|
|
search: false,
|
|
|
- width: 50
|
|
|
|
|
|
|
+ width: 120
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: 'QQ',
|
|
title: 'QQ',
|
|
|
dataIndex: 'qq',
|
|
dataIndex: 'qq',
|
|
|
search: false,
|
|
search: false,
|
|
|
- width: 50
|
|
|
|
|
|
|
+ width: 150
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '部门',
|
|
title: '部门',
|
|
|
dataIndex: 'departmentName',
|
|
dataIndex: 'departmentName',
|
|
|
search: false,
|
|
search: false,
|
|
|
- width: 50
|
|
|
|
|
|
|
+ width: 70
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '岗位',
|
|
title: '岗位',
|
|
|
dataIndex: 'position',
|
|
dataIndex: 'position',
|
|
|
search: false,
|
|
search: false,
|
|
|
- width: 50
|
|
|
|
|
|
|
+ width: 100
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '聘用状态',
|
|
title: '聘用状态',
|
|
|
dataIndex: 'nature',
|
|
dataIndex: 'nature',
|
|
|
search: false,
|
|
search: false,
|
|
|
- width: 50
|
|
|
|
|
|
|
+ width: 80
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '入职时间',
|
|
title: '入职时间',
|
|
|
dataIndex: 'hiredate',
|
|
dataIndex: 'hiredate',
|
|
|
search: false,
|
|
search: false,
|
|
|
- width: 50
|
|
|
|
|
|
|
+ width: 150
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '离职时间',
|
|
title: '离职时间',
|
|
|
dataIndex: 'dimissionDate',
|
|
dataIndex: 'dimissionDate',
|
|
|
search: false,
|
|
search: false,
|
|
|
- width: 50
|
|
|
|
|
|
|
+ width: 150
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
const onSelect = id => {
|
|
const onSelect = id => {
|
|
@@ -84,7 +81,7 @@ const Employee = props => {
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<div className="h-full w-full flex flex-row">
|
|
<div className="h-full w-full flex flex-row">
|
|
|
- <RoleMenu onSelect={onSelect} />
|
|
|
|
|
|
|
+ <RoleMenu onSelect={onSelect} showType={true} />
|
|
|
<div style={{ width: 'calc(100% - 12rem)' }}>
|
|
<div style={{ width: 'calc(100% - 12rem)' }}>
|
|
|
<div className="ml-8 shadow-hex-3e2c5a">
|
|
<div className="ml-8 shadow-hex-3e2c5a">
|
|
|
{state.params.id && (
|
|
{state.params.id && (
|
|
@@ -111,7 +108,4 @@ const Employee = props => {
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// export default Employee
|
|
|
|
|
-export default connect(({ staff }) => ({
|
|
|
|
|
- departments: staff.departments
|
|
|
|
|
-}))(Employee)
|
|
|
|
|
|
|
+export default Employee
|