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: 'myClient', subKey: 'sub1', keyList: [ { key: 'sub1', value: ['myClient','companyCustomer'] }, { key: 'sub2', value: ['individualCustomer','queryCustomer'] }, { key: 'sub3', value: ['myBusiness', 'serviceQuery'] }, { key: 'sub4', value: ['visitStatistics', 'statusStatistics','followStatistics'] }, ] }; }, handleClick(e) { 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;