yee пре 7 година
родитељ
комит
b33ff5745c
29 измењених фајлова са 927 додато и 248 уклоњено
  1. 15 14
      js/component/account/achievement/techAchievementDesc.jsx
  2. 1 1
      js/component/account/index/normal.jsx
  3. 0 1
      js/component/account/topTab.jsx
  4. 1 1
      js/component/certify/top.jsx
  5. 44 1
      js/component/dataDic.js
  6. 1 1
      js/component/groupCertify/bank.jsx
  7. 2 1
      js/component/groupCertify/confirm.jsx
  8. 1 1
      js/component/groupCertify/top.jsx
  9. 6 2
      js/component/manageCenter/achievement/techAchievementDesc.jsx
  10. 5 1
      js/component/manageCenter/demand/techDemandDesc.jsx
  11. 642 0
      js/component/manageCenter/idea/activity/activity.jsx
  12. 8 0
      js/component/manageCenter/idea/content.jsx
  13. 3 0
      js/component/manageCenter/idea/content.less
  14. 6 0
      js/component/manageCenter/idea/leftTab.jsx
  15. 32 93
      js/component/manageCenter/idea/news/news.jsx
  16. 0 68
      js/component/manageCenter/idea/news/richTextEditors.jsx
  17. 1 1
      js/component/manageCenter/set/leftTab.jsx
  18. 1 3
      js/component/portal/portal.less
  19. 1 1
      js/component/portal/search/achievement.jsx
  20. 1 1
      js/component/portal/search/demand.jsx
  21. 2 2
      js/component/portal/search/subscriberOrg.jsx
  22. 2 3
      js/component/portal/search/subscriberUser.jsx
  23. 4 4
      js/component/portal/top.jsx
  24. 116 0
      js/component/richTextEditors.jsx
  25. 28 44
      js/component/tools.js
  26. 1 1
      js/portal/search/achievement.js
  27. 1 1
      js/portal/search/demand.js
  28. 1 1
      js/portal/search/subscriberOrg.js
  29. 1 1
      js/portal/search/subscriberUser.js

+ 15 - 14
js/component/account/achievement/techAchievementDesc.jsx

@@ -247,11 +247,11 @@ const AchievementDetailShow = Form.create()(React.createClass({
                             label="名称" >
                             <span>{theData.name}</span>
                         </FormItem>
-                        <FormItem className="half-item"
+                        {userData.type ? <FormItem className="half-item"
                             {...formItemLayout}
                             label="联系人" >
                             <span>{this.props.contactsObj[theData.contacts]}</span>
-                        </FormItem>
+                        </FormItem> : <div></div>}
                         <FormItem className="half-item"
                             {...formItemLayout}
                             label="数据类别" >
@@ -807,18 +807,19 @@ const AchievementDetailForm = Form.create()(React.createClass({
                                 <Input />
                                 )}
                         </FormItem>
-                        <FormItem className="half-item"
-                            {...formItemLayout}
-                            label="联系人" >
-                            {getFieldDecorator('contacts', {
-                                rules: [{ required: true, message: '此项为必填项!' }],
-                                initialValue: theData.contacts
-                            })(
-                                <Select placeholder="选择联系人" style={{ width: 260 }} >
-                                    {this.props.contactsOption}
-                                </Select>
-                                )}
-                        </FormItem>
+                        {userData.type ?
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="联系人" >
+                                {getFieldDecorator('contacts', {
+                                    rules: [{ required: true, message: '此项为必填项!' }],
+                                    initialValue: theData.contacts
+                                })(
+                                    <Select placeholder="选择联系人" style={{ width: 260 }} >
+                                        {this.props.contactsOption}
+                                    </Select>
+                                    )}
+                            </FormItem> : <div></div>}
                         <FormItem className="half-item"
                             {...formItemLayout}
                             label="数据类别" >

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

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Spin, Button, Tabs } from 'antd';
+import { Spin, Button, Tabs, message } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 

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

@@ -41,7 +41,6 @@ const TopTab = React.createClass({
                         <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>
-                        <Col className={this.props.active === 'idea' ? 'active' : ''} span={3}><a href={globalConfig.context + "/user/account/idea.html"}>科技思想</a></Col>
                     </Row>
                 </div>
             </div >

+ 1 - 1
js/component/certify/top.jsx

@@ -14,7 +14,7 @@ const LoginTop = React.createClass({
                         <span className="text">实名认证</span>
                         <span className="alink">
                             <a href={globalConfig.context + "/portal/index.html"}>返回首页</a>
-                            <a href="./account/index">尊敬的{userData.nickname || userData.number || this.state.username}</a>
+                            <a href="./account/index">尊敬的{userData.nickname || userData.number }</a>
                             <a href="./login.html">退出</a>
                             <a href="./index.html">交易管理中心</a>
                             <a href="./index.html">消息</a>

+ 44 - 1
js/component/dataDic.js

@@ -754,5 +754,48 @@ module.exports = {
             value: "6",
             key: "关闭"
         }
-    ]
+    ],
+
+    //科技活动
+    //活动类型
+    activityType:[
+        {
+            value: "0",
+            key: "展会"
+        }, {
+            value: "1",
+            key: "对接会"
+        }, {
+            value: "2",
+            key: "峰会"
+        }, {
+            value: "3",
+            key: "论坛"
+        }, {
+            value: "4",
+            key: "沙龙"
+        }, {
+            value: "5",
+            key: "竞赛"
+        }, {
+            value: "6",
+            key: "培训"
+        }, {
+            value: "7",
+            key: "讲座"
+        }, {
+            value: "8",
+            key: "军民融合"
+        }
+    ],
+    //活动形式
+    activityForm:[
+        {
+            value: "0",
+            key: "在线直播"
+        }, {
+            value: "1",
+            key: "线下现场"
+        }
+    ],
 };

+ 1 - 1
js/component/groupCertify/bank.jsx

@@ -174,7 +174,7 @@ const Content = Form.create()(React.createClass({
                             </span>}
                     >
                         {getFieldDecorator('contactMobile')(
-                            <span>{this.state.firstContacts + ' ' + this.state.firstMobile}</span>
+                            <span>{(this.state.firstContacts || '') + ' ' + (this.state.firstMobile || '')}</span>
                         )}
                     </FormItem>
                     <FormItem wrapperCol={{ span: 12, offset: 6 }}>

+ 2 - 1
js/component/groupCertify/confirm.jsx

@@ -24,6 +24,7 @@ const Content = Form.create()(React.createClass({
                         orgCode: data.data.orgCode,
                         orgCodeUrl: data.data.orgCodeUrl,
                         lastYearTaxReportUrl: data.data.lastYearTaxReportUrl,
+                        ratepayId: data.data.ratepayId,
                         firstContacts: data.data.firstContacts,
                         firstMobile: data.data.firstMobile,
                         bankAccount: data.data.bankAccount,
@@ -141,7 +142,7 @@ const Content = Form.create()(React.createClass({
                         wrapperCol={{ span: 18 }}
                         label="上年度纳税报表"
                     >
-                        <a onClick={newDownloadFile.bind(null, this.state.lastYearTaxReportId, "last_year_ratepay", "/api/admin/patent/downloadRatepay")}>上年度纳税报表</a>
+                        <a onClick={newDownloadFile.bind(null, this.state.ratepayId, 'ratepay', '/api/user/cognizance/downloadRatepay', null)}>上年度纳税报表</a>
                     </FormItem>
                     <FormItem wrapperCol={{ span: 12, offset: 6 }}>
                         <p className="certify-title">请确认银行卡信息</p>

+ 1 - 1
js/component/groupCertify/top.jsx

@@ -14,7 +14,7 @@ const LoginTop = React.createClass({
                         <span className="text">实名认证</span>
                         <span className="alink">
                             <a href={globalConfig.context + "/portal/index.html"}>返回首页</a>
-                            <a href="./account/index.html">尊敬的{userData.nickname || userData.number || this.state.username}</a>
+                            <a href="./account/index.html">尊敬的{userData.nickname || userData.number}</a>
                             <a href="./login.html">退出</a>
                             <a href="./index.html">交易管理中心</a>
                             <a href="./index.html">消息</a>

+ 6 - 2
js/component/manageCenter/achievement/techAchievementDesc.jsx

@@ -518,7 +518,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
                                 <FormItem className="half-item"
                                     {...formItemLayout}
                                     label="联系电话" >
-                                    <span>{this.state.contactsObj[theData.contacts]}</span>
+                                    {theData.ownerType == "1" ? <span>{this.state.contactsObj[theData.contacts]}</span> : <span>{theData.iOwnerMobile}</span>}
                                 </FormItem>
                                 <FormItem className="half-item"
                                     {...formItemLayout}
@@ -648,7 +648,11 @@ const AchievementDetailShow = Form.create()(React.createClass({
                             {getFieldDecorator('techBroderId', {
                                 initialValue: theData.techBroderId
                             })(
-                                <Select style={{ width: 260 }}>
+                                <Select style={{ width: 260 }}
+                                    placeholder="请选择技术经纪人"
+                                    notFoundContent="未获取到经纪人列表"
+                                    showSearch
+                                    filterOption={companySearch}>
                                     {this.props.techBrodersOption}
                                 </Select>
                                 )}

+ 5 - 1
js/component/manageCenter/demand/techDemandDesc.jsx

@@ -584,7 +584,11 @@ const DemandDetailShow = Form.create()(React.createClass({
                             {getFieldDecorator('techBroderId', {
                                 initialValue: theData.techBroderId
                             })(
-                                <Select style={{ width: 260 }}>
+                                <Select style={{ width: 260 }}
+                                    placeholder="请选择技术经纪人"
+                                    notFoundContent="未获取到经纪人列表"
+                                    showSearch
+                                    filterOption={companySearch}>
                                     {this.props.techBrodersOption}
                                 </Select>
                                 )}

+ 642 - 0
js/component/manageCenter/idea/activity/activity.jsx

@@ -0,0 +1,642 @@
+import React from 'react';
+import { Icon, Button, Spin, message, Table, Input, Modal, DatePicker, Upload, Select } from 'antd';
+import { beforeUpload, getBase64, getActivityForm, getActivityType, splitUrl } from '../../../tools';
+import { activityForm, activityType } from '../../../dataDic';
+import moment from 'moment';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+
+
+const Avatar = React.createClass({
+    getInitialState() {
+        return {
+            imageUrl: ''
+        }
+    },
+    handleChange(info) {
+        if (info.file.status === 'done') {
+            // Get this url from response in real world.
+            getBase64(info.file.originFileObj, imageUrl => this.setState({ imageUrl }));
+            this.props.urlData(info.file.response.data);
+        }
+    },
+    componentWillReceiveProps(nextProps) {
+        if (this.props.visible && !nextProps.visible) {
+            this.state.imageUrl = null;
+        };
+    },
+    render() {
+        const imageUrl = this.state.imageUrl;
+        return (
+            <Upload
+                className="avatar-uploader"
+                name={this.props.name}
+                showUploadList={false}
+                action={globalConfig.context + "/api/admin/activity/upload"}
+                data={{ 'sign': 'activity_title_picture' }}
+                beforeUpload={beforeUpload}
+                onChange={this.handleChange} >
+                {
+                    (imageUrl || this.props.imageUrl) ?
+                        <img src={imageUrl || this.props.imageUrl} role="presentation" id={this.props.name} /> :
+                        <Icon type="plus" className="avatar-uploader-trigger" />
+                }
+            </Upload>
+        );
+    }
+});
+
+const PicturesWall = React.createClass({
+    getInitialState() {
+        return {
+            previewVisible: false,
+            previewImage: '',
+            fileList: [],
+        }
+    },
+    handleCancel() {
+        this.setState({ previewVisible: false })
+    },
+    handlePreview(file) {
+        this.setState({
+            previewImage: file.url || file.thumbUrl,
+            previewVisible: true,
+        });
+    },
+    handleChange(info) {
+        let fileList = info.fileList;
+        this.setState({ fileList });
+        this.props.fileList(fileList);
+    },
+    componentWillReceiveProps(nextProps) {
+        this.state.fileList = nextProps.pictureUrl;
+    },
+    render() {
+        const { previewVisible, previewImage, fileList } = this.state;
+        const uploadButton = (
+            <div>
+                <Icon type="plus" />
+                <div className="ant-upload-text">点击上传</div>
+            </div>
+        );
+        return (
+            <div className="clearfix">
+                <Upload
+                    action={globalConfig.context + "/api/admin/activity/upload"}
+                    data={{ 'sign': 'activity_content_picture' }}
+                    listType="picture-card"
+                    fileList={fileList}
+                    onPreview={this.handlePreview}
+                    onChange={this.handleChange} >
+                    {fileList.length >= 5 ? null : uploadButton}
+                </Upload>
+                <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
+                    <img alt="example" style={{ width: '100%' }} src={previewImage} />
+                </Modal>
+            </div>
+        );
+    }
+});
+
+const Activity = React.createClass({
+    loadData(pageNo) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/activity/list',
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                sTime: this.state.startDate, //活动开始时间(startTime起)
+                eTime: this.state.endDate, //活动开始时间(startTime止)
+                name: this.state.searchName,
+                host: this.state.searchHost,
+                type: this.state.searchType ? Number(this.state.searchType) : undefined, // 活动类型
+                form: this.state.searchForm ? Number(this.state.searchForm) : undefined, //活动形式
+            },
+            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,
+                            startTime: thisdata.startTime,
+                            startTimeFormattedDate: thisdata.startTimeFormattedDate,
+                            endTime: thisdata.endTime,
+                            endTimeFormattedDate: thisdata.endTimeFormattedDate,
+                            name: thisdata.name,
+                            host: thisdata.host,
+                            type: thisdata.type,
+                            form: thisdata.form,
+                            enrollDeadline: thisdata.enrollDeadline,
+                            enrollDeadlineFormattedDate: thisdata.enrollDeadlineFormattedDate
+                        });
+                    };
+                    this.state.pagination.current = data.data.pageNo;
+                    this.state.pagination.total = data.data.totalCount;
+                };
+                this.setState({
+                    tableData: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    loadDetailData() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/activity/detail',
+            data: {
+                id: this.state.RowData.id //新闻主键ID(数字类型,非字符串)
+            },
+            success: function (data) {
+                let theObj = {}, theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    theObj = data.data;
+                    theArr = theObj.asist ? theObj.asist.split(',') : [];
+                    theObj.imgUrls = theObj.imgUrls ? splitUrl(theObj.imgUrls, ',', globalConfig.avatarHost + '/upload') : [];
+                };
+                this.setState({
+                    RowData: theObj,
+                    asistArray: theArr
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            loading: false,
+            visible: false,
+            selectedRowKeys: [],
+            selectedRows: [],
+            asistArray: [],
+            keysObj: {},
+            RowData: {},
+            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: 'name',
+                    key: 'name',
+                    width: '20%'
+                }, {
+                    title: '主办单位',
+                    dataIndex: 'host',
+                    key: 'host',
+                }, {
+                    title: '活动类型',
+                    dataIndex: 'type',
+                    key: 'type',
+                    render: (text) => { return getActivityType(text); }
+                }, {
+                    title: '活动形式',
+                    dataIndex: 'form',
+                    key: 'form',
+                    render: (text) => { return getActivityForm(text); }
+                }, {
+                    title: '报名截止时间',
+                    dataIndex: 'enrollDeadlineFormattedDate',
+                    key: 'enrollDeadlineFormattedDate'
+                }, {
+                    title: '活动开始时间',
+                    dataIndex: 'startTimeFormattedDate',
+                    key: 'startTimeFormattedDate'
+                }
+            ],
+            tableData: []
+        };
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        this.loadDetailData();
+        this.setState({
+            visible: true
+        });
+    },
+    componentWillMount() {
+        this.loadData();
+        let theTypeOption = [], theFormOption = [];
+        activityType.map((item) => {
+            theTypeOption.push(
+                <Select.Option key={item.value}>{item.key}</Select.Option>
+            )
+        });
+        activityForm.map((item) => {
+            theFormOption.push(
+                <Select.Option key={item.value}>{item.key}</Select.Option>
+            )
+        });
+        this.state.activityTypeOption = theTypeOption;
+        this.state.activityFormOption = theFormOption;
+    },
+    submit() {
+        if (!this.state.RowData.name) {
+            message.warning('必须填写一个标题!');
+            return;
+        };
+        if (!this.state.RowData.startTimeFormattedDate) {
+            message.warning('必须选择一个活动开始时间!');
+            return;
+        };
+        if (!this.state.RowData.type) {
+            message.warning('必须选择一个活动类型!');
+            return;
+        };
+        if (!this.state.RowData.form) {
+            message.warning('必须选择一个活动形式!');
+            return;
+        };
+        if (!this.state.RowData.address) {
+            message.warning('必须选择一个活动地点!');
+            return;
+        };
+        let imgUrls = null;
+        if (this.state.RowData.imgUrls.length) {
+            let picArr = [];
+            this.state.RowData.imgUrls.map(function (item) {
+                picArr.push(item.response.data);
+            });
+            imgUrls = picArr.join(",");
+        };
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + (this.state.RowData.id ? '/api/admin/activity/update' : '/api/admin/activity/add'),
+            data: {
+                id: this.state.RowData.id || null, //主键,如果不填主键则为新增记录,填主键则为更新
+                name: this.state.RowData.name,// 标题,
+                address: this.state.RowData.address,// 活动地址,
+                host: this.state.RowData.host,// 主办单位,
+                undertake: this.state.RowData.undertake,// 承办单位,
+                asist: this.state.asistArray ? this.state.asistArray.join(',') : undefined,// 协办单位A,协办单位B,
+                type: this.state.RowData.type,// 0, //活动类型
+                form: this.state.RowData.form,// 1, //活动形式
+                imgUrls: imgUrls,// 活动图片,
+                result: this.state.RowData.result,// 活动结果,
+                titleUrl: this.state.RowData.titleUrl,// 题图URL,
+                summary: this.state.RowData.summary,// 描述,
+                startTimeFormattedDate: this.state.RowData.startTimeFormattedDate,// 2012-02-02, //活动开始时间 yyyy-MM-dd
+                endTimeFormattedDate: this.state.RowData.endTimeFormattedDate,// 2012-09-09, //活动结束时间 yyyy-MM-dd
+                enrollDeadlineFormattedDate: this.state.RowData.enrollDeadlineFormattedDate,// 2012-09-09, //报名结束时间 yyyy-MM-dd
+            },
+            success: function (data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                } else {
+                    message.success('保存成功!');
+                    this.setState({ visible: false });
+                    this.loadData();
+                };
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    delectRow() {
+        let deletedIds = [];
+        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
+            let rowItem = this.state.selectedRows[idx];
+            if (rowItem.id) {
+                deletedIds.push(rowItem.id)
+            };
+        };
+        this.setState({
+            selectedRowKeys: [],
+            loading: deletedIds.length > 0
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/activity/delete",
+            data: {
+                ids: deletedIds
+            }
+        }).done(function (data) {
+            if (data.error && data.error.length) {
+                message.warning(data.error[0].message);
+            } else {
+                message.success('删除成功!');
+            };
+            this.setState({
+                loading: false,
+            });
+            this.loadData();
+        }.bind(this));
+    },
+    reset() {
+        this.state.startDate = undefined;
+        this.state.endDate = undefined;
+        this.state.searchName = undefined;
+        this.state.searchHost = undefined;
+        this.state.searchType = undefined;
+        this.state.searchForm = undefined;
+        this.loadData();
+    },
+    render() {
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
+                });
+            }
+        };
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        return (
+            <div className="admin-content" >
+                <div className="admin-content-title">
+                    <span>活动圈管理</span>
+                    <Button type="primary" style={{ float: 'right' }}
+                        onClick={() => { this.setState({ RowData: {}, visible: true }) }}>
+                        添加<Icon type="plus" />
+                    </Button>
+                </div>
+                <div className="admin-content-warp">
+                    <div className="admin-content-search">
+                        <Input placeholder="活动名称" style={{ width: 200 }}
+                            value={this.state.searchName}
+                            onChange={(e) => { this.setState({ searchName: e.target.value }); }} />
+                        <Input placeholder="主办单位" style={{ width: 200 }}
+                            value={this.state.searchHost}
+                            onChange={(e) => { this.setState({ searchHost: e.target.value }); }} />
+                        <Select placeholder="活动类型"
+                            style={{ width: 100 }}
+                            value={this.state.searchType}
+                            onChange={(e) => { this.setState({ searchType: e }) }}>
+                            {this.state.activityTypeOption}
+                        </Select>
+                        <Select placeholder="活动形式"
+                            style={{ width: 100 }}
+                            value={this.state.searchForm}
+                            onChange={(e) => { this.setState({ searchForm: e }) }}>
+                            {this.state.activityFormOption}
+                        </Select>
+                        <span>活动时间</span>
+                        <DatePicker style={{ width: 150 }}
+                            showTime
+                            format="YYYY-MM-DD HH:mm:ss"
+                            placeholder="搜索开始时间"
+                            value={this.state.startDate ? moment(this.state.startDate, "YYYY-MM-DD HH:mm:ss") : undefined}
+                            onChange={(t, str) => {
+                                this.setState({ startDate: str });
+                            }} />
+                        <span>到</span>
+                        <DatePicker style={{ width: 150 }}
+                            showTime
+                            format="YYYY-MM-DD HH:mm:ss"
+                            placeholder="搜索结束时间"
+                            value={this.state.endDate ? moment(this.state.endDate, "YYYY-MM-DD HH:mm:ss") : undefined}
+                            onChange={(t, str) => {
+                                this.setState({ endDate: str });
+                            }} />
+                        <Button type="primary" onClick={() => { this.loadData() }}>搜索</Button>
+                        <Button onClick={this.reset}>重置</Button>
+                        <Button type='danger' disabled={!hasSelected} onClick={this.delectRow}>
+                            删除<Icon type="minus" />
+                        </Button>
+                    </div>
+                    <Spin spinning={this.state.loading}>
+                        <Table className="no-all-select" columns={this.state.columns}
+                            dataSource={this.state.tableData}
+                            pagination={this.state.pagination}
+                            rowSelection={rowSelection}
+                            onRowClick={this.tableRowClick} />
+                    </Spin>
+                </div>
+                <Modal title="活动详情" width={600} className="activity-modal"
+                    visible={this.state.visible}
+                    maskClosable={false}
+                    footer={null}
+                    afterClose={() => { this.state.RowData = {}; this.state.asist = null; this.state.asistArray = []; }}
+                    onCancel={() => { this.setState({ visible: false }) }} >
+                    <Spin spinning={this.state.loading}>
+                        <div className="clearfix">
+                            <div className="modal-box">
+                                <span className="modal-box-title">活动标题</span>
+                                <div className="modal-box-detail">
+                                    <Input value={this.state.RowData.name}
+                                        onChange={(e) => {
+                                            this.state.RowData.name = e.target.value;
+                                            this.setState({ RowData: this.state.RowData });
+                                        }} />
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">标题图片</span>
+                                <div className="modal-box-detail clearfix" style={{ width: '360px' }}>
+                                    <Avatar visible={this.state.visible}
+                                        imageUrl={this.state.RowData.titleUrl ? (globalConfig.avatarHost + "/upload" + this.state.RowData.titleUrl) : null}
+                                        urlData={(url) => { this.state.RowData.titleUrl = url }} />
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">活动描述</span>
+                                <div className="modal-box-detail">
+                                    <Input type="textarea" rows={4} value={this.state.RowData.summary}
+                                        onChange={(e) => {
+                                            this.state.RowData.summary = e.target.value;
+                                            this.setState({ RowData: this.state.RowData });
+                                        }} />
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">活动类型</span>
+                                <div className="modal-box-detail" style={{ width: '160px' }}>
+                                    <Select placeholder="选择活动类型"
+                                        style={{ width: 120 }}
+                                        value={this.state.RowData.type}
+                                        onChange={(e) => {
+                                            this.state.RowData.type = e;
+                                            this.setState({ RowData: this.state.RowData });
+                                        }}>
+                                        {this.state.activityTypeOption}
+                                    </Select>
+                                </div>
+                                <span className="modal-box-title">活动形式</span>
+                                <div className="modal-box-detail" style={{ width: '160px' }}>
+                                    <Select placeholder="选择活动形式"
+                                        style={{ width: 120 }}
+                                        value={this.state.RowData.form}
+                                        onChange={(e) => {
+                                            this.state.RowData.form = e;
+                                            this.setState({ RowData: this.state.RowData });
+                                        }}>
+                                        {this.state.activityFormOption}
+                                    </Select>
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">活动地址</span>
+                                <div className="modal-box-detail">
+                                    <Input value={this.state.RowData.address}
+                                        onChange={(e) => {
+                                            this.state.RowData.address = e.target.value;
+                                            this.setState({ RowData: this.state.RowData });
+                                        }} />
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">主办单位</span>
+                                <div className="modal-box-detail">
+                                    <Input value={this.state.RowData.host}
+                                        onChange={(e) => {
+                                            this.state.RowData.host = e.target.value;
+                                            this.setState({ RowData: this.state.RowData });
+                                        }} />
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">承办单位</span>
+                                <div className="modal-box-detail">
+                                    <Input value={this.state.RowData.undertake}
+                                        onChange={(e) => {
+                                            this.state.RowData.undertake = e.target.value;
+                                            this.setState({ RowData: this.state.RowData });
+                                        }} />
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">协办单位</span>
+                                <div className="modal-box-detail">
+                                    <Input value={this.state.asist} style={{ width: '320px', marginRight: '20px' }}
+                                        onChange={(e) => { this.setState({ asist: e.target.value }); }} />
+                                    <Button onClick={() => {
+                                        let _me = this, theArr = this.state.asistArray.concat(), theBool = true;
+                                        if (!theArr.length) {
+                                            theArr.push(this.state.asist);
+                                        } else {
+                                            this.state.asistArray.map((item, i) => {
+                                                if (item === _me.state.asist) {
+                                                    theBool = false;
+                                                };
+                                            });
+                                            if (theBool) {
+                                                theArr.push(_me.state.asist);
+                                            } else {
+                                                message.warning('已经录入该单位!')
+                                            }
+                                        };
+                                        this.setState({ asistArray: theArr, asist: null });
+                                    }}>添加</Button>
+                                </div>
+                                <div className="modal-box-detail" style={{ marginLeft: '106px' }}>
+                                    {this.state.asistArray.map((item, i) => {
+                                        return <p key={i}>{item}</p>
+                                    })}
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">活动时间</span>
+                                <div className="modal-box-detail">
+                                    <DatePicker style={{ width: '150px' }}
+                                        showTime
+                                        format="YYYY-MM-DD HH:mm:ss"
+                                        placeholder="选择开始时间"
+                                        value={this.state.RowData.startTimeFormattedDate ? moment(this.state.RowData.startTimeFormattedDate, "YYYY-MM-DD HH:mm:ss") : undefined}
+                                        onChange={(t, str) => {
+                                            this.state.RowData.startTimeFormattedDate = str;
+                                            this.setState({ RowData: this.state.RowData });
+                                        }} />
+                                    <span>到</span>
+                                    <DatePicker style={{ width: '150px' }}
+                                        showTime
+                                        format="YYYY-MM-DD HH:mm:ss"
+                                        placeholder="选择结束时间"
+                                        value={this.state.RowData.endTimeFormattedDate ? moment(this.state.RowData.endTimeFormattedDate, "YYYY-MM-DD HH:mm:ss") : undefined}
+                                        onChange={(t, str) => {
+                                            this.state.RowData.endTimeFormattedDate = str;
+                                            this.setState({ RowData: this.state.RowData });
+                                        }} />
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">报名截止时间</span>
+                                <div className="modal-box-detail">
+                                    <DatePicker style={{ width: '150px' }}
+                                        showTime
+                                        format="YYYY-MM-DD HH:mm:ss"
+                                        placeholder="选择截止时间"
+                                        value={this.state.RowData.enrollDeadlineFormattedDate ? moment(this.state.RowData.enrollDeadlineFormattedDate, "YYYY-MM-DD HH:mm:ss") : undefined}
+                                        onChange={(t, str) => {
+                                            this.state.RowData.enrollDeadlineFormattedDate = str;
+                                            this.setState({ RowData: this.state.RowData });
+                                        }} />
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">活动图片</span>
+                                <div className="modal-box-detail">
+                                    <PicturesWall
+                                        fileList={(e) => { this.state.RowData.imgUrls = e; this.setState({ RowData: this.state.RowData }); }}
+                                        pictureUrl={this.state.RowData.imgUrls || []} />
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">活动结果描述</span>
+                                <div className="modal-box-detail">
+                                    <Input type="textarea" rows={4} value={this.state.RowData.result}
+                                        onChange={(e) => {
+                                            this.state.RowData.result = e.target.value;
+                                            this.setState({ RowData: this.state.RowData });
+                                        }} />
+                                </div>
+                            </div>
+                        </div>
+                        <div className="modal-box">
+                            <Button type="primary" onClick={this.submit}>提交</Button>
+                            <Button type="ghost" onClick={() => { this.setState({ visible: false }) }}>取消</Button>
+                        </div>
+                    </Spin>
+                </Modal>
+            </div >
+        );
+    }
+});
+
+export default Activity;

+ 8 - 0
js/component/manageCenter/idea/content.jsx

@@ -77,6 +77,14 @@ class Content extends Component {
                     });
                 });
                 break;
+            case 'activity':
+                require.ensure([], () => {
+                    const Activity = require('./activity/activity').default;
+                    this.setState({
+                        component: <Activity />
+                    });
+                });
+                break;
         };
         window.location.hash = key;
     }

+ 3 - 0
js/component/manageCenter/idea/content.less

@@ -63,6 +63,9 @@
     .quill {
         margin-top: 40px;
         margin-bottom: 40px;
+        .ql-editor {
+            min-height: 400px;
+        }
     }
     .ant-modal-body {
         padding-bottom: 50px;

+ 6 - 0
js/component/manageCenter/idea/leftTab.jsx

@@ -13,6 +13,7 @@ const LeftTab = React.createClass({
             keyList: [
                 { key: 'sub1', value: ['star', 'lecture'] },
                 { key: 'sub2', value: ['flash', 'localPolicy', 'nationalPolicy', 'contact'] },
+                { key: 'sub3', value: ['activity'] },
                 { key: 'sub10', value: ['banner'] }
             ]
         };
@@ -67,6 +68,11 @@ const LeftTab = React.createClass({
                         政府往来
                     </Menu.Item>
                 </SubMenu>
+                <SubMenu key="sub3" title={<span>活动圈</span>}>
+                    <Menu.Item key="activity">
+                        活动圈
+                    </Menu.Item>
+                </SubMenu>
                 <SubMenu key="sub10" title={<span>广告图</span>}>
                     <Menu.Item key="banner">
                         广告图管理

+ 32 - 93
js/component/manageCenter/idea/news/news.jsx

@@ -1,46 +1,12 @@
 import React from 'react';
-import { Icon, Button, Spin, message, Table, Input, Modal, DatePicker, Upload, Select, Radio, Tabs } from 'antd';
+import { Icon, Button, Spin, message, Table, Input, Modal, DatePicker, Upload, Select, Radio } from 'antd';
 import { beforeUpload, getBase64 } from '../../../tools';
-import theme from 'react-quill/dist/quill.snow.css'
-import ReactQuill from 'react-quill'
+import Editors from '../../../richTextEditors'
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 
-function uploadImg(s) {
-    let myform = new FormData(), file = document.getElementById("fileToUpload").files[0];
-    if (!file) {
-        return;
-    }
-    myform.append('file', file);
-    myform.append('sign', 'news_content_picture');
-    $.ajax({
-        method: "post",
-        dataType: "json",
-        url: location.origin + "/api/admin/news/upload",
-        data: myform,
-        contentType: false,
-        processData: false,
-        success: function (data) {
-            if (data.error && data.error.length) {
-                message.warning(data.error[0].message);
-            } else {
-                const cursorPosition = s.quill.getSelection().index
-                s.quill.insertEmbed(cursorPosition, 'image', globalConfig.avatarHost + '/upload' + data.data)
-                s.quill.setSelection(cursorPosition + 1)
-            };
-        }
-    })
-}
-function fileSelect() {
-    let uploader = document.getElementById("fileToUpload");
-    if (!uploader.onchange) {
-        uploader.onchange = () => {
-            uploadImg(this)
-        }
-    }
-    uploader.click();
-}
+
 const Avatar = React.createClass({
     getInitialState() {
         return {
@@ -112,7 +78,7 @@ const News = React.createClass({
                         let thisdata = data.data.list[i];
                         theArr.push({
                             key: i,
-                            id: thisdata.id,
+                            id: thisdata.id ? thisdata.id.toString() : null,
                             createTime: thisdata.createTime,
                             editTime: thisdata.editTime,
                             title: thisdata.title,
@@ -235,17 +201,12 @@ const News = React.createClass({
             this.loadData(1, nextProps.newsType);
         };
     },
-    handleRichText(value) {
-        console.log(value);
-        this.state.RowData.content = value;
-        this.setState({ RowData: this.state.RowData });
-    },
     submit() {
         if (!this.state.RowData.title) {
             message.warning('必须填写一个标题!');
             return;
         };
-        if (!this.state.RowData.createTime) {
+        if (!this.state.RowData.createTimeFormattedDate) {
             message.warning('必须选择一个发布时间!');
             return;
         };
@@ -322,7 +283,12 @@ const News = React.createClass({
         }.bind(this));
     },
     reset() {
-        this.state.searchKey = undefined;
+        this.state.searchTitle = undefined;
+        this.state.searchAuthor = undefined;
+        this.state.startDate = undefined;
+        this.state.endDate = undefined;
+        this.state.searchSource = undefined;
+        this.state.searchHot = undefined;
         this.loadData();
     },
     render() {
@@ -336,42 +302,23 @@ const News = React.createClass({
             }
         };
         const hasSelected = this.state.selectedRowKeys.length > 0;
-        const modules = {
-            toolbar: {
-                container: [
-                    [{ 'size': ['small', false, 'large', 'huge'] }],  // custom dropdown
-                    [{ 'header': [1, 2, 3, false] }],
-
-                    ['bold', 'italic', 'underline', 'strike', 'blockquote'],        // toggled buttons
-
-                    //  [{ 'header': 1 }, { 'header': 2 }],               // custom button values
-                    [{ 'list': 'ordered' }, { 'list': 'bullet' }],
-                    //  [{ 'script': 'sub' }, { 'script': 'super' }],      // superscript/subscript
-                    [{ 'indent': '-1' }, { 'indent': '+1' }],          // outdent/indent
-                    //  [{ 'direction': 'rtl' }],                         // text direction
-
-                    [{ 'color': [] }, { 'background': [] }],          // dropdown with defaults from theme
-                    //  [{ 'font': [] }],
-                    [{ 'align': [] }],
-                    ['link', 'image'],
-                    ['clean']
-                ],
-                handlers: { 'image': fileSelect }
-            }
-        };
-        const formats = [
-            'size', 'header',
-            'bold', 'italic', 'underline', 'strike', 'blockquote',
-            'list', 'bullet', 'indent',
-            'color', 'background',
-            'align',
-            'link', 'image'
-        ];
         return (
             <div className="admin-content" >
-                <div className="admin-content-title">科技快讯管理</div>
+                <div className="admin-content-title">
+                    {(() => {
+                        switch (this.props.newsType) {
+                            case 1: return <span>科技快讯管理</span>;
+                            case 4: return <span>国家政策管理</span>;
+                            case 5: return <span>地方政策管理</span>;
+                            case 2: return <span>政府往来管理</span>;
+                        }
+                    })()}
+                    <Button type="primary" style={{ float: 'right' }}
+                        onClick={() => { this.setState({ RowData: {}, visible: true }) }}>
+                        添加<Icon type="plus" />
+                    </Button>
+                </div>
                 <div className="admin-content-warp">
-                    <div className="admin-content-header">科技快讯列表</div>
                     <div className="admin-content-search">
                         <Input placeholder="标题" style={{ width: 200 }}
                             value={this.state.searchTitle}
@@ -410,10 +357,6 @@ const News = React.createClass({
                         <Button type='danger' disabled={!hasSelected} onClick={this.delectRow}>
                             删除<Icon type="minus" />
                         </Button>
-                        <Button type="primary" style={{ float: 'right' }}
-                            onClick={() => { this.setState({ RowData: {}, visible: true }) }}>
-                            添加<Icon type="plus" />
-                        </Button>
                     </div>
                     <Spin spinning={this.state.loading}>
                         <Table className="no-all-select" columns={this.state.columns}
@@ -444,7 +387,7 @@ const News = React.createClass({
                             <div className="modal-box">
                                 <span className="modal-box-title">简介</span>
                                 <div className="modal-box-detail">
-                                    <Input value={this.state.RowData.summary}
+                                    <Input type="textarea" rows={3} value={this.state.RowData.summary}
                                         onChange={(e) => {
                                             this.state.RowData.summary = e.target.value;
                                             this.setState({ RowData: this.state.RowData });
@@ -475,7 +418,7 @@ const News = React.createClass({
                                 <span className="modal-box-title">标题图片</span>
                                 <div className="modal-box-detail clearfix" style={{ width: '360px' }}>
                                     <Avatar sign={'news'} visible={this.state.visible}
-                                        imageUrl={this.state.RowData.titleImg ? (globalConfig.avatarHost + "/upload" + this.state.RowData.imgurl) : null}
+                                        imageUrl={this.state.RowData.titleImg ? (globalConfig.avatarHost + "/upload" + this.state.RowData.titleImg) : null}
                                         urlData={(url) => { this.state.RowData.titleImg = url }} />
                                 </div>
                             </div>
@@ -520,15 +463,11 @@ const News = React.createClass({
                         <div className="modal-box">
                             <span className="modal-box-title">新闻内容</span>
                         </div>
-                        <ReactQuill theme="snow"
-                            value={this.state.RowData.content}
-                            modules={modules}
-                            formats={formats}
-                            onChange={this.handleRichText} />
-                        <input type="file"
-                            name="fileToUpload"
-                            id="fileToUpload"
-                            style={{ "display": "none" }} />
+                        <Editors textContent={this.state.RowData.content}
+                            uploadUrl={'/api/admin/news/upload'}
+                            uploadSign={'news_content_picture'}
+                            handleRichText={(value) => { this.state.RowData.content = value; }}
+                            visible={this.state.visible} />
                         <div className="modal-box">
                             <Button type="primary" onClick={this.submit}>提交</Button>
                             <Button type="ghost" onClick={() => { this.setState({ visible: false }) }}>取消</Button>

+ 0 - 68
js/component/manageCenter/idea/news/richTextEditors.jsx

@@ -1,68 +0,0 @@
-import React from 'react';
-import ReactDOM from 'react-dom';
-import LzEditor from 'react-lz-editor'
-class Editors extends React.Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            content: `<h1>一级标题 Head level 1</h1>
-              <p style='text-align:center;'><span style="color:#ED5565">红色文字</span>,居中对齐,<strong>加粗</strong>,<em>斜体</em></p>
-              <blockquote style='text-align:left;'><span style="color:#ffce54">其</span><span style="color:#a0d468">他</span><span style="color:#38afda">颜</span><span style="color:#967adc">色</span> <span style="color:#a0d468">C</span><span style="color:#48cfad">OL</span><span style="color:#4a89dc">O</span><span style="color:#967adc">R</span><span style="color:#434a54">S</span></blockquote>
-              <p><br></p>
-              <ul>
-                <li><span style="color:#434a54">list 1</span></li>
-                <li><span style="color:#434a54">list 2</span></li>
-                <li><span style="color:#434a54">list 3</span></li>
-                <li><span style="color:#434a54">......</span></li>
-              </ul>
-              <pre><code>Block here.Block here.Block here.Block here.</code></pre>
-              <pre><code>Block here.Block here.Block here.Block here.Block here.</code></pre>
-              <pre><code>Block here.Block here.Block here.Block here.Block here.</code></pre>
-              <p><img src="https://image.qiluyidian.mobi/43053508139910678747.jpg"/></p>
-              <p><br></p>
-              <h2>正文示例:</h2>
-              <h3>乐视金融传将收购数码视讯子公司,拿下互联网、数字电视两张支付牌照</h3>
-              <p>用场景化的方式表达就是,用户可以在观看电视购物频道的时候,直接从电视上进行支付购买商品,不用再通过银行汇款或者货到付款;可以选择对电视上的点播内容进行付费,还可能在电视上对水电煤等公用事业费用进行缴费。</p>
-              <p>一度金融的消息称,乐视金融同数码视讯的接触尚处在高层范围内进行,因此对于收购价格,暂时还不能确定。</p>
-              <p>如果乐视金融拿下数码视讯的两张金融牌照,并且在到期后能够获得央行审核顺利延期,意味着乐视可以通过移动设备和电视两个终端来链接用户的银行卡。</p>
-              <p>乐视金融在去年11月份首度公开亮相的时候,缺少银行和支付两张关键牌照就一直是外界关注的问题。</p>`
-        }
-        this.receiveHtml = this.receiveHtml.bind(this);
-        this.onChange = this.onChange.bind(this);
-        this.beforeUpload = this.beforeUpload.bind(this);
-    }
-    receiveHtml(content) {
-        console.log("Recieved content", content);
-    }
-    onChange(info) {
-        console.log("onChange:", info);
-    }
-    beforeUpload(file) {
-        console.log("beforeUpload:", file);
-    }
-    render() {
-        //uploadProps 配置方法见 https://ant.design/components/upload-cn/
-        const uploadProps = {
-            action: "",
-            onChange: this.onChange,
-            listType: 'picture',
-            fileList: [""],
-            data: (file) => {//支持自定义保存文件名、扩展名支持
-                console.log("uploadProps data", file)
-            },
-            multiple: true,
-            beforeUpload: this.beforeUpload,
-            showUploadList: true
-        }
-        return <LzEditor
-            active={true}
-            importContent={this.state.content}
-            cbReceiver={this.receiveHtml}
-            uploadProps={uploadProps}
-            fullScreen={false}
-            convertFormat="html" />
-    }
-}
-
-
-export default Editors;

+ 1 - 1
js/component/manageCenter/set/leftTab.jsx

@@ -38,7 +38,7 @@ const LeftTab = React.createClass({
                 <Menu.Item key="role">
                     角色控制
                 </Menu.Item>
-                <Menu.Item key="site">
+                <Menu.Item key="site" style={{display:'none'}}>
                     站点设置
                 </Menu.Item>
             </Menu>

+ 1 - 3
js/component/portal/portal.less

@@ -372,6 +372,7 @@
             >li {
                 &:hover {
                     box-shadow: 0px 0px 12px 2px #58a3ff;
+                    cursor: pointer;
                 }
             }
             .user-detail {
@@ -570,9 +571,6 @@
         margin-top: 20px;
         border: 1px solid #ececec;
         padding: 0 20px 20px;
-        &:hover {
-            box-shadow: 0px 0px 4px #58a3ff;
-        }
     }
     .interest_list_title {
         line-height: 40px;

+ 1 - 1
js/component/portal/search/achievement.jsx

@@ -262,7 +262,7 @@ const Content = React.createClass({
                         </Col>
                         <Col span={10}>
                             <div className="nav-search">
-                                <Input placeholder="请输入关键词" onChange={(e) => { this.state.keyword = e.target.value; }} />
+                                <Input value={this.state.keyword} placeholder="请输入关键词" onChange={(e) => { this.setState({ keyword: e.target.value }); }} />
                                 <Button onClick={() => { this.loadData() }}>
                                     <img src={searchImg} alt="" />
                                 </Button>

+ 1 - 1
js/component/portal/search/demand.jsx

@@ -239,7 +239,7 @@ const Content = React.createClass({
                         </Col>
                         <Col span={6}>
                             <div className="nav-search">
-                                <Input placeholder="请输入关键词" onChange={(e) => { this.state.keyword = e.target.value; }} />
+                                <Input value={this.state.keyword} placeholder="请输入关键词" onChange={(e) => { this.setState({ keyword: e.target.value }); }} />
                                 <Button onClick={() => { this.loadData() }}>
                                     <img src={searchImg} alt="" />
                                 </Button>

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

@@ -109,7 +109,7 @@ const SubContent = React.createClass({
 
         if (window.location.search) {
             let theUrl = window.location.search
-            this.state.keyword = theUrl.substring(1, theUrl.length);
+            this.state.searchName = theUrl.substring(1, theUrl.length);
         };
 
         this.loadData();
@@ -268,7 +268,7 @@ const SubContent = React.createClass({
                         </Col>
                         <Col span={6}>
                             <div className="nav-search" style={{ float: 'none', marginBottom: '10px' }}>
-                                <Input onChange={(e) => { this.state.searchName = e.target.value; }} />
+                                <Input value={this.state.searchName} onChange={(e) => { this.setState({ searchName: e.target.value }); }} />
                                 <Button onClick={() => { this.loadData() }}>
                                     <img src={searchImg} alt="" />
                                 </Button>

+ 2 - 3
js/component/portal/search/subscriberUser.jsx

@@ -106,9 +106,8 @@ const SubContent = React.createClass({
 
         if (window.location.search) {
             let theUrl = window.location.search
-            this.state.keyword = theUrl.substring(1, theUrl.length);
+            this.state.searchName = theUrl.substring(1, theUrl.length);
         };
-
         this.loadData();
     },
     fieldFirstChange(e) {
@@ -219,7 +218,7 @@ const SubContent = React.createClass({
                         </Col>
                         <Col span={6}>
                             <div className="nav-search" style={{ float: 'none', marginBottom: '10px' }}>
-                                <Input onChange={(e) => { this.state.searchName = e.target.value; }} />
+                                <Input value={this.state.searchName} onChange={(e) => { this.setState({ searchName: e.target.value }); }} />
                                 <Button onClick={() => { this.loadData() }}>
                                     <img src={searchImg} alt="" />
                                 </Button>

+ 4 - 4
js/component/portal/top.jsx

@@ -70,10 +70,10 @@ const LoginTop = React.createClass({
                                 <li className="active">
                                     <a href={globalConfig.context + '/portal/search/achievement.html'}>技术交易</a>
                                     <ul className="secondary_navigation_nav" style={{ 'width': (4 * 75) + 'px', left: '-' + (4 * 75 / 2 - 74.25 / 2) + 'px' }}>
-                                        <li><a href={globalConfig.context + '/portal/search/demand.html'}>需求谷</a></li>
-                                        <li><a href={globalConfig.context + '/portal/search/achievement.html'}>技术海</a></li>
-                                        <li><a href={globalConfig.context + '/portal/search/subscriberOrg.html'}>伙伴</a></li>
-                                        <li><a href={globalConfig.context + '/portal/search/subscriberUser.html'}>行家</a></li>
+                                        <li className={this.props.active == 'demand' ? 'active' : ''}><a href={globalConfig.context + '/portal/search/demand.html'}>需求谷</a></li>
+                                        <li className={this.props.active == 'achievement' ? 'active' : ''} ><a href={globalConfig.context + '/portal/search/achievement.html'}>技术海</a></li>
+                                        <li className={this.props.active == 'subscriberOrg' ? 'active' : ''}><a href={globalConfig.context + '/portal/search/subscriberOrg.html'}>伙伴</a></li>
+                                        <li className={this.props.active == 'subscriberUser' ? 'active' : ''}><a href={globalConfig.context + '/portal/search/subscriberUser.html'}>行家</a></li>
                                     </ul>
                                 </li>
                                 <li>

+ 116 - 0
js/component/richTextEditors.jsx

@@ -0,0 +1,116 @@
+import React from 'react';
+import theme from 'react-quill/dist/quill.snow.css';
+import ReactQuill from 'react-quill';
+
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+
+var RichTextUploadUrl, RichTextUploadSign;
+function uploadImg(s) {
+    let myform = new FormData(), file = document.getElementById("fileToUpload").files[0];
+    if (!file) {
+        return;
+    };
+    myform.append('file', file);
+    myform.append('sign', RichTextUploadSign);
+    $.ajax({
+        method: "post",
+        dataType: "json",
+        url: location.origin + RichTextUploadUrl,
+        data: myform,
+        contentType: false,
+        processData: false,
+        success: function (data) {
+            if (data.error && data.error.length) {
+                message.warning(data.error[0].message);
+            } else {
+                const cursorPosition = s.quill.getSelection().index
+                s.quill.insertEmbed(cursorPosition, 'image', globalConfig.avatarHost + '/upload' + data.data)
+                s.quill.setSelection(cursorPosition + 1)
+            };
+        }
+    })
+}
+function fileSelect() {
+    let uploader = document.getElementById("fileToUpload");
+    if (!uploader.onchange) {
+        uploader.onchange = () => {
+            uploadImg(this)
+        }
+    }
+    uploader.click();
+}
+
+const Editors = React.createClass({
+    getInitialState() {
+        return {
+            value: null,
+            theBool: true
+        }
+    },
+    handleRichText(value) {
+        this.setState({ value: value });
+        this.props.handleRichText(value);
+    },
+    componentWillMount() {
+        RichTextUploadUrl = this.props.uploadUrl;
+        RichTextUploadSign = this.props.uploadSign;
+    },
+    componentWillReceiveProps(nextProps) {
+        if (this.state.theBool && nextProps.textContent) {
+            this.state.value = nextProps.textContent;
+            this.state.theBool = false;
+        }
+        if (!this.props.visible && nextProps.visible) {
+            this.state.theBool = true;
+        }
+    },
+    render() {
+        const modules = {
+            toolbar: {
+                container: [
+                    [{ 'size': ['small', false, 'large', 'huge'] }],  // custom dropdown
+                    [{ 'header': [1, 2, 3, false] }],
+
+                    ['bold', 'italic', 'underline', 'strike', 'blockquote'],        // toggled buttons
+
+                    //  [{ 'header': 1 }, { 'header': 2 }],               // custom button values
+                    [{ 'list': 'ordered' }, { 'list': 'bullet' }],
+                    //  [{ 'script': 'sub' }, { 'script': 'super' }],      // superscript/subscript
+                    [{ 'indent': '-1' }, { 'indent': '+1' }],          // outdent/indent
+                    //  [{ 'direction': 'rtl' }],                         // text direction
+
+                    [{ 'color': [] }, { 'background': [] }],          // dropdown with defaults from theme
+                    //  [{ 'font': [] }],
+                    [{ 'align': [] }],
+                    ['link', 'image'],
+                    ['clean']
+                ],
+                handlers: { 'image': fileSelect }
+            }
+        };
+        const formats = [
+            'size', 'header',
+            'bold', 'italic', 'underline', 'strike', 'blockquote',
+            'list', 'bullet', 'indent',
+            'color', 'background',
+            'align',
+            'link', 'image'
+        ];
+        return (
+            <div>
+                <ReactQuill theme="snow"
+                    value={this.state.value}
+                    modules={modules}
+                    formats={formats}
+                    onChange={this.handleRichText} />
+                <input type="file"
+                    name="fileToUpload"
+                    id="fileToUpload"
+                    style={{ "display": "none" }} />
+            </div>
+        )
+    },
+});
+
+export default Editors;

+ 28 - 44
js/component/tools.js

@@ -27,8 +27,9 @@ import {
     transferModeList,
     innovationList,
     orderStatusList,
+    activityForm,
+    activityType
 } from './dataDic.js';
-import { techFieldList } from './DicTechFieldList.js'
 module.exports = {
     splitUrl: function (string, i, url) {
         let theList = [];
@@ -37,7 +38,7 @@ module.exports = {
             theArr = string.split(i);
             theArr.map(function (item, i) {
                 theList.push({
-                    uid: -i,
+                    uid: -i-1,
                     url: url + item,
                     response: {
                         data: item
@@ -143,47 +144,6 @@ module.exports = {
             return theSource;
         }
     },
-    getTechField: function (field1, field2, field3) {
-        let fieldList = [];
-        for (let i = 0; i < techFieldList.length; i++) {
-            fieldList.push({
-                value: techFieldList[i].value,
-                label: techFieldList[i].label
-            });
-            if (techFieldList[i].children) {
-                for (let j = 0; j < techFieldList[i].children.length; j++) {
-                    fieldList.push({
-                        value: techFieldList[i].children[j].value,
-                        label: techFieldList[i].children[j].label
-                    });
-                    if (techFieldList[i].children[j].children) {
-                        for (let n = 0; n < techFieldList[i].children[j].children.length; n++) {
-                            fieldList.push({
-                                value: techFieldList[i].children[j].children[n].value,
-                                label: techFieldList[i].children[j].children[n].label
-                            });
-                        }
-                    };
-                };
-            }
-        };
-        fieldList.sort(function (a, b) {
-            return a.value - b.value
-        });
-        let fieldKey = "";
-        fieldList.map(function (item) {
-            if (field1 && Number(field1) == item.value) {
-                fieldKey = item.label;
-            };
-            if (field2 == item.value) {
-                fieldKey = fieldKey + "/" + item.label;
-            };
-            if (field3 == item.value) {
-                fieldKey = fieldKey + "/" + item.label;
-            };
-        });
-        return fieldKey;
-    },
     getCatagory: function (e) {
         if (e) {
             let theType = '';
@@ -666,5 +626,29 @@ module.exports = {
             });
             return theType;
         }
-    }
+    },
+    //科技管理
+    //活动圈后台管理
+    getActivityType: function (e) {
+        if (e) {
+            let theType = '';
+            activityType.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
+    getActivityForm: function (e) {
+        if (e) {
+            let theType = '';
+            activityForm.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
 }

+ 1 - 1
js/portal/search/achievement.js

@@ -9,7 +9,7 @@ import Footer from '../../component/portal/footer.jsx';
 
 ReactDOM.render(
     <div className="wrap">
-        <Top />
+        <Top active="achievement"/>
         <Content searchType={"achievement"}/>
         <Footer />
     </div>,

+ 1 - 1
js/portal/search/demand.js

@@ -9,7 +9,7 @@ import Footer from '../../component/portal/footer.jsx';
 
 ReactDOM.render(
     <div className="wrap">
-        <Top />
+        <Top active="demand"/>
         <Content searchType={"demand"}/>
         <Footer />
     </div>,

+ 1 - 1
js/portal/search/subscriberOrg.js

@@ -9,7 +9,7 @@ import Footer from '../../component/portal/footer.jsx';
 
 ReactDOM.render(
     <div className="wrap">
-        <Top />
+        <Top active="subscriberOrg"/>
         <Content searchType={"subscriber"}/>
         <Footer />
     </div>,

+ 1 - 1
js/portal/search/subscriberUser.js

@@ -9,7 +9,7 @@ import Footer from '../../component/portal/footer.jsx';
 
 ReactDOM.render(
     <div className="wrap">
-        <Top />
+        <Top active="subscriberUser"/>
         <Content searchType={"subscriber"}/>
         <Footer />
     </div>,