liting2017 6 years ago
parent
commit
5dcd6baf33

+ 0 - 47
js/component/account/achievement/content.jsx

@@ -1,47 +0,0 @@
-import React, { Component } from 'react';
-import '../content.less';
-import LeftTab from './leftTab';
-import TechAchievement from './techAchievement';
-
-
-class Content extends Component {
-    constructor() {
-        super();
-        this.state = {
-            loading: false,
-            component: 'div'
-        };
-    }
-    componentWillMount() {
-        if (window.location.hash) {
-            this.getKey(window.location.hash.substr(1));
-        } else {
-            this.getKey("techAchievement");
-        };
-    }
-    getKey(key) {
-        switch (key) {
-            case 'techAchievement':
-                require.ensure([], () => {
-                    const TechDemand = require('./techAchievement').default;
-                    this.setState({
-                        component: TechAchievement
-                    });
-                });
-                break;
-        };
-        window.location.hash = key;
-    }
-    render() {
-        return (
-            <div className="acc-content">
-                <LeftTab handlekey={this.getKey.bind(this)} />
-                <div className="content-right">
-                    <this.state.component />
-                </div>
-            </div>
-        )
-    }
-}
-
-export default Content;

+ 0 - 40
js/component/account/achievement/leftTab.jsx

@@ -1,40 +0,0 @@
-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: 'techAchievement'
-        };
-    },
-    handleClick(e) {
-        this.props.handlekey(e.key);
-        this.setState({
-            current: e.key,
-        });
-    },
-    componentWillMount() {
-        if (window.location.hash) {
-            this.state.current = window.location.hash.substr(1);
-        };
-    },
-    render() {
-        return (
-            <Menu onClick={this.handleClick}
-                selectedKeys={[this.state.current]}
-                mode="vertical"
-                className="account-left"
-            >
-                <Menu.Item key="techAchievement">
-                    科技成果列表
-                </Menu.Item>
-            </Menu>
-        );
-    },
-});
-
-export default LeftTab;

+ 1 - 2
js/component/account/demand/content.jsx

@@ -17,8 +17,7 @@ class Content extends Component {
             this.getKey(window.location.hash.substr(1));
         } else {
             this.getKey("techDemand");
-        };
-    }
+        };    }
     getKey(key) {
         switch (key) {
             case 'techDemand':

+ 0 - 40
js/component/account/demand/leftTab.jsx

@@ -1,40 +0,0 @@
-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: 'techDemand'
-        };
-    },
-    handleClick(e) {
-        this.props.handlekey(e.key);
-        this.setState({
-            current: e.key,
-        });
-    },
-    componentWillMount() {
-        if (window.location.hash) {
-            this.state.current = window.location.hash.substr(1);
-        };
-    },
-    render() {
-        return (
-            <Menu onClick={this.handleClick}
-                selectedKeys={[this.state.current]}
-                mode="vertical"
-                className="account-left"
-            >
-                <Menu.Item key="techDemand">
-                    科技需求列表
-                </Menu.Item>
-            </Menu>
-        );
-    },
-});
-
-export default LeftTab;

+ 4 - 0
js/component/account/index/content.jsx

@@ -10,6 +10,8 @@ import Collection from '@/account/index/collection';
 import TechList from '@/account/index/techList';
 import ServiceList from '@/account/index/serviceList';
 import ConsultList from '@/account/index/consultList';
+import DemandList from '@/account/demand/techDemand';
+import Achievement from '@/account/achievement/techAchievement';
 
 import {hashHistory,Route,Router,IndexRedirect} from 'react-router';
 import {Layout} from 'antd';
@@ -32,6 +34,8 @@ export default class ContentRouter extends React.Component {
             <Route path="/unit" component={Unit} />
             <Route path="/personal" component={Personal} />
             <Route path="/contacts" component={Contacts} />
+            <Route path="/demand" component={DemandList} />
+            <Route path="/achievement" component={Achievement} />
         </Router>
       </Content>
     )

