yee 7 years ago
parent
commit
e57822c2f1

+ 10 - 1
entry.js

@@ -119,6 +119,15 @@ module.exports = {
     'admin/servicesManage/technology': ['webpack-dev-server/client?http://127.0.0.1:80', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',
       './js/admin/servicesManage/technology.js'
-    ]
+    ],
+    //portal  门户
+    'portal/search/demand': ['webpack-dev-server/client?http://127.0.0.1:80', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './js/portal/search/demand.js'
+    ],
+    'portal/search/achievement': ['webpack-dev-server/client?http://127.0.0.1:80', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './js/portal/search/achievement.js'
+    ],
   }
 }

+ 63 - 61
js/component/account/index/content.jsx

@@ -41,8 +41,8 @@ const Content = React.createClass({
                 if (data.data && data.data.personPortraitUrl && data.data.nickname) {
                     this.setState({
                         personPortraitUrl: data.data.personPortraitUrl,
-                        logoUrl:data.data.logoUrl,
-                        type:data.data.type,
+                        logoUrl: data.data.logoUrl,
+                        type: data.data.type,
                         nickname: data.data.nickname,
                         lvl: data.data.lvl,
                         number: data.data.number
@@ -72,70 +72,72 @@ const Content = React.createClass({
     },
     render() {
         return (
-                <div className="acc-content">
-                    <LeftTab handlekey={this.handlekey} />
-                    <div className="content-right">
-                        <Spin spinning={this.state.loading} className='spin-box'>
-                            <div className="index-content">
-                                <div className="index-userdata clearfix">
-                                    <p className="acc-title">{this.state.number}</p>
-                                    <div className="userdata-img">
-                                        {this.state.type == 0 ?
-                                        <img src={globalConfig.avatarHost + "/upload" + this.state.personPortraitUrl} alt="" /> : 
+            <div className="acc-content">
+                <LeftTab handlekey={this.handlekey} />
+                <div className="content-right">
+                    <Spin spinning={this.state.loading} className='spin-box'>
+                        <div className="index-content">
+                            <div className="index-userdata clearfix">
+                                <p className="acc-title">{this.state.number}</p>
+                                <div className="userdata-img">
+                                    {this.state.type == 0 ?
+                                        <img src={globalConfig.avatarHost + "/upload" + this.state.personPortraitUrl} alt="" /> :
                                         <img src={globalConfig.avatarHost + "/upload" + this.state.logoUrl} alt="" />}
-                                    </div>
-                                    <div className="userdata-content">
-                                        {(() => {
-                                            switch (userData.lvl || this.state.userlvl) {
-                                                case '0':
-                                                    return <p className="userdata-lvl">等级:<span>LV1</span> 普通用户</p>;
-                                                case '1':
-                                                    return <p className="userdata-lvl">等级:<span>LV2</span> 已认证用户</p>;
-                                            };
-                                        })()}
-                                        <p>完善资料 {this.state.per}% ,<a href="./set.html">继续完善</a>,有助于提高您的资信</p>
-                                        <p className="userdata-relate" style={{ 'display': 'none' }}>
-                                            <Button className="relateqq"><img src={qq} alt="" /> QQ账号登录</Button>
-                                            <Button className="relateweibo"><img src={weibo} alt="" />微博账号登录</Button>
-                                            <Button className="relateweixin"><img src={weixin} alt="" />微信账号登录</Button>
-                                        </p>
-                                        <div className="userdata-follow">已有<a href="">{this.state.follow}</a>人关注你</div>
-                                    </div>
                                 </div>
-                                <div className="index-record">
-                                    <p className="acc-title">我的轨迹</p>
-                                    <ul className="record-list clearfix">
-                                        <li>技术成果:<a href="">{this.state.chengguo}</a>项</li>
-                                        <li>技术开发:<a href="">{this.state.kaifa}</a>项</li>
-                                        <li>科技服务:<a href="">{this.state.fuwu}</a>项</li>
-                                        <li>发布需求:<a href="">{this.state.xuqiu}</a>项</li>
-                                    </ul>
-                                </div>
-                                <div className="index-activity">
-                                    <Tabs defaultActiveKey="1" onChange={this.tabChange}>
-                                        <TabPane tab="活动" key="1">
-                                            <p className="acc-title">即将举办的活动</p>
-                                            <ul className="activity-list">
-                                                {
-                                                    this.state.activityArr.map(function (item, i) {
-                                                        return <li key={i}>
-                                                            <span className="list-type">[{item.type}]</span>
-                                                            <span className="list-title">{item.title}</span>
-                                                            <a href={item.link}>报名</a>
-                                                            <span className="list-time">{item.time}</span>
-                                                        </li>;
-                                                    })
-                                                }
-                                            </ul>
-                                        </TabPane>
-                                        <TabPane tab="其他" key="2">Content of Tab Pane 2</TabPane>
-                                    </Tabs>
+                                <div className="userdata-content">
+                                    {(() => {
+                                        switch (userData.lvl || this.state.userlvl) {
+                                            case '0':
+                                                return <p className="userdata-lvl">等级:<span>LV1</span> 普通用户</p>;
+                                            case '1':
+                                                return <p className="userdata-lvl">等级:<span>LV2</span> 已认证用户</p>;
+                                        };
+                                    })()}
+                                    <p>完善资料 {this.state.per}% ,<a href={globalConfig.avatarHost + "/user/account/set.html"}>继续完善</a>,有助于提高您的资信</p>
+                                    <a href={globalConfig.context + "/portal/search/achievement.html"}>成果搜索</a>
+                                    <a href={globalConfig.context + "/portal/search/demand.html"}>需求搜索</a>
+                                    <p className="userdata-relate" style={{ 'display': 'none' }}>
+                                        <Button className="relateqq"><img src={qq} alt="" /> QQ账号登录</Button>
+                                        <Button className="relateweibo"><img src={weibo} alt="" />微博账号登录</Button>
+                                        <Button className="relateweixin"><img src={weixin} alt="" />微信账号登录</Button>
+                                    </p>
+                                    <div className="userdata-follow">已有<a href="">{this.state.follow}</a>人关注你</div>
                                 </div>
                             </div>
-                        </Spin>
-                    </div>
+                            <div className="index-record">
+                                <p className="acc-title">我的轨迹</p>
+                                <ul className="record-list clearfix">
+                                    <li>技术成果:<a href="">{this.state.chengguo}</a>项</li>
+                                    <li>技术开发:<a href="">{this.state.kaifa}</a>项</li>
+                                    <li>科技服务:<a href="">{this.state.fuwu}</a>项</li>
+                                    <li>发布需求:<a href="">{this.state.xuqiu}</a>项</li>
+                                </ul>
+                            </div>
+                            <div className="index-activity">
+                                <Tabs defaultActiveKey="1" onChange={this.tabChange}>
+                                    <TabPane tab="活动" key="1">
+                                        <p className="acc-title">即将举办的活动</p>
+                                        <ul className="activity-list">
+                                            {
+                                                this.state.activityArr.map(function (item, i) {
+                                                    return <li key={i}>
+                                                        <span className="list-type">[{item.type}]</span>
+                                                        <span className="list-title">{item.title}</span>
+                                                        <a href={item.link}>报名</a>
+                                                        <span className="list-time">{item.time}</span>
+                                                    </li>;
+                                                })
+                                            }
+                                        </ul>
+                                    </TabPane>
+                                    <TabPane tab="其他" key="2">Content of Tab Pane 2</TabPane>
+                                </Tabs>
+                            </div>
+                        </div>
+                    </Spin>
                 </div>
-            )
+            </div>
+        )
     }
 });
 

+ 35 - 0
js/component/dataDic.js

@@ -680,5 +680,40 @@ module.exports = {
             value: "4",
             key: "审核未通过"
         }
+    ],
+    //成熟度
+    maturityList:[
+        {
+            value: "0",
+            key: "正在研发"
+        }, {
+            value: "1",
+            key: "已有样品"
+        }, {
+            value: "2",
+            key: "通过小试"
+        }, {
+            value: "3",
+            key: "通过中试"
+        }, {
+            value: "4",
+            key: "可以量产"
+        }
+    ],
+    //交易方式
+    transferModeList:[
+        {
+            value: "0",
+            key: "完全转让"
+        }, {
+            value: "1",
+            key: "许可转让"
+        }, {
+            value: "2",
+            key: "技术入股"
+        }, {
+            value: "3",
+            key: "5年独占许可转让"
+        }
     ]
 };

+ 4 - 1
js/component/manageCenter/achievement/techAchievementDesc.jsx

@@ -222,6 +222,9 @@ const AchievementDetailShow = Form.create()(React.createClass({
                     }
                 }).done(function (data) {
                     this.state.auditStatus = 0;
+                    this.setState({
+                        loading: false
+                    });
                     if (!data.error.length) {
                         message.success('保存成功!');
                         this.setState({
@@ -231,7 +234,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
                         this.props.handleOk();
                     } else {
                         message.warning(data.error[0].message);
-                    }
+                    };
                 }.bind(this));
             }
         });

