|
@@ -1,14 +1,11 @@
|
|
|
import React from 'react';
|
|
|
-import { Menu, Icon, Layout, message } from 'antd';
|
|
|
+import { Menu, Icon, message } from 'antd';
|
|
|
import '@/account/leftTab.less';
|
|
|
const SubMenu = Menu.SubMenu;
|
|
|
-const MenuItemGroup = Menu.ItemGroup;
|
|
|
import { Link } from 'react-router';
|
|
|
-import ajax from 'jquery/src/ajax/xhr.js';
|
|
|
import $ from 'jquery/src/ajax';
|
|
|
-import { menu } from '@/account/menu';
|
|
|
+import { menu,menuInit } from '@/account/menu';
|
|
|
import logo from 'img/acc-logo.png';
|
|
|
-const { Sider } = Layout;
|
|
|
|
|
|
const LeftTab = React.createClass({
|
|
|
getInitialState() {
|
|
@@ -116,33 +113,24 @@ const LeftTab = React.createClass({
|
|
|
children: [ { name: '科技成果列表', url: 'achievement' } ]
|
|
|
}
|
|
|
];
|
|
|
- let menuList = [],newMenu=[],noExpert=[];
|
|
|
+ let menuList = [],newMenu=[];
|
|
|
let menuNO = menu[1].children;
|
|
|
menuNO.map((item) => {
|
|
|
- if(item.url!='expert'){
|
|
|
- noExpert.push(item);
|
|
|
- };
|
|
|
if (this.state.type == '0') {
|
|
|
- if (item.name != '企业资料') {
|
|
|
+ if (item.url != 'unit') {
|
|
|
menuList.push(item);
|
|
|
}
|
|
|
} else if (this.state.type == '1') {
|
|
|
- if (item.name != '个人资料') {
|
|
|
+ if (item.url != 'personal') {
|
|
|
menuList.push(item);
|
|
|
}
|
|
|
- } else {
|
|
|
- menuList.push(item);
|
|
|
- }
|
|
|
+ }
|
|
|
});
|
|
|
- if(this.state.type=='undefined'){
|
|
|
- menu[1].children= noExpert;
|
|
|
- }else{
|
|
|
- menu[1].children = menuList;
|
|
|
- }
|
|
|
if (this.state.type == '0' || this.state.type == '1') {
|
|
|
+ menu[1].children = menuList;
|
|
|
newMenu = menu.concat(demandList);
|
|
|
}else{
|
|
|
- newMenu=menu;
|
|
|
+ newMenu=menuInit
|
|
|
}
|
|
|
return (
|
|
|
<div>
|