123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- 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', 'patent', 'copyright', 'intellectual'] },
- { key: 'sub2', value: ['standard', 'activity', 'activityCostList', 'orgTechCenter', 'techProduct', 'ratepay', 'finance', 'achievement', 'honorList', 'annualReport', 'cognizance', 'companyDetail'] },
- { key: 'sub3', value: ['technology'] },
- { key: 'sub4', value: ['evaluate'] }
- ]
- };
- },
- 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;
- if (theKey == 'createEvaluate') {
- this.state.subKey = 'sub4'
- this.state.current = 'evaluate';
- }
- };
- },
- render() {
- if (window.userData && window.userData.type == 1) {
- 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>
- <Menu.Item key="patent">
- 专利管理
- </Menu.Item>
- <Menu.Item key="copyright">
- 软著管理
- </Menu.Item>
- <Menu.Item key="intellectual">
- 知识产权管理
- </Menu.Item>
- </SubMenu>
- <SubMenu key="sub2" title={<span>高企认定</span>}>
- <Menu.Item key="cognizance">
- 高企申请管理
- </Menu.Item>
- <Menu.Item key="companyDetail">
- 企业基本信息
- </Menu.Item>
- <Menu.Item key="standard">
- 标准制定情况
- </Menu.Item>
- <Menu.Item key="activity">
- 企业研究开发活动
- </Menu.Item>
- <Menu.Item key="activityCostList">
- 企业研发费用详情
- </Menu.Item>
- <Menu.Item key="orgTechCenter">
- 企业研发机构
- </Menu.Item>
- <Menu.Item key="techProduct">
- 高新技术产品(服务)情况
- </Menu.Item>
- <Menu.Item key="ratepay">
- 所得税纳税申报信息
- </Menu.Item>
- <Menu.Item key="finance">
- 财务报表信息
- </Menu.Item>
- <Menu.Item key="achievement">
- 科技成果转化
- </Menu.Item>
- <Menu.Item key="honorList">
- 企业荣誉及其他证明材料
- </Menu.Item>
- <Menu.Item key="annualReport">
- 企业年报
- </Menu.Item>
- </SubMenu>
- <SubMenu key="sub3" title={<span>科技项目申报</span>}>
- <Menu.Item key="technology">
- 申报管理
- </Menu.Item>
- </SubMenu>
- <SubMenu key="sub4" title={<span>科技评估</span>}>
- <Menu.Item key="evaluate">
- 科技评估管理
- </Menu.Item>
- </SubMenu>
- </Menu>
- );
- } else {
- return (<Menu onClick={this.handleClick}
- selectedKeys={[this.state.current]}
- defaultOpenKeys={[this.state.subKey]}
- mode="vertical"
- className="account-left"
- mode="inline" >
- <SubMenu key="sub4" title={<span>科技评估</span>}>
- <Menu.Item key="evaluate">
- 科技评估管理
- </Menu.Item>
- </SubMenu>
- </Menu>
- );
- }
- }
- });
- export default LeftTab;
|