From 2217ed1e30afe3dddbfeb205195534f356a18b8a Mon Sep 17 00:00:00 2001 From: deartibers <947466799@qq.com> Date: Mon, 17 Oct 2022 11:34:42 +0800 Subject: [PATCH] 1 --- .../assets/images/hrImg/defaultAvatar.png | Bin 0 -> 13944 bytes .../src/sections/auth/containers/login.jsx | 3 +- .../humanAffairs/actions/personnelFiles.js | 58 ++- .../humanAffairs/components/city.json | 360 +----------------- .../humanAffairs/components/deleteModal.jsx | 117 ++++++ .../components/personnelModal.jsx | 152 ++++++-- .../humanAffairs/components/style.less | 15 + .../containers/personnelFiles.jsx | 73 ++-- .../containers/personnelFilesDetail.jsx | 67 +++- web/client/src/utils/webapi.js | 6 +- 10 files changed, 433 insertions(+), 418 deletions(-) create mode 100644 web/client/assets/images/hrImg/defaultAvatar.png create mode 100644 web/client/src/sections/humanAffairs/components/deleteModal.jsx create mode 100644 web/client/src/sections/humanAffairs/components/style.less diff --git a/web/client/assets/images/hrImg/defaultAvatar.png b/web/client/assets/images/hrImg/defaultAvatar.png new file mode 100644 index 0000000000000000000000000000000000000000..ebf478e698c2d24cbd46adcb9880ee8c7d9119f7 GIT binary patch literal 13944 zcmeIZ^;?u*)IR#mFqAYX-3*{KNJ*EJG>AwJf^-a$l0$0Dv$*K?pn? z%tN8Ot>eGH-1SrxfXWg2O#om9)Rg26e9U(P@crgRYftT#sP^5+CDo97?MwIf46gH^ zHGl2IP|Vky1zhGmedugV`CKoVJyWVldoNp=89xU^j1$_WQEcoO8y1d78Z5_3$_j$$ z?d=GY=|EHgdORg&6kZ|#=JEH+#XQAvqT~={%pi!-#f}8#2`3~C2H51lc-05LJz3?z zXliCKNErbkg)P@^DAKlXQggScMuVe;5xC^>nwa^V%{!v_^4a!mf25VUSoXqO!AaKwpU01e^QJKXi# zQ${QB;v@15J4bQyG#@Fx5(DEw#CJ(d5T$2WesQXw`{g8REleL3*3I|Py58hDOgKeH zoHbKJS+8WWBJf87KPRXuaSJYD0onk-hEdGVH3LA*!{91a`!*9l!S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an)W zKA|s7<8!h>#(AII&y8V1h%5+VNL+k0=xFuZXFYp%0MjfHUduhK{37v-HzxLHNrIJV z<06#FyT9kzr@z_3l!t#FQ}J5|xoQ)WkeHnYK7s(Uh+ps3v_?l$Aj|mCWs@kZnGhx! zAJmX+<>$2ua(on>`BO)$Pyf+p_&9FhaRM0$Gv$PB+BfWC1FjGxxQz+PloYvRYUy@H zJYz|!#FyRfBsRHu&Lm^r8v0+0uWa49u3YDzw)cerEeTcx?*d-*1|h`&Pll@GyyOghGCFi=uP*(A zk`QCMe?c`V2yIz+ySiHDLP9ZPn8e#@+dm;qN4Bk9Z}OAvqXf zCT`VBtAuLAp#I#(Ua@%Mm@6*uz9^9>gewNUFs$35CWB+Hx%{tz|2u>KU-LoKJ#LLo Xbe(45b}!~C8KCxDOQ});7V>`qa~RUG literal 0 HcmV?d00001 diff --git a/web/client/src/sections/auth/containers/login.jsx b/web/client/src/sections/auth/containers/login.jsx index 949e12e..3870091 100644 --- a/web/client/src/sections/auth/containers/login.jsx +++ b/web/client/src/sections/auth/containers/login.jsx @@ -59,13 +59,14 @@ const Login = props => { width: 388, marginTop: "18.33%" }}> -
+
FS-CRM企业信息管理系统
{ dispatch(login(values.username, values.password)).then(res => { const data = res.payload.user + localStorage.setItem('word', JSON.stringify(values.password)) dispatch(actions.layout.initWebSocket({ ioUrl: apiRoot, token: data.token, hrUserId: data.hrUserInfo.id })) }) }} diff --git a/web/client/src/sections/humanAffairs/actions/personnelFiles.js b/web/client/src/sections/humanAffairs/actions/personnelFiles.js index f835534..fea5a7d 100644 --- a/web/client/src/sections/humanAffairs/actions/personnelFiles.js +++ b/web/client/src/sections/humanAffairs/actions/personnelFiles.js @@ -23,4 +23,60 @@ export function membersBulkAdd(values) { data: values, msg: { option: '导入员工信息' }, }); -} \ No newline at end of file +} + +export function postMember (data) {//添加/编辑成员 + let msg = '' + if (data) { + msg = data.msg + } + return (dispatch) => + basicAction({ + type: "post", + dispatch: dispatch, + data, + actionType: "POST_MEMBER", + url: `${ApiTable.postMember}`, + msg: { option: msg }, //添加/编辑成员 + reducer: { name: "" }, + }); +} + +export function getMemberList(query) {//查询人员列表 + return (dispatch) => basicAction({ + type: "get", + dispatch: dispatch, + actionType: "GET_MENBERLIST", + query: query, + url: `${ApiTable.getMemberList}`, + msg: { option: "查询人员列表" }, + reducer: { name: "MemberList", params: { noClear: true } }, + }); +} +export function delMember (data) {//删除人员信息 + let msg = '' + if (data) { + msg = data.msg + } + return (dispatch) => + basicAction({ + type: "del", + query:data, + dispatch: dispatch, + actionType: "DEL_MEMBER", + url: `${ApiTable.delMember}`, + msg: { option: msg }, //删除人员信息 + reducer: {}, + }); +} +export function getMemberOvertime(query) {//查询单个人员加班统计数据 + return (dispatch) => basicAction({ + type: "get", + dispatch: dispatch, + actionType: "GET_MemberOVERTIME", + query: query, + url: `${ApiTable.getMemberOvertime}`, + msg: { option: "查询人员加班统计数据" }, + reducer: { name: "MemberOvertime", params: { noClear: true } }, + }); +} diff --git a/web/client/src/sections/humanAffairs/components/city.json b/web/client/src/sections/humanAffairs/components/city.json index 020decd..0042b5f 100644 --- a/web/client/src/sections/humanAffairs/components/city.json +++ b/web/client/src/sections/humanAffairs/components/city.json @@ -1,143 +1,11 @@ [ { "code": "11", - "name": "北京市", - "children": [ - { - "code": "110101", - "name": "东城区" - }, - { - "code": "110102", - "name": "西城区" - }, - { - "code": "110105", - "name": "朝阳区" - }, - { - "code": "110106", - "name": "丰台区" - }, - { - "code": "110107", - "name": "石景山区" - }, - { - "code": "110108", - "name": "海淀区" - }, - { - "code": "110109", - "name": "门头沟区" - }, - { - "code": "110111", - "name": "房山区" - }, - { - "code": "110112", - "name": "通州区" - }, - { - "code": "110113", - "name": "顺义区" - }, - { - "code": "110114", - "name": "昌平区" - }, - { - "code": "110115", - "name": "大兴区" - }, - { - "code": "110116", - "name": "怀柔区" - }, - { - "code": "110117", - "name": "平谷区" - }, - { - "code": "110118", - "name": "密云区" - }, - { - "code": "110119", - "name": "延庆区" - } - ] + "name": "北京市" }, { "code": "12", - "name": "天津市", - "children": [ - { - "code": "120101", - "name": "和平区" - }, - { - "code": "120102", - "name": "河东区" - }, - { - "code": "120103", - "name": "河西区" - }, - { - "code": "120104", - "name": "南开区" - }, - { - "code": "120105", - "name": "河北区" - }, - { - "code": "120106", - "name": "红桥区" - }, - { - "code": "120110", - "name": "东丽区" - }, - { - "code": "120111", - "name": "西青区" - }, - { - "code": "120112", - "name": "津南区" - }, - { - "code": "120113", - "name": "北辰区" - }, - { - "code": "120114", - "name": "武清区" - }, - { - "code": "120115", - "name": "宝坻区" - }, - { - "code": "120116", - "name": "滨海新区" - }, - { - "code": "120117", - "name": "宁河区" - }, - { - "code": "120118", - "name": "静海区" - }, - { - "code": "120119", - "name": "蓟州区" - } - ] + "name": "天津市" }, { "code": "13", @@ -457,73 +325,7 @@ }, { "code": "31", - "name": "上海市", - "children": [ - { - "code": "310101", - "name": "黄浦区" - }, - { - "code": "310104", - "name": "徐汇区" - }, - { - "code": "310105", - "name": "长宁区" - }, - { - "code": "310106", - "name": "静安区" - }, - { - "code": "310107", - "name": "普陀区" - }, - { - "code": "310109", - "name": "虹口区" - }, - { - "code": "310110", - "name": "杨浦区" - }, - { - "code": "310112", - "name": "闵行区" - }, - { - "code": "310113", - "name": "宝山区" - }, - { - "code": "310114", - "name": "嘉定区" - }, - { - "code": "310115", - "name": "浦东新区" - }, - { - "code": "310116", - "name": "金山区" - }, - { - "code": "310117", - "name": "松江区" - }, - { - "code": "310118", - "name": "青浦区" - }, - { - "code": "310120", - "name": "奉贤区" - }, - { - "code": "310151", - "name": "崇明区" - } - ] + "name": "上海市" }, { "code": "32", @@ -1315,161 +1117,7 @@ }, { "code": "50", - "name": "重庆市", - "children": [ - { - "code": "500101", - "name": "万州区" - }, - { - "code": "500102", - "name": "涪陵区" - }, - { - "code": "500103", - "name": "渝中区" - }, - { - "code": "500104", - "name": "大渡口区" - }, - { - "code": "500105", - "name": "江北区" - }, - { - "code": "500106", - "name": "沙坪坝区" - }, - { - "code": "500107", - "name": "九龙坡区" - }, - { - "code": "500108", - "name": "南岸区" - }, - { - "code": "500109", - "name": "北碚区" - }, - { - "code": "500110", - "name": "綦江区" - }, - { - "code": "500111", - "name": "大足区" - }, - { - "code": "500112", - "name": "渝北区" - }, - { - "code": "500113", - "name": "巴南区" - }, - { - "code": "500114", - "name": "黔江区" - }, - { - "code": "500115", - "name": "长寿区" - }, - { - "code": "500116", - "name": "江津区" - }, - { - "code": "500117", - "name": "合川区" - }, - { - "code": "500118", - "name": "永川区" - }, - { - "code": "500119", - "name": "南川区" - }, - { - "code": "500120", - "name": "璧山区" - }, - { - "code": "500151", - "name": "铜梁区" - }, - { - "code": "500152", - "name": "潼南区" - }, - { - "code": "500153", - "name": "荣昌区" - }, - { - "code": "500154", - "name": "开州区" - }, - { - "code": "500155", - "name": "梁平区" - }, - { - "code": "500156", - "name": "武隆区" - }, - { - "code": "500229", - "name": "城口县" - }, - { - "code": "500230", - "name": "丰都县" - }, - { - "code": "500231", - "name": "垫江县" - }, - { - "code": "500233", - "name": "忠县" - }, - { - "code": "500235", - "name": "云阳县" - }, - { - "code": "500236", - "name": "奉节县" - }, - { - "code": "500237", - "name": "巫山县" - }, - { - "code": "500238", - "name": "巫溪县" - }, - { - "code": "500240", - "name": "石柱土家族自治县" - }, - { - "code": "500241", - "name": "秀山土家族苗族自治县" - }, - { - "code": "500242", - "name": "酉阳土家族苗族自治县" - }, - { - "code": "500243", - "name": "彭水苗族土家族自治县" - } - ] + "name": "重庆市" }, { "code": "51", diff --git a/web/client/src/sections/humanAffairs/components/deleteModal.jsx b/web/client/src/sections/humanAffairs/components/deleteModal.jsx new file mode 100644 index 0000000..4d21b2f --- /dev/null +++ b/web/client/src/sections/humanAffairs/components/deleteModal.jsx @@ -0,0 +1,117 @@ +import React, { useState, useRef, useEffect } from "react"; +import { connect } from "react-redux"; +import { Modal, Form, Button, Upload, Toast } from "@douyinfe/semi-ui"; +import { IconAlertCircle } from '@douyinfe/semi-icons'; +import cityData from './city.json'; +import PerfectScrollbar from "perfect-scrollbar"; +import './style.less' +let Scrollbar; +function deleteModal (props) { + const { + close, + cancel, + visible, + dispatch, + actions, + pepUserId + } = props; + const { humanAffairs } = actions; + const form = useRef();//表单 + + const [idPhoto, setIdPhoto] = useState(); //证件照 + + const [word, setWord] = useState(); //简历 + //初始化 + useEffect(() => { + setWord(JSON.parse(localStorage.getItem('word'))) + }, []); + + useEffect(() => { + const Project = document.getElementById("myForm"); + if (Project) { + if (Project && Scrollbar) { + Scrollbar.update(); + } + Scrollbar = new PerfectScrollbar("#myForm", { + suppressScrollX: true, + }); + } + }); + function handleOk () { + //点击弹框确定 右边按钮 + form.current + .validate() + .then((values) => { + if (word == values.word) { + dispatch(humanAffairs.delMember({ pepUserId: pepUserId, msg: '删除档案' })).then((res) => {//获取项企(PEP)全部部门及其下用户 + if (res.success) { + close(); + } + }) + } + else { + Toast.error('密码错误'); + form.current.setValue('word', '') + } + + }) + } + function handleCancel () { + cancel(); + //点击弹框取消 左边按钮 + } + return ( + <> + +
+ { + console.log('values', values); + }} + getFormApi={(formApi) => (form.current = formApi)} + > +
+
+
+ +
+
+
+ +
+ + ); +} +function mapStateToProps (state) { + const { auth, global, members } = state; + return { + // loading: members.isRequesting, + user: auth.user, + actions: global.actions, + apiRoot: global.apiRoot, + // members: members.data, + }; +} + +export default connect(mapStateToProps)(deleteModal); diff --git a/web/client/src/sections/humanAffairs/components/personnelModal.jsx b/web/client/src/sections/humanAffairs/components/personnelModal.jsx index 7b3dd88..fd39986 100644 --- a/web/client/src/sections/humanAffairs/components/personnelModal.jsx +++ b/web/client/src/sections/humanAffairs/components/personnelModal.jsx @@ -4,7 +4,7 @@ import { Modal, Form, Button, Upload } from "@douyinfe/semi-ui"; import { IconAlertCircle } from '@douyinfe/semi-icons'; import cityData from './city.json'; import PerfectScrollbar from "perfect-scrollbar"; - +import './style.less' let Scrollbar; function pushModal (props) { const { @@ -16,7 +16,8 @@ function pushModal (props) { actions, adminEdit,//是否是编辑 editObj, - user + user, + apiRoot, } = props; const { humanAffairs } = actions; const form = useRef();//表单 @@ -26,16 +27,24 @@ function pushModal (props) { const [peoplePro, setPeoplePro] = useState({}); //人员信息 const [usecityData, setUsecityData] = useState(); //人员id + const [idPhoto, setIdPhoto] = useState(); //证件照 + const [idPhotoBtn, setIdPhotoBtn] = useState(true); //证件照 + + const [vitae, setVitae] = useState(); //简历 + const [vitaeBtn, setVitaeBtn] = useState(true); //简历按钮 + //初始化 useEffect(() => { let mycityData = JSON.parse(JSON.stringify(cityData)); for (let i = 0; i < mycityData.length; i++) { mycityData[i].value = mycityData[i].name mycityData[i].label = mycityData[i].name - for (let j = 0; j < mycityData[i].children.length; j++) { - mycityData[i].children[j].value = mycityData[i].children[j].name - mycityData[i].children[j].label = mycityData[i].children[j].name + if (mycityData[i].children) { + for (let j = 0; j < mycityData[i].children.length; j++) { + mycityData[i].children[j].value = mycityData[i].children[j].name + mycityData[i].children[j].label = mycityData[i].children[j].name + } } } setUsecityData(mycityData) @@ -64,24 +73,64 @@ function pushModal (props) { }); } }); - function memberSeach (id) { + function memberSeach (id) {//搜索项企用户 dispatch(humanAffairs.getMemberSearch({ keyword: id })).then((res) => {//搜索项企用户 if (res.success) { - console.log('res.payload.data', res.payload.data); setPeoplePro(res.payload.data[0]) } }) } + function uploadOnChange (fileList, currentFile, event) {//证件照 + if (fileList.currentFile.status == "success") { + setIdPhoto(fileList.currentFile.response.key) + setIdPhotoBtn(false) + } + if (fileList.fileList.length == 0) { + setIdPhotoBtn(true); + setIdPhoto(''); + } + } + function uploadPdfOnChange (fileList, currentFile, event) {//简历 + if (fileList.currentFile.status == "success") { + setVitae(fileList.currentFile.response.key) + setVitaeBtn(false) + } + if (fileList.fileList.length == 0) { + setVitaeBtn(true); + setVitae(''); + } + } function handleOk () { //点击弹框确定 右边按钮 form.current .validate() .then((values) => { + let obj = values + if (values.nativePlace) { + if (values.nativePlace.length > 1) { + obj.nativePlace = values.nativePlace.join('-') + } + else { + obj.nativePlace = values.nativePlace[0] + } + } + if (values.workPlace) { + if (values.workPlace.length > 1) { + obj.workPlace = values.workPlace.join('-') + } + else { + obj.workPlace = values.workPlace[0] + } + } if (adminEdit) { } else { - + dispatch(humanAffairs.postMember({ idPhoto: idPhoto, vitae: vitae, msg: '新增档案', ...obj })).then((res) => {//获取项企(PEP)全部部门及其下用户 + if (res.success) { + close(); + } + }) } }) } @@ -103,7 +152,7 @@ function pushModal (props) {
{/* idPhoto */} -
+
上传照片:
- 请上传照片 + { + !idPhotoBtn ? '' : () + } -
- 请上传照片,不超过10m,支持png、jpg、bmp格式。 + 请上传照片,不超过10M,支持png、jpg、bmp格式。
@@ -277,7 +328,8 @@ function pushModal (props) { label='出生年月:' placeholder="请选择出生年月" style={{ width: 184 }} - initValue={new Date()} /> + // initValue={new Date()} + />
+
+
+ + + 已婚已育 + + + 已婚 + + + 未婚 + + +
+
{/* 学历信息 */} @@ -404,7 +478,8 @@ function pushModal (props) { label='毕业时间:' placeholder="请选择毕业时间" style={{ width: 300 }} - initValue={new Date()} /> + // initValue={new Date()} + /> @@ -423,7 +498,8 @@ function pushModal (props) { label='入职时间:' placeholder="请选择入职时间" style={{ width: 288 }} - initValue={new Date()} /> + // initValue={new Date()} . + />
+ // initValue={new Date()} + />
@@ -446,7 +523,8 @@ function pushModal (props) { label='转正时间:' placeholder="请选择转正时间" style={{ width: 288 }} - initValue={new Date()} /> + // initValue={new Date()} + />
+ // initValue={new Date()} + />
@@ -481,18 +560,30 @@ function pushModal (props) { /> {/* vitae */} -
+
上传简历:
-
-
- 请上传简历.pdf -
-
- -
-
+ +
+ 请上传简历.pdf +
+
+ +
+
+ ) + } + +
+
+ 请上传简历,不超过10M,支持pdf格式。
@@ -507,7 +598,7 @@ function pushModal (props) {
- + ); } @@ -517,6 +608,7 @@ function mapStateToProps (state) { // loading: members.isRequesting, user: auth.user, actions: global.actions, + apiRoot: global.apiRoot, // members: members.data, }; } diff --git a/web/client/src/sections/humanAffairs/components/style.less b/web/client/src/sections/humanAffairs/components/style.less new file mode 100644 index 0000000..aae9a02 --- /dev/null +++ b/web/client/src/sections/humanAffairs/components/style.less @@ -0,0 +1,15 @@ +.upload{ + .semi-upload-file-card{ + width:182px; + } +} +.vitae{ + .semi-upload-file-card{ + width:288px; + height: 32px; + .semi-upload-file-card-preview{ + height: 30px; + width: 30px; + } + } +} \ No newline at end of file diff --git a/web/client/src/sections/humanAffairs/containers/personnelFiles.jsx b/web/client/src/sections/humanAffairs/containers/personnelFiles.jsx index 9c996d3..0c66ccd 100644 --- a/web/client/src/sections/humanAffairs/containers/personnelFiles.jsx +++ b/web/client/src/sections/humanAffairs/containers/personnelFiles.jsx @@ -1,10 +1,11 @@ import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; -import { Select, Input, Button, CheckboxGroup } from '@douyinfe/semi-ui'; +import { Select, Input, Button, CheckboxGroup, Tooltip } from '@douyinfe/semi-ui'; import { IconSearch } from '@douyinfe/semi-icons'; import PersonnelModal from '../components/personnelModal'; import ExportMembersModal from './import-members-modal' import '../style.less' +import moment from 'moment' const Rest = (props) => { const { dispatch, actions, history, user, loading, socket } = props @@ -12,7 +13,7 @@ const Rest = (props) => { const { humanAffairs } = actions; let [departmentValue, setDepartmentValue] = useState(''); - let [archivesList, setArchivesList] = useState(['', '', '', '', '', '', '', '', '', '']); + let [archivesList, setArchivesList] = useState([]); const [personnelModal, setPersonnelModal] = useState(false);//档案弹框 const [exportModalVs, setExportModalVs] = useState(false); const options = [ @@ -29,9 +30,11 @@ const Rest = (props) => { getMemberSearchList() }, []) - function getMemberSearchList() {//搜索项企用户 - dispatch(humanAffairs.getMemberSearch()).then((res) => {//搜索项企用户 + function getMemberSearchList () {//搜索项企用户 + dispatch(humanAffairs.getMemberList()).then((res) => {//搜索项企用户 if (res.success) { + console.log('res.success', res.payload.data); + setArchivesList(res.payload.data) // let mytableData = JSON.parse(JSON.stringify(res.payload.data.rows)); // let mytableKey = [] // for (let index = 0; index < mytableData.length; index++) { @@ -46,11 +49,11 @@ const Rest = (props) => { }) } - function typeOnChange(e) {//角色选择 + function typeOnChange (e) {//角色选择 console.log('e.target.value', e.target.value); setTypeChoose(e.target.value); } - function seachValueChange() { + function seachValueChange () { } return ( @@ -146,19 +149,40 @@ const Rest = (props) => { return (
- +
- 0012 + {item.pepUserId}
-
- 行业服务部 -
- {/*
+ { + item.departmrnt.map((ite, idx) => { + let departmentsArr = [] + for (let i = 0; i < item.departmrnt.length; i++) { + departmentsArr.push(item.departmrnt[i].name) + } + return ( +
+ {idx == 0 ? + (
+ {ite.name} +
) : ('') -
*/} + } + { + item.departmrnt.length > 1 && idx == 1 ? ( + +
+ ... +
+
+ ) : ('') + } +
+ ) + }) + }
@@ -166,27 +190,27 @@ const Rest = (props) => {
- 刘昊然 + {item.userName}
请假中
- 23岁 + {item.birthday ? moment(new Date()).diff(item.birthday, 'years') + '岁' : '暂无'}
- +
- 男 + {item.gender || '暂无'}
- 未婚 + {item.marital || '暂无'}
@@ -195,11 +219,11 @@ const Rest = (props) => {
- 人力资源部副部长 + {item.roleName || '暂无'}
- 9年经验 + {item.experienceYear ? item.experienceYear + '年经验' : '暂无'}
@@ -208,17 +232,17 @@ const Rest = (props) => {
- 入职3年 + {item.hiredate ? '入职' + moment(new Date()).diff(item.hiredate, 'years') + '年' : '暂无'}
- 本科 + {item.educationBackground || '暂无'}
@@ -242,6 +266,7 @@ const Rest = (props) => { // anxincloudArr={anxincloudArr} cancel={() => { setPersonnelModal(false); + getMemberSearchList() }} close={() => { setPersonnelModal(false); @@ -257,7 +282,7 @@ const Rest = (props) => { ) } -function mapStateToProps(state) { +function mapStateToProps (state) { const { auth, global, members, webSocket } = state; return { // loading: members.isRequesting, diff --git a/web/client/src/sections/humanAffairs/containers/personnelFilesDetail.jsx b/web/client/src/sections/humanAffairs/containers/personnelFilesDetail.jsx index eed1147..793cd98 100644 --- a/web/client/src/sections/humanAffairs/containers/personnelFilesDetail.jsx +++ b/web/client/src/sections/humanAffairs/containers/personnelFilesDetail.jsx @@ -4,17 +4,21 @@ import { Select, Input, Button, CheckboxGroup, DatePicker, Table } from '@douyin import { IconSearch } from '@douyinfe/semi-icons'; import ReactECharts from 'echarts-for-react'; import * as echarts from 'echarts'; +import DeleteModal from '../components/deleteModal'; + import '../style.less' const Rest = (props) => { - const { dispatch, actions, user, loading, socket } = props + const { dispatch, actions, user, loading, socket, history } = props const { humanAffairs } = actions; const [option, setOption] = useState({}); const [leaveoption, setLeaveOption] = useState({}); const [tableData, setTableData] = useState([{}, {}, {}, {}, {}, {}, {}]) //表格数据 const [leaveData, setLeaveData] = useState([{}, {}, {}, {}, {}, {}, {}]) //表格数据 + + const [deleteModal, setDeleteModal] = useState(false) //表格数据 const [columns, setColumns] = useState([//表格属性 { title: "实例号", @@ -119,14 +123,41 @@ const Rest = (props) => { }, }, ]) + + const [pepUserId, setPepUserId] = useState(''); const scroll = useMemo(() => ({ y: 248 }), []); useEffect(() => { getMemberSearchList() - getWorkOption() - getLeaveOption() + getWorkOption()//加班信息 + getLeaveOption()//请假信息 + setPepUserId(history?.location?.search.slice(1)) + peopleDetail() }, []) + function peopleDetail () { + dispatch(humanAffairs.getMemberList({keywordTarget:'number',keyword:history?.location?.search.slice(1)})).then((res) => {//搜索项企用户 + if (res.success) { + console.log('res.success', res.payload.data); + // setArchivesList(res.payload.data) + // let mytableData = JSON.parse(JSON.stringify(res.payload.data.rows)); + // let mytableKey = [] + // for (let index = 0; index < mytableData.length; index++) { + // mytableData[index].key = mytableData[index].id + // mytableKey.push(mytableData[index].id) + // } + // setTableKey(mytableKey) + // setTableData(mytableData) + // setLimits(res.payload.data.count) + // mylimits.current = res.payload.data.rows.length + } + }) + } function getWorkOption () {//请假折线图 + dispatch(humanAffairs.getMemberOvertime({pepUserId:history?.location?.search.slice(1),startDate:'',endDate:''})).then((res) => {//搜索项企用户 + if (res.success) { + console.log('res.success', res.payload.data); + } + }) var date = []; date.push([2017, 6, 1].join("/")); date.push([2017, 6, 2].join("/")); @@ -309,7 +340,9 @@ const Rest = (props) => {
-
+
{ + history.goBack(); + }}>
@@ -319,7 +352,9 @@ const Rest = (props) => {
编辑档案
-
+
{ setDeleteModal(true) }} + > 删除档案
@@ -734,6 +769,28 @@ const Rest = (props) => {
+ {//删除弹框 + deleteModal ? + { + setDeleteModal(false); + // getMemberSearchList() + }} + close={() => { + setDeleteModal(false); + // getUserList() + history.goBack() + }} > + : '' + } ) } diff --git a/web/client/src/utils/webapi.js b/web/client/src/utils/webapi.js index 0bc8f48..d2a55e7 100644 --- a/web/client/src/utils/webapi.js +++ b/web/client/src/utils/webapi.js @@ -18,7 +18,11 @@ export const ApiTable = { //人事管理-人员档案 getMemberSearch: 'member/search',//搜索项企用户 - addMembersBulk: 'add/members/bulk' + addMembersBulk: 'add/members/bulk', + postMember: 'member',//添加人员信息 + getMemberList: 'member/list',//查询人员列表 + delMember: 'member',//删除人员信息 + getMemberOvertime: 'member/overtime',//查询单个人员加班统计数据 }; export const RouteTable = {