+ 14 - 0
js/component/portal/footer.jsx

@@ -0,0 +1,14 @@
+import React from 'react';
+import './portal.less';
+
+const Footer = React.createClass({
+    render() {
+        return (
+            <div className="footer">
+                <p>阿凡提2017  技术支持@湖南智明</p>
+            </div>
+        )
+    }
+});
+
+export default Footer;

+ 97 - 0
js/component/portal/portal.less

@@ -0,0 +1,97 @@
+.wrap {
+    width: 100%;
+    margin: 0 auto;
+    background: #ffffff;
+    .portal-header {
+        background: #f8f8f8;
+        width: 100%;
+        .portal-logo {
+            width: 100%;
+            margin: 0 auto;
+            padding: 10px 0;
+            .logo {
+                width: 120px;
+                padding-top: 60px;
+                float: left;
+                margin-left: 4%;
+                position: relative;
+                overflow: hidden;
+                img {
+                    position: absolute;
+                    top: 0;
+                    right: 0;
+                    height: 60px;
+                    width: 60px;
+                }
+            }
+            .portal-text {
+                width: 84%;
+                float: left;
+                line-height: 60px;
+                font-size: 24px;
+                margin-left: 20px;
+                .text {
+                    border-left: 1px solid #999999;
+                }
+                .alink {
+                    float: right;
+                    font-size: 14px;
+                    line-height: 60px;
+                    a {
+                        color: #333;
+                        padding: 0 8px;
+                        border-left: 1px solid #999999;
+                    }
+                    >a {
+                        &:first-child {
+                            border: none;
+                        }
+                    }
+                }
+                >span {
+                    padding-left: 20px;
+                }
+            }
+        }
+    }
+    .footer {
+        width: 100%;
+        position: fixed;
+        bottom: 0;
+        left: 0;
+        z-index: 1;
+        text-align: center;
+        padding: 6px 0;
+        padding: 10px 0;
+        text-align: center;
+        background: #f0f0f0;
+        p {
+            line-height: 24px;
+        }
+    }
+    .portal-content {
+        width: 1280px;
+        margin: 0 auto; //background: #e0e0e0;
+        padding-top: 20px;
+        padding-bottom: 60px;
+        .search-criteria {
+            margin-bottom: 10px;
+            border-bottom: 1px dotted #ccc;
+        }
+        .ant-radio-group {
+            >label {
+                border-radius: 0px;
+                border: 1px solid #d9d9d9;
+                margin-right: 10px;
+                margin-bottom: 10px;
+            }
+            .ant-radio-button-wrapper-checked {
+                border: 1px solid #58a3ff;
+                box-shadow: none;
+            }
+        }
+        .search-title {
+            text-align: center;
+        }
+    }
+}