+ 1 - 1
js/component/account/index/leftMenu.jsx

@@ -17,7 +17,7 @@ const LeftTab = React.createClass({
 			openKeys: [ 'sub1' ],
 			current: 'normal',
 			switch: false,
-			rootSubmenuKeys :['sub1', 'sub2' ]
+			rootSubmenuKeys :['sub1', 'sub2','sub3','sub4']
 		};
 	},
 	loadData() {

+ 15 - 0
js/component/account/menu.jsx

@@ -22,6 +22,21 @@ module.exports = {
             { name: '个人资料', url: 'personal' },
             { name: '常用联系人', url: 'contacts' },
           ]
+        },
+        {
+          name: '我的需求',
+          url: 'sub3',
+          icon: 'bulb',
+          children: [
+            { name: '科技需求列表', url: 'demand' }
+          ]
+        },{
+          name: '我的成果',
+          url: 'sub4',
+          icon: 'compass',
+          children: [
+            { name: '科技成果列表', url: 'achievement'}
+          ]
         }
     ]
 }

+ 0 - 8
js/component/account/topTab.jsx

@@ -51,14 +51,6 @@ const TopTab = React.createClass({
                     <span className="acc-top-user-name">欢迎您, {this.state.nickname || userData.nickname || userData.number } <a onClick={this.logOut}>[ 退出 ]</a></span>
                     <span className="acc-top-user-toindex"><a href={globalConfig.context + "/portal/index.html"}>返回首页</a></span>
                 </div>
-                {/* <div className="acc-top-tab">
-                    <Row>
-                        <Col className={this.props.active === 'set' ? 'active' : ''} span={3}><a href={globalConfig.context + "/user/account/set.html"}>账号设置</a></Col>
-                        <Col className={this.props.active === 'services' ? 'active' : ''} span={3}><a href={globalConfig.context + "/user/account/services.html"}>科技服务</a></Col>
-                        <Col className={this.props.active === 'achievement' ? 'active' : ''} span={3}><a href={globalConfig.context + "/user/account/achievement.html"}>科技成果</a></Col>
-                        <Col className={this.props.active === 'demand' ? 'active' : ''} span={3}><a href={globalConfig.context + "/user/account/demand.html"}>科技需求</a></Col>
-                    </Row>
-                </div> */}
             </div >
         )
     }

+ 4 - 0
js/component/account/topTab.less

@@ -15,7 +15,11 @@
             color:#ffffff;
             .acc-top-user-name {
                 margin-left: 10px;
+                a:hover{
+                    color:red;
+                }
             }
+           
             .acc-top-user-toindex {
                 float: right;
                 margin-right: 10px;

+ 2 - 2
js/component/portal/search/achievementDesc.jsx

@@ -3,8 +3,8 @@ import { Icon, Modal, message, Spin, Button, Row, Col, Upload, Tooltip, Tag, Tab
 import '../portal.less';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
-import { getIndustryCategory } from '../../DicIndustryList.js';
-import { splitUrl, getAchievementCategory, getMaturity, getInnovation, getOrderStatus, beforeUploadFile } from '../../tools.js';
+import { getIndustryCategory } from '@/DicIndustryList.js';
+import { splitUrl, getAchievementCategory, getMaturity, getInnovation, getOrderStatus, beforeUploadFile } from '@/tools.js';
 
 
 const AchievementDetail = React.createClass({

+ 2 - 2
js/component/portal/search/demandDesc.jsx

@@ -3,8 +3,8 @@ import { Icon, Modal, message, Spin, Button, Row, Col, Upload, Tooltip, Tag, Inp
 import '../portal.less';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
-import { getIndustryCategory } from '../../DicIndustryList.js';
-import { splitUrl, getDemandType, beforeUploadFile, getOrderStatus } from '../../tools.js';
+import { getIndustryCategory } from '@/DicIndustryList.js';
+import { splitUrl, getDemandType, beforeUploadFile, getOrderStatus } from '@/tools.js';
 
 
 const DemandDetail = React.createClass({