人员简历
This commit is contained in:
parent
54305211d4
commit
80b9c2f288
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
import {
|
||||
WeaTools
|
||||
} from 'ecCom'
|
||||
|
||||
export const getHasRight = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/personnelresume/hasRight', 'GET', params);
|
||||
}
|
||||
|
|
@ -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 = (
|
||||
<WeaOrgTree ecId={`${this && this.props && this.props.ecId || ''}_WeaOrgTree@dhi1ro`}
|
||||
ref='WeaOrgTree'
|
||||
dataUrl={"/api/bs/hrmorganization/personnelresume/getSearchTree"}
|
||||
loading
|
||||
needSearch
|
||||
noCache={true}
|
||||
needDropMenu={false}
|
||||
isLoadSubDepartment={true}
|
||||
topPrefix={'hrmSearch'}
|
||||
companysId={companysId}
|
||||
inputLeftDom={`<b>${i18n.label.organization()}</b>`}
|
||||
treeNodeClick={this.treeNodeClick}
|
||||
expandAllChildrenOnSearch={true}
|
||||
renderNode={item => this.renderNode(item)}
|
||||
/>
|
||||
)
|
||||
return tree;
|
||||
}
|
||||
|
||||
renderNode(item) {
|
||||
return <div className='text-elli' title={item.name}>
|
||||
<i className={item.icon} style={{ marginRight: '5px' }}></i>
|
||||
{item.name}
|
||||
{item.canceled && <span style={{ color: 'red' }}>({i18n.label.forbidden()})</span>}
|
||||
</div>
|
||||
}
|
||||
|
||||
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(<Select showSearch
|
||||
style={{ width: 115 }}
|
||||
placeholder="请选择模板"
|
||||
defaultValue="人员简历模板"
|
||||
optionFilterProp="children"
|
||||
notFoundContent="无法找到"
|
||||
size="large"
|
||||
onChange={this.handleChange()}
|
||||
>
|
||||
<Option value="1">人员简历模板</Option>
|
||||
<Option value="2">人员晋升模板</Option>
|
||||
</Select>)
|
||||
|
||||
topMenu.map((item, i) => {
|
||||
btns.push(<Button type='primary' onClick={() => this.handleClick(item)}>{item.menuName}</Button>);
|
||||
});
|
||||
|
||||
|
||||
|
||||
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: <i className={`${item.menuIcon}`} />,
|
||||
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 && <div ref='page' style={{ height: '100%' }}>
|
||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@k6oc4u`}
|
||||
datas={this.getDropMenuDatas()}
|
||||
onClick={key => this.handleMenuClick(key)}
|
||||
>
|
||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@bj98s7`}
|
||||
title={i18n.label.personnelResume()}
|
||||
icon={<i className='icon-coms-hrm' />}
|
||||
iconBgcolor='#217346'
|
||||
loading={true}
|
||||
buttons={this.getTopMenuBtns()}
|
||||
showDropIcon={true}
|
||||
dropMenuDatas={this.getDropMenuDatas()}
|
||||
onDropMenuClick={(e) => this.handleMenuClick(e)}
|
||||
>
|
||||
<WeaLeftRightLayout ecId={`${this && this.props && this.props.ecId || ''}_WeaLeftRightLayout@7muhhb`} isNew={true} showLeft={defaultShowLeft} leftCom={this.getTree()}>
|
||||
<div id='personnel-resume'>
|
||||
<div className='content'>
|
||||
<p className='title'>人员简历信息</p>
|
||||
<table border="1" align="center" width="750" cellspacing='0' className='resume-table'>
|
||||
<tr align="center" height='50'>
|
||||
<td colspan="7">一、基本信息</td>
|
||||
</tr>
|
||||
<tr align="center" height='50'>
|
||||
<td width="100" >姓名</td>
|
||||
<td width="100">{resumeList.lastName}</td>
|
||||
<td width="100">性别</td>
|
||||
<td width="100">{resumeList.sex}</td>
|
||||
<td width="100">出生年月</td>
|
||||
<td width="100">{resumeList.birthday}</td>
|
||||
<td rowspan="3"><img style={{ "width": "100px", "height": "120px" }} src={resumeList.image} /></td>
|
||||
</tr>
|
||||
<tr align="center" height='50'>
|
||||
<td width="100" >籍贯</td>
|
||||
<td width="100">{resumeList.native}</td>
|
||||
<td width="100">政治面貌</td>
|
||||
<td width="100">{resumeList.politics}</td>
|
||||
<td width="100">部门</td>
|
||||
<td width="100">{resumeList.department}</td>
|
||||
</tr>
|
||||
<tr align="center" height='50'>
|
||||
<td width="100">婚姻状况</td>
|
||||
<td width="100">{resumeList.marriage}</td>
|
||||
<td width="100">岗位</td>
|
||||
<td width="100">{resumeList.jobtitle}</td>
|
||||
<td width="100">入职时间</td>
|
||||
<td width="100">{resumeList.companystartdate}</td>
|
||||
</tr>
|
||||
<tr align="center" height='50'>
|
||||
<td width="100">参加工作时间</td>
|
||||
<td width="100" colspan="2">{resumeList.workstartdate}</td>
|
||||
<td width="100" colspan="2">身份证号</td>
|
||||
<td width="100" colspan="2">{resumeList.idCard}</td>
|
||||
</tr>
|
||||
<tr align="center" height='50'>
|
||||
<td width="100" rowspan="2">家庭地址</td>
|
||||
<td width="100" rowspan="2" colspan="2">{resumeList.address}</td>
|
||||
<td width="100" colspan="2">联系电话</td>
|
||||
<td width="100" colspan="2">{resumeList.telephone}</td>
|
||||
</tr>
|
||||
<tr align="center" height='50'>
|
||||
<td width="100" colspan="2">E-mail</td>
|
||||
<td width="100" colspan="2">{resumeList.email}</td>
|
||||
</tr>
|
||||
|
||||
{
|
||||
resumeList.tables.map((item, index) => {
|
||||
return (
|
||||
<React.Fragment key={index}>
|
||||
<tr align="center" height='50'>
|
||||
<td colspan="7">{item.title}</td>
|
||||
</tr>
|
||||
<tr align="center" height='50'>
|
||||
{
|
||||
item.columns.map(column => {
|
||||
return (
|
||||
<td width="100" rowspan={column.rowspans} colspan={column.colspans}>{column.name}</td>
|
||||
)
|
||||
})
|
||||
}
|
||||
</tr>
|
||||
|
||||
{
|
||||
item.datas.map(data => {
|
||||
return (
|
||||
<tr align="center" height='50'>
|
||||
{
|
||||
data.map((row, index) => {
|
||||
return (
|
||||
<td width="100" rowspan={row.rowspans} colspan={row.colspans}>{row.value}</td>
|
||||
)
|
||||
})
|
||||
}
|
||||
</tr>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
</React.Fragment>
|
||||
)
|
||||
})
|
||||
}
|
||||
<tr align="center" height='200'>
|
||||
<td width="100">个人自述</td>
|
||||
<td width="100" colspan="6">{resumeList.selfStatement}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</WeaLeftRightLayout>
|
||||
</WeaTop>
|
||||
</WeaRightMenu>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -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 = (
|
|||
<Route key="resourceCard" path="resourceCard/:id" component={ResourceCard} />
|
||||
<Route key="managerDetach" path="managerDetach" component={ManagerDetach} />
|
||||
<Route key="columnSetting" path="columnSetting" component={ColumnSetting} />
|
||||
<Route key="personnelResume" path="personnelResume/:id" component={PersonnelResume} />
|
||||
|
||||
</Route>
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ export const i18n = {
|
|||
columnPermission:() => getLabel(386247, '栏目权限管理'),
|
||||
columnCustom:() => getLabel(386247, '栏目功能定义'),
|
||||
cardColumnSet:() => getLabel(386247, '人员卡片栏目设置'),
|
||||
personnelResume:() => getLabel(386247, '人员简历'),
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue