import React from 'react'; import '../../content.less'; import LeftTab from '../leftTab.jsx'; import ProjectOrder from './orderOrder/projectOrder.jsx'; import ProjectManage from './projectManagement/projectManage.jsx'; import ProjectOrderNew from './projectManagement/projectManageNew.jsx'; import MyTask from './myTask/projectManage.jsx'; import TaskManagement from './taskManagement/projectManage.jsx'; import Business from '../projectBusiness/business'; import Module from '../../module.jsx'; const Content = React.createClass({ getInitialState() { return { loading: false, leftKey: 'myProject', }; }, handlekey(key) { this.setState({ leftKey: key, }); window.location.hash = key; }, componentWillMount(){ if ( window.location.hash ) { this.handlekey(window.location.hash.substr(1)); }; }, render() { return (
{(() => { switch (this.state.leftKey) { case 'myProject': return ; case 'projectManage': return ; case 'projectQuery': return ; case 'ProjectOrderNew': return ; case 'myTask': return ; case 'taskManagement': return ; case 'addBusiness': return ; default: return ; }; })()}
) } }); export default Content;