weaver_trunk_cli/pc4mobx/hrm/components/newOutside/NewOutSide.js

43 lines
1.3 KiB
JavaScript

import React, { Component } from 'react'
import {observer,inject} from 'mobx-react'
import Top from './Top'
import '../../style/outside.less';
import {WeaRightMenu} from 'ecCom'
@inject('newOutSide')
@observer
export default class NewOutSide extends Component {
componentDidMount () {
const {newOutSide} = this.props;
const {getData,init} = newOutSide;
init();
getData();
}
componentWillReceiveProps(nextProps) {
const {newOutSide} = this.props;
const {getData,init} = newOutSide;
if (this.props.location.key !== nextProps.location.key) {
const {
newOutSide
} = this.props;
init();
getData();
}
}
render() {
const {newOutSide} = this.props;
const {loading,rightMenu,hrmId} = newOutSide
return (
<div className="wea-hrm-checking wea-hrm-outside">
<div style={{ height: '100%', border: '1px solid #eaeaea' }} >
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@xwyxca`} datas={rightMenu}>
<Top ecId={`${this && this.props && this.props.ecId || ''}_Top@qq7gfz`} newOutSide = {newOutSide}/>
</WeaRightMenu>
</div>
</div>
)
}
}