From 95606316385629d3553c32301a55ba0cfb13c775 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Wed, 4 Jan 2023 10:27:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E7=AE=80=E5=8E=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/organization/apis/personnelResume.js | 4 + .../components/SearchPanelDialog.js | 135 ++++++++++++++++++ .../components/resource/PersonnelResume.js | 51 +++++-- .../organization/stores/personnelResume.js | 23 +++ pc4mobx/organization/stores/rankscheme.js | 2 +- 5 files changed, 203 insertions(+), 12 deletions(-) create mode 100644 pc4mobx/organization/components/SearchPanelDialog.js diff --git a/pc4mobx/organization/apis/personnelResume.js b/pc4mobx/organization/apis/personnelResume.js index 24e4743..7b3d0b4 100644 --- a/pc4mobx/organization/apis/personnelResume.js +++ b/pc4mobx/organization/apis/personnelResume.js @@ -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); } \ No newline at end of file diff --git a/pc4mobx/organization/components/SearchPanelDialog.js b/pc4mobx/organization/components/SearchPanelDialog.js new file mode 100644 index 0000000..9d3f9fe --- /dev/null +++ b/pc4mobx/organization/components/SearchPanelDialog.js @@ -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( +
+ + {} + +
+ ) + }) + }) + return {arr} + } + + getSearchGroupForm() { + const { + condition, + form, + isFormInit, + } = this.props; + + let arr = []; + isFormInit && condition.map((c, i) => { + let _arr = []; + c.items.map((field, index) => { + _arrarr.push( +
+ + {} + +
+ ) + }) + arr.push() + }) + + return {arr}; + } + + + + render() { + const { + title, + visible, + search, + onCancel, + loading, + height, + conditionLen, + form + } = this.props, { + width, + } = this.state; + + const buttons = [ + (), + (), + () + ]; + + return ( + onCancel()} + buttons={buttons} + style={{ width: width, height: height }} + initLoadCss + > + { + loading ?
+ +
+ : conditionLen > 1 ? this.getSearchGroupForm() : this.getForm()} + + +
+ ) + } +} diff --git a/pc4mobx/organization/components/resource/PersonnelResume.js b/pc4mobx/organization/components/resource/PersonnelResume.js index 829b263..1a46fb8 100644 --- a/pc4mobx/organization/components/resource/PersonnelResume.js +++ b/pc4mobx/organization/components/resource/PersonnelResume.js @@ -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 = ( this.handleMenuClick(e)} > - { - show &&
- -
- } { !this.isEmptyObject(resumeList) ?
@@ -381,14 +400,24 @@ export default class PersonnelResume extends React.Component { -
-
: }
+ this.onSelect()} + onCancel={() => personnelResume.show = ! show} + /> ) } diff --git a/pc4mobx/organization/stores/personnelResume.js b/pc4mobx/organization/stores/personnelResume.js index 4f6e6c5..749d111 100644 --- a/pc4mobx/organization/stores/personnelResume.js +++ b/pc4mobx/organization/stores/personnelResume.js @@ -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; } diff --git a/pc4mobx/organization/stores/rankscheme.js b/pc4mobx/organization/stores/rankscheme.js index 0b50179..ecd5cc0 100644 --- a/pc4mobx/organization/stores/rankscheme.js +++ b/pc4mobx/organization/stores/rankscheme.js @@ -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);