+ 371 - 0
js/component/portal/search/content.jsx

@@ -0,0 +1,371 @@
+import React from 'react';
+import { Icon, message, Row, Col, Radio, Checkbox, Input, InputNumber, Button, Table, Spin } from 'antd';
+import '../portal.less';
+import { IndustryObject, getIndustryCategory } from '../../DicIndustryList';
+import { achievementCategoryList, transferModeList, maturityList } from '../../dataDic';
+import { getAchievementCategory } from '../../tools';
+import ajax from 'jquery/src/ajax/xhr.js'
+import $ from 'jquery/src/ajax';
+
+const Content = React.createClass({
+    loadData(pageNo) {
+        this.setState({
+            loading: true
+        });
+        switch (this.state.transferPrice) {
+            case 1:
+                this.state.transferPriceLower = 1;
+                this.state.transferPriceUpper = 10;
+                break;
+            case 2:
+                this.state.transferPriceLower = 10;
+                this.state.transferPriceUpper = 50;
+                break;
+            case 3:
+                this.state.transferPriceLower = 50;
+                this.state.transferPriceUpper = 100;
+                break;
+            case 4:
+                this.state.transferPriceLower = 100;
+                this.state.transferPriceUpper = 500;
+                break;
+            case 5:
+                this.state.transferPriceLower = 500;
+                this.state.transferPriceUpper = 1000;
+                break;
+            case 999:
+                this.state.transferPriceLower = null;
+                this.state.transferPriceUpper = null;
+                break;
+        }
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            url: globalConfig.context + "/portal/search/achievementList",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                category: this.state.category == 999 ? null : this.state.category, //技术类型
+                keyword: this.state.keyword,
+                maturity: this.state.maturity == 999 ? null : this.state.maturity, //成熟度
+                transferPriceLower: this.state.transferPriceLower, //交易金额下限
+                transferPriceUpper: this.state.transferPriceUpper, //交易金额上限
+                transferMode: this.state.transferMode == 999 ? null : this.state.transferMode, //交易方式
+                fieldA: this.state.fieldA, //技术领域(行业类别A)
+                fieldB: this.state.fieldB == 999 ? null : this.state.fieldB, //技术领域(行业类别B)
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data && !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+                            serialNumber: thisdata.serialNumber,
+                            keyword: thisdata.keyword,
+                            name: thisdata.name,
+                            dataCategory: thisdata.dataCategory,
+                            category: thisdata.category,
+                            ownerName: thisdata.username || thisdata.unitName,
+                            username: thisdata.username,
+                            unitName: thisdata.unitName,
+                            releaseDate: thisdata.releaseDate,
+                            ownerType: thisdata.ownerType,
+                            field: [thisdata.fieldA, thisdata.fieldB],
+                            transferPrice: thisdata.transferPrice,
+                            maturity: thisdata.maturity,
+                            transferMode: thisdata.transferMode,
+                            releaseDateFormattedDate: thisdata.releaseDateFormattedDate
+                        });
+                    };
+                };
+                this.state.pagination.defaultCurrent = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).done(function (data) {
+            if (data.error && data.error.length) {
+                message.warning(data.error[0].message);
+            };
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            loading: false,
+            industryRadioB: [],
+            transferPrice: 999,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'serialNumber',
+                    key: 'serialNumber',
+                }, {
+                    title: '名称',
+                    dataIndex: 'name',
+                    key: 'name',
+                }, {
+                    title: '关键字',
+                    dataIndex: 'keyword',
+                    key: 'keyword',
+                }, {
+                    title: '成果类型',
+                    dataIndex: 'dataCategory',
+                    key: 'dataCategory',
+                    render: text => {
+                        switch (text) {
+                            case "0":
+                                return <span>成果</span>;
+                            case "1":
+                                return <span>技术</span>;
+                            case "2":
+                                return <span>项目</span>;
+                        }
+                    }
+                }, {
+                    title: '类型',
+                    dataIndex: 'category',
+                    key: 'category',
+                    render: text => { return getAchievementCategory(text); }
+                }, {
+                    title: '行业分类',
+                    dataIndex: 'field',
+                    key: 'field',
+                    render: text => { return getIndustryCategory(text[0], text[1]) }
+                }, {
+                    title: '所有人名称',
+                    dataIndex: 'ownerName',
+                    key: 'ownerName',
+                }, {
+                    title: '所有人类型',
+                    dataIndex: 'ownerType',
+                    key: 'ownerType',
+                    render: text => {
+                        switch (text) {
+                            case "0":
+                                return <span>个人</span>;
+                            case "1":
+                                return <span>组织</span>
+                        }
+                    }
+                }, {
+                    title: '发布时间',
+                    dataIndex: 'releaseDateFormattedDate',
+                    key: 'releaseDateFormattedDate',
+                }
+            ],
+            dataSource: []
+        };
+    },
+    componentWillMount() {
+        let theArr = [];
+        let theCategoryArr = [], theTransferModeArr = [], theMaturityArr = [];
+        //行业分类单选项
+        theArr.push(
+            <Radio.Button key={999} value={999}>不限</Radio.Button>
+        );
+        IndustryObject.map(function (item) {
+            theArr.push(
+                <Radio.Button key={item.value} value={item.value}>{item.label}</Radio.Button>
+            );
+        });
+        //技术类型单选项目
+        theCategoryArr.push(
+            <Radio.Button key={999} value={999}>不限</Radio.Button>
+        );
+        achievementCategoryList.map(function (item) {
+            theCategoryArr.push(
+                <Radio.Button key={item.value} value={item.value}>{item.key}</Radio.Button>
+            );
+        });
+        //交易方式单选项目
+        theTransferModeArr.push(
+            <Radio.Button key={999} value={999}>不限</Radio.Button>
+        );
+        transferModeList.map(function (item) {
+            theTransferModeArr.push(
+                <Radio.Button key={item.value} value={item.value}>{item.key}</Radio.Button>
+            );
+        });
+        //成熟度单选项目
+        theMaturityArr.push(
+            <Radio.Button key={999} value={999}>不限</Radio.Button>
+        );
+        maturityList.map(function (item) {
+            theMaturityArr.push(
+                <Radio.Button key={item.value} value={item.value}>{item.key}</Radio.Button>
+            );
+        });
+        this.state.industryRadioA = theArr;
+        this.state.categoryRadio = theCategoryArr;
+        this.state.transferModeRadio = theTransferModeArr;
+        this.state.maturityRadio = theMaturityArr;
+    },
+    industryChange(e) {
+        let theArr = [];
+        if (e.target.value !== 999) {
+            theArr.push(
+                <Radio.Button key={999} value={999}>不限</Radio.Button>
+            );
+            IndustryObject.map(function (item1) {
+                if (item1.value == e.target.value) {
+                    item1.children.map(function (item2) {
+                        theArr.push(
+                            <Radio.Button key={item2.value} value={item2.value}>{item2.label}</Radio.Button>
+                        );
+                    });
+                }
+            });
+            this.state.fieldA = e.target.value;
+        } else {
+            this.state.fieldA = null;
+        };
+        this.loadData();
+        this.setState({ industryRadioB: theArr });
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        this.setState({
+            showDesc: true
+        });
+    },
+    render() {
+        return (
+            <div className="portal-content">
+                <Row className="search-criteria">
+                    <Col className="search-title" span={2}>
+                        <span>行业分类</span>
+                    </Col>
+                    <Col className="search-select" span={22}>
+                        <Radio.Group defaultValue={999} onChange={this.industryChange}>
+                            {this.state.industryRadioA}
+                        </Radio.Group>
+                    </Col>
+                </Row>
+                {this.state.industryRadioB.length > 1 ? <Row className="search-criteria">
+                    <Col className="search-title" span={2}>
+                        <span>行业子分类</span>
+                    </Col>
+                    <Col className="search-select" span={22}>
+                        <Radio.Group defaultValue={999} onChange={(e) => { this.state.fieldB = e.target.value; this.loadData() }}>
+                            {this.state.industryRadioB}
+                        </Radio.Group>
+                    </Col>
+                </Row> : <div></div>}
+                <Row className="search-criteria">
+                    <Col className="search-title" span={2}>
+                        <span>交易价格</span>
+                    </Col>
+                    <Col className="search-select" span={12}>
+                        <Radio.Group value={this.state.transferPrice}
+                            onChange={(e) => {
+                                this.setState({
+                                    transferPrice: e.target.value
+                                });
+                                this.loadData();
+                            }}>
+                            <Radio.Button value={999}>不限</Radio.Button>
+                            <Radio.Button value={1}>1-10万元</Radio.Button>
+                            <Radio.Button value={2}>10-50万元</Radio.Button>
+                            <Radio.Button value={3}>50-100万元</Radio.Button>
+                            <Radio.Button value={4}>100-500万元</Radio.Button>
+                            <Radio.Button value={5}>500-1000万元</Radio.Button>
+                        </Radio.Group>
+                    </Col>
+                    <Col span={10}>
+                        <Checkbox checked={!this.state.transferPrice} onChange={(e) => { if (e.target.checked) { this.setState({ transferPrice: null }) } }}>自定义金额</Checkbox>
+                        <InputNumber style={{ width: 80 }} disabled={Boolean(this.state.transferPrice)} onChange={(e) => { this.state.transferPriceLower = e.target.value; }} />
+                        <span> 到 </span>
+                        <InputNumber style={{ width: 80 }} disabled={Boolean(this.state.transferPrice)} onChange={(e) => { this.state.transferPriceUpper = e.target.value; }} />
+                        <span> 万元</span>
+                        <Button style={{ marginLeft: '20px' }} disabled={Boolean(this.state.transferPrice)} onClick={this.loadData}>确定</Button>
+                    </Col>
+                </Row>
+                <Row className="search-criteria">
+                    <Col className="search-title" span={2}>
+                        <span>技术类型</span>
+                    </Col>
+                    <Col className="search-select" span={22}>
+                        <Radio.Group defaultValue={999} onChange={(e) => {
+                            this.setState({
+                                category: e.target.value
+                            });
+                            this.loadData();
+                        }}>
+                            {this.state.categoryRadio}
+                        </Radio.Group>
+                    </Col>
+                </Row>
+                <Row className="search-criteria">
+                    <Col className="search-title" span={2}>
+                        <span>交易方式</span>
+                    </Col>
+                    <Col className="search-select" span={22}>
+                        <Radio.Group defaultValue={999} onChange={(e) => {
+                            this.setState({
+                                transferMode: e.target.value
+                            });
+                            this.loadData();
+                        }}>
+                            {this.state.transferModeRadio}
+                        </Radio.Group>
+                    </Col>
+                </Row>
+                <Row className="search-criteria">
+                    <Col className="search-title" span={2}>
+                        <span>成熟度</span>
+                    </Col>
+                    <Col className="search-select" span={22}>
+                        <Radio.Group defaultValue={999} onChange={(e) => {
+                            this.setState({
+                                maturity: e.target.value
+                            });
+                            this.loadData();
+                        }}>
+                            {this.state.maturityRadio}
+                        </Radio.Group>
+                    </Col>
+                </Row>
+                <Row className="search-criteria" style={{ paddingBottom: '10px' }}>
+                    <Col className="search-title" span={2}>
+                        <span>关键字</span>
+                    </Col>
+                    <Col className="search-select" span={22}>
+                        <Input style={{ width: 120 }} onChange={(e) => { this.state.keyword = e.target.value; }} />
+                        <Button style={{ marginLeft: '20px' }} onClick={() => { this.loadData() }}>确定</Button>
+                    </Col>
+                </Row>
+                <Spin spinning={this.state.loading}>
+                    <Table columns={this.state.columns}
+                        dataSource={this.state.dataSource}
+                        pagination={this.state.pagination}
+                        onRowClick={this.tableRowClick} />
+                </Spin>
+            </div >
+        )
+    }
+});
+
+export default Content;

