人员简历
This commit is contained in:
parent
7dfc190df6
commit
9560631638
|
|
@ -10,4 +10,8 @@ export const getHasRight = () => {
|
|||
|
||||
export const getPersonnelResume = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/personnelresume/getResumeList', 'GET', params);
|
||||
}
|
||||
|
||||
export const getAdvanceSearchCondition = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/personnelresume/personnelScreening', 'GET', params);
|
||||
}
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
import {
|
||||
WeaDialog,
|
||||
WeaFormItem,
|
||||
WeaNewScroll,
|
||||
WeaSearchGroup,
|
||||
WeaMoreButton,
|
||||
WeaPopoverHrm
|
||||
} from 'ecCom'
|
||||
|
||||
import {
|
||||
Row,
|
||||
Col,
|
||||
Spin,
|
||||
Button,
|
||||
} from 'antd'
|
||||
|
||||
import {
|
||||
WeaSwitch
|
||||
} from 'comsMobx'
|
||||
|
||||
import {
|
||||
i18n
|
||||
} from '../public/i18n';
|
||||
import AttachToNumberField from './NewNumberField';
|
||||
import "../style/common.less";
|
||||
|
||||
export default class SearchPanelDialog extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
width: 700,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
getForm() {
|
||||
const {
|
||||
condition,
|
||||
form,
|
||||
isFormInit,
|
||||
} = this.props;
|
||||
|
||||
let arr = [];
|
||||
isFormInit && condition.map(c => {
|
||||
c.items.map((field, index) => {
|
||||
arr.push(<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@4cc308@${index}`} span={(index % 2 == 0) ? 10 : 11} offset={1}>
|
||||
<div style={{ marginTop: 20 }}>
|
||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@u6ex85@${index}`}
|
||||
label={`${field.label}`}
|
||||
labelCol={{ span: `${field.labelcol}` }}
|
||||
wrapperCol={{ span: `${field.fieldcol}` }}>
|
||||
{<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@p7d3td@${index}`} fieldConfig={field} form={form} formParams={form.getFormParams()} />}
|
||||
</WeaFormItem>
|
||||
</div>
|
||||
</Col>)
|
||||
})
|
||||
})
|
||||
return <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@ppeb6z`}>{arr}</Row>
|
||||
}
|
||||
|
||||
getSearchGroupForm() {
|
||||
const {
|
||||
condition,
|
||||
form,
|
||||
isFormInit,
|
||||
} = this.props;
|
||||
|
||||
let arr = [];
|
||||
isFormInit && condition.map((c, i) => {
|
||||
let _arr = [];
|
||||
c.items.map((field, index) => {
|
||||
_arrarr.push(<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@4cc308@${index}`} span={(index % 2 == 0) ? 10 : 11} offset={1}>
|
||||
<div style={{ marginTop: 20 }}>
|
||||
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@u6ex85@${index}`}
|
||||
label={`${field.label}`}
|
||||
labelCol={{ span: `${field.labelcol}` }}
|
||||
wrapperCol={{ span: `${field.fieldcol}` }}>
|
||||
{<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@p7d3td@${index}`} fieldConfig={field} form={form} formParams={form.getFormParams()} />}
|
||||
</WeaFormItem>
|
||||
</div>
|
||||
</Col>)
|
||||
})
|
||||
arr.push(<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@qaih5l@${i}`} needTigger={true} title={c.title} showGroup={c.defaultshow} items={_arr} col={1} />)
|
||||
})
|
||||
|
||||
return <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@ppeb6z`}>{arr}</Row>;
|
||||
}
|
||||
|
||||
|
||||
|
||||
render() {
|
||||
const {
|
||||
title,
|
||||
visible,
|
||||
search,
|
||||
onCancel,
|
||||
loading,
|
||||
height,
|
||||
conditionLen,
|
||||
form
|
||||
} = this.props, {
|
||||
width,
|
||||
} = this.state;
|
||||
|
||||
const buttons = [
|
||||
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@jd6baw`} type="primary" onClick={() => search()} disabled={loading}>{i18n.button.search()}</Button>),
|
||||
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@jd6baw`} onClick={() => form.reset()} disabled={loading}>{i18n.button.reset()}</Button>),
|
||||
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@jd6baw`} onClick={() => onCancel()} disabled={loading}>{i18n.button.cancel()}</Button>)
|
||||
];
|
||||
|
||||
return (
|
||||
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@1txk5f`}
|
||||
className="new-edit-wrapper"
|
||||
title={title}
|
||||
icon="icon-coms-hrm"
|
||||
iconBgcolor="#217346"
|
||||
visible={visible}
|
||||
closable={true}
|
||||
hasScroll={true}
|
||||
onCancel={() => onCancel()}
|
||||
buttons={buttons}
|
||||
style={{ width: width, height: height }}
|
||||
initLoadCss
|
||||
>
|
||||
{
|
||||
loading ? <div className='hrm-loading-center-small'>
|
||||
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@4ygl4a`} spinning={loading}></Spin>
|
||||
</div>
|
||||
: conditionLen > 1 ? this.getSearchGroupForm() : this.getForm()}
|
||||
|
||||
|
||||
</WeaDialog>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -31,6 +31,8 @@ import {
|
|||
} from '../../public/i18n';
|
||||
|
||||
import '../../style/resume.less';
|
||||
import SearchPanelDialog from '../SearchPanelDialog';
|
||||
|
||||
import { renderNoright } from '../../util';
|
||||
import { exportWord } from '../mhtmlToWord'
|
||||
|
||||
|
|
@ -74,6 +76,22 @@ export default class PersonnelResume extends React.Component {
|
|||
personnelResume.getHasRight();
|
||||
}
|
||||
|
||||
onSelect = (e) => {
|
||||
const {
|
||||
personnelResume
|
||||
} = this.props,{
|
||||
form,
|
||||
show
|
||||
} = personnelResume;
|
||||
|
||||
personnelResume.show = ! show;
|
||||
personnelResume.params = {
|
||||
...form.getFormParams()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//左侧树
|
||||
getTree = () => {
|
||||
const {
|
||||
|
|
@ -81,7 +99,9 @@ export default class PersonnelResume extends React.Component {
|
|||
} = this.props;
|
||||
const {
|
||||
companysId,
|
||||
} = personnelResume
|
||||
params
|
||||
} = personnelResume;
|
||||
|
||||
|
||||
let tree = (
|
||||
<WeaOrgTree ecId={`${this && this.props && this.props.ecId || ''}_WeaOrgTree@dhi1ro`}
|
||||
|
|
@ -90,6 +110,8 @@ export default class PersonnelResume extends React.Component {
|
|||
loading
|
||||
needSearch
|
||||
noCache={true}
|
||||
params={params}
|
||||
onSelect={this.onSelect}
|
||||
needDropMenu={false}
|
||||
isLoadSubDepartment={true}
|
||||
topPrefix={'hrmSearch'}
|
||||
|
|
@ -121,7 +143,6 @@ export default class PersonnelResume extends React.Component {
|
|||
const type = event.node.props.type || '0';
|
||||
const id = event.node.props.id || '';
|
||||
personnelResume.nodeType = type;
|
||||
debugger
|
||||
if (type == '4') {
|
||||
personnelResume.resourceId = id;
|
||||
setTimeout(function() {
|
||||
|
|
@ -216,9 +237,12 @@ export default class PersonnelResume extends React.Component {
|
|||
const {
|
||||
personnelResume
|
||||
} = this.props,{
|
||||
show
|
||||
show,form
|
||||
} = personnelResume;
|
||||
form.reset();
|
||||
personnelResume.show = ! show;
|
||||
personnelResume.getSearchCondition();
|
||||
|
||||
}
|
||||
|
||||
//导出当前
|
||||
|
|
@ -258,7 +282,7 @@ export default class PersonnelResume extends React.Component {
|
|||
personnelResume
|
||||
} = this.props;
|
||||
const {
|
||||
hasRight, defaultShowLeft, resumeList,percent,show
|
||||
hasRight, defaultShowLeft, resumeList,percent,show,form,condition,dialogLoading
|
||||
} = personnelResume;
|
||||
|
||||
if (hasRight === false) {
|
||||
|
|
@ -283,11 +307,6 @@ export default class PersonnelResume extends React.Component {
|
|||
onDropMenuClick={(e) => this.handleMenuClick(e)}
|
||||
>
|
||||
<WeaLeftRightLayout ecId={`${this && this.props && this.props.ecId || ''}_WeaLeftRightLayout@7muhhb`} isNew={true} showLeft={defaultShowLeft} leftCom={this.getTree()}>
|
||||
{
|
||||
show && <div className='search-group'>
|
||||
|
||||
</div>
|
||||
}
|
||||
{
|
||||
!this.isEmptyObject(resumeList) ? <div id='personnel-resume'>
|
||||
<div className='content'>
|
||||
|
|
@ -381,14 +400,24 @@ export default class PersonnelResume extends React.Component {
|
|||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
: <Progress percent={percent} strokeWidth={10} />}
|
||||
</WeaLeftRightLayout>
|
||||
</WeaTop>
|
||||
</WeaRightMenu>
|
||||
<SearchPanelDialog ecId={`${this && this.props && this.props.ecId || ''}_SearchPanelDialog@q4rrwm`}
|
||||
title={"人员筛选"}
|
||||
visible={show}
|
||||
condition={toJS(condition)}
|
||||
form={form}
|
||||
isFormInit={form.isFormInit}
|
||||
loading={dialogLoading}
|
||||
height={200}
|
||||
conditionLen={1}
|
||||
search={() => this.onSelect()}
|
||||
onCancel={() => personnelResume.show = ! show}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@ export class PersonnelResumeStore {
|
|||
@observable percent = 0;
|
||||
@observable visible = false;
|
||||
@observable show = false;
|
||||
@observable params = {};
|
||||
@observable condition = [];
|
||||
@observable dialogLoading = true;
|
||||
// @observable resumeList = {
|
||||
// lastName: '徐凤年',
|
||||
// sex: '男',
|
||||
|
|
@ -287,6 +290,26 @@ export class PersonnelResumeStore {
|
|||
}
|
||||
}
|
||||
|
||||
@action("人员筛选表单") getSearchCondition() {
|
||||
this.dialogLoading = true;
|
||||
Api.getAdvanceSearchCondition().then(res => {
|
||||
if (res.code === 200) {
|
||||
this.dialogLoading = false;
|
||||
res.data.conditions && this.setCondition(res.data.conditions);
|
||||
res.data.conditions && this.form.initFormFields(res.data.conditions);
|
||||
} else {
|
||||
message.warning(res.msg);
|
||||
}
|
||||
}, error => {
|
||||
message.warning(error.msg);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
setCondition(condition) {
|
||||
this.condition = condition;
|
||||
}
|
||||
|
||||
setTopMenu(topMenu) {
|
||||
this.topMenu = topMenu;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ export class RankSchemeStore {
|
|||
}
|
||||
|
||||
getSearchCondition() {
|
||||
this.setScLoadingStatus(false);
|
||||
this.setScLoadingStatus(true);
|
||||
Api.getAdvanceSearchCondition().then(res => {
|
||||
if (res.code === 200) {
|
||||
this.setScLoadingStatus(false);
|
||||
|
|
|
|||
Loading…
Reference in New Issue