巴林闲侠 2 years ago
parent
commit
fb5d847c81
  1. 332
      web/client/src/sections/humanAffairs/containers/employeeInformation.jsx
  2. 4
      web/client/src/sections/humanAffairs/containers/index.js
  3. 622
      web/client/src/sections/humanAffairs/containers/leaveStatistics.jsx
  4. 6
      web/client/src/sections/humanAffairs/containers/personnelFiles.jsx
  5. 4
      web/client/src/sections/humanAffairs/containers/personnelFilesDetail.jsx
  6. 8
      web/client/src/sections/humanAffairs/nav-item.jsx
  7. 12
      web/client/src/sections/humanAffairs/routes.js

332
web/client/src/sections/humanAffairs/containers/employeeInformation.jsx

@ -1,4 +1,4 @@
import React, { useEffect, useState, useRef } from 'react';
import React, { useEffect, useState, useRef, useMemo } from 'react';
import { connect } from 'react-redux';
import { Table, Button, Pagination, Skeleton, Form, Tooltip } from '@douyinfe/semi-ui';
import { IconSearch } from '@douyinfe/semi-icons';
@ -22,32 +22,70 @@ const employeeInformation = (props) => {
const [setupp, setSetupp] = useState([]);//
const [query, setQuery] = useState({ limit: 10, page: 0 }); //
const [limits, setLimits] = useState()//
const [downloadUrl, setDownloadUrl] = useState('')//pdf
const EMPLOYEEINFORMATION = "employeeInformation";
const page = useRef(query.page);//
const tableList = [//
{
title: '基础信息',
list: [
{ name: "员工编号", value: "userCode" },
{ name: "姓名", value: "userName" },
{ name: "所属部门", value: "departmrnt" },
// { name: "", value: "monitorCount" },
// { name: "", value: "logCount" },
{ name: "职位", value: "roleName" },
{ name: "证件号", value: "idNumber" },
{ name: "性别", value: "gender" },
{ name: "籍贯", value: "nativePlace" },
{ name: "出生日期", value: "birthday" },
{ name: "婚育状态", value: "marital" },
{ name: "政治面貌", value: "politicsStatus" },
{ name: "联系方式", value: "phoneNumber" },
{ name: "工作地点", value: "workPlace" },
]
}, {
title: '学历信息',
list: [
{ name: "毕业院校", value: "graduatedFrom" },
{ name: "学历", value: "educationBackground" },
{ name: "专业", value: "specialty" },
{ name: "毕业时间", value: "graduationDate" },
]
}, {
title: '学历信息',
list: [
{ name: "入职时间", value: "hiredate" },
{ name: "转正时间", value: "regularDate" },
{ name: "转试用期时间", value: "turnProbationPeriod" },
{ name: "离职日期", value: "dimissionDate" },
{ name: "入职年限", value: "employmentLife" },
{ name: "试用期时间", value: "probationPeriodDate" },
{ name: "工作经验", value: "experienceYear" },
]
}, {
title: '履历信息',
list: [
{ name: "历史工作经历与职务", value: "occupationalHistory" },
{ name: "简历", value: "vitae" },
]
}
];
useEffect(() => {
getMemberNativePlaceList()//
getMemberWorkPlaceList()//
getMemberSearchList()//
attribute();
localStorage.getItem(EMPLOYEEINFORMATION) == null
? localStorage.setItem(
EMPLOYEEINFORMATION,
JSON.stringify(['userCode', 'userName', 'departmrnt'])
JSON.stringify(['userName', 'departmrnt', 'roleName', 'idNumber', 'gender', 'nativePlace', 'birthday', 'marital', 'politicsStatus', 'phoneNumber', 'workPlace',
'graduatedFrom', 'educationBackground', 'specialty', 'graduationDate',
'hiredate', 'regularDate', 'turnProbationPeriod', 'dimissionDate', 'employmentLife', 'probationPeriodDate', 'experienceYear',
'occupationalHistory', 'vitae'])
)
: "";
}, [])
useEffect(() => {
getMemberSearchList()//
}, [query])
function getMemberSearchList () {//
let obj = form.current.getValues()
@ -59,7 +97,6 @@ const employeeInformation = (props) => {
obj.hiredateStart = ''
obj.hiredateEnd = ''
}
setQuery({ limit: 10, page: 0 })
dispatch(humanAffairs.getMemberList({ ...obj, ...query })).then((res) => {//
if (res.success) {
setArchivesList(res.payload?.data?.rows)
@ -81,7 +118,21 @@ const employeeInformation = (props) => {
}
})
}
const columns = [];
const columns = [
{
title: (
<div>
<img src="/assets/images/hrImg/V.png" alt="" style={{ width: 14, height: 14 }} /> 员工编号
</div>
),
width: 120,
dataIndex: "userCode",
key: "userCode",
render: (_, r, index) => {
return (r.userCode ? r.userCode : '-');
},
},
];
//
function attribute () {
const arr = localStorage.getItem(EMPLOYEEINFORMATION)
@ -90,26 +141,16 @@ const employeeInformation = (props) => {
const column = [
{
title: (
<div>
<img src="/assets/images/hrImg/V.png" alt="" style={{ width: 14, height: 14 }} /> 员工编号
</div>
),
dataIndex: "userCode",
key: "userCode",
render: (_, r, index) => {
return r.userCode;
},
}, {
title: (
<div>
<img src="/assets/images/hrImg/V.png" alt="" style={{ width: 14, height: 14 }} /> 姓名
</div>
),
width: 100,
dataIndex: "userName",
key: "userName",
render: (_, r, index) => {
return r.userName;
return (r.userName ? r.userName : '-');
},
}, {
title: (
@ -117,6 +158,7 @@ const employeeInformation = (props) => {
<img src="/assets/images/hrImg/V.png" alt="" style={{ width: 14, height: 14 }} /> 所属部门
</div>
),
width: 200,
dataIndex: "departmrnt",
key: "departmrnt",
render: (_, r, index) => {
@ -152,55 +194,198 @@ const employeeInformation = (props) => {
</div>
)
},
}, {
title: (
<div>
<img src="/assets/images/hrImg/V.png" alt="" style={{ width: 14, height: 14 }} /> 职位
</div>
),
width: 150,
dataIndex: "roleName",
key: "roleName",
render: (_, r, index) => {
return (r.roleName ? r.roleName : '-');
},
}, {
title: '证件号',
width: 180,
dataIndex: "idNumber",
key: "idNumber",
render: (_, r, index) => {
return (r.idNumber ? r.idNumber : '-');
},
}, {
title: '性别',
width: 60,
dataIndex: "gender",
key: "gender",
render: (_, r, index) => {
return (r.gender ? r.gender : '-');
},
}, {
title: '籍贯',
width: 150,
dataIndex: "nativePlace",
key: "nativePlace",
render: (_, r, index) => {
return (r.nativePlace ? r.nativePlace : '-');
},
}, {
title: '出生日期',
width: 120,
dataIndex: "birthday",
key: "birthday",
render: (_, r, index) => {
return (r.birthday ? r.birthday : '-');
},
}, {
title: '婚育状态',
width: 100,
dataIndex: "marital",
key: "marital",
render: (_, r, index) => {
return (r.marital ? r.marital : '-');
},
}, {
title: '政治面貌',
width: 100,
dataIndex: "politicsStatus",
key: "politicsStatus",
render: (_, r, index) => {
return (r.politicsStatus ? r.politicsStatus : '-');
},
}, {
title: '联系方式',
width: 120,
dataIndex: "phoneNumber",
key: "phoneNumber",
render: (_, r, index) => {
return (r.phoneNumber ? r.phoneNumber : '-');
},
}, {
title: '工作地点',
width: 150,
dataIndex: "workPlace",
key: "workPlace",
render: (_, r, index) => {
return (r.workPlace ? r.workPlace : '-');
},
}, {
title: '毕业院校',
width: 200,
dataIndex: "graduatedFrom",
key: "graduatedFrom",
render: (_, r, index) => {
return (r.graduatedFrom ? r.graduatedFrom : '-');
},
}, {
title: '学历',
width: 60,
dataIndex: "educationBackground",
key: "educationBackground",
render: (_, r, index) => {
return (r.educationBackground ? r.educationBackground : '-');
},
}, {
title: '专业',
width: 200,
dataIndex: "specialty",
key: "specialty",
render: (_, r, index) => {
return (r.specialty ? r.specialty : '-');
},
}, {
title: '毕业时间',
width: 120,
dataIndex: "graduationDate",
key: "graduationDate",
render: (_, r, index) => {
return (r.graduationDate ? r.graduationDate : '-');
},
}, {
title: '入职时间',
width: 120,
dataIndex: "hiredate",
key: "hiredate",
render: (_, r, index) => {
return (r.hiredate ? r.hiredate : '-');
},
}, {
title: '转正时间',
width: 120,
dataIndex: "regularDate",
key: "regularDate",
render: (_, r, index) => {
return (r.regularDate ? r.regularDate : '-');
},
}, {
title: '转试用期时间',
width: 120,
dataIndex: "turnProbationPeriod",
key: "turnProbationPeriod",
render: (_, r, index) => {
return (r.turnProbationPeriod ? r.turnProbationPeriod : '-');
},
}, {
title: '离职日期',
width: 120,
dataIndex: "dimissionDate",
key: "dimissionDate",
render: (_, r, index) => {
return (r.dimissionDate ? r.dimissionDate : '-');
},
}, {
title: '入职年限',
width: 120,
dataIndex: "employmentLife",
key: "employmentLife",
render: (_, r, index) => {
return (r.hiredate ? <span style={{ color: '#1890FF' }}>{moment(new Date()).diff(r.hiredate, 'years') + '年'}</span> : '-')
},
}, {
title: '试用期时间',
width: 120,
dataIndex: "probationPeriodDate",
key: "probationPeriodDate",
render: (_, r, index) => {
return (r.regularDate ? moment(r.regularDate).diff(r.hiredate, 'months', true).toFixed(1) + '个月' : '-')
},
}, {
title: '工作经验',
width: 120,
dataIndex: "experienceYear",
key: "experienceYear",
render: (_, r, index) => {
return (r.experienceYear ? r.experienceYear + '年' : '-')
},
}, {
title: '历史工作经历与职务',
width: 200,
dataIndex: "occupationalHistory",
key: "occupationalHistory",
render: (_, r, index) => {
return (r.occupationalHistory ?
(
<Tooltip content={r.occupationalHistory} style={{ lineHeight: 2 }}>
<div style={{
textOverflow: 'ellipsis',
overflow: 'hidden',
whiteSpace: 'nowrap',
width: 200
}}>{r.occupationalHistory}</div>
</Tooltip>
) : '-')
},
}, {
title: '简历',
width: 200,
dataIndex: "vitae",
key: "vitae",
render: (_, r, index) => {
return (r.vitae ? <a href={`/_file-server/${r.vitae}`} style={{ color: '#005ABD' }}>下载</a> : '-')
},
},
// {
// title: "",
// dataIndex: "logCount",
// key: "logCount",
// render: (_, r, index) => {
// return (r.logCount + '')
// },
// },
// {
// title: "",
// dataIndex: "monitorCount",
// key: "monitorCount",
// render: (_, r, index) => {
// return r.monitorCount
// },
// },
// {
// title: "",
// dataIndex: "pushWay",
// key: "pushWay",
// render: (_, r, index) => {
// return r.pushWay == 'email' ? '' : '';
// },
// },
// {
// title: "",
// dataIndex: "text1",
// key: "text1",
// render: (_, r, index) => {
// return r.text1
// },
// },
// {
// title: "",
// dataIndex: "text2",
// key: "text2",
// render: (_, r, index) => {
// return r.text2
// },
// },
// {
// title: "",
// dataIndex: "time",
// key: "time",
// render: (_, r, index) => {
// return r.time
// },
// },
];
for (let i = 0; i < arr.length; i++) {
let colum = column.filter((item) => {
@ -222,6 +407,7 @@ const employeeInformation = (props) => {
return {};
}
}
const scroll = useMemo(() => ({}), []);
return (
<>
<div style={{ padding: '0px 12px' }}>
@ -335,13 +521,17 @@ const employeeInformation = (props) => {
</div>
<div style={{ display: 'flex', alignItems: 'center' }}>
<img src="/assets/images/hrImg/export.png" alt="" style={{ width: 20, height: 20, cursor: "pointer", marginRight: 15 }}
// onClick={() => setSetup(true)}
onClick={() => { setDownloadUrl(`members/export?token=${user.token}&timestamp=${moment().valueOf()}`) }}
/>
{
downloadUrl ? <iframe src={`/_api/${downloadUrl}`} style={{ display: 'none' }} /> : ''
}
<img src="/assets/images/hrImg/setup.png" alt="" style={{ width: 20, height: 20, cursor: "pointer", marginRight: 15 }}
onClick={() => setSetup(true)}
/>
<Button theme='solid' type='primary' style={{ width: 80, borderRadius: 2, height: 32, background: '#DBECFF', color: '#005ABD' }}
onClick={() => {
setQuery({ limit: 10, page: 0 })
getMemberSearchList()
}}>查询</Button>
</div>
@ -368,6 +558,7 @@ const employeeInformation = (props) => {
empty="暂无数据"
pagination={false}
onRow={handleRow}
scroll={scroll}
/>
</Skeleton>
<div
@ -408,7 +599,6 @@ const employeeInformation = (props) => {
close={() => {
setSetup(false);
attribute();
// setcameraSetup(false);
}}
/>
) : (

4
web/client/src/sections/humanAffairs/containers/index.js

@ -3,5 +3,7 @@
import PersonnelFiles from './personnelFiles';
import PersonnelFilesDetail from './personnelFilesDetail';
import EmployeeInformation from './employeeInformation';
import LeaveStatistics from './leaveStatistics';
export { PersonnelFiles, PersonnelFilesDetail, EmployeeInformation };
export { PersonnelFiles, PersonnelFilesDetail, EmployeeInformation, LeaveStatistics };

622
web/client/src/sections/humanAffairs/containers/leaveStatistics.jsx

@ -0,0 +1,622 @@
import React, { useEffect, useState, useRef, useMemo } from 'react';
import { connect } from 'react-redux';
import { Table, Button, Pagination, Skeleton, Form, Tooltip } from '@douyinfe/semi-ui';
import { IconSearch } from '@douyinfe/semi-icons';
import { SkeletonScreen } from "$components";
import '../style.less'
import { Setup } from "$components";
import moment from 'moment'
import { set } from 'nprogress';
const leaveStatistics = (props) => {
const { dispatch, actions, history, user, loading, socket, xqMembers } = props
const { humanAffairs } = actions;
const form = useRef();//
let [archivesList, setArchivesList] = useState([]);//
let [workPlaceList, setWorkPlaceList] = useState([]);//
let [nativeList, setNativeList] = useState([]);//
const [setup, setSetup] = useState(false);//
const [setupp, setSetupp] = useState([]);//
const [query, setQuery] = useState({ limit: 10, page: 0 }); //
const [limits, setLimits] = useState()//
const [downloadUrl, setDownloadUrl] = useState('')//pdf
const EMPLOYEEINFORMATION = "employeeInformation";
const page = useRef(query.page);//
const tableList = [//
{
title: '基础信息',
list: [
{ name: "姓名", value: "userName" },
{ name: "所属部门", value: "departmrnt" },
{ name: "职位", value: "roleName" },
{ name: "证件号", value: "idNumber" },
{ name: "性别", value: "gender" },
{ name: "籍贯", value: "nativePlace" },
{ name: "出生日期", value: "birthday" },
{ name: "婚育状态", value: "marital" },
{ name: "政治面貌", value: "politicsStatus" },
{ name: "联系方式", value: "phoneNumber" },
{ name: "工作地点", value: "workPlace" },
]
}, {
title: '学历信息',
list: [
{ name: "毕业院校", value: "graduatedFrom" },
{ name: "学历", value: "educationBackground" },
{ name: "专业", value: "specialty" },
{ name: "毕业时间", value: "graduationDate" },
]
}, {
title: '学历信息',
list: [
{ name: "入职时间", value: "hiredate" },
{ name: "转正时间", value: "regularDate" },
{ name: "转试用期时间", value: "turnProbationPeriod" },
{ name: "离职日期", value: "dimissionDate" },
{ name: "入职年限", value: "employmentLife" },
{ name: "试用期时间", value: "probationPeriodDate" },
{ name: "工作经验", value: "experienceYear" },
]
}, {
title: '履历信息',
list: [
{ name: "历史工作经历与职务", value: "occupationalHistory" },
{ name: "简历", value: "vitae" },
]
}
];
useEffect(() => {
getMemberNativePlaceList()//
getMemberWorkPlaceList()//
attribute();
localStorage.getItem(EMPLOYEEINFORMATION) == null
? localStorage.setItem(
EMPLOYEEINFORMATION,
JSON.stringify(['userName', 'departmrnt', 'roleName', 'idNumber', 'gender', 'nativePlace', 'birthday', 'marital', 'politicsStatus', 'phoneNumber', 'workPlace',
'graduatedFrom', 'educationBackground', 'specialty', 'graduationDate',
'hiredate', 'regularDate', 'turnProbationPeriod', 'dimissionDate', 'employmentLife', 'probationPeriodDate', 'experienceYear',
'occupationalHistory', 'vitae'])
)
: "";
}, [])
useEffect(() => {
getMemberSearchList()//
}, [query])
function getMemberSearchList () {//
let obj = form.current.getValues()
if (form.current.getValues().entryTime?.length > 1) {
obj.hiredateStart = moment(form.current.getValues().entryTime[0]).format('YYYY-MM-DD')
obj.hiredateEnd = moment(form.current.getValues().entryTime[1]).format('YYYY-MM-DD')
}
else {
obj.hiredateStart = ''
obj.hiredateEnd = ''
}
dispatch(humanAffairs.getMemberList({ ...obj, ...query })).then((res) => {//
if (res.success) {
setArchivesList(res.payload?.data?.rows)
setLimits(res.payload?.data?.count)
}
})
}
function getMemberNativePlaceList () {
dispatch(humanAffairs.getMemberNativePlace()).then((res) => {//
if (res.success) {
setNativeList(res.payload?.data)
}
})
}
function getMemberWorkPlaceList () {
dispatch(humanAffairs.getMemberWorkPlace()).then((res) => {//
if (res.success) {
setWorkPlaceList(res.payload?.data)
}
})
}
const columns = [
{
title: (
<div>
<img src="/assets/images/hrImg/V.png" alt="" style={{ width: 14, height: 14 }} /> 员工编号
</div>
),
width: 120,
dataIndex: "userCode",
key: "userCode",
render: (_, r, index) => {
return (r.userCode ? r.userCode : '-');
},
},
];
//
function attribute () {
const arr = localStorage.getItem(EMPLOYEEINFORMATION)
? JSON.parse(localStorage.getItem(EMPLOYEEINFORMATION))
: [];
const column = [
{
title: (
<div>
<img src="/assets/images/hrImg/V.png" alt="" style={{ width: 14, height: 14 }} /> 姓名
</div>
),
width: 100,
dataIndex: "userName",
key: "userName",
render: (_, r, index) => {
return (r.userName ? r.userName : '-');
},
}, {
title: (
<div>
<img src="/assets/images/hrImg/V.png" alt="" style={{ width: 14, height: 14 }} /> 所属部门
</div>
),
width: 200,
dataIndex: "departmrnt",
key: "departmrnt",
render: (_, r, index) => {
return (
<div>
{
r.departmrnt.map((ite, idx) => {
let departmentsArr = []
for (let i = 0; i < r.departmrnt.length; i++) {
departmentsArr.push(r.departmrnt[i].name)
}
return (
<div key={idx} style={{ display: 'flex' }}>
{idx == 0 ?
(<div style={{ padding: '0px 4px 1px 4px ', color: '#FFFFFF', fontSize: 12, background: 'rgba(0,90,189,0.8)', borderRadius: 2, marginRight: 4 }}>
{ite.name}
</div>) : ('')
}
{
r.departmrnt.length > 1 && idx == 1 ? (
<Tooltip content={departmentsArr.join(',')} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ padding: '0px 4px 1px 4px ', color: '#FFFFFF', fontSize: 12, background: 'rgba(0,90,189,0.8)', borderRadius: 2, marginRight: 4, cursor: "pointer", }}>
...
</div>
</Tooltip>
) : ('')
}
</div>
)
})
}
</div>
)
},
}, {
title: (
<div>
<img src="/assets/images/hrImg/V.png" alt="" style={{ width: 14, height: 14 }} /> 职位
</div>
),
width: 150,
dataIndex: "roleName",
key: "roleName",
render: (_, r, index) => {
return (r.roleName ? r.roleName : '-');
},
}, {
title: '证件号',
width: 180,
dataIndex: "idNumber",
key: "idNumber",
render: (_, r, index) => {
return (r.idNumber ? r.idNumber : '-');
},
}, {
title: '性别',
width: 60,
dataIndex: "gender",
key: "gender",
render: (_, r, index) => {
return (r.gender ? r.gender : '-');
},
}, {
title: '籍贯',
width: 150,
dataIndex: "nativePlace",
key: "nativePlace",
render: (_, r, index) => {
return (r.nativePlace ? r.nativePlace : '-');
},
}, {
title: '出生日期',
width: 120,
dataIndex: "birthday",
key: "birthday",
render: (_, r, index) => {
return (r.birthday ? r.birthday : '-');
},
}, {
title: '婚育状态',
width: 100,
dataIndex: "marital",
key: "marital",
render: (_, r, index) => {
return (r.marital ? r.marital : '-');
},
}, {
title: '政治面貌',
width: 100,
dataIndex: "politicsStatus",
key: "politicsStatus",
render: (_, r, index) => {
return (r.politicsStatus ? r.politicsStatus : '-');
},
}, {
title: '联系方式',
width: 120,
dataIndex: "phoneNumber",
key: "phoneNumber",
render: (_, r, index) => {
return (r.phoneNumber ? r.phoneNumber : '-');
},
}, {
title: '工作地点',
width: 150,
dataIndex: "workPlace",
key: "workPlace",
render: (_, r, index) => {
return (r.workPlace ? r.workPlace : '-');
},
}, {
title: '毕业院校',
width: 200,
dataIndex: "graduatedFrom",
key: "graduatedFrom",
render: (_, r, index) => {
return (r.graduatedFrom ? r.graduatedFrom : '-');
},
}, {
title: '学历',
width: 60,
dataIndex: "educationBackground",
key: "educationBackground",
render: (_, r, index) => {
return (r.educationBackground ? r.educationBackground : '-');
},
}, {
title: '专业',
width: 200,
dataIndex: "specialty",
key: "specialty",
render: (_, r, index) => {
return (r.specialty ? r.specialty : '-');
},
}, {
title: '毕业时间',
width: 120,
dataIndex: "graduationDate",
key: "graduationDate",
render: (_, r, index) => {
return (r.graduationDate ? r.graduationDate : '-');
},
}, {
title: '入职时间',
width: 120,
dataIndex: "hiredate",
key: "hiredate",
render: (_, r, index) => {
return (r.hiredate ? r.hiredate : '-');
},
}, {
title: '转正时间',
width: 120,
dataIndex: "regularDate",
key: "regularDate",
render: (_, r, index) => {
return (r.regularDate ? r.regularDate : '-');
},
}, {
title: '转试用期时间',
width: 120,
dataIndex: "turnProbationPeriod",
key: "turnProbationPeriod",
render: (_, r, index) => {
return (r.turnProbationPeriod ? r.turnProbationPeriod : '-');
},
}, {
title: '离职日期',
width: 120,
dataIndex: "dimissionDate",
key: "dimissionDate",
render: (_, r, index) => {
return (r.dimissionDate ? r.dimissionDate : '-');
},
}, {
title: '入职年限',
width: 120,
dataIndex: "employmentLife",
key: "employmentLife",
render: (_, r, index) => {
return (r.hiredate ? <span style={{ color: '#1890FF' }}>{moment(new Date()).diff(r.hiredate, 'years') + '年'}</span> : '-')
},
}, {
title: '试用期时间',
width: 120,
dataIndex: "probationPeriodDate",
key: "probationPeriodDate",
render: (_, r, index) => {
return (r.regularDate ? moment(r.regularDate).diff(r.hiredate, 'months', true).toFixed(1) + '个月' : '-')
},
}, {
title: '工作经验',
width: 120,
dataIndex: "experienceYear",
key: "experienceYear",
render: (_, r, index) => {
return (r.experienceYear ? r.experienceYear + '年' : '-')
},
}, {
title: '历史工作经历与职务',
width: 200,
dataIndex: "occupationalHistory",
key: "occupationalHistory",
render: (_, r, index) => {
return (r.occupationalHistory ?
(
<Tooltip content={r.occupationalHistory} style={{ lineHeight: 2 }}>
<div style={{
textOverflow: 'ellipsis',
overflow: 'hidden',
whiteSpace: 'nowrap',
width: 200
}}>{r.occupationalHistory}</div>
</Tooltip>
) : '-')
},
}, {
title: '简历',
width: 200,
dataIndex: "vitae",
key: "vitae",
render: (_, r, index) => {
return (r.vitae ? <a href={`/_file-server/${r.vitae}`} style={{ color: '#005ABD' }}>下载</a> : '-')
},
},
];
for (let i = 0; i < arr.length; i++) {
let colum = column.filter((item) => {
return item.key === arr[i];
});
columns.splice(i + 2, 0, colum[0]);
}
setSetupp(columns);
}
function handleRow (record, index) {//
//
if (index % 2 === 0) {
return {
style: {
background: '#FAFCFF',
}
};
} else {
return {};
}
}
const scroll = useMemo(() => ({}), []);
return (
<>
<div style={{ padding: '0px 12px' }}>
<div style={{ display: 'flex' }}>
<div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14 }}>人事管理</div>
<div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14, margin: '0px 8px' }}>/</div>
<div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14 }}>档案中心</div>
<div style={{ color: '#033C9A', fontSize: 14, margin: '0px 8px' }}>/</div>
<div style={{ color: '#033C9A', fontSize: 14 }}>人员档案</div>
</div>
<div style={{ background: '#FFFFFF', boxShadow: '0px 0px 12px 2px rgba(220,222,224,0.2)', borderRadius: 2, padding: '20px 0px 20px 19px ', marginTop: 12 }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'baseline' }}>
<div style={{ width: 0, height: 20, borderLeft: '3px solid #0F7EFB', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div>
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#033C9A', marginLeft: 8 }}>员工信息</div>
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>EMPLOYEE INFORMATION</div>
</div>
</div>
<div style={{ marginRight: 20, marginTop: 18 }}>
<Form
labelPosition="left"
labelAlign="right"
labelWidth="80px"
onValueChange={(values, field) => {
console.log('values', values);
}}
getFormApi={(formApi) => (form.current = formApi)}
>
<div>
<div style={{ display: 'flex', alignItems: 'center' }}>
<Form.Select
pure
field="keywordTarget"
placeholder="请选择搜索类型"
style={{ width: 200 }}
showClear
>
<Form.Select.Option value='role'>职位</Form.Select.Option>
<Form.Select.Option value='dep'>部门</Form.Select.Option>
<Form.Select.Option value='number'>编号</Form.Select.Option>
<Form.Select.Option value='name'>姓名</Form.Select.Option>
</Form.Select>
<Form.Input
suffix={<IconSearch />}
field="keyword"
pure
showClear
style={{ width: 346, marginLeft: 12, marginRight: 12 }}
placeholder="请输入或选择关键词"
/>
<Form.DatePicker
label='入职时间:'
field='entryTime' type="dateRange" density="compact" showClear style={{ width: 370, color: "#F9F9F9" }} />
</div>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<Form.Select
label="婚育状态:"
field="marital"
labelPosition="left"
placeholder="全部"
style={{ width: 246, marginRight: 20, color: "#F9F9F9", }}
showClear
>
<Form.Select.Option value=''>
全部
</Form.Select.Option>
<Form.Select.Option value='已婚已育'>
已婚已育
</Form.Select.Option>
<Form.Select.Option value='已婚'>
已婚
</Form.Select.Option>
<Form.Select.Option value='未婚'>
未婚
</Form.Select.Option>
</Form.Select>
<Form.Select
label='户籍地:'
labelPosition="left"
field='native'
style={{ width: 246, marginRight: 20, color: "#F9F9F9", }}
placeholder="全部"
showClear
>
{nativeList.map((item) => {
return (
<Form.Select.Option key={item.nativePlace} value={item.nativePlace}>
{item.nativePlace}
</Form.Select.Option>
);
})}
</Form.Select>
<Form.Select
label='工作地点:'
labelPosition="left"
field='workPlace'
style={{ width: 246, marginRight: 20, color: "#F9F9F9", }}
placeholder="全部"
showClear
>
{workPlaceList.map((item) => {
return (
<Form.Select.Option key={item.workPlace} value={item.workPlace}>
{item.workPlace}
</Form.Select.Option>
);
})}
</Form.Select>
</div>
<div style={{ display: 'flex', alignItems: 'center' }}>
<img src="/assets/images/hrImg/export.png" alt="" style={{ width: 20, height: 20, cursor: "pointer", marginRight: 15 }}
onClick={() => { setDownloadUrl(`members/export?token=${user.token}&timestamp=${moment().valueOf()}`) }}
/>
{
downloadUrl ? <iframe src={`/_api/${downloadUrl}`} style={{ display: 'none' }} /> : ''
}
<img src="/assets/images/hrImg/setup.png" alt="" style={{ width: 20, height: 20, cursor: "pointer", marginRight: 15 }}
onClick={() => setSetup(true)}
/>
<Button theme='solid' type='primary' style={{ width: 80, borderRadius: 2, height: 32, background: '#DBECFF', color: '#005ABD' }}
onClick={() => {
setQuery({ limit: 10, page: 0 })
getMemberSearchList()
}}>查询</Button>
</div>
</div>
</div>
</Form>
<div style={{ border: '1px solid #C7E1FF', background: '#F4F8FF', borderRadius: 2, height: 32, width: 669, padding: '8px 0px 7px 12px', display: 'flex', alignItems: 'center', color: '#0F7EFB', fontSize: 12 }}>
<img src="/assets/images/hrImg/!.png" alt="" style={{ width: 14, height: 14, marginRight: 8 }} />
表格中带有认证标识"
<img src="/assets/images/hrImg/V.png" alt="" style={{ width: 14, height: 14 }} />
"信息的为系统基础数据来源于项企PEP钉钉等系统其他数据均为导入或自定义数据
</div>
<div style={{ marginTop: 20 }}>
<Skeleton
// loading={loading}
loading={false}
active={true}
placeholder={SkeletonScreen()}
>
<Table
columns={setupp.filter((s) => s)}
dataSource={archivesList}
bordered={false}
empty="暂无数据"
pagination={false}
onRow={handleRow}
scroll={scroll}
/>
</Skeleton>
<div
style={{
display: "flex",
justifyContent: "space-between",
padding: "20px 20px",
}}
>
<div>
</div>
<div style={{ display: 'flex', }}>
<span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}>
{limits}条信息
</span>
<Pagination
className="22"
total={limits}
showSizeChanger
currentPage={query.page + 1}
pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, page: currentPage - 1 });
page.current = currentPage - 1
}}
/>
</div>
</div>
</div>
</div>
</div>
</div>
{setup ? (
<Setup
tableType={EMPLOYEEINFORMATION}
tableList={tableList}
length={25}
close={() => {
setSetup(false);
attribute();
}}
/>
) : (
""
)}
</>
)
}
function mapStateToProps (state) {
const { auth, global, MemberSearch, webSocket } = state;
return {
// loading: members.isRequesting,
user: auth.user,
actions: global.actions,
xqMembers: MemberSearch.data,
// socket: webSocket.socket
};
}
export default connect(mapStateToProps)(leaveStatistics);