+ 43 - 0
js/component/portal/top.jsx

@@ -0,0 +1,43 @@
+import React from 'react';
+import './portal.less';
+import logo from '../../../image/logo.jpg';
+
+const LoginTop = React.createClass({
+    logOut() {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            url: globalConfig.context + "/login",
+        }).done(function (data) {
+            window.location.href = globalConfig.context + "/user/login.html"
+        });
+    },
+    render() {
+        return (
+            <div className="portal-header">
+                <div className="portal-logo clearfix">
+                    <div className="logo">
+                        <img src={logo} alt="" />
+                    </div>
+                    <div className="portal-text">
+                        <span className="text">科技项目搜索</span>
+                        <span className="alink">
+                            <a href={globalConfig.context + "/user/account/index.html"}>返回首页</a>
+                            {window.userData ?
+                                <span>
+                                    <a href={globalConfig.context + "/user/account/index"}>尊敬的{userData.nickname || userData.number || this.state.username}</a>
+                                    <a href="./index.html">交易管理中心</a>
+                                    <a href="./index.html">消息</a>
+                                </span>
+                                : <a href={globalConfig.context + "/user/login/index"}>请登录</a>}
+                            <a onClick={this.logOut}>退出</a>
+                            <a href="./index.html">帮助中心</a>
+                        </span>
+                    </div>
+                </div>
+            </div>
+        )
+    }
+});
+
+export default LoginTop;

