import React from 'react'; import { Menu, Icon } from 'antd'; import '../leftTab.less'; const SubMenu = Menu.SubMenu; const MenuItemGroup = Menu.ItemGroup; const LeftTab = React.createClass({ getInitialState() { return { current: 'contract', subKey: 'sub1', keyList: [ { key: 'sub1', value: ['contract'] }, { key: 'sub2', value: ['comprehensive', 'payment', 'correction', 'express', 'applyFee'] }, { key: 'sub3', value: ['copyright'] }, { key: 'sub4', value: ['highTechApply', 'highTechFoster'] }, { key: 'sub5', value: ['applyManage', 'websiteManage'] } ] }; }, handleClick(e) { if (this.state.subKey !== e.keyPath[1]) { switch (e.keyPath[1]) { case 'sub1': location.href = globalConfig.context + '/admin/servicesManage/contract.html#' + e.key; break; case 'sub2': location.href = globalConfig.context + '/admin/servicesManage/patent.html#' + e.key; break; case 'sub3': location.href = globalConfig.context + '/admin/servicesManage/copyright.html#' + e.key; break; case 'sub4': location.href = globalConfig.context + '/admin/servicesManage/highTech.html#' + e.key; break; case 'sub5': location.href = globalConfig.context + '/admin/servicesManage/technology.html#' + e.key; break; } }; this.props.handlekey(e.key); this.setState({ current: e.key, }); }, componentWillMount() { const _me = this; if (window.location.hash) { let theKey = window.location.hash.substr(1); this.state.keyList.map(function (item1) { item1.value.map(function (item2) { if (theKey == item2) { _me.state.subKey = item1.key }; }); }); this.state.current = theKey; }; }, render() { return ( 合同申请管理}> 合同申请管理 专利申请管理}> 专利综合管理 待缴费专利管理 补正审查通知管理 专利纸件收发登记 专利申请费用管理 软著申请管理}> 软著申请管理 高企认定管理}> 高企认定申请 高企认定培育 科技项目申报管理}> 申报管理 科技部门网址管理 ); } }); export default LeftTab;