diff --git a/pc4mobx/organization/apis/company.js b/pc4mobx/organization/apis/company.js index 9ab3932..ccc6838 100644 --- a/pc4mobx/organization/apis/company.js +++ b/pc4mobx/organization/apis/company.js @@ -41,6 +41,7 @@ export const getAdvanceSearchCondition = (params) => { return WeaTools.callApi('/api/bs/hrmorganization/comp/getSearchCondition', 'GET', params); } + export const add = (params) => { return WeaTools.callApi('/api/bs/hrmorganization/comp/saveBaseComp', 'POST', params); } @@ -49,6 +50,10 @@ export const version = (params) => { return WeaTools.callApi('/api/bs/hrmorganization/version/subcompanyfielddefined/save', 'POST', params); } +export const selectVersions = (params) => { + return WeaTools.callApi('/api/bs/hrmorganization/version/subcompanyfielddefined/getVersion', 'GET', params); +} + export const editResource = (params) => { return WeaTools.callApi('/api/bs/hrmorganization/comp/updateComp', 'POST', params); } diff --git a/pc4mobx/organization/apis/department.js b/pc4mobx/organization/apis/department.js index c0f15eb..3a0f813 100644 --- a/pc4mobx/organization/apis/department.js +++ b/pc4mobx/organization/apis/department.js @@ -45,6 +45,10 @@ export const version = (params) => { return WeaTools.callApi('/api/bs/hrmorganization/version/departmentfielddefined/save', 'POST', params); } +export const selectVersions = (params) => { + return WeaTools.callApi('/api/bs/hrmorganization/version/departmentfielddefined/getVersion', 'GET', params); +} + export const getTransferForm = (params) => { return WeaTools.callApi('/api/bs/hrmorganization/dept/getMoveForm', 'GET', params); } diff --git a/pc4mobx/organization/apis/job.js b/pc4mobx/organization/apis/job.js index 4a5e8ef..0230814 100644 --- a/pc4mobx/organization/apis/job.js +++ b/pc4mobx/organization/apis/job.js @@ -37,6 +37,10 @@ export const getCopyForm = (params) => { return WeaTools.callApi('/api/bs/hrmorganization/job/getCopyForm', 'GET', params); } +export const refresh = (params) => { + return WeaTools.callApi('/api/bs/hrmorganization/job/refresh', 'GET', params); +} + export const add = (params) => { return fetch('/api/bs/hrmorganization/job/saveBaseForm', { method: 'POST', diff --git a/pc4mobx/organization/apis/personnelResume.js b/pc4mobx/organization/apis/personnelResume.js new file mode 100644 index 0000000..7ca85a3 --- /dev/null +++ b/pc4mobx/organization/apis/personnelResume.js @@ -0,0 +1,8 @@ + +import { + WeaTools +} from 'ecCom' + +export const getHasRight = (params) => { + return WeaTools.callApi('/api/bs/hrmorganization/personnelresume/hasRight', 'GET', params); +} \ No newline at end of file diff --git a/pc4mobx/organization/apis/resource.js b/pc4mobx/organization/apis/resource.js index f90612d..d7d1e33 100644 --- a/pc4mobx/organization/apis/resource.js +++ b/pc4mobx/organization/apis/resource.js @@ -43,8 +43,6 @@ export const version = (params) => { return WeaTools.callApi('/api/bs/hrmorganization/version/resourcefielddefined/save', 'POST', params); } - - export const exportResource = (ids) => { fetch('/api/bs/hrmorganization/common/resource/export?ids='+ids).then(res => res.blob().then(blob => { var filename=`人员档案.xlsx` diff --git a/pc4mobx/organization/apis/resourceCard.js b/pc4mobx/organization/apis/resourceCard.js index 6f49c60..d82035c 100644 --- a/pc4mobx/organization/apis/resourceCard.js +++ b/pc4mobx/organization/apis/resourceCard.js @@ -6,3 +6,8 @@ import { export const getCardData = (id) => { return WeaTools.callApi(`/api/bs/hrmorganization/personnelcard/getPersonnelCard?id=${id}`, 'GET'); } + + +export const selectVersions = (params) => { + return WeaTools.callApi('/api/bs/hrmorganization/version/resourcefielddefined/getVersion', 'GET', params); +} \ No newline at end of file diff --git a/pc4mobx/organization/components/NewAndEditDialog.js b/pc4mobx/organization/components/NewAndEditDialog.js index 73dfe84..c9e24d6 100644 --- a/pc4mobx/organization/components/NewAndEditDialog.js +++ b/pc4mobx/organization/components/NewAndEditDialog.js @@ -50,8 +50,8 @@ export default class NewAndEditDialog extends React.Component { {} {field.domkey[0] == 'subcompanycode' && field.viewAttr != '1' && } {field.domkey[0] == 'departmentcode' && field.viewAttr != '1' && } - {field.domkey[0] == 'job_no' && field.viewAttr != '1' && } - {field.domkey[0] == 'work_code' && field.viewAttr != '1' && } + {/* {field.domkey[0] == 'job_no' && field.viewAttr != '1' && } + {field.domkey[0] == 'work_code' && field.viewAttr != '1' && } */} ) }) }) @@ -103,10 +103,10 @@ export default class NewAndEditDialog extends React.Component { > - {field.domkey[0] == 'subcompanycode' && field.viewAttr != 1 && } + {field.domkey[0] == 'subcompanycode' && field.viewAttr != '1' && } {field.domkey[0] == 'departmentcode' && field.viewAttr != '1' && } - {field.domkey[0] == 'job_no' && field.viewAttr != '1' && } - {field.domkey[0] == 'work_code' && field.viewAttr != '1' && } + {/* {field.domkey[0] == 'job_no' && field.viewAttr != '1' && } + {field.domkey[0] == 'work_code' && field.viewAttr != '1' && } */} ), diff --git a/pc4mobx/organization/components/NewNumberField.js b/pc4mobx/organization/components/NewNumberField.js index 648f22f..9d6e40c 100644 --- a/pc4mobx/organization/components/NewNumberField.js +++ b/pc4mobx/organization/components/NewNumberField.js @@ -32,7 +32,7 @@ export default class AttachToNumberField extends PureComponent { subcompanycode: "SUBCOMPANY", departmentcode: "DEPARTMENT", job_no: "JOBTITLES", - work_code: "USER" + // work_code: "USER" }; } diff --git a/pc4mobx/organization/components/VersionsSlider.js b/pc4mobx/organization/components/VersionsSlider.js index a1770e8..442ddda 100644 --- a/pc4mobx/organization/components/VersionsSlider.js +++ b/pc4mobx/organization/components/VersionsSlider.js @@ -22,6 +22,14 @@ export default class VersionsSlider extends React.Component { } + isEmptyObject(obj) { + for (let key in obj) { + return false; + } + return true; + } + + render() { const { versionList, @@ -32,54 +40,54 @@ export default class VersionsSlider extends React.Component { return ( -
- - -

操作人: {versionList.operateName}

- - -

操作时间: {versionList.operateTime}

- - -
版本: + { + versionList.versions.map((item) => { + return () + }) + } -
- -
- -
- {newData.map((item, index) => { - return ( -
- {item.map((subItem) => { +
+ + +
+ {newData.map((item, index) => { return ( -
- {subItem.fieldId} - {subItem.fieldValue.length > 10 ? - {subItem.fieldValue} - : {subItem.fieldValue}} +
+ {item.map((subItem) => { + return ( +
+ {subItem.fieldId} + {subItem.fieldValue.length > 10 ? + {subItem.fieldValue} + : {subItem.fieldValue}} +
+ + ); + })}
- ); })}
- ); - })} -
-
+
) } } diff --git a/pc4mobx/organization/components/company/CompanyExtend.js b/pc4mobx/organization/components/company/CompanyExtend.js index a7968b6..d71d440 100644 --- a/pc4mobx/organization/components/company/CompanyExtend.js +++ b/pc4mobx/organization/components/company/CompanyExtend.js @@ -1,7 +1,7 @@ /** * @Author: 程亮 * @Date: 2022-05-18 14:52:39 - * @LastEditTime: 2022-12-09 17:45:16 + * @LastEditTime: 2022-12-16 17:48:54 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/company/CompanyExtend.js */ @@ -129,7 +129,7 @@ export default class CompanyExtend extends React.Component { labelCol={{ span: `${field.labelcol}` }} wrapperCol={{ span: `${field.fieldcol}` }}> - {field.domkey[0] == 'comp_no' && field.viewAttr != '1' && } + {field.domkey[0] == 'subcompanycode' && } ), colSpan: 1 }); @@ -235,7 +235,7 @@ export default class CompanyExtend extends React.Component { view = () => { const { companyExtend } = this.props; - companyExtend.open = true; + companyExtend.selectVersions(); } onClose = () => { @@ -305,7 +305,7 @@ export default class CompanyExtend extends React.Component { height={94} direction={'right'} measure={'%'} - content={ companyExtend.changeVersion(val)}/>} + content={!isEmpty(versionList) ? companyExtend.changeVersion(val)}/> :
暂无历史版本
} onClose={this.onClose} onAnimationEnd={() => console.log('onAnimationEnd')} /> diff --git a/pc4mobx/organization/components/company/company.js b/pc4mobx/organization/components/company/company.js index 9736dd3..64fd9f2 100644 --- a/pc4mobx/organization/components/company/company.js +++ b/pc4mobx/organization/components/company/company.js @@ -1,7 +1,7 @@ /** * @Author: 程亮 * @Date: 2022-05-18 16:23:32 - * @LastEditTime: 2022-12-09 11:36:44 + * @LastEditTime: 2022-12-16 17:17:45 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js */ @@ -184,7 +184,7 @@ export default class Company extends React.Component { okText: i18n.button.ok(), cancelText: i18n.button.cancel(), onOk() { - company.version(record); + company.version(record.id); }, onCancel() { return false; @@ -615,8 +615,8 @@ export default class Company extends React.Component { isFormInit={form1.isFormInit} loading={dialogLoading} isEdit={isEdit} - height={340} - conditionLen={2} + height={350} + conditionLen={1} save={() => this.handleSave()} onCancel={() => company.setNewVisible(false)} saveAndSetting = {() => this.handleSaveAndSetting()} diff --git a/pc4mobx/organization/components/department/department.js b/pc4mobx/organization/components/department/department.js index 341678b..538f594 100644 --- a/pc4mobx/organization/components/department/department.js +++ b/pc4mobx/organization/components/department/department.js @@ -1,7 +1,7 @@ /** * @Author: 程亮 * @Date: 2022-06-02 09:19:37 - * @LastEditTime: 2022-12-13 16:00:41 + * @LastEditTime: 2022-12-16 17:47:38 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js */ @@ -348,7 +348,7 @@ export default class Department extends React.Component { okText: i18n.button.ok(), cancelText: i18n.button.cancel(), onOk() { - department.version(record); + department.version(record.id); }, onCancel() { return false; @@ -708,7 +708,7 @@ export default class Department extends React.Component { loading={dialogLoading} isEdit={isEdit} height={400} - conditionLen={2} + conditionLen={1} save={() => this.handleSave()} onCancel={() => department.setNewVisible(false)} saveAndSetting={() => this.handleSaveAndSetting()} @@ -724,7 +724,7 @@ export default class Department extends React.Component { isFormInit={form1.isFormInit} loading={confirmLoading} height={100} - width={400} + width={320} isMerge={isMerge} defaultValue={"0"} save={() => this.PopconfirmSave()} diff --git a/pc4mobx/organization/components/department/departmentExtend.js b/pc4mobx/organization/components/department/departmentExtend.js index 6c20f50..bbdfe06 100644 --- a/pc4mobx/organization/components/department/departmentExtend.js +++ b/pc4mobx/organization/components/department/departmentExtend.js @@ -1,7 +1,7 @@ /** * @Author: 程亮 * @Date: 2022-06-02 09:20:03 - * @LastEditTime: 2022-12-09 17:46:00 + * @LastEditTime: 2022-12-16 16:35:02 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/department/departmentExtend.js */ @@ -43,7 +43,12 @@ export default class DepartmentExtendStore extends React.Component { view = () => { const { departmentExtend } = this.props; - departmentExtend.open = true; + departmentExtend.selectVersions(); + } + + onClose = () => { + const { departmentExtend } = this.props; + departmentExtend.open = false; } getTabChildren = () => { @@ -134,7 +139,7 @@ export default class DepartmentExtendStore extends React.Component { labelCol={{ span: `${field.labelcol}` }} wrapperCol={{ span: `${field.fieldcol}` }}> - {field.domkey[0] == 'dept_no' && field.viewAttr != '1' && } + {field.domkey[0] == 'departmentcode' && field.viewAttr != '1' && } ), colSpan: 1 }); @@ -296,7 +301,7 @@ export default class DepartmentExtendStore extends React.Component { height={94} direction={'right'} measure={'%'} - content={!isEmpty(versionList) ? departmentExtend.changeVersion(val)}/> : ''} + content={!isEmpty(versionList) ? departmentExtend.changeVersion(val)}/> :
暂无历史版本
} onClose={this.onClose} onAnimationEnd={() => console.log('onAnimationEnd')} /> diff --git a/pc4mobx/organization/components/job/Job.js b/pc4mobx/organization/components/job/Job.js index 2329e16..cc52470 100644 --- a/pc4mobx/organization/components/job/Job.js +++ b/pc4mobx/organization/components/job/Job.js @@ -1,7 +1,7 @@ /** * @Author: 程亮 * @Date: 2022-05-26 14:05:59 - * @LastEditTime: 2022-12-13 16:01:40 + * @LastEditTime: 2022-12-16 16:36:59 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/job/Job.js */ @@ -127,9 +127,18 @@ export default class Job extends React.Component { job.setNeDialogTitle(i18n.label.newPost()); job.setNewVisible(true); job.getJobForm(); - } + + refresh() { + const { + job + } = this.props; + + job.refresh(); + } + + //联查人员 select(id) { const { @@ -327,7 +336,7 @@ export default class Job extends React.Component { return _this.updateForbiddenTag(checked, record.id)} /> } }; - if (c.dataIndex == 'jobName') { + if (c.dataIndex == 'jobTitleName') { c.render = function (text, record) { return { window.open(`/spa/organization/static/index.html#/main/organization/jobExtend/${record.id}`, "_blank") diff --git a/pc4mobx/organization/components/resource/PersonnelResume.js b/pc4mobx/organization/components/resource/PersonnelResume.js new file mode 100644 index 0000000..eaa2b8d --- /dev/null +++ b/pc4mobx/organization/components/resource/PersonnelResume.js @@ -0,0 +1,346 @@ +import React from 'react' +import * as mobx from 'mobx' +import { + inject, + observer, +} from 'mobx-react' +import { + WeaTop, + WeaTab, + WeaFormItem, + WeaRightMenu, + WeaLeftRightLayout, + WeaOrgTree +} from 'ecCom' +import { + Row, + Col, + Spin, + Modal, + Button, + message, + Switch, + Menu, Dropdown, Icon, Select +} from 'antd' +import { + WeaSwitch, + WeaTableNew +} from 'comsMobx' +import { + i18n +} from '../../public/i18n'; + +import '../../style/resume.less'; +import { renderNoright } from '../../util'; + + +const toJS = mobx.toJS; +const confirm = Modal.confirm; + + +@inject('personnelResume') +@observer +export default class PersonnelResume extends React.Component { + constructor(props) { + super(props); + } + + componentWillMount() { + } + + componentDidMount() { + this.init(); + } + + componentWillReceiveProps(nextProps) { + const { + personnelResume + } = this.props; + + if (this.props.location.key !== nextProps.location.key) { + this.init(); + } + } + + init() { + const { + personnelResume + } = this.props; + let { hash } = window.location; + hash = hash.split("?")[0]; + let id = hash.match("[^/]+(?=/$|$)")[0]; + personnelResume.resourceId = id;; + personnelResume.getHasRight(); + } + + //左侧树 + getTree = () => { + const { + personnelResume + } = this.props; + const { + companysId, + } = personnelResume + + let tree = ( + ${i18n.label.organization()}`} + treeNodeClick={this.treeNodeClick} + expandAllChildrenOnSearch={true} + renderNode={item => this.renderNode(item)} + /> + ) + return tree; + } + + renderNode(item) { + return
+ + {item.name} + {item.canceled && ({i18n.label.forbidden()})} +
+ } + + treeNodeClick = (event, ids, nodeids, nodes) => { + const { + personnelResume + } = this.props; + const { + companysId + } = personnelResume; + const type = event.node.props.type || '0'; + const id = event.node.props.id || ''; + personnelResume.nodeType = type; + if (type == '4') { + personnelResume.resourceId = id; + personnelResume.getPersonnelResume(); + } + } + + getTopMenuBtns() { + const { + personnelResume + } = this.props; + const { + topMenu, + tableStore + } = personnelResume; + + let btns = []; + + btns.push() + + topMenu.map((item, i) => { + btns.push(); + }); + + + + return btns; + } + + handleClick(item) { + this[item.menuFun] && this[item.menuFun](); + } + + handleChange(value) { + + } + + // log = () => { + // window.setLogViewProp({ + // logMoudleType: 11, + // keys: new Date().getTime(), + // }); + // } + + + getDropMenuDatas() { + const { + personnelResume + } = this.props; + const { + rightMenu + } = personnelResume; + + let menus = []; + toJS(rightMenu).map((item, index) => { + let obj = { + key: item.menuFun, + icon: , + content: item.menuName, + } + if (item.menuFun == 'collection' || item.menuFun == 'help' || item.menuFun == 'pageAddress') { + obj.disabled = true; + } + menus.push(obj); + }) + return menus; + } + + handleMenuClick(key) { + this[key] && this[key](); + } + + isEmptyObject(obj) { + for (let key in obj) { + return false; + } + return true; + } + + + render() { + + const { + personnelResume + } = this.props; + const { + hasRight, defaultShowLeft, resumeList + } = personnelResume; + + if (hasRight === false) { + return renderNoright(); + } + + + return ( + hasRight &&
+ this.handleMenuClick(key)} + > + } + iconBgcolor='#217346' + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => this.handleMenuClick(e)} + > + +
+
+

人员简历信息

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + resumeList.tables.map((item, index) => { + return ( + + + + + + { + item.columns.map(column => { + return ( + + ) + }) + } + + + { + item.datas.map(data => { + return ( + + { + data.map((row, index) => { + return ( + + ) + }) + } + + ) + }) + } + + + ) + }) + } + + + + + +
一、基本信息
姓名{resumeList.lastName}性别{resumeList.sex}出生年月{resumeList.birthday}
籍贯{resumeList.native}政治面貌{resumeList.politics}部门{resumeList.department}
婚姻状况{resumeList.marriage}岗位{resumeList.jobtitle}入职时间{resumeList.companystartdate}
参加工作时间{resumeList.workstartdate}身份证号{resumeList.idCard}
家庭地址{resumeList.address}联系电话{resumeList.telephone}
E-mail{resumeList.email}
{item.title}
{column.name}
{row.value}
个人自述{resumeList.selfStatement}
+ +
+ +
+
+
+
+
+ ) + } +} \ No newline at end of file diff --git a/pc4mobx/organization/components/resource/ResourceCard.js b/pc4mobx/organization/components/resource/ResourceCard.js index 0464c11..cc538a5 100644 --- a/pc4mobx/organization/components/resource/ResourceCard.js +++ b/pc4mobx/organization/components/resource/ResourceCard.js @@ -10,7 +10,8 @@ import { WeaFormItem, WeaRightMenu, WeaAlertPage, - WeaNewScrollPagination + WeaNewScrollPagination, + WeaSlideModal } from 'ecCom' import { Row, @@ -36,6 +37,9 @@ import FormItem from './FormItem'; import IframeItem from './IframeItem'; import AnchorDetect from './AnchorDetect'; import { renderNoright } from '../../util'; // 从util文件引入公共的方法 +import VersionsSlider from '../VersionsSlider'; +import isEmpty from 'lodash/isEmpty' + const toJS = mobx.toJS; const confirm = Modal.confirm; @@ -133,6 +137,16 @@ export default class ResourceCard extends React.Component { window.open(e.item.props.url,"_blank") } + view = () => { + const { resourceCard } = this.props; + resourceCard.selectVersions(); + } + + onClose = () => { + const { resourceCard } = this.props; + resourceCard.open = false; + } + onScroll = (event) => { const { resourceCard @@ -188,7 +202,9 @@ export default class ResourceCard extends React.Component { offset, overtime, intervalTime, - data + data, + versionList, + open } = resourceCard; const menu = ( @@ -238,6 +254,7 @@ export default class ResourceCard extends React.Component {
+ { data.buttons.slice(0,3).map((item,index) => { return ( @@ -319,6 +336,15 @@ export default class ResourceCard extends React.Component {
+ resourceCard.changeVersion(val)}/> :
暂无历史版本
} + onClose={this.onClose} + onAnimationEnd={() => console.log('onAnimationEnd')} /> ) } diff --git a/pc4mobx/organization/components/resource/resource.js b/pc4mobx/organization/components/resource/resource.js index fffa35a..78be5e6 100644 --- a/pc4mobx/organization/components/resource/resource.js +++ b/pc4mobx/organization/components/resource/resource.js @@ -352,7 +352,7 @@ export default class Resource extends React.Component { okText: i18n.button.ok(), cancelText: i18n.button.cancel(), onOk() { - resource.version(record); + resource.version(record.id); }, onCancel() { return false; diff --git a/pc4mobx/organization/index.js b/pc4mobx/organization/index.js index c09a712..de71a75 100644 --- a/pc4mobx/organization/index.js +++ b/pc4mobx/organization/index.js @@ -34,6 +34,7 @@ import ResourceBasicInfo from "./components/resource/ResourceBasicInfo"; import ResourceCard from "./components/resource/ResourceCard"; import ManagerDetach from "./components/detach/ManagerDetach"; import ColumnSetting from "./components/columnSetting"; +import PersonnelResume from "./components/resource/PersonnelResume" import stores from "./stores"; import "./style/index"; @@ -100,6 +101,8 @@ const Routes = ( + + ); diff --git a/pc4mobx/organization/public/i18n.js b/pc4mobx/organization/public/i18n.js index 5dc7667..82db8c0 100644 --- a/pc4mobx/organization/public/i18n.js +++ b/pc4mobx/organization/public/i18n.js @@ -171,6 +171,7 @@ export const i18n = { columnPermission:() => getLabel(386247, '栏目权限管理'), columnCustom:() => getLabel(386247, '栏目功能定义'), cardColumnSet:() => getLabel(386247, '人员卡片栏目设置'), + personnelResume:() => getLabel(386247, '人员简历'), diff --git a/pc4mobx/organization/stores/company.js b/pc4mobx/organization/stores/company.js index 077cc2c..9796de3 100644 --- a/pc4mobx/organization/stores/company.js +++ b/pc4mobx/organization/stores/company.js @@ -265,8 +265,8 @@ export class CompanyStore { }) } - @action("另存为版本") version(record) { - Api.version(record).then(res => { + @action("另存为版本") version(id) { + Api.version({id:id}).then(res => { if (res.code === 200) { message.success(res.msg); } else { diff --git a/pc4mobx/organization/stores/companyextend.js b/pc4mobx/organization/stores/companyextend.js index ddb4d46..97614f8 100644 --- a/pc4mobx/organization/stores/companyextend.js +++ b/pc4mobx/organization/stores/companyextend.js @@ -26,10 +26,11 @@ export class CompanyExtendStore { @observable tabkey = '0'; @observable open = false; - + @observable version = '1.0'; @observable selectedRowKeys = []; @observable selectedRows = []; + @observable versionList = {}; @action onRowSelect = (keys) => { this.setSelectedRowKeys(keys); @@ -47,6 +48,23 @@ export class CompanyExtendStore { this.detailSelectedKey = '0' } + @action selectVersions = () => { + let params = { + id:this.id, + version:this.version + } + Api.selectVersions(params).then((res) => { + this.open = true; + if (res.code === 200) { + this.setVersionList(res.data); + } else { + message.warning(res.msg); + } + }, error => { + message.warning(error.msg); + }) + } + init = () => { this.detailSelectedKey = '0' this.isEditor = false; @@ -177,7 +195,8 @@ export class CompanyExtendStore { } changeVersion = data => { - debugger + this.version = data; + this.selectVersions(); } setLoading(val) { @@ -245,49 +264,53 @@ export class CompanyExtendStore { this.date = date; } - //历史版本 - @observable versionList = { - operateName: '史永成', - operateTime: '2022-12-31', - versions: [ - { value: "1.0" }, - { value: "1.1" }, - { value: "1.2" }, - { value: "1.3" } - ], - datas: [ - { - fieldId: '简称', - fieldValue: '泛微' - }, { - fieldId: '全称', - fieldValue: '泛微' - }, { - fieldId: '上级分部', - fieldValue: '泛微北京' - }, { - fieldId: '网站', - fieldValue: '1546875925@qq.com' - }, { - fieldId: '分部ID', - fieldValue: '8' - }, { - fieldId: '显示顺序', - fieldValue: '9' - }, { - fieldId: '分部编号', - fieldValue: '分部1-1' - }, { - fieldId: '限制用户数', - fieldValue: '产品运营' - }, { - fieldId: '在职离职人数', - fieldValue: '产品运营' - } - ] - - - + setVersionList(obj) { + this.versionList = obj; } + //历史版本 + // @observable versionList = { + // operateName: '史永成', + // operateTime: '2022-12-31', + // versions: [ + // { value: "1.0" }, + // { value: "1.1" }, + // { value: "1.2" }, + // { value: "1.3" } + // ], + // datas: [ + // { + // fieldId: '简称', + // fieldValue: '泛微' + // }, { + // fieldId: '全称', + // fieldValue: '泛微' + // }, { + // fieldId: '上级分部', + // fieldValue: '泛微北京' + // }, { + // fieldId: '网站', + // fieldValue: '1546875925@qq.com' + // }, { + // fieldId: '分部ID', + // fieldValue: '8' + // }, { + // fieldId: '显示顺序', + // fieldValue: '9' + // }, { + // fieldId: '分部编号', + // fieldValue: '分部1-1' + // }, { + // fieldId: '限制用户数', + // fieldValue: '产品运营' + // }, { + // fieldId: '在职离职人数', + // fieldValue: '产品运营' + // } + // ] + + + + // } + } diff --git a/pc4mobx/organization/stores/department.js b/pc4mobx/organization/stores/department.js index b3808b1..39fb412 100644 --- a/pc4mobx/organization/stores/department.js +++ b/pc4mobx/organization/stores/department.js @@ -374,8 +374,8 @@ export class DepartmentStore { }) } - @action("另存为版本") version(record) { - Api.version(record).then(res => { + @action("另存为版本") version(id) { + Api.version({id:id}).then(res => { if (res.code === 200) { message.success(res.msg); } else { diff --git a/pc4mobx/organization/stores/departmentextend.js b/pc4mobx/organization/stores/departmentextend.js index 1371ac9..ffacc2e 100644 --- a/pc4mobx/organization/stores/departmentextend.js +++ b/pc4mobx/organization/stores/departmentextend.js @@ -29,6 +29,8 @@ export class DepartmentExtendStore { @observable selectedRows = []; @observable open = false; + @observable version = '1.0'; + @observable versionList = {}; @action onRowSelect = (keys) => { this.setSelectedRowKeys(keys); @@ -39,8 +41,7 @@ export class DepartmentExtendStore { } - @action - edit = () => { + @action edit = () => { this.isEditor = true; this.getData(); this.getTabInfo(); @@ -77,6 +78,23 @@ export class DepartmentExtendStore { }) } + @action("历史版本") selectVersions = () => { + let params = { + id:this.id, + version:this.version + } + Api.selectVersions(params).then((res) => { + this.open = true; + if (res.code === 200) { + this.setVersionList(res.data); + } else { + message.warning(res.msg); + } + }, error => { + message.warning(error.msg); + }) + } + editResource = () => { let pDatas = this.form.getFormParams(); Api.editResource({ ...{ @@ -171,7 +189,8 @@ export class DepartmentExtendStore { } changeVersion = data => { - debugger + this.version = data; + this.selectVersions(); } @@ -240,50 +259,8 @@ export class DepartmentExtendStore { this.date = date; } - //历史版本 - @observable versionList = { - operateName: '史永成', - operateTime: '2022-12-31', - versions: [ - { value: "1.0" }, - { value: "1.1" }, - { value: "1.2" }, - { value: "1.3" } - ], - datas: [ - { - fieldId: '简称', - fieldValue: '泛微' - }, { - fieldId: '全称', - fieldValue: '泛微' - }, { - fieldId: '上级分部', - fieldValue: '泛微北京' - }, { - fieldId: '网站', - fieldValue: '1546875925@qq.com' - }, { - fieldId: '分部ID', - fieldValue: '8' - }, { - fieldId: '显示顺序', - fieldValue: '9' - }, { - fieldId: '分部编号', - fieldValue: '分部1-1' - }, { - fieldId: '限制用户数', - fieldValue: '产品运营' - }, { - fieldId: '在职离职人数', - fieldValue: '产品运营' - } - ] - - - + setVersionList(obj) { + this.versionList = obj; } - } diff --git a/pc4mobx/organization/stores/index.js b/pc4mobx/organization/stores/index.js index 32418fb..0fe47d4 100644 --- a/pc4mobx/organization/stores/index.js +++ b/pc4mobx/organization/stores/index.js @@ -28,6 +28,7 @@ import {ImportDialogStore} from "./importDialog"; import {ResourceCardStore} from "./resourceCard"; import {ManagerDetachStore} from "./managerDetach"; import {ColumnSetting} from './columnSetting'; +import {PersonnelResumeStore} from './personnelResume' module.exports = { @@ -61,4 +62,5 @@ module.exports = { resourceCard:new ResourceCardStore(), managerDetach: new ManagerDetachStore(), columnSetting: new ColumnSetting(), + personnelResume:new PersonnelResumeStore() }; diff --git a/pc4mobx/organization/stores/job.js b/pc4mobx/organization/stores/job.js index 3e4ab51..3900625 100644 --- a/pc4mobx/organization/stores/job.js +++ b/pc4mobx/organization/stores/job.js @@ -155,6 +155,19 @@ export class JobStore { }) } + @action("刷新") refresh() { + Api.refresh().then(res => { + if (res.code === 200) { + this.getTableInfo(); + message.success(res.msg); + } else { + message.warning(res.msg); + } + }, error => { + message.warning(error.msg); + }) + } + updateForbiddenTag(checked, id) { let params = { forbiddenTag: checked, diff --git a/pc4mobx/organization/stores/personnelResume.js b/pc4mobx/organization/stores/personnelResume.js new file mode 100644 index 0000000..e3114b3 --- /dev/null +++ b/pc4mobx/organization/stores/personnelResume.js @@ -0,0 +1,265 @@ +import { + observable, + action +} from 'mobx'; +import * as mobx from 'mobx'; +import * as Api from '../apis/personnelResume'; +import { + WeaForm +} from 'comsMobx'; +import { + WeaTableNew +} from 'comsMobx'; +import { + Modal, + message, +} from 'antd' +import { + i18n +} from '../public/i18n'; + +const toJS = mobx.toJS; +const { + TableStore +} = WeaTableNew; + + +export class PersonnelResumeStore { + + @observable topMenu = [] + @observable rightMenu = []; + @observable condition = []; + @observable form = new WeaForm(); + @observable loading = true; + @observable resourceId = ''; + @observable resumeList = { + lastName: '徐凤年', + sex: '男', + birthday: '1999-10-10', + image: '/weaver/weaver.file.FileDownload?fileid=1538', + native: '上海', + politics: '党员', + department: '财务部', + marriage: '已婚', + jobtitle: '剑道第一人', + companystartdate: '2020-12-31', + workstartdate: '2011-10-10', + idCard: '3409871298377483992', + address: '江苏省南京市雨花台区润和创智中心', + telephone: '19823045643', + email: '16378324@163.com', + selfStatement:'本人性格开朗,秦武大帝转世,世间武道的第一人', + tables: [ + { + title: '二、社会保险及住房公积金缴纳情况(单位/元)', + columns: [ + { + name: '首次参保时间', + colspans: 2, + rowspans: 1 + }, + { + name: '养老保险', + colspans: 1, + rowspans: 1 + }, + { + name: '医疗保险', + colspans: 1, + rowspans: 1 + }, + { + name: '失业保险', + colspans: 1, + rowspans: 1 + }, + { + name: '住房公积金', + colspans: 1, + rowspans: 1 + }, + { + name: '企业年金', + colspans: 1, + rowspans: 1 + }, + ], + datas: [ + [{ + value: '2022-10-02', + colspans: 2, + rowspans: 1 + }, { + value: '80', + colspans: 1, + rowspans: 1 + }, + { + value: '36', + colspans: 1, + rowspans: 1 + }, { + value: '360', + colspans: 1, + rowspans: 1 + }, { + value: '180', + colspans: 1, + rowspans: 1 + }, { + value: '20000', + colspans: 2, + rowspans: 1 + }] + ] + }, + { + title: '三、家庭成员信息(包括父母、配偶、子女)', + columns: [ + { + name: '关系', + colspans: 2, + rowspans: 1 + }, + { + name: '姓名', + colspans: 1, + rowspans: 1 + }, + { + name: '工作单位及职务', + colspans: 1, + rowspans: 1 + }, + { + name: '联系电话', + colspans: 1, + rowspans: 1 + }, + { + name: '住址', + colspans: 2, + rowspans: 1 + } + ], + datas: [ + [ + { + value: '父子', + colspans: 2, + rowspans: 1 + }, { + value: '徐晓', + colspans: 1, + rowspans: 1 + }, + { + value: '北凉王', + colspans: 1, + rowspans: 1 + }, { + value: '1589756859', + colspans: 1, + rowspans: 1 + }, { + value: '江苏省南京市北凉军营', + colspans: 2, + rowspans: 1 + } + ], + [ + { + value: '母子', + colspans: 2, + rowspans: 1 + }, { + value: '吴素', + colspans: 1, + rowspans: 1 + }, + { + value: '北凉王妃', + colspans: 1, + rowspans: 1 + }, { + value: '15897566487', + colspans: 1, + rowspans: 1 + }, { + value: '江苏省南京市北凉龙雀军团', + colspans: 2, + rowspans: 1 + } + ], + [ + { + value: '女儿', + colspans: 2, + rowspans: 1 + }, { + value: '徐念凉', + colspans: 1, + rowspans: 1 + }, + { + value: '北凉公主', + colspans: 1, + rowspans: 1 + }, { + value: '15897566587', + colspans: 1, + rowspans: 1 + }, { + value: '莽荒之地', + colspans: 2, + rowspans: 1 + } + ] + ] + + } + ] + + + } + + + @observable defaultShowLeft = true; + @observable companysId = 1 + @observable hasRight = ''; + + + + @action("获取操作按钮") getHasRight() { + Api.getHasRight().then(res => { + if (res.code === 200) { + this.setHasRight(res.data.hasRight); + res.data.rightMenu && this.setRightMenu(res.data.rightMenu); + res.data.topMenu && this.setTopMenu(res.data.topMenu); + res.data.hasRight && this.getPersonnelResume(); + } else { + message.warning(res.msg); + } + }, error => { + message.warning(error.msg); + }) + } + + @action("获取人员简历") getPersonnelResume() { + + + } + + setTopMenu(topMenu) { + this.topMenu = topMenu; + } + + setRightMenu(rightMenu) { + this.rightMenu = rightMenu; + } + + setHasRight(bool) { + this.hasRight = bool; + } + +} \ No newline at end of file diff --git a/pc4mobx/organization/stores/resource.js b/pc4mobx/organization/stores/resource.js index 0b0dc6f..9dfa973 100644 --- a/pc4mobx/organization/stores/resource.js +++ b/pc4mobx/organization/stores/resource.js @@ -167,8 +167,8 @@ const { this.tableStore.selectedRowKeys = []; } - @action("另存为版本") version(record) { - Api.version(record).then(res => { + @action("另存为版本") version(id) { + Api.version({id:id}).then(res => { if (res.code === 200) { message.success(res.msg); } else { diff --git a/pc4mobx/organization/stores/resourceCard.js b/pc4mobx/organization/stores/resourceCard.js index af71ec6..a1d8b14 100644 --- a/pc4mobx/organization/stores/resourceCard.js +++ b/pc4mobx/organization/stores/resourceCard.js @@ -17,6 +17,10 @@ export class ResourceCardStore { @observable detectElements = [] // 受监控元素,可能存在空项 @observable flag = true; // 点击Anchor菜单项,不执行监听滚动事件 + @observable open = false; + @observable version = '1.0'; + @observable versionList = {}; + @action("初始化") init = () => { //const { userid } = JSON.parse(localStorage.getItem("theme-account")); this.getCardData(); @@ -36,6 +40,23 @@ export class ResourceCardStore { }) } + @action("历史版本") selectVersions = () => { + let params = { + id:this.userid, + version:this.version + } + Api.selectVersions(params).then((res) => { + this.open = true; + if (res.code === 200) { + this.setVersionList(res.data); + } else { + message.warning(res.msg); + } + }, error => { + message.warning(error.msg); + }) + } + buildDetectElements = (data) => { !this.isEmptyObject(data) && data.anchorList.map((item, index) => { item.activity = index; @@ -51,6 +72,11 @@ export class ResourceCardStore { return true; } + changeVersion = data => { + this.version = data; + this.selectVersions(); + } + setData(value){ this.data = value; @@ -60,6 +86,10 @@ export class ResourceCardStore { setDetectElements(value) { this.detectElements = value; } + + setVersionList(obj) { + this.versionList = obj; + } /************** json数据*****************/ // @observable data = { // buttons:[ diff --git a/pc4mobx/organization/style/resume.less b/pc4mobx/organization/style/resume.less new file mode 100644 index 0000000..f7b8d15 --- /dev/null +++ b/pc4mobx/organization/style/resume.less @@ -0,0 +1,27 @@ +// 人员简历 +.code-box-demo .ant-select { + margin: 0 8px 10px 0; + } + + #components-select-demo-search-box .code-box-demo .ant-select { + margin: 0; + } + + #personnel-resume { + background-color: #dadce0; + padding: 0 60px; + .content{ + height: 100%; + background-color: #FFFFFF; + box-shadow: 2px 2px 10px #909090; + padding: 20px 40px; + .title{ + font-size: 18px; + font-weight: 900; + text-align: center; + } + .resume-table { + margin-top: 20px; + } + } + } \ No newline at end of file