+ 27 - 1
js/component/tools.js

@@ -23,7 +23,9 @@ import {
     contractStateList,
     demandTypeList,
     achievementCategoryList,
-    techAuditStatusList
+    techAuditStatusList,
+    maturityList,
+    transferModeList
 } from './dataDic.js';
 import { provinceList } from './DicProvinceList.js';
 import { techFieldList } from './DicTechFieldList.js'
@@ -688,5 +690,29 @@ module.exports = {
             });
             return theType;
         }
+    },
+    //获取需求和成果审核状态
+    getMaturity: function (e) {
+        if (e) {
+            let theType = '';
+            maturityList.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
+    //获取需求和成果审核状态
+    gettTransferMode: function (e) {
+        if (e) {
+            let theType = '';
+            transferModeList.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
     }
 }

+ 17 - 0
js/portal/search/achievement.js

@@ -0,0 +1,17 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+import '../../../css/base.less';
+import '../../../css/login.less';
+
+import Top from '../../component/portal/top.jsx';
+import Content from '../../component/portal/search/content.jsx';
+import Footer from '../../component/portal/footer.jsx';
+
+ReactDOM.render(
+    <div className="wrap">
+        <Top />
+        <Content />
+        <Footer />
+    </div>,
+    document.getElementById('root')
+)

+ 17 - 0
js/portal/search/demand.js

@@ -0,0 +1,17 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+import '../../../css/base.less';
+import '../../../css/login.less';
+
+import Top from '../../component/portal/top.jsx';
+import Content from '../../component/portal/search/content.jsx';
+import Footer from '../../component/portal/footer.jsx';
+
+ReactDOM.render(
+    <div className="wrap">
+        <Top />
+        <Content />
+        <Footer />
+    </div>,
+    document.getElementById('root')
+)

+ 14 - 0
webpack.config.js

@@ -164,6 +164,20 @@ module.exports = (function () {
             filename: 'admin/set.html',
             template: './template/template.html',
             chunks: ['admin/set', 'vendors']
+        }),
+
+        //portal 门户
+        new HtmlWebpackPlugin({
+            title: '主页-需求搜索',
+            filename: 'portal/search/demand.html',
+            template: './template/template.html',
+            chunks: ['portal/search/demand', 'vendors']
+        }),
+        new HtmlWebpackPlugin({
+            title: '主页-科技成果搜索',
+            filename: 'portal/search/achievement.html',
+            template: './template/template.html',
+            chunks: ['portal/search/achievement', 'vendors']
         })
     ];
     if (!isDev) {