Browse Source

接口修改

master
deartibers 2 years ago
parent
commit
9a3f2c6e8d
  1. 15
      web/client/src/sections/humanAffairs/actions/employeeInformation.js
  2. 3
      web/client/src/sections/humanAffairs/actions/index.js
  3. 11
      web/client/src/sections/humanAffairs/containers/employeeInformation.jsx
  4. 2
      web/client/src/sections/humanAffairs/containers/personnelFiles.jsx
  5. 12
      web/client/src/sections/humanAffairs/containers/personnelFilesDetail.jsx
  6. 1
      web/client/src/utils/webapi.js

15
web/client/src/sections/humanAffairs/actions/employeeInformation.js

@ -0,0 +1,15 @@
'use strict';
import { ApiTable, basicAction } from '$utils'
export function getMemberNativePlace(query) {//查询籍贯列表
return (dispatch) => basicAction({
type: "get",
dispatch: dispatch,
actionType: "GET_MemberNativePlace",
query: query,
url: `${ApiTable.getMemberNativePlace}`,
msg: { option: "查询籍贯列表" },
reducer: { name: "MemberNativePlace", params: { noClear: true } },
});
}

3
web/client/src/sections/humanAffairs/actions/index.js

@ -1,6 +1,9 @@
'use strict';
import * as personnelFiles from './personnelFiles'
import * as employeeInformation from './employeeInformation'
export default {
...personnelFiles,
...employeeInformation
}

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

@ -40,7 +40,7 @@ const employeeInformation = (props) => {
];
useEffect(() => {
getMemberSearchList()
getMemberNativePlaceList()
// attribute();
// localStorage.getItem(EMPLOYEEINFORMATION) == null
@ -58,7 +58,14 @@ const employeeInformation = (props) => {
}
})
}
function getMemberNativePlaceList(){
dispatch(humanAffairs.getMemberNativePlace()).then((res) => {//
if (res.success) {
// setArchivesList(res.payload?.data?.rows)
console.log('res.payload?.data?.rows',res.payload?.data);
}
})
}
function typeOnChange (e) {//
setTypeChoose(e.target.value);
}

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

@ -256,7 +256,7 @@ const Rest = (props) => {
<div style={{ marginTop: 16, marginLeft: 4 }}>
<Button theme='solid' type='primary' style={{ width: 212, borderRadius: 17, height: 28 }}
onClick={() => {
history.push(`/personnelFilesDetail?${item.pepUserId}`);
history.push(`/personnelFilesDetail?${item.userCode}-${item.pepUserId}`);
}}>详情</Button>
</div>
</div>

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

@ -129,6 +129,7 @@ const Rest = (props) => {
},
])
const [pepUserCode, setPepUserCode] = useState('');
const [pepUserId, setPepUserId] = useState('');
const [pepObj, setPepObj] = useState({});
const scroll = useMemo(() => ({ y: 248 }), []);
@ -137,7 +138,8 @@ const Rest = (props) => {
const [endDate, setEndDate] = useState('');//
useEffect(() => {
setPepUserId(history?.location?.search.slice(1))
setPepUserCode(history?.location?.search.slice(1).split('-')[0])
setPepUserId(history?.location?.search.slice(1).split('-')[1])
peopleDetail()
}, [])
useEffect(() => {
@ -145,7 +147,7 @@ const Rest = (props) => {
getLeaveOption()//
}, [startDate, endDate])
function peopleDetail () {
dispatch(humanAffairs.getMemberList({ keywordTarget: 'number', keyword: history?.location?.search.slice(1) })).then((res) => {//
dispatch(humanAffairs.getMemberList({ keywordTarget: 'number', keyword: history?.location?.search.slice(1).split('-')[0] })).then((res) => {//
if (res.success) {
setPepObj(res.payload?.data?.rows[0])
}
@ -155,7 +157,7 @@ const Rest = (props) => {
let date = [];
let showdate = []
let showdate1 = []
dispatch(humanAffairs.getMemberOvertime({ pepUserId: history?.location?.search.slice(1), startDate: startDate, endDate: endDate })).then((res) => {//
dispatch(humanAffairs.getMemberOvertime({ pepUserId: history?.location?.search.slice(1).split('-')[1], startDate: startDate, endDate: endDate })).then((res) => {//
if (res.success) {
setTableData(res.payload?.data?.data)
setTableStatistic(res.payload?.data)
@ -279,7 +281,7 @@ const Rest = (props) => {
function getLeaveOption () {//线
let date = [];
let showdate = []
dispatch(humanAffairs.getMemberVacate({ pepUserId: history?.location?.search.slice(1), startDate: startDate, endDate: endDate })).then((res) => {//
dispatch(humanAffairs.getMemberVacate({ pepUserId: history?.location?.search.slice(1).split('-')[1], startDate: startDate, endDate: endDate })).then((res) => {//
if (res.success) {
setLeaveData(res.payload?.data?.data)
let year = 0;
@ -430,7 +432,7 @@ const Rest = (props) => {
<img src="/assets/images/hrImg/back.png" alt="" style={{ width: '100%', height: '100%' }} />
</div>
<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 }}>{pepObj.userName}的个人档案</div>
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#033C9A', marginLeft: 8 }}>{pepObj?.userName}的个人档案</div>
</div>
<div style={{ display: 'flex', marginRight: 20 }}>
<div style={{ padding: '6px 20px', background: '#0F7EFB', color: '#FFFFFF', fontSize: 14, cursor: "pointer" }}

1
web/client/src/utils/webapi.js

@ -26,6 +26,7 @@ export const ApiTable = {
getMemberOvertime: 'member/overtime',//查询单个人员加班统计数据
getMemberVacate: 'member/vacate',//查询单个人员请假统计数据
getMemberExport: 'member/export',//导出员工信息
getMemberNativePlace: 'member/native_place',//查询籍贯列表
};
export const RouteTable = {

Loading…
Cancel
Save