123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- 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 (
- <Menu onClick={this.handleClick}
- selectedKeys={[this.state.current]}
- defaultOpenKeys={[this.state.subKey]}
- mode="vertical"
- className="account-left"
- mode="inline" >
- <SubMenu key="sub1" title={<span>合同申请管理</span>}>
- <Menu.Item key="contract">
- 合同申请管理
- </Menu.Item>
- </SubMenu>
- <SubMenu key="sub2"
- title={<div>专利申请管理</div>}>
- <Menu.Item key="comprehensive">
- 专利综合管理
- </Menu.Item>
- <Menu.Item key="payment">
- 待缴费专利管理
- </Menu.Item>
- <Menu.Item key="correction">
- 补正审查通知管理
- </Menu.Item>
- <Menu.Item key="express">
- 专利纸件收发登记
- </Menu.Item>
- <Menu.Item key="applyFee">
- 专利申请费用管理
- </Menu.Item>
- </SubMenu>
- <SubMenu key="sub3" title={<span>软著申请管理</span>}>
- <Menu.Item key="copyright">
- 软著申请管理
- </Menu.Item>
- </SubMenu>
- <SubMenu key="sub4"
- title={<div>高企认定管理</div>}>
- <Menu.Item key="highTechApply">
- 高企认定申请
- </Menu.Item>
- <Menu.Item key="highTechFoster">
- 高企认定培育
- </Menu.Item>
- </SubMenu>
- <SubMenu key="sub5" title={<span>科技项目申报管理</span>}>
- <Menu.Item key="applyManage">
- 申报管理
- </Menu.Item>
- <Menu.Item key="websiteManage">
- 科技部门网址管理
- </Menu.Item>
- </SubMenu>
- </Menu>
- );
- }
- });
- export default LeftTab;
|