6
web/client/src/sections/humanAffairs/containers/personnelFiles.jsx

@ -17,7 +17,7 @@ const Rest = (props) => {
const [personnelModal, setPersonnelModal] = useState(false);//
const [exportModalVs, setExportModalVs] = useState(false);
const [keyword, setKeyword] = useState('');//
const [keywordTarget, setKeywordTarget] = useState('');//
const [keywordTarget, setKeywordTarget] = useState('role');//
const [downloadUrl, setDownloadUrl] = useState('')
const optionsList = {
dimission: '离职',
@ -86,7 +86,7 @@ const Rest = (props) => {
</div>
<div style={{ display: 'flex', marginTop: 16, marginBottom: 17 }}>
<div>
<Select value={keywordTarget} onChange={setKeywordTarget} placeholder='请选择搜索类型' style={{ width: 200 }} showClear>
<Select value={keywordTarget} onChange={setKeywordTarget} placeholder='请选择搜索类型' style={{ width: 200 }} >
<Select.Option value='role'>职位</Select.Option>
<Select.Option value='dep'>部门</Select.Option>
<Select.Option value='number'>编号</Select.Option>
@ -136,7 +136,7 @@ const Rest = (props) => {
</RadioGroup>
</div>
<div style={{ display: 'flex', marginLeft: 30, alignItems: 'center', cursor: 'pointer' }} onClick={() => {
setDownloadUrl(`members/export?token=${user.token}&timestamp=${moment().valueOf()}`)
setDownloadUrl(`members/export?token=${user.token}&state=${typeChoose}&keywordTarget=${keywordTarget}&keyword=${keyword}`)
}}>
<div style={{ width: 20, height: 20 }}>

4
web/client/src/sections/humanAffairs/containers/personnelFilesDetail.jsx

@ -68,7 +68,7 @@ const Rest = (props) => {
return moment(text).format('YYYY-MM-DD HH:mm');
},
}, {
title: "总计时间",
title: "核定时间",
dataIndex: "duration",
key: 'duration',
render: (text, r, index) => {
@ -120,7 +120,7 @@ const Rest = (props) => {
return moment(text).format('YYYY-MM-DD HH:mm');
},
}, {
title: "总计时间",
title: "核定时间",
dataIndex: "duration",
key: 'duration',
render: (text, r, index) => {

8
web/client/src/sections/humanAffairs/nav-item.jsx

@ -25,6 +25,14 @@ export function getNavItem (user, dispatch) {
items: [{
itemKey: 'employeeInformation', to: '/humanAffairs/employeeRelations/employeeInformation', text: '员工信息'
}]
},{
itemKey: 'leaveManagement',
text: '假勤管理',
icon: <iconpark-icon style={{ width: 20, height: 20 }} name="iconcbjiaqinguanli"></iconpark-icon>,
to: '/humanAffairs/leaveManagement/leaveStatistics',
items: [{
itemKey: 'leaveStatistics', to: '/humanAffairs/leaveManagement/leaveStatistics', text: '请假统计'
}]
},
]
},

12
web/client/src/sections/humanAffairs/routes.js

@ -1,4 +1,4 @@
import { PersonnelFiles, PersonnelFilesDetail, EmployeeInformation } from './containers';
import { PersonnelFiles, PersonnelFilesDetail, EmployeeInformation,LeaveStatistics } from './containers';
export default [{
type: 'inner',
@ -27,6 +27,16 @@ export default [{
component: EmployeeInformation,
breadcrumb: '员工信息',
}]
},{
path: '/leaveManagement',
key: 'leaveManagement',
breadcrumb: '假勤管理',
childRoutes: [{
path: '/leaveStatistics',
key: 'leaveStatistics',
component: LeaveStatistics,
breadcrumb: '请假统计',
}]
}]
}
}, {

Loading…
Cancel
Save