leftTab.jsx 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. import React from 'react';
  2. import { Menu, Icon } from 'antd';
  3. import '../leftTab.less';
  4. const SubMenu = Menu.SubMenu;
  5. const MenuItemGroup = Menu.ItemGroup;
  6. const LeftTab = React.createClass({
  7. getInitialState() {
  8. return {
  9. current: 'patent',
  10. subKey: 'sub1',
  11. keyList: [
  12. { key: 'sub1', value: ['patent', 'copyright', 'intellectual'] },
  13. { key: 'sub2', value: ['standard', 'activity', 'activityCostList', 'orgTechCenter', 'techProduct', 'ratepay', 'finance', 'achievement', 'honorList','annualReport','cognizance','companyDetail'] },
  14. { key: 'sub3', value: ['technology'] }
  15. ]
  16. };
  17. },
  18. handleClick(e) {
  19. this.props.handlekey(e.key);
  20. this.setState({
  21. current: e.key,
  22. });
  23. },
  24. componentWillMount() {
  25. const _me = this;
  26. if (window.location.hash) {
  27. let theKey = window.location.hash.substr(1);
  28. this.state.keyList.map(function (item1) {
  29. item1.value.map(function (item2) {
  30. if (theKey == item2) {
  31. _me.state.subKey = item1.key
  32. }
  33. });
  34. });
  35. this.state.current = theKey;
  36. };
  37. },
  38. render() {
  39. return (
  40. <Menu onClick={this.handleClick}
  41. selectedKeys={[this.state.current]}
  42. defaultOpenKeys={[this.state.subKey]}
  43. mode="vertical"
  44. className="account-left"
  45. mode="inline"
  46. >
  47. <SubMenu key="sub1" title={<span>知识产权申请</span>}>
  48. <Menu.Item key="patent">
  49. 专利申请
  50. </Menu.Item>
  51. <Menu.Item key="copyright">
  52. 软著申请
  53. </Menu.Item>
  54. <Menu.Item key="intellectual">
  55. 知识产权管理
  56. </Menu.Item>
  57. </SubMenu>
  58. <SubMenu key="sub2" title={<span>高企认定</span>}>
  59. <Menu.Item key="cognizance">
  60. 高企申请管理
  61. </Menu.Item>
  62. <Menu.Item key="companyDetail">
  63. 企业基本信息
  64. </Menu.Item>
  65. <Menu.Item key="standard">
  66. 标准制定情况
  67. </Menu.Item>
  68. <Menu.Item key="activity">
  69. 企业研究开发活动
  70. </Menu.Item>
  71. <Menu.Item key="activityCostList">
  72. 企业研发费用详情
  73. </Menu.Item>
  74. <Menu.Item key="orgTechCenter">
  75. 企业研发机构
  76. </Menu.Item>
  77. <Menu.Item key="techProduct">
  78. 高新技术产品(服务)情况
  79. </Menu.Item>
  80. <Menu.Item key="ratepay">
  81. 所得税纳税申报信息
  82. </Menu.Item>
  83. <Menu.Item key="finance">
  84. 财务报表信息
  85. </Menu.Item>
  86. <Menu.Item key="achievement">
  87. 科技成果转化
  88. </Menu.Item>
  89. <Menu.Item key="honorList">
  90. 企业荣誉及其他证明材料
  91. </Menu.Item>
  92. <Menu.Item key="annualReport">
  93. 企业年报
  94. </Menu.Item>
  95. </SubMenu>
  96. <SubMenu key="sub3" title={<span>科技项目申报</span>}>
  97. <Menu.Item key="technology">
  98. 申报管理
  99. </Menu.Item>
  100. </SubMenu>
  101. </Menu>
  102. );
  103. }
  104. });
  105. export default LeftTab;