leftTab.jsx 4.4 KB

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