Browse Source

Accept Merge Request #46 meger v1.0.38 : (master -> prod)

Merge Request: meger v1.0.38
Created By: @seirios
Accepted By: @seirios
URL: https://coding.net/t/aft/p/AFT-WEB/git/merge/46
seirios 7 years ago
parent
commit
4d8a1237bf
61 changed files with 2798 additions and 825 deletions
  1. BIN
      image/logo-2.png
  2. BIN
      image/logo.png
  3. 16 15
      js/component/account/achievement/techAchievementDesc.jsx
  4. 2 1
      js/component/account/demand/techDemandDesc.jsx
  5. 1 1
      js/component/account/index/normal.jsx
  6. 2 2
      js/component/account/services/activity.jsx
  7. 331 321
      js/component/account/services/annualReport.jsx
  8. 158 144
      js/component/account/services/cognizance.jsx
  9. 1 0
      js/component/account/services/contract/contract.jsx
  10. 5 3
      js/component/account/services/contract/contractDetail.jsx
  11. 3 1
      js/component/account/services/copyright/comPatentChange.jsx
  12. 1 1
      js/component/account/services/intellectualDesc.jsx
  13. 2 6
      js/component/account/services/patent.jsx
  14. 1 1
      js/component/account/services/patent.less
  15. 40 7
      js/component/account/services/patentDesc.jsx
  16. 3 3
      js/component/account/services/standard.jsx
  17. 2 2
      js/component/account/services/techProduct.jsx
  18. 0 1
      js/component/account/topTab.jsx
  19. 1 1
      js/component/certify/top.jsx
  20. 44 1
      js/component/dataDic.js
  21. 1 1
      js/component/groupCertify/bank.jsx
  22. 2 1
      js/component/groupCertify/confirm.jsx
  23. 1 1
      js/component/groupCertify/top.jsx
  24. 60 8
      js/component/manageCenter/achievement/techAchievementDesc.jsx
  25. 61 7
      js/component/manageCenter/demand/techDemandDesc.jsx
  26. 668 0
      js/component/manageCenter/idea/activity/activity.jsx
  27. 255 0
      js/component/manageCenter/idea/activity/activityUserList.jsx
  28. 4 3
      js/component/manageCenter/idea/bannerManage/bannerManage.jsx
  29. 170 136
      js/component/manageCenter/idea/bigShot/lecture.jsx
  30. 29 1
      js/component/manageCenter/idea/bigShot/star.jsx
  31. 61 5
      js/component/manageCenter/idea/content.jsx
  32. 24 0
      js/component/manageCenter/idea/content.less
  33. 27 0
      js/component/manageCenter/idea/leftTab.jsx
  34. 510 0
      js/component/manageCenter/idea/news/news.jsx
  35. 3 1
      js/component/manageCenter/servicesManage/contract/contractDetail.jsx
  36. 2 1
      js/component/manageCenter/servicesManage/copyright/copyright.jsx
  37. 2 2
      js/component/manageCenter/servicesManage/highTech/fosterDesc/activity.jsx
  38. 28 2
      js/component/manageCenter/servicesManage/highTech/fosterDesc/annualReport.jsx
  39. 2 2
      js/component/manageCenter/servicesManage/highTech/fosterDesc/techProduct.jsx
  40. 3 3
      js/component/manageCenter/servicesManage/highTech/highTechApply.jsx
  41. 8 0
      js/component/manageCenter/set/content.jsx
  42. 3 0
      js/component/manageCenter/set/leftTab.jsx
  43. 24 0
      js/component/manageCenter/set/site.jsx
  44. 1 3
      js/component/portal/portal.less
  45. 2 2
      js/component/portal/search/achievement.jsx
  46. 1 1
      js/component/portal/search/achievementDesc.jsx
  47. 2 1
      js/component/portal/search/demand.jsx
  48. 1 1
      js/component/portal/search/demandDesc.jsx
  49. 3 2
      js/component/portal/search/subscriberOrg.jsx
  50. 3 3
      js/component/portal/search/subscriberUser.jsx
  51. 18 8
      js/component/portal/top.jsx
  52. 118 0
      js/component/richTextEditors.jsx
  53. 1 1
      js/component/subscriberDetail/content.jsx
  54. 29 72
      js/component/tools.js
  55. 1 1
      js/portal/search/achievement.js
  56. 1 1
      js/portal/search/demand.js
  57. 1 1
      js/portal/search/subscriberOrg.js
  58. 1 1
      js/portal/search/subscriberUser.js
  59. 3 2
      package.json
  60. 1 0
      webpack/entry.config.js
  61. 50 40
      webpack/module.config.js

BIN
image/logo-2.png


BIN
image/logo.png


+ 16 - 15
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="数据类别" >
@@ -1003,7 +1004,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                                 };
                                 this.setState({ textFileList: info.fileList.slice(-1) });
                             }} >
-                            <Button><Icon type="upload" /> 上传需求文本文件 </Button>
+                            <Button><Icon type="upload" /> 上传成熟度证明文本 </Button>
                         </Upload>
                         <p style={{ marginTop: '10px' }}>{theData.maturityTextFileUrl ?
                             <span className="download-file">

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

@@ -4,8 +4,9 @@ import moment from 'moment';
 import './techDemand.less';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
+import { getTechField } from '../../DicTechFieldList.js';
 import { IndustryObject, getIndustryCategory } from '../../DicIndustryList.js';
-import { beforeUploadFile, splitUrl, companySearch, getTechField, getDemandType, getAchievementCategory } from '../../tools.js';
+import { beforeUploadFile, splitUrl, companySearch, getDemandType, getAchievementCategory } from '../../tools.js';
 
 const KeyWordTagGroup = React.createClass({
     getInitialState() {

+ 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';
 

+ 2 - 2
js/component/account/services/activity.jsx

@@ -1,8 +1,8 @@
 import React from 'react';
 import { Icon, Button, Upload, Input, Spin, Table, message, Select, Modal, DatePicker, Cascader, Transfer, InputNumber, Switch, Form } from 'antd';
 import { technicalSourceList } from '../../dataDic.js';
-import { techFieldList } from '../../DicTechFieldList.js';
-import { getTechField, getTechnicalSource, beforeUploadFile, newDownloadFile } from '../../tools.js';
+import { techFieldList, getTechField } from '../../DicTechFieldList.js';
+import { getTechnicalSource, beforeUploadFile, newDownloadFile } from '../../tools.js';
 import './activity.less';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';

+ 331 - 321
js/component/account/services/annualReport.jsx

@@ -12,9 +12,71 @@ const AnnualReportDescFrom = Form.create()(React.createClass({
     getInitialState() {
         return {
             loading: false,
+            data: {},
+            contactsOption: [],
+            contactsObj: {},
             yearOption: []
         };
     },
+    loadData(theYear) {
+        this.setState({
+            loading: true
+        })
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/user/cognizance/annualReportDetail",
+            data: {
+                year: theYear || this.props.data.year
+            }
+        }).done((data) => {
+            let thisdata = data.data;
+            if (!thisdata) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                };
+                thisdata = {};
+            } else {
+                thisdata.location = getProvince(thisdata.locationProvince, thisdata.locationCity, thisdata.locationArea);
+            };
+            this.setState({
+                data: thisdata
+            });
+        }).always(function () {
+            this.setState({
+                loading: false
+            })
+        }.bind(this));
+    },
+    getContactsOption() {
+        let theOption = [], theObj = {};
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/user/getContacts',
+            success: function (data) {
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let item in data.data) {
+                        let theData = data.data[item];
+                        theOption.push(
+                            <Select.Option value={item} key={theData}>{theData}</Select.Option>
+                        );
+                    };
+                    theObj = data.data || {};
+                };
+                this.setState({
+                    contactsOption: theOption,
+                    contactsObj: theObj
+                });
+            }.bind(this)
+        });
+    },
     componentWillMount() {
         let d = new Date();
         let _me = this;
@@ -24,6 +86,17 @@ const AnnualReportDescFrom = Form.create()(React.createClass({
                 <Select.Option key={i.toString()} >{i}</Select.Option>
             )
         };
+        this.getContactsOption();
+        if (this.props.data) {
+            this.loadData();
+        };
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            if (nextProps.data) {
+                this.loadData(nextProps.data.year)
+            };
+        };
     },
     handleSubmit(e) {
         e.preventDefault();
@@ -61,7 +134,7 @@ const AnnualReportDescFrom = Form.create()(React.createClass({
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
-        const theData = this.props.detailData;
+        const theData = this.state.data;
         const formItemLayout = {
             labelCol: { span: 0 },
             wrapperCol: { span: 20 },
@@ -69,325 +142,268 @@ const AnnualReportDescFrom = Form.create()(React.createClass({
         const _me = this;
         return (
             <Form onSubmit={this.handleSubmit} id="annualReport-form">
-                <div className="activityCost-title">
-                    <span>年份: </span>
-                    <span>{this.props.data.year}</span>
-                </div>
-                <div className="clearfix" style={{ padding: '0 10px' }}>
-                    <div className="half-item" style={{ marginRight: "50%" }}>
-                        <p className="item-title">企业名称: </p>
-                        <p>{theData.unitName}</p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">组织机构代码或统一社会信用代码: </p>
-                        <p>{theData.orgCode}</p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">所属地区: </p>
-                        <p>{theData.location}</p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">高新技术企业认定证书编号: </p>
-                        <p>{theData.certificateNumber}</p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">高新技术企业认定时间: </p>
-                        <p>{theData.issuingDateFormattedDate}</p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">企业是否上市: </p>
-                        <p>{theData.listed == 0 ? "否" : "是"}</p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">上市时间: </p>
-                        <p>{theData.listedDateFormattedDate}</p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">上市类型: </p>
-                        <p>
-                            {(() => {
-                                switch (theData.listedType) {
-                                    case 0:
-                                        return "股票型上市公司";
-                                    case 1:
-                                        return "债券型上市公司";
-                                    default:
-                                        return "";
-                                }
-                            })()}
-                        </p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">股票代码: </p>
-                        <p>{theData.stockCode}</p>
-                    </div>
-                    <div className="half-item">
-                        <p className="item-title">企业联系人: </p>
-                        <p>{theData.contacts}</p>
-                    </div>
-                </div>
-                <div className="activityCost-title"><span>本年度获得的知识产权数: </span></div>
-                <div className="clearfix annualReport-box">
-                    <div className="four-item">
-                        <p className="item-title">发明专利数: </p>
-                        <p>{theData.inventionPatent}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">国防专利数: </p>
-                        <p>{theData.defensePatent}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">国家级农作物品种数: </p>
-                        <p>{theData.nationalCrop}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">植物新品种数: </p>
-                        <p>{theData.newPlantCariety}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">国家新药数: </p>
-                        <p>{theData.nationalDrug}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">国家一级中药保护品种数: </p>
-                        <p>{theData.chineseMedicine}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">实用新型专利数: </p>
-                        <p>{theData.utilityPatent}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">集成电路布图设计专有权数: </p>
-                        <p>{theData.circuitDesign}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">外观设计专利数: </p>
-                        <p>{theData.exteriorPatent}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">软件著作权数: </p>
-                        <p>{theData.softwareWorks}</p>
-                    </div>
-                </div>
-                <div className="activityCost-title"><span>本年度人员情况(人): </span></div>
-                <div className="clearfix annualReport-box">
-                    <div className="four-item">
-                        <p className="item-title">职工总人数: </p>
-                        <p>{theData.firmTotal}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">科技人员数: </p>
-                        <p>{theData.techTotal}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">新增就业人数: </p>
-                        <p>{theData.newEmployment}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">高校应届毕业生人数: </p>
-                        <p>{theData.graduateNumber}</p>
-                    </div>
-                </div>
-                <div className="activityCost-title"><span>企业本年度财务状况(万元): </span></div>
-                <div className="clearfix annualReport-box">
-                    <div className="four-item">
-                        <p className="item-title">企业总收入: </p>
-                        <p>{theData.totalRevenue}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">销售收入: </p>
-                        <p>{theData.salesRevenue}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">所有者权益(净资产)合计: </p>
-                        <p>{theData.netAsset}</p>
+                <Spin spinning={this.state.loading} className='spin-box'>
+                    <div className="activityCost-title">
+                        <span>年份: </span>
+                        <span>{this.props.data.year}</span>
+                    </div>
+                    <div className="clearfix" style={{ padding: '0 10px' }}>
+                        <div className="half-item" style={{ marginRight: "50%" }}>
+                            <p className="item-title">企业名称: </p>
+                            <p>{theData.unitName}</p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">组织机构代码或统一社会信用代码: </p>
+                            <p>{theData.orgCode}</p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">所属地区: </p>
+                            <p>{theData.location}</p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">高新技术企业认定证书编号: </p>
+                            <p>{theData.certificateNumber}</p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">高新技术企业认定时间: </p>
+                            <p>{theData.issuingDate}</p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">企业是否上市: </p>
+                            <p>{theData.listed == 1 ? "是" : "否"}</p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">上市时间: </p>
+                            <p>{theData.listedDate}</p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">上市类型: </p>
+                            <p>
+                                {(() => {
+                                    switch (theData.listedType) {
+                                        case '0':
+                                            return "股票型上市公司";
+                                        case '1':
+                                            return "债券型上市公司";
+                                        default:
+                                            return "";
+                                    }
+                                })()}
+                            </p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">股票代码: </p>
+                            <p>{theData.stockCode}</p>
+                        </div>
+                        <div className="half-item">
+                            <p className="item-title">企业联系人: </p>
+                            <p>{this.state.contactsObj[theData.contacts]}</p>
+                        </div>
                     </div>
-                    <div className="four-item">
-                        <p className="item-title">高新技术产品(服务)收入:
-                        </p>
-                        <p>
-                            <span>{theData.lastYearRevenue} </span>
-                            {(() => {
-                                let s = (theData.lastYearRevenue / theData.totalRevenue * 100).toFixed(2);
-                                if (s < 50) {
-                                    return <span style={{ color: '#ea0862' }}> 占比总收入的{s}%,小于60%</span>
-                                } else {
-                                    return <span> 占比总收入的{s}%</span>
-                                };
-                            })()}
-                        </p>
+                    <div className="activityCost-title"><span>本年度获得的知识产权数: </span></div>
+                    <div className="clearfix annualReport-box">
+                        <div className="four-item">
+                            <p className="item-title">发明专利数: </p>
+                            <p>{theData.inventionPatent}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">国防专利数: </p>
+                            <p>{theData.defensePatent}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">国家级农作物品种数: </p>
+                            <p>{theData.nationalCrop}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">植物新品种数: </p>
+                            <p>{theData.newPlantCariety}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">国家新药数: </p>
+                            <p>{theData.nationalDrug}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">国家一级中药保护品种数: </p>
+                            <p>{theData.chineseMedicine}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">实用新型专利数: </p>
+                            <p>{theData.utilityPatent}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">集成电路布图设计专有权数: </p>
+                            <p>{theData.circuitDesign}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">外观设计专利数: </p>
+                            <p>{theData.exteriorPatent}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">软件著作权数: </p>
+                            <p>{theData.softwareWorks}</p>
+                        </div>
                     </div>
-                    <div className="four-item">
-                        <p className="item-title">利润总额: </p>
-                        <p>{theData.grossProfit}</p>
+                    <div className="activityCost-title"><span>本年度人员情况(人): </span></div>
+                    <div className="clearfix annualReport-box">
+                        <div className="four-item">
+                            <p className="item-title">职工总人数: </p>
+                            <p>{theData.firmTotal}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">科技人员数: </p>
+                            <p>{theData.techTotal}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">新增就业人数: </p>
+                            <p>{theData.newEmployment}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">高校应届毕业生人数: </p>
+                            <p>{theData.graduateNumber}</p>
+                        </div>
                     </div>
-                    <div className="four-item">
-                        <p className="item-title">研发费用总额:
+                    <div className="activityCost-title"><span>企业本年度财务状况(万元): </span></div>
+                    <div className="clearfix annualReport-box">
+                        <div className="four-item">
+                            <p className="item-title">企业总收入: </p>
+                            <p>{theData.totalRevenue}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">销售收入: </p>
+                            <p>{theData.salesRevenue}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">所有者权益(净资产)合计: </p>
+                            <p>{theData.netAsset}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">高新技术产品(服务)收入:
                         </p>
-                        <p>
-                            <span>{theData.researchCost} </span>
-                            {(() => {
-                                let s = (theData.researchCost / theData.salesRevenue * 100).toFixed(2);
-                                if (theData.salesRevenue < 5000) {
-                                    if (s < 5) {
-                                        return <span style={{ color: '#ea0862' }}> 占比总收入的{s}%,小于60%</span>
-                                    } else {
-                                        return <span> 占比总收入的{s}%</span>
-                                    };
-                                } else if (5000 < theData.salesRevenue < 20000) {
-                                    if (s < 4) {
-                                        return <span style={{ color: '#ea0862' }}> 占比总收入的{s}%,小于60%</span>
+                            <p>
+                                <span>{theData.lastYearRevenue} </span>
+                                {(() => {
+                                    let s = (theData.lastYearRevenue / theData.totalRevenue * 100).toFixed(2);
+                                    if (!isNaN(s)) {
+                                        if (s < 50) {
+                                            return <span style={{ color: '#ea0862' }}> 占比总收入的{s}%,小于60%</span>
+                                        } else {
+                                            return <span> 占比总收入的{s}%</span>
+                                        };
                                     } else {
-                                        return <span> 占比总收入的{s}%</span>
-                                    };
-                                } else if (theData.salesRevenue >= 20000) {
-                                    if (s < 3) {
-                                        return <span style={{ color: '#ea0862' }}> 占比总收入的{s}%,小于60%</span>
-                                    } else {
-                                        return <span> 占比总收入的{s}%</span>
-                                    };
-                                }
-                            })()}
+                                        return <span> 占比总收入的0%</span>
+                                    }
+                                })()}
+                            </p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">利润总额: </p>
+                            <p>{theData.grossProfit}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">研发费用总额:
                         </p>
+                            <p>
+                                <span>{theData.researchCost} </span>
+                                {(() => {
+                                    let s = (theData.researchCost / theData.salesRevenue * 100).toFixed(2);
+                                    if (!isNaN(s)) {
+                                        if (theData.salesRevenue < 5000) {
+                                            if (s < 5) {
+                                                return <span style={{ color: '#ea0862' }}> 占比总收入的{s}%,小于60%</span>
+                                            } else {
+                                                return <span> 占比总收入的{s}%</span>
+                                            };
+                                        } else if (5000 < theData.salesRevenue < 20000) {
+                                            if (s < 4) {
+                                                return <span style={{ color: '#ea0862' }}> 占比总收入的{s}%,小于60%</span>
+                                            } else {
+                                                return <span> 占比总收入的{s}%</span>
+                                            };
+                                        } else if (theData.salesRevenue >= 20000) {
+                                            if (s < 3) {
+                                                return <span style={{ color: '#ea0862' }}> 占比总收入的{s}%,小于60%</span>
+                                            } else {
+                                                return <span> 占比总收入的{s}%</span>
+                                            };
+                                        }
+                                    } else {
+                                        return <span> 占比总收入的0%</span>
+                                    }
+                                })()}
+                            </p>
+                        </div>
+                        <div className="four-item" style={{ marginRight: '25%' }}>
+                            <p className="item-title">在中国境内研发费用: </p>
+                            <p>{theData.territory}</p>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">纳税总额: </p>
+                            <FormItem
+                                {...formItemLayout}
+                            >
+                                {getFieldDecorator('totalTax', {
+                                    rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
+                                    initialValue: this.props.data.totalTax
+                                })(
+                                    <InputNumber min={0} max={999999} step={0.01} />
+                                    )}
+                                <span>万元</span>
+                            </FormItem>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">高企所得税减免额: </p>
+                            <FormItem
+                                {...formItemLayout}
+                            >
+                                {getFieldDecorator('incomeTaxRelief', {
+                                    rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
+                                    initialValue: this.props.data.incomeTaxRelief
+                                })(
+                                    <InputNumber min={0} max={999999} step={0.01} />
+                                    )}
+                                <span>万元</span>
+                            </FormItem>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">出口创汇总额(人民币): </p>
+                            <FormItem
+                                {...formItemLayout}
+                            >
+                                {getFieldDecorator('totalExportVolume', {
+                                    rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
+                                    initialValue: this.props.data.totalExportVolume
+                                })(
+                                    <InputNumber min={0} max={999999} step={0.01} />
+                                    )}
+                                <span>万元</span>
+                            </FormItem>
+                        </div>
+                        <div className="four-item">
+                            <p className="item-title">基础研究投入费用: </p>
+                            <FormItem
+                                {...formItemLayout}
+                            >
+                                {getFieldDecorator('basicResearchCost', {
+                                    rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
+                                    initialValue: this.props.data.basicResearchCost
+                                })(
+                                    <InputNumber min={0} max={999999} step={0.01} />
+                                    )}
+                                <span>万元</span>
+                            </FormItem>
+                        </div>
                     </div>
-                    <div className="four-item" style={{ marginRight: '25%' }}>
-                        <p className="item-title">在中国境内研发费用: </p>
-                        <p>{theData.territory}</p>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">纳税总额: </p>
-                        <FormItem
-                            {...formItemLayout}
-                        >
-                            {getFieldDecorator('totalTax', {
-                                rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
-                                initialValue: this.props.data.totalTax
-                            })(
-                                <InputNumber min={0} max={999999} step={0.01} />
-                                )}
-                            <span>万元</span>
-                        </FormItem>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">高企所得税减免额: </p>
-                        <FormItem
-                            {...formItemLayout}
-                        >
-                            {getFieldDecorator('incomeTaxRelief', {
-                                rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
-                                initialValue: this.props.data.incomeTaxRelief
-                            })(
-                                <InputNumber min={0} max={999999} step={0.01} />
-                                )}
-                            <span>万元</span>
-                        </FormItem>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">出口创汇总额(人民币): </p>
-                        <FormItem
-                            {...formItemLayout}
-                        >
-                            {getFieldDecorator('totalExportVolume', {
-                                rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
-                                initialValue: this.props.data.totalExportVolume
-                            })(
-                                <InputNumber min={0} max={999999} step={0.01} />
-                                )}
-                            <span>万元</span>
-                        </FormItem>
-                    </div>
-                    <div className="four-item">
-                        <p className="item-title">基础研究投入费用: </p>
-                        <FormItem
-                            {...formItemLayout}
-                        >
-                            {getFieldDecorator('basicResearchCost', {
-                                rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
-                                initialValue: this.props.data.basicResearchCost
-                            })(
-                                <InputNumber min={0} max={999999} step={0.01} />
-                                )}
-                            <span>万元</span>
-                        </FormItem>
-                    </div>
-                </div>
-                <FormItem style={{ marginTop: '20px' }}>
-                    <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
-                    <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
-                </FormItem>
+                    <FormItem style={{ marginTop: '20px' }}>
+                        <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
+                        <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
+                    </FormItem>
+                </Spin>
             </Form >
         );
     },
 }));
 
 const AnnualReportDesc = React.createClass({
-    loadData(v) {
-        this.setState({
-            loading: true
-        });
-        $.ajax({
-            method: "post",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/user/cognizance/annualReportDetail",
-            data: {
-                year: this.props.data ? this.props.data.year : (new Date().getFullYear() - 1)
-            }
-        }).done((data) => {
-            let thisdata = data.data;
-            if (!thisdata) {
-                if (data.error && data.error.length) {
-                    message.warning(data.error[0].message);
-                };
-                thisdata = {};
-            };
-            this.state.detailData = {
-                id: thisdata.id,
-                uid: thisdata.uid,
-                unitName: thisdata.unitName,
-                orgCode: thisdata.orgCode,
-                locationProvince: thisdata.locationProvince,
-                locationCity: thisdata.locationCity,
-                locationArea: thisdata.locationArea,
-                location: getProvince(thisdata.locationProvince, thisdata.locationCity, thisdata.locationArea),
-                certificateNumber: thisdata.certificateNumber,
-                issuingDate: thisdata.issuingDate,
-                issuingDateFormattedDate: thisdata.issuingDateFormattedDate,
-                listed: thisdata.listed,
-                listedDate: thisdata.listedDate,
-                listedDateFormattedDate: thisdata.listedDateFormattedDate,
-                listedType: thisdata.listedType,
-                stockCode: thisdata.stockCode,
-                contacts: thisdata.contacts,
-                inventionPatent: thisdata.inventionPatent,
-                defensePatent: thisdata.defensePatent,
-                nationalCrop: thisdata.nationalCrop,
-                newPlantCariety: thisdata.newPlantCariety,
-                nationalDrug: thisdata.nationalDrug,
-                chineseMedicine: thisdata.chineseMedicine,
-                utilityPatent: thisdata.utilityPatent,
-                circuitDesign: thisdata.circuitDesign,
-                exteriorPatent: thisdata.exteriorPatent,
-                softwareWorks: thisdata.softwareWorks,
-                firmTotal: thisdata.firmTotal,
-                techTotal: thisdata.techTotal,
-                newEmployment: thisdata.newEmployment,
-                graduateNumber: thisdata.graduateNumber,
-                totalRevenue: thisdata.totalRevenue,
-                salesRevenue: thisdata.salesRevenue,
-                netAsset: thisdata.netAsset,
-                lastYearRevenue: thisdata.lastYearRevenue,
-                grossProfit: thisdata.grossProfit,
-                researchCost: thisdata.researchCost,
-                territory: thisdata.territory
-            };
-        }).always(function () {
-            this.setState({
-                loading: false,
-                visible: v
-            });
-        }.bind(this));
-    },
     getInitialState() {
         return {
             visible: false,
@@ -395,9 +411,7 @@ const AnnualReportDesc = React.createClass({
         };
     },
     componentWillReceiveProps(nextProps) {
-        if (nextProps.showDesc) {
-            this.loadData(nextProps.showDesc);
-        };
+        this.state.visible = nextProps.showDesc;
     },
     showModal() {
         this.setState({
@@ -416,11 +430,6 @@ const AnnualReportDesc = React.createClass({
         });
         this.props.closeDesc(false);
     },
-    spinChange(e) {
-        this.setState({
-            loading: e
-        });
-    },
     render() {
         return (
             <div className="patent-addNew">
@@ -428,12 +437,12 @@ const AnnualReportDesc = React.createClass({
                     onOk={this.handleOk} onCancel={this.handleCancel}
                     width='1000px'
                     footer='' >
-                    <Spin spinning={this.state.loading} className='spin-box'>
-                        <AnnualReportDescFrom
-                            data={this.props.data}
-                            detailData={this.state.detailData}
-                            spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
-                    </Spin>
+                    <AnnualReportDescFrom
+                        data={this.props.data}
+                        visible={this.state.visible}
+                        detailData={this.state.detailData}
+                        closeModal={this.handleCancel}
+                        clickOk={this.handleOk} />
                 </Modal>
             </div>
         );
@@ -627,6 +636,7 @@ const AnnualReport = React.createClass({
         return {
             selectedRowKeys: [],
             selectedRows: [],
+            RowData: {},
             loading: false,
             pagination: {
                 defaultCurrent: 1,

+ 158 - 144
js/component/account/services/cognizance.jsx

@@ -9,7 +9,7 @@ import moment from 'moment';
 import './cognizance.less';
 
 const CognizanceDescFrom = Form.create()(React.createClass({
-    loadData() {
+    loadData(theCid, theYear) {
         this.setState({
             loading: true
         });
@@ -19,8 +19,8 @@ const CognizanceDescFrom = Form.create()(React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/user/cognizance/cognizanceDetail",
             data: {
-                cid: this.props.data.cid,
-                year: this.props.data.year
+                cid: theCid || this.props.data.cid,
+                year: theYear || this.props.data.year
             },
             success: function (data) {
                 if (data.error.length || !data.data) {
@@ -49,8 +49,26 @@ const CognizanceDescFrom = Form.create()(React.createClass({
                     salesRevenue: data.data.salesRevenue3,
                     grossProfit: data.data.grossProfit3
                 }];
-                this.state.netAssetRate = 1 / 2 * (data.data.netAsset2 / data.data.netAsset3 + data.data.netAsset1 / data.data.netAsset2) - 1;
-                this.state.salesRevenueRate = 1 / 2 * (data.data.salesRevenue2 / data.data.salesRevenue3 + data.data.salesRevenue1 / data.data.salesRevenue2) - 1;
+                if (data.data.netAsset2 == 0) {
+                    this.state.netAssetRate = 0;
+                } else if (data.data.netAsset3 == 0) {
+                    this.state.netAssetRate = (data.data.netAsset1 / data.data.netAsset2) - 1;
+                } else {
+                    this.state.netAssetRate = 1 / 2 * (data.data.netAsset2 / data.data.netAsset3 + data.data.netAsset1 / data.data.netAsset2) - 1;
+                };
+                if (this.state.netAssetRate < 0 || isNaN(this.state.netAssetRate)) {
+                    this.state.netAssetRate = 0
+                };
+                if (data.data.salesRevenue2 == 0) {
+                    this.state.salesRevenueRate = 0;
+                } else if (data.data.salesRevenue3 == 0) {
+                    this.state.salesRevenueRate = (data.data.salesRevenue1 / data.data.salesRevenue2) - 1;
+                } else {
+                    this.state.salesRevenueRate = 1 / 2 * (data.data.salesRevenue2 / data.data.salesRevenue3 + data.data.salesRevenue1 / data.data.salesRevenue2) - 1;
+                };
+                if (this.state.salesRevenueRate < 0 || isNaN(this.state.salesRevenueRate)) {
+                    this.state.salesRevenueRate = 0
+                };
             }.bind(this),
         }).always(function () {
             this.setState({
@@ -58,7 +76,7 @@ const CognizanceDescFrom = Form.create()(React.createClass({
             });
         }.bind(this));
     },
-    getStateData() {
+    getStateData(theCid) {
         this.setState({
             loading: true
         });
@@ -68,7 +86,7 @@ const CognizanceDescFrom = Form.create()(React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/user/cognizance/cognizanceLog",
             data: {
-                cid: this.props.data.cid
+                cid: theCid || this.props.data.cid
             },
             success: function (data) {
                 if (data.error.length || !data.data) {
@@ -184,164 +202,160 @@ const CognizanceDescFrom = Form.create()(React.createClass({
     },
     componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
-            this.getStateData();
-            this.loadData();
+            this.getStateData(nextProps.data.cid);
+            this.loadData(nextProps.data.cid, nextProps.data.year);
         };
     },
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
-        const theData = this.state.data;
+        const theData = this.state.data || {};
         const formItemLayout = {
             labelCol: { span: 6 },
             wrapperCol: { span: 12 },
         };
         const _me = this;
-        if (this.state.data) {
-            return (
-                <Form onSubmit={this.handleSubmit} id="highTechApply-form">
-                    <div className="clearfix">
-                        <div className="half-item">
-                            <span className="item-title">公司名称: </span>
-                            <span>{theData.unitName}</span>
-                        </div>
-                        <div className="half-item">
-                            <span className="item-title">公司组织机构代码: </span>
-                            <span>{theData.orgCode}</span>
-                        </div>
-                        <div className="half-item">
-                            <span className="item-title">公司地址: </span>
-                            <span>{theData.postalAddress}</span>
-                        </div>
-                        <div className="half-item">
-                            <span className="item-title">申请年份: </span>
-                            <span>{this.state.year}</span>
-                        </div>
-                        <FormItem className="half-item"
-                            labelCol={{ span: 6 }}
-                            wrapperCol={{ span: 14 }}
-                        >
-                            {getFieldDecorator('contacts', {
-                                rules: [{ required: true, message: '此项为必填项!' }],
-                                initialValue: theData.contacts
-                            })(
-                                <Select placeholder='选择一个联系人'>{this.props.contactsOption}</Select>
-                                )}
-                        </FormItem>
+        return (
+            <Form onSubmit={this.handleSubmit} id="highTechApply-form">
+                <div className="clearfix">
+                    <div className="half-item">
+                        <span className="item-title">公司名称: </span>
+                        <span>{theData.unitName}</span>
+                    </div>
+                    <div className="half-item">
+                        <span className="item-title">公司组织机构代码: </span>
+                        <span>{theData.orgCode}</span>
                     </div>
-                    <FormItem style={{ width: '50%' }}
-                        labelCol={{ span: 0 }}
-                        wrapperCol={{ span: 24 }}
-                        label="技术领域"
+                    <div className="half-item">
+                        <span className="item-title">公司地址: </span>
+                        <span>{theData.postalAddress}</span>
+                    </div>
+                    <div className="half-item">
+                        <span className="item-title">申请年份: </span>
+                        <span>{this.state.year}</span>
+                    </div>
+                    <FormItem className="half-item"
+                        labelCol={{ span: 6 }}
+                        wrapperCol={{ span: 14 }}
                     >
-                        <span className="item-title">技术领域: </span>
-                        {getFieldDecorator('technicalField', {
-                            rules: [{ type: 'array', required: true, message: '此项为必填项!' }],
-                            initialValue: [theData.technicalField1, theData.technicalField2, theData.technicalField3]
+                        {getFieldDecorator('contacts', {
+                            rules: [{ required: true, message: '此项为必填项!' }],
+                            initialValue: theData.contacts
                         })(
-                            <Cascader options={techFieldList} placeholder="请选择技术领域" />
+                            <Select placeholder='选择一个联系人'>{this.props.contactsOption}</Select>
                             )}
                     </FormItem>
-                    <div className="clearfix">
-                        <div>
-                            <span className="form-title">获得知识产权数量(件): </span>
-                        </div>
-                        <div className="half-item">
-                            <span className="item-title">一类: </span>
-                            <span>{theData.firstCatagory}</span>
-                        </div>
-                        <div className="half-item">
-                            <span className="item-title">二类: </span>
-                            <span>{theData.secondCatagory}</span>
-                        </div>
-                    </div>
-                    <div className="clearfix">
-                        <div>
-                            <span className="form-title">人力资源状况(人): </span>
-                        </div>
-                        <div className="half-item">
-                            <span className="item-title">职工总数: </span>
-                            <span>{theData.firmTotal}</span>
-                        </div>
-                        <div className="half-item">
-                            <span className="item-title">科技人员数: </span>
-                            <span>{theData.techTotal}</span>
-                        </div>
+                </div>
+                <FormItem style={{ width: '50%' }}
+                    labelCol={{ span: 0 }}
+                    wrapperCol={{ span: 24 }}
+                    label="技术领域"
+                >
+                    <span className="item-title">技术领域: </span>
+                    {getFieldDecorator('technicalField', {
+                        rules: [{ type: 'array', required: true, message: '此项为必填项!' }],
+                        initialValue: [theData.technicalField1, theData.technicalField2, theData.technicalField3]
+                    })(
+                        <Cascader options={techFieldList} placeholder="请选择技术领域" />
+                        )}
+                </FormItem>
+                <div className="clearfix">
+                    <div>
+                        <span className="form-title">获得知识产权数量(件): </span>
                     </div>
-                    <div className="form-title">近三年经营状况(万元): </div>
-                    <Table pagination={false} dataSource={this.state.moneyTable} columns={this.state.moneyColumns} />
-                    <div className="clearfix">
-                        <div className="half-item">
-                            <span className="item-title">净资产增长率: </span>
-                            <span>{isNaN(this.state.netAssetRate) ? '数据错误无法计算' : (this.state.netAssetRate * 100).toFixed(2) + '%'}</span>
-                        </div>
-                        <div className="half-item">
-                            <span className="item-title">销售收入增长率: </span>
-                            <span>{isNaN(this.state.salesRevenueRate) ? '数据错误无法计算' : (this.state.salesRevenueRate * 100).toFixed(2) + '%'}</span>
-                        </div>
+                    <div className="half-item">
+                        <span className="item-title">一类: </span>
+                        <span>{theData.firstCatagory}</span>
                     </div>
-                    <div className="clearfix">
-                        <div><span className="form-title">近三年研究开发费用总额(万元): </span></div>
-                        <div className="third-item">
-                            <div className="item-title">近三年研究开发费用总额</div>
-                            <p>{theData.researchCost}</p>
-                        </div>
-                        <div className="third-item">
-                            <div className="item-title">其中: 在中国境内研发费用总和</div>
-                            <p>{theData.territory}</p>
-                        </div>
-                        <div className="third-item">
-                            <div className="item-title">其中: 基础研究投入费用总额</div>
-                            <div>
-                                <FormItem
-                                    labelCol={{ span: 0 }}
-                                    wrapperCol={{ span: 24 }}
-                                >
-                                    {getFieldDecorator('basicResearchCost', {
-                                        rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
-                                        initialValue: theData.basicResearchCost
-                                    })(
-                                        <InputNumber min={0} max={999999} step={0.01} />
-                                        )}
-                                    <span>万元</span>
-                                </FormItem>
-                            </div>
-                        </div>
+                    <div className="half-item">
+                        <span className="item-title">二类: </span>
+                        <span>{theData.secondCatagory}</span>
                     </div>
+                </div>
+                <div className="clearfix">
                     <div>
-                        <span className="item-title">近一年企业总收入(万元): </span>
-                        <span>{theData.totalRevenue}</span>
+                        <span className="form-title">人力资源状况(人): </span>
                     </div>
-                    <div>
-                        <span className="item-title">近一年高新技术产品收入(万元): </span>
-                        <span>{theData.lastYearRevenue}</span>
+                    <div className="half-item">
+                        <span className="item-title">职工总数: </span>
+                        <span>{theData.firmTotal}</span>
                     </div>
-                    <div className="item-title">申请认定前一年内是否发生过重大安全、重大质量或严重环境违法行为</div>
-                    <FormItem
-                        labelCol={{ span: 0 }}
-                        wrapperCol={{ span: 24 }}
-                    >
-                        {getFieldDecorator('accident', {
-                            rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
-                            initialValue: theData.accident
-                        })(
-                            <Radio.Group>
-                                <Radio value={0}>否</Radio>
-                                <Radio value={1}>是</Radio>
-                            </Radio.Group>
-                            )}
-                    </FormItem>
-                    <div className="form-title">状态流转记录: </div>
-                    <Table pagination={false} dataSource={this.state.stateTable} columns={this.state.stateColumns} />
-                    <FormItem style={{ marginTop: '20px' }}>
-                        <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
-                        <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
-                    </FormItem>
-                </Form >
-            );
-        } else {
-            return (<div></div>)
-        };
+                    <div className="half-item">
+                        <span className="item-title">科技人员数: </span>
+                        <span>{theData.techTotal}</span>
+                    </div>
+                </div>
+                <div className="form-title">近三年经营状况(万元): </div>
+                <Table pagination={false} dataSource={this.state.moneyTable} columns={this.state.moneyColumns} />
+                <div className="clearfix">
+                    <div className="half-item">
+                        <span className="item-title">净资产增长率: </span>
+                        <span>{isNaN(this.state.netAssetRate) || this.state.netAssetRate == Infinity ? '数据错误无法计算' : (this.state.netAssetRate * 100).toFixed(2) + '%'}</span>
+                    </div>
+                    <div className="half-item">
+                        <span className="item-title">销售收入增长率: </span>
+                        <span>{isNaN(this.state.salesRevenueRate) || this.state.salesRevenueRate == Infinity ? '数据错误无法计算' : (this.state.salesRevenueRate * 100).toFixed(2) + '%'}</span>
+                    </div>
+                </div>
+                <div className="clearfix">
+                    <div><span className="form-title">近三年研究开发费用总额(万元): </span></div>
+                    <div className="third-item">
+                        <div className="item-title">近三年研究开发费用总额</div>
+                        <p>{theData.researchCost}</p>
+                    </div>
+                    <div className="third-item">
+                        <div className="item-title">其中: 在中国境内研发费用总和</div>
+                        <p>{theData.territory}</p>
+                    </div>
+                    <div className="third-item">
+                        <div className="item-title">其中: 基础研究投入费用总额</div>
+                        <div>
+                            <FormItem
+                                labelCol={{ span: 0 }}
+                                wrapperCol={{ span: 24 }}
+                            >
+                                {getFieldDecorator('basicResearchCost', {
+                                    rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
+                                    initialValue: theData.basicResearchCost
+                                })(
+                                    <InputNumber min={0} max={999999} step={0.01} />
+                                    )}
+                                <span>万元</span>
+                            </FormItem>
+                        </div>
+                    </div>
+                </div>
+                <div>
+                    <span className="item-title">近一年企业总收入(万元): </span>
+                    <span>{theData.totalRevenue}</span>
+                </div>
+                <div>
+                    <span className="item-title">近一年高新技术产品收入(万元): </span>
+                    <span>{theData.lastYearRevenue}</span>
+                </div>
+                <div className="item-title">申请认定前一年内是否发生过重大安全、重大质量或严重环境违法行为</div>
+                <FormItem
+                    labelCol={{ span: 0 }}
+                    wrapperCol={{ span: 24 }}
+                >
+                    {getFieldDecorator('accident', {
+                        rules: [{ type: 'number', required: true, message: '此项为必填项!' }],
+                        initialValue: theData.accident
+                    })(
+                        <Radio.Group>
+                            <Radio value={0}>否</Radio>
+                            <Radio value={1}>是</Radio>
+                        </Radio.Group>
+                        )}
+                </FormItem>
+                <div className="form-title">状态流转记录: </div>
+                <Table pagination={false} dataSource={this.state.stateTable} columns={this.state.stateColumns} />
+                <FormItem style={{ marginTop: '20px' }}>
+                    <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
+                    <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
+                </FormItem>
+            </Form >
+        );
     },
 }));
 

+ 1 - 0
js/component/account/services/contract/contract.jsx

@@ -294,6 +294,7 @@ const Contract = React.createClass({
                     <ContractDetail
                         data={this.state.RowData}
                         statusOption={this.state.statusOption}
+                        contactsList={this.state.contactsList}
                         showDesc={this.state.showDesc}
                         closeDesc={this.closeDesc} />
                 </div >

+ 5 - 3
js/component/account/services/contract/contractDetail.jsx

@@ -110,6 +110,8 @@ const ContractDetailForm = Form.create()(React.createClass({
                                 return '26-30个工作日';
                             case 35:
                                 return '31-35个工作日';
+                            default:
+                                return '不加急(45个工作日)';
                         }
                     },
                     width: 220
@@ -330,7 +332,7 @@ const ContractDetailForm = Form.create()(React.createClass({
                         "contractId": item.contractId,  //合同ID
                         "copyrightName": item.copyrightName,  //项目名称
                         "serialNumber": item.serialNumber,
-                        "state": item.state,   //状态
+                        "status": item.status,   //状态
                         "inUrgent": item.inUrgent, //加急天数
                         "principal": item.principal,  //当前负责人(技术员)
                         "tableType": "copyright"
@@ -436,7 +438,7 @@ const ContractDetailForm = Form.create()(React.createClass({
                     <FormItem className="half-item"
                         {...formItemLayout}
                         label="联系人" >
-                        <span>{this.state.contactsList ? this.state.contactsList[theData.contacts] : ''}</span>
+                        <span>{this.props.contactsList ? this.props.contactsList[theData.contacts] : ''}</span>
                     </FormItem>
                 </div>
                 <p style={{ fontSize: '14px', color: '#333' }}>状态流转记录: </p>
@@ -566,7 +568,7 @@ const ContractDetail = React.createClass({
                     <Spin spinning={this.state.loading} className='spin-box'>
                         <ContractDetailForm
                             visible={this.state.visible}
-                            authorOption={this.props.authorOption}
+                            contactsList={this.props.contactsList}
                             statusOption={this.props.statusOption}
                             data={this.props.data}
                             spinState={this.spinChange}

+ 3 - 1
js/component/account/services/copyright/comPatentChange.jsx

@@ -117,6 +117,8 @@ const CopyrightDescForm = Form.create()(React.createClass({
                     id: detailData.id,
                     province: detailData.province,
                     unitName: detailData.unitName,
+                    postalAddress: detailData.postalAddress,
+                    orgCode: detailData.orgCode,
                     serialNumber: detailData.serialNumber,
                     createTime: detailData.createTime,
                     acceptTime: detailData.acceptTime,
@@ -219,7 +221,7 @@ const CopyrightDescForm = Form.create()(React.createClass({
                     <FormItem className="half-item"
                         {...formItemLayout}
                         label="组织机构代码" >
-                        <span>{theData.unitNumber}</span>
+                        <span>{theData.orgCode}</span>
                     </FormItem>
                 </div>
                 <div className="clearfix">

+ 1 - 1
js/component/account/services/intellectualDesc.jsx

@@ -230,7 +230,7 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                     </Upload>
                     <p style={{ margin: '10px 0' }}>{theData.propertyRightUrl ? <a onClick={newDownloadFile.bind(null, theData.id, 'property_right', '/api/user/cognizance/downloadPropertyRight', 'downloadPropertyRight')}>{theData.propertyRightDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传知识产权证书!</span>}</p>
                     {(theData.type && theData.type != 0) ? <p style={{ margin: '10px 0' }}>
-                        {theData.manuscript ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'manuscript', '/api/user/cognizance/downloadManuscript', this.props.data.type)}>稿件下载</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传稿件!</span>}
+                        {theData.manuscript ? <a onClick={newDownloadFile.bind(null, theData.id, 'manuscript', '/api/user/cognizance/downloadManuscript', theData.type)}>稿件下载</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传稿件!</span>}
                     </p> : <span></span>}
                 </div>
                 <FormItem>

+ 2 - 6
js/component/account/services/patent.jsx

@@ -114,17 +114,13 @@ const Patent = React.createClass({
                     key: 'patentNum',
                 }, {
                     title: '专利类型',
-                    dataIndex: 'patentType',
-                    key: 'patentType',
+                    dataIndex: 'patentCatagory',
+                    key: 'patentCatagory',
                 }, {
                     title: '专利名称',
                     dataIndex: 'patentName',
                     key: 'patentName',
                 }, {
-                    title: '专利类型',
-                    dataIndex: 'patentCatagory',
-                    key: 'patentCatagory',
-                }, {
                     title: '专利状态',
                     dataIndex: 'patentState',
                     key: 'patentState',

+ 1 - 1
js/component/account/services/patent.less

@@ -123,7 +123,7 @@
             }
         }
         .time-line {
-            width: 200px;
+            width: 240px;
             margin: 0 auto;
             .ant-timeline-item-content {
                 span {

+ 40 - 7
js/component/account/services/patentDesc.jsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import { Icon, Modal, message, Spin, Timeline, Button, Popconfirm } from 'antd';
-import { getPatentType, getPatentState, getTime, getPatentField, newDownloadFile, getStepList } from '../../tools.js';
+import { getPatentType, getPatentState, getTime, getPatentField, newDownloadFile } from '../../tools.js';
 import './patent.less';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -48,10 +48,43 @@ const PatentDesc = React.createClass({
             }.bind(this),
         });
     },
+    getStepList(thepid) {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/user/patent/patentProcess',
+            data: {
+                pid: thepid || this.props.pid
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (var item in data.data) {
+                        theArr.push(
+                            <Timeline.Item key={item}>
+                                <span>{getPatentState(data.data[item].state)}</span>
+                                {data.data[item].recordTimeFormattedDate}
+                            </Timeline.Item>
+                        )
+                    };
+                };
+                this.setState({
+                    stepList: theArr
+                });
+            }.bind(this),
+        });
+    },
     componentWillReceiveProps(nextProps) {
-        if (nextProps.data && nextProps.data.pid !== null && !this.state.visible && nextProps.showDesc) {
-            this.state.stepList = getStepList(nextProps.data.pid, '/api/user/patent/patentProcess');
-            this.getPatentInfo(nextProps.data.pid);
+        if (!this.state.visible && nextProps.showDesc) {
+            if (nextProps.data && nextProps.data.pid) {
+                this.getStepList(nextProps.data.pid);
+                this.getPatentInfo(nextProps.data.pid);
+            };
         };
         this.state.visible = nextProps.showDesc;
     },
@@ -149,13 +182,13 @@ const PatentDesc = React.createClass({
                                 }
                             </div>
                             <div>
-                                <span>专利申请日:</span>{theData.startTime}
+                                <span>专利申请日:</span>{theData.patentApplicationFormattedDate}
                             </div>
                             <div>
-                                <span>专利授权日:</span>{theData.authorizedTime}
+                                <span>专利授权日:</span>{theData.authorizedFormattedDate}
                             </div>
                             <div>
-                                <span>每年年费缴费截止日:</span>{theData.endTime}
+                                <span>每年年费缴费截止日:</span>{getTime(theData.authorizedDate, 12)}
                             </div>
                             <div>
                                 <p>第一发明人:</p>

+ 3 - 3
js/component/account/services/standard.jsx

@@ -45,7 +45,7 @@ const StandardDesc = React.createClass({
                         standardNumber: data.data.standardNumber,
                         standardLevel: data.data.standardLevel,
                         participateWay: data.data.participateWay,
-                        enclosureUrl: this.state.enclosureUrl
+                        enclosureUrl: data.data.enclosureUrl
                     });
                 } else if (data.error && data.error.length) {
                     message.warning(data.error[0].message);
@@ -82,6 +82,8 @@ const StandardDesc = React.createClass({
     },
     componentWillReceiveProps(nextProps) {
         if (!this.state.visible && nextProps.showDesc) {
+            this.state.fileList = [];
+            this.state.enclosureUrl = undefined;
             if (nextProps.data) {
                 this.state.standardName = nextProps.data.standardName;
                 this.state.standardNumber = nextProps.data.standardNumber;
@@ -90,8 +92,6 @@ const StandardDesc = React.createClass({
                 this.state.participateWay = nextProps.data.participateWay;
                 this.state.enclosureUrl = nextProps.data.enclosureUrl;
             };
-            this.state.fileList = [];
-            this.state.enclosureUrl = undefined;
         };
         this.state.visible = nextProps.showDesc;
     },

+ 2 - 2
js/component/account/services/techProduct.jsx

@@ -1,8 +1,8 @@
 import React from 'react';
 import { Icon, Upload, Form, Button, Radio, Input, Spin, Table, message, Select, Modal, Cascader, Transfer, InputNumber } from 'antd';
 import { technicalSourceList } from '../../dataDic.js';
-import { techFieldList } from '../../DicTechFieldList.js';
-import { getTechField, getTechnicalSource, beforeUploadFile, newDownloadFile } from '../../tools.js';
+import { techFieldList, getTechField } from '../../DicTechFieldList.js';
+import { getTechnicalSource, beforeUploadFile, newDownloadFile } from '../../tools.js';
 import './techProduct.less';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';

+ 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>

+ 60 - 8
js/component/manageCenter/achievement/techAchievementDesc.jsx

@@ -207,9 +207,39 @@ const AchievementDetailShow = Form.create()(React.createClass({
             }
         }.bind(this));
     },
+    modifyBroker() {
+        this.props.form.validateFields((err, values) => {
+            if (!err) {
+                this.setState({
+                    loading: true
+                });
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: globalConfig.context + '/api/admin/audit/modifyAchievementTechBroker',
+                    data: {
+                        id: this.props.data.id,
+                        techBrokerId: values.modifyTechBrokerId
+                    }
+                }).done(function (data) {
+                    this.state.auditStatus = 0;
+                    this.setState({
+                        loading: false
+                    });
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    } else {
+                        message.success('保存成功!');
+                        this.props.handleOk();
+                    };
+                }.bind(this));
+            }
+        });
+    },
     formSubmit() {
         this.props.form.validateFields((err, values) => {
-            if (values.auditStatus == 3 && !values.techBroderId) {
+            if (values.auditStatus == 3 && !values.techBrokerId) {
                 message.warning('必须选择一个技术经纪人!');
                 return
             };
@@ -224,7 +254,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
                     url: globalConfig.context + '/api/admin/audit/achievement',
                     data: {
                         id: this.props.data.id,
-                        techBroderId: values.techBroderId,
+                        techBroderId: values.techBrokerId,
                         auditStatus: values.auditStatus
                     }
                 }).done(function (data) {
@@ -518,7 +548,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}
@@ -645,10 +675,31 @@ const AchievementDetailShow = Form.create()(React.createClass({
                         <FormItem className="half-item"
                             {...formItemLayout}
                             label="技术经纪人" >
-                            {getFieldDecorator('techBroderId', {
-                                initialValue: theData.techBroderId
+                            {getFieldDecorator('techBrokerId', {
+                                initialValue: theData.techBrokerId
+                            })(
+                                <Select style={{ width: 260 }}
+                                    placeholder="请选择技术经纪人"
+                                    notFoundContent="未获取到经纪人列表"
+                                    showSearch
+                                    filterOption={companySearch}>
+                                    {this.props.techBrodersOption}
+                                </Select>
+                                )}
+                        </FormItem>
+                    </div> : <div></div>}
+                    {window.showAuditStatus && theData.auditStatus == 3 ? <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="指派新经纪人" >
+                            {getFieldDecorator('modifyTechBrokerId', {
+                                initialValue: theData.techBrokerId
                             })(
-                                <Select style={{ width: 260 }}>
+                                <Select style={{ width: 260 }}
+                                    placeholder="请选择要指派的新经纪人"
+                                    notFoundContent="未获取到经纪人列表"
+                                    showSearch
+                                    filterOption={companySearch}>
                                     {this.props.techBrodersOption}
                                 </Select>
                                 )}
@@ -656,6 +707,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
                     </div> : <div></div>}
                     <FormItem wrapperCol={{ span: 12, offset: 4 }}>
                         {theData.auditStatus == 2 ? <Button className="set-submit" type="primary" htmlType="submit">保存</Button> : <span></span>}
+                        {theData.auditStatus == 3 ? <Button className="set-submit" type="primary" onClick={() => { this.modifyBroker(); }}>保存</Button> : <span></span>}
                         <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
                         {window.showAuditStatus ? <Button className="set-submit" loading={this.state.buttonLoading} type="primary" onClick={this.buildMatchList}>生成匹配列表</Button> : <span></span>}
                     </FormItem>
@@ -1138,7 +1190,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                                 };
                                 this.setState({ textFileList: info.fileList.slice(-1) });
                             }} >
-                            <Button><Icon type="upload" /> 上传需求文本文件 </Button>
+                            <Button><Icon type="upload" /> 上传成熟度证明文本 </Button>
                         </Upload>
                         <p style={{ marginTop: '10px' }}>{theData.maturityTextFileUrl ?
                             <span className="download-file">
@@ -1514,7 +1566,7 @@ const AchievementDetail = React.createClass({
                 let _me = this, theArr = [];
                 for (var item in data.data) {
                     theArr.push(
-                        <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
+                        <Select.Option key={item}>{data.data[item]}</Select.Option>
                     )
                 };
                 this.setState({

+ 61 - 7
js/component/manageCenter/demand/techDemandDesc.jsx

@@ -5,7 +5,8 @@ import './techDemand.less';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import { IndustryObject, getIndustryCategory } from '../../DicIndustryList.js';
-import { beforeUploadFile, getTechAuditStatus, splitUrl, companySearch, getTechField, getDemandType, getAchievementCategory } from '../../tools.js';
+import { getTechField } from '../../DicTechFieldList.js';
+import { beforeUploadFile, getTechAuditStatus, splitUrl, companySearch, getDemandType, getAchievementCategory } from '../../tools.js';
 import throttle from '../../throttle.js';
 
 const KeyWordTagGroup = React.createClass({
@@ -222,9 +223,40 @@ const DemandDetailShow = Form.create()(React.createClass({
             });
         }.bind(this));
     },
+    modifyBroker() {
+        this.props.form.validateFields((err, values) => {
+            debugger
+            if (!err) {
+                this.setState({
+                    loading: true
+                });
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: globalConfig.context + '/api/admin/audit/modifyDemandTechBroker',
+                    data: {
+                        id: this.props.data.id,
+                        techBrokerId: values.modifyTechBrokerId
+                    }
+                }).done(function (data) {
+                    this.state.auditStatus = 0;
+                    this.setState({
+                        loading: false
+                    });
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    } else {
+                        message.success('保存成功!');
+                        this.props.handleOk();
+                    };
+                }.bind(this));
+            }
+        });
+    },
     formSubmit() {
         this.props.form.validateFields((err, values) => {
-            if (values.auditStatus == 3 && !values.techBroderId) {
+            if (values.auditStatus == 3 && !values.techBrokerId) {
                 message.warning('必须选择一个技术经纪人!');
                 return
             };
@@ -239,7 +271,7 @@ const DemandDetailShow = Form.create()(React.createClass({
                     url: globalConfig.context + '/api/admin/audit/demand',
                     data: {
                         id: this.props.data.id,
-                        techBroderId: values.techBroderId,
+                        techBroderId: values.techBrokerId,
                         auditStatus: values.auditStatus
                     }
                 }).done(function (data) {
@@ -581,10 +613,31 @@ const DemandDetailShow = Form.create()(React.createClass({
                         <FormItem className="half-item"
                             {...formItemLayout}
                             label="技术经纪人" >
-                            {getFieldDecorator('techBroderId', {
-                                initialValue: theData.techBroderId
+                            {getFieldDecorator('techBrokerId', {
+                                initialValue: theData.techBrokerId
+                            })(
+                                <Select style={{ width: 260 }}
+                                    placeholder="请选择技术经纪人"
+                                    notFoundContent="未获取到经纪人列表"
+                                    showSearch
+                                    filterOption={companySearch}>
+                                    {this.props.techBrodersOption}
+                                </Select>
+                                )}
+                        </FormItem>
+                    </div> : <div></div>}
+                    {window.showAuditStatus && theData.auditStatus == 3 ? <div className="clearfix">
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="指派新经纪人" >
+                            {getFieldDecorator('modifyTechBrokerId', {
+                                initialValue: theData.techBrokerId
                             })(
-                                <Select style={{ width: 260 }}>
+                                <Select style={{ width: 260 }}
+                                    placeholder="请选择要指派的新经纪人"
+                                    notFoundContent="未获取到经纪人列表"
+                                    showSearch
+                                    filterOption={companySearch}>
                                     {this.props.techBrodersOption}
                                 </Select>
                                 )}
@@ -592,6 +645,7 @@ const DemandDetailShow = Form.create()(React.createClass({
                     </div> : <div></div>}
                     <FormItem wrapperCol={{ span: 12, offset: 3 }}>
                         {theData.auditStatus == 2 ? <Button className="set-submit" type="primary" htmlType="submit">保存</Button> : <span></span>}
+                        {theData.auditStatus == 3 ? <Button className="set-submit" type="primary" onClick={() => { this.modifyBroker(); }}>保存</Button> : <span></span>}
                         <Button className="set-submit" type="ghost" onClick={this.props.closeDesc}>取消</Button>
                         {window.showAuditStatus ? <Button className="set-submit" loading={this.state.buttonLoading} type="primary" onClick={this.buildMatchList}>生成匹配列表</Button> : <span></span>}
                     </FormItem>
@@ -1289,7 +1343,7 @@ const DemandDetail = React.createClass({
                 let _me = this, theArr = [];
                 for (var item in data.data) {
                     theArr.push(
-                        <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
+                        <Select.Option key={item}>{data.data[item]}</Select.Option>
                     )
                 };
                 this.setState({

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

@@ -0,0 +1,668 @@
+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));
+    },
+    cleanCache(sign) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/activity/cleanCache',
+            data: {
+                'cacheKey': sign
+            },
+            success: function (data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                } else {
+                    message.success('清除缓存成功!');
+                };
+            }.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>
+                        <Button type="primary" onClick={() => { this.cleanCache('activity_portal_list_cache_key'); }}>清除缓存</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;

+ 255 - 0
js/component/manageCenter/idea/activity/activityUserList.jsx

@@ -0,0 +1,255 @@
+import React from 'react';
+import { Icon, Button, Spin, message, Table, Input, Tabs, Select } from 'antd';
+//import { getActivityForm, getActivityType } 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 ActivityTable = React.createClass({
+    loadData(pageNo, apiUrl) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + (apiUrl || this.props.apiUrl),
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                activityName: this.state.searchName,
+                mobile: this.state.searchMobile,
+                username: this.state.searchUsername,
+                unitName: this.state.searchUnitName,
+                number: this.state.searchNumber,
+            },
+            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,
+                            aid: thisdata.aid,
+                            uid: thisdata.uid,
+                            createTime: thisdata.createTime,
+                            lastUpdateTime: thisdata.lastUpdateTime,
+                            activityName: thisdata.activityName,
+                            number: thisdata.number,
+                            mobile: thisdata.mobile,
+                            username: thisdata.username,
+                            unitName: thisdata.unitName,
+                            theName: thisdata.username || thisdata.unitName,
+                            startTime: thisdata.startTime,
+                            endTime: thisdata.endTime,
+                            enrollDeadline: thisdata.enrollDeadline,
+                            createTimeFormattedDate: thisdata.createTimeFormattedDate,
+                            enrollDeadlineFormattedDate: thisdata.enrollDeadlineFormattedDate,
+                            startTimeFormattedDate: thisdata.startTimeFormattedDate,
+                            endTimeFormattedDate: thisdata.endTimeFormattedDate,
+                            lastUpdateTimeFormattedDate: thisdata.lastUpdateTimeFormattedDate,
+                        });
+                    };
+                    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));
+    },
+    getInitialState() {
+        return {
+            loading: false,
+            visible: false,
+            selectedRowKeys: [],
+            selectedRows: [],
+            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: 'theName',
+                    key: 'theName'
+                }, {
+                    title: '活动名称',
+                    dataIndex: 'activityName',
+                    key: 'activityName',
+                }, {
+                    title: '阿凡提号',
+                    dataIndex: 'number',
+                    key: 'number'
+                }, {
+                    title: '联系方式',
+                    dataIndex: 'mobile',
+                    key: 'mobile'
+                }, {
+                    title: '首次报名/咨询时间',
+                    dataIndex: 'createTimeFormattedDate',
+                    key: 'createTimeFormattedDate'
+                }, {
+                    title: '最近一次报名/咨询时间',
+                    dataIndex: 'lastUpdateTimeFormattedDate',
+                    key: 'lastUpdateTimeFormattedDate'
+                }, {
+                    title: '活动截止报名时间',
+                    dataIndex: 'enrollDeadlineFormattedDate',
+                    key: 'enrollDeadlineFormattedDate'
+                }
+            ],
+            tableData: []
+        };
+    },
+    componentWillMount() {
+        this.loadData();
+    },
+    componentWillReceiveProps(nextProps) {
+        if (this.props.tableType !== nextProps.tableType) {
+            this.loadData(nextProps.apiUrl)
+        }
+    },
+    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/activityUser/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.searchName = undefined;
+        this.state.searchMobile = undefined;
+        this.state.searchUsername = undefined;
+        this.state.searchUnitName = undefined;
+        this.state.searchNumber = undefined;
+        this.loadData();
+    },
+    render() {
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows,
+                    selectedRowKeys: selectedRowKeys
+                });
+            }
+        };
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        return (
+            <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.searchMobile}
+                        onChange={(e) => { this.setState({ searchMobile: e.target.value }); }} />
+                    {(() => {
+                        switch (this.props.tableType) {
+                            case 'user':
+                                return <Input placeholder="报名人名称" style={{ width: 200 }}
+                                    value={this.state.searchUsername}
+                                    onChange={(e) => { this.setState({ searchUsername: e.target.value }); }} />
+                            case 'org':
+                                return <Input placeholder="报名人名称" style={{ width: 200 }}
+                                    value={this.state.searchUnitName}
+                                    onChange={(e) => { this.setState({ searchUnitName: e.target.value }); }} />
+                        };
+                    })()}
+                    <Input placeholder="报名人阿凡提号" style={{ width: 200 }}
+                        value={this.state.searchNumber}
+                        onChange={(e) => { this.setState({ searchNumber: e.target.value }); }} />
+                    <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
+                        columns={this.state.columns}
+                        dataSource={this.state.tableData}
+                        pagination={this.state.pagination}
+                        rowSelection={rowSelection} />
+                </Spin>
+            </div>
+        )
+    }
+});
+
+const ActivityUserList = React.createClass({
+    getInitialState() {
+        return {
+            userApiUrl: '/api/admin/activityUser/userList',
+            orgApiUrl: '/api/admin/activityUser/orgList',
+            tableType: 'user'
+        };
+    },
+    tabChange(key) {
+        this.setState({ tableType: key });
+    },
+    render() {
+        return (
+            <div className="admin-content" >
+                <div className="admin-content-title">
+                    <span>活动圈报名管理</span>
+                </div>
+                <Tabs activeKey={this.state.tableType} onChange={this.tabChange}>
+                    <Tabs.TabPane tab="个人报名管理" key="user">
+                        <ActivityTable apiUrl={this.state.userApiUrl} tableType={'user'} />
+                    </Tabs.TabPane>
+                    <Tabs.TabPane tab="组织报名管理" key="org">
+                        <ActivityTable apiUrl={this.state.orgApiUrl} tableType={'org'} />
+                    </Tabs.TabPane>
+                </Tabs>
+            </div >
+        );
+    }
+});
+export default ActivityUserList;

+ 4 - 3
js/component/manageCenter/idea/bannerManage/bannerManage.jsx

@@ -19,7 +19,7 @@ const Avatar = React.createClass({
         }
     },
     componentWillReceiveProps(nextProps) {
-        if (this.props.id != nextProps.id) {
+        if (this.props.visible && !nextProps.visible) {
             this.state.imageUrl = null;
         };
     },
@@ -328,7 +328,7 @@ const Lecture = React.createClass({
                             onChange={(e) => { this.setState({ searchKey: e }) }}>
                             {this.state.keysOption}
                         </Select>
-                        <Button type="primary" onClick={this.loadData}>搜索</Button>
+                        <Button type="primary" onClick={() => { this.loadData() }}>搜索</Button>
                         <Button type="ghost" onClick={this.clearCache}>清除缓存</Button>
                         <Button onClick={this.reset}>重置</Button>
                         <Button type='danger' disabled={!hasSelected} onClick={this.delectRow}>
@@ -351,7 +351,7 @@ const Lecture = React.createClass({
                     visible={this.state.visible}
                     maskClosable={false}
                     footer={null}
-                    afterClose={() => { this.state.RowData = {} }}
+                    afterClose={() => { this.state.RowData = {}; }}
                     onCancel={() => { this.setState({ visible: false }) }} >
                     <Spin spinning={this.state.loading}>
                         <div className="modal-box">
@@ -439,6 +439,7 @@ const Lecture = React.createClass({
                             <div className="modal-box-detail clearfix">
                                 <Avatar sign={this.state.RowData.sign} id={this.state.RowData.id}
                                     imageUrl={this.state.RowData.imgurl ? (globalConfig.avatarHost + "/upload" + this.state.RowData.imgurl) : null}
+                                    visible={this.state.visible}
                                     urlData={(url) => { this.state.RowData.imgurl = url }} />
                             </div>
                         </div>

+ 170 - 136
js/component/manageCenter/idea/bigShot/lecture.jsx

@@ -46,58 +46,6 @@ const Avatar = React.createClass({
 });
 
 const Lecture = React.createClass({
-    loadUserData(pageNo) {
-        this.setState({
-            loading: true
-        });
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + '/api/admin/lecture/starAndExpertList',
-            data: {
-                pageNo: pageNo || 1,
-                pageSize: this.state.userPagination.pageSize,
-                number: this.state.searchUserNumber, //编号
-                username: this.state.searchUserName, //名称
-                engagedField: this.state.searchField ? this.state.searchField.join(',') : undefined,
-                professionalTitle: this.state.searchPfs,
-                workUnit: this.state.searchUnit
-            },
-            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,
-                            uid: thisdata.uid,
-                            engagedField: thisdata.engagedField ? thisdata.engagedField.split(',') : [],
-                            username: thisdata.username,
-                            professionalTitle: thisdata.professionalTitle,
-                            workUnit: thisdata.workUnit,
-                            number: thisdata.number,
-                            achievementNums: thisdata.achievementNums,
-                        });
-                    };
-                    this.state.userPagination.current = data.data.pageNo;
-                    this.state.userPagination.total = data.data.totalCount;
-                };
-                this.setState({
-                    userTableData: theArr,
-                    userPagination: this.state.userPagination
-                });
-            }.bind(this),
-        }).always(function () {
-            this.setState({
-                loading: false
-            });
-        }.bind(this));
-    },
     loadLectureData(pageNo) {
         this.setState({
             loading: true
@@ -245,7 +193,7 @@ const Lecture = React.createClass({
         }.bind(this));
     },
     loadData() {
-        this.loadUserData();
+        //    this.loadUserData();
         this.loadLectureData();
         this.loadHotData();
         this.loadDynamicData();
@@ -257,18 +205,18 @@ const Lecture = React.createClass({
             addModal: {},
             selectedRowKeys: [],
             selectedRows: [],
-            userPagination: {
-                defaultCurrent: 1,
-                defaultPageSize: 10,
-                showQuickJumper: true,
-                pageSize: 10,
-                onChange: function (page) {
-                    this.loadUserData(page);
-                }.bind(this),
-                showTotal: function (total) {
-                    return '共' + total + '条数据';
-                }
-            },
+            // userPagination: {
+            //     defaultCurrent: 1,
+            //     defaultPageSize: 10,
+            //     showQuickJumper: true,
+            //     pageSize: 10,
+            //     onChange: function (page) {
+            //         this.loadUserData(page);
+            //     }.bind(this),
+            //     showTotal: function (total) {
+            //         return '共' + total + '条数据';
+            //     }
+            // },
             lecturePagination: {
                 defaultCurrent: 1,
                 defaultPageSize: 10,
@@ -281,34 +229,34 @@ const Lecture = React.createClass({
                     return '共' + total + '条数据';
                 }
             },
-            userColumns: [
-                {
-                    title: '编号',
-                    dataIndex: 'number',
-                    key: 'number',
-                }, {
-                    title: '姓名',
-                    dataIndex: 'username',
-                    key: 'username',
-                }, {
-                    title: '从事领域',
-                    dataIndex: 'engagedField',
-                    key: 'engagedField',
-                    render: text => { return getTechField(text[0], text[1], text[2]) }
-                }, {
-                    title: '职称名字',
-                    dataIndex: 'professionalTitle',
-                    key: 'professionalTitle',
-                }, {
-                    title: '工作单位',
-                    dataIndex: 'workUnit',
-                    key: 'workUnit',
-                }, {
-                    title: '成果数量',
-                    dataIndex: 'achievementNums',
-                    key: 'achievementNums',
-                }
-            ],
+            // userColumns: [
+            //     {
+            //         title: '编号',
+            //         dataIndex: 'number',
+            //         key: 'number',
+            //     }, {
+            //         title: '姓名',
+            //         dataIndex: 'username',
+            //         key: 'username',
+            //     }, {
+            //         title: '从事领域',
+            //         dataIndex: 'engagedField',
+            //         key: 'engagedField',
+            //         render: text => { return getTechField(text[0], text[1], text[2]) }
+            //     }, {
+            //         title: '职称名字',
+            //         dataIndex: 'professionalTitle',
+            //         key: 'professionalTitle',
+            //     }, {
+            //         title: '工作单位',
+            //         dataIndex: 'workUnit',
+            //         key: 'workUnit',
+            //     }, {
+            //         title: '成果数量',
+            //         dataIndex: 'achievementNums',
+            //         key: 'achievementNums',
+            //     }
+            // ],
             lectureColumns: [
                 {
                     title: '讲堂名称',
@@ -316,8 +264,8 @@ const Lecture = React.createClass({
                     key: 'name',
                 }, {
                     title: '开讲人姓名',
-                    dataIndex: 'username',
-                    key: 'username',
+                    dataIndex: 'lecturer',
+                    key: 'lecturer',
                 }, {
                     title: '描述',
                     dataIndex: 'summary',
@@ -397,6 +345,7 @@ const Lecture = React.createClass({
             data: {
                 'id': this.state.addModal.id,
                 "uid": this.state.addModal.uid,
+                "lecturer": this.state.addModal.lecturer,
                 "name": this.state.addModal.name,
                 "summary": this.state.addModal.summary,
                 "lectureUrl": this.state.addModal.lectureUrl,
@@ -420,14 +369,39 @@ const Lecture = React.createClass({
             });
         }.bind(this));
     },
-    resetUser() {
-        this.state.searchUserNumber = undefined;
-        this.state.searchUserName = undefined;
-        this.state.searchField = undefined;
-        this.state.searchPfs = undefined;
-        this.state.searchUnit = undefined;
-        this.loadUserData();
+    cleanCache(sign) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/lecture/cleanCache',
+            data: {
+                'cacheKey': sign
+            },
+            success: function (data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                } else {
+                    message.success('清除缓存成功!');
+                };
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
     },
+    // resetUser() {
+    //     this.state.searchUserNumber = undefined;
+    //     this.state.searchUserName = undefined;
+    //     this.state.searchField = undefined;
+    //     this.state.searchPfs = undefined;
+    //     this.state.searchUnit = undefined;
+    //     this.loadUserData();
+    // },
     resetList() {
         this.state.searchLectureUser = undefined;
         this.state.searchLectureName = undefined;
@@ -435,9 +409,7 @@ const Lecture = React.createClass({
         this.state.endLectureTime = undefined;
         this.loadLectureData();
     },
-    userTableRowClick(record, index) {
-        this.state.addModal.uid = record.uid;
-        this.state.addModal.username = record.username;
+    addClick() {
         this.setState({
             addVisible: true
         });
@@ -465,40 +437,13 @@ const Lecture = React.createClass({
             <div className="admin-content" >
                 <div className="admin-content-title">科技讲堂管理</div>
                 <div className="admin-content-warp">
-                    <div className="admin-content-header">专家明星列表</div>
-                    <div className="admin-content-search">
-                        <Input placeholder="编号" style={{ width: 100 }}
-                            value={this.state.searchUserNumber}
-                            onChange={(e) => { this.setState({ searchUserNumber: e.target.value }); }} />
-                        <Input placeholder="专家明星名称" style={{ width: 160 }}
-                            value={this.state.searchUserName}
-                            onChange={(e) => { this.setState({ searchUserName: e.target.value }); }} />
-                        <Cascader placeholder="请选择一个行业" style={{ width: 300 }}
-                            options={techFieldList}
-                            value={this.state.searchField}
-                            onChange={(e) => { this.setState({ searchField: e }) }} />
-                        <Input placeholder="职称名字" style={{ width: 160 }}
-                            value={this.state.searchPfs}
-                            onChange={(e) => { this.setState({ searchPfs: e.target.value }); }} />
-                        <Input placeholder="工作单位" style={{ width: 160 }}
-                            value={this.state.searchUnit}
-                            onChange={(e) => { this.setState({ searchUnit: e.target.value }); }} />
-                        <Button type="primary" onClick={() => { this.loadUserData() }}>搜索</Button>
-                        <Button onClick={this.resetUser}>重置</Button>
-                    </div>
-                    <Spin spinning={this.state.loading}>
-                        <Table columns={this.state.userColumns}
-                            dataSource={this.state.userTableData}
-                            pagination={this.state.userPagination}
-                            onRowClick={this.userTableRowClick} />
-                    </Spin>
-                </div>
-                <div className="admin-content-warp">
                     <div className="admin-content-header">
                         <span>讲堂列表</span>
+                        <Button type="primary" onClick={() => { this.cleanCache('lecture_list_cache_key'); }}>清除缓存</Button>
                         <Button type='danger' disabled={!hasSelected} onClick={this.delectRow}>
                             删除<Icon type="minus" />
                         </Button>
+                        <Button type="primary" onClick={() => { this.addClick(); }}>新增</Button>
                     </div>
                     <div className="admin-content-search">
                         <Input placeholder="开讲人名称" style={{ width: 160 }}
@@ -540,6 +485,7 @@ const Lecture = React.createClass({
                     <div className="admin-content-warp" style={{ width: '50%', float: 'left' }}>
                         <div className="admin-content-header">
                             <span>大咖页列表</span>
+                            <Button type="primary" onClick={() => { this.cleanCache('big_shot_lecture_cache_key'); }}>清除缓存</Button>
                         </div>
                         <Spin spinning={this.state.loading}>
                             <Table columns={this.state.lectureColumns}
@@ -551,6 +497,7 @@ const Lecture = React.createClass({
                     <div className="admin-content-warp" style={{ width: '50%', float: 'left' }}>
                         <div className="admin-content-header">
                             <span>明星动态列表</span>
+                            <Button type="primary" onClick={() => { this.cleanCache('lecture_dynamic_list_cache_key'); }}>清除缓存</Button>
                         </div>
                         <Spin spinning={this.state.loading}>
                             <Table columns={this.state.lectureColumns}
@@ -571,7 +518,11 @@ const Lecture = React.createClass({
                         <div className="modal-box">
                             <span className="modal-box-title">开讲人</span>
                             <div className="modal-box-detail">
-                                {this.state.addModal.username}
+                                <Input value={this.state.addModal.lecturer}
+                                    onChange={(e) => {
+                                        this.state.addModal.lecturer = e.target.value;
+                                        this.setState({ addModal: this.state.addModal });
+                                    }} />
                             </div>
                         </div>
                         <div className="modal-box">
@@ -652,4 +603,87 @@ const Lecture = React.createClass({
     }
 });
 
-export default Lecture;
+export default Lecture;
+
+    // loadUserData(pageNo) {
+    //     this.setState({
+    //         loading: true
+    //     });
+    //     $.ajax({
+    //         method: "get",
+    //         dataType: "json",
+    //         crossDomain: false,
+    //         url: globalConfig.context + '/api/admin/lecture/starAndExpertList',
+    //         data: {
+    //             pageNo: pageNo || 1,
+    //             pageSize: this.state.userPagination.pageSize,
+    //             number: this.state.searchUserNumber, //编号
+    //             username: this.state.searchUserName, //名称
+    //             engagedField: this.state.searchField ? this.state.searchField.join(',') : undefined,
+    //             professionalTitle: this.state.searchPfs,
+    //             workUnit: this.state.searchUnit
+    //         },
+    //         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,
+    //                         uid: thisdata.uid,
+    //                         engagedField: thisdata.engagedField ? thisdata.engagedField.split(',') : [],
+    //                         username: thisdata.username,
+    //                         professionalTitle: thisdata.professionalTitle,
+    //                         workUnit: thisdata.workUnit,
+    //                         number: thisdata.number,
+    //                         achievementNums: thisdata.achievementNums,
+    //                     });
+    //                 };
+    //                 this.state.userPagination.current = data.data.pageNo;
+    //                 this.state.userPagination.total = data.data.totalCount;
+    //             };
+    //             this.setState({
+    //                 userTableData: theArr,
+    //                 userPagination: this.state.userPagination
+    //             });
+    //         }.bind(this),
+    //     }).always(function () {
+    //         this.setState({
+    //             loading: false
+    //         });
+    //     }.bind(this));
+    // },
+
+                // <div className="admin-content-warp">
+                //     <div className="admin-content-header">专家明星列表</div>
+                //     <div className="admin-content-search">
+                //         <Input placeholder="编号" style={{ width: 100 }}
+                //             value={this.state.searchUserNumber}
+                //             onChange={(e) => { this.setState({ searchUserNumber: e.target.value }); }} />
+                //         <Input placeholder="专家明星名称" style={{ width: 160 }}
+                //             value={this.state.searchUserName}
+                //             onChange={(e) => { this.setState({ searchUserName: e.target.value }); }} />
+                //         <Cascader placeholder="请选择一个行业" style={{ width: 300 }}
+                //             options={techFieldList}
+                //             value={this.state.searchField}
+                //             onChange={(e) => { this.setState({ searchField: e }) }} />
+                //         <Input placeholder="职称名字" style={{ width: 160 }}
+                //             value={this.state.searchPfs}
+                //             onChange={(e) => { this.setState({ searchPfs: e.target.value }); }} />
+                //         <Input placeholder="工作单位" style={{ width: 160 }}
+                //             value={this.state.searchUnit}
+                //             onChange={(e) => { this.setState({ searchUnit: e.target.value }); }} />
+                //         <Button type="primary" onClick={() => { this.loadUserData() }}>搜索</Button>
+                //         <Button onClick={this.resetUser}>重置</Button>
+                //     </div>
+                //     <Spin spinning={this.state.loading}>
+                //         <Table columns={this.state.userColumns}
+                //             dataSource={this.state.userTableData}
+                //             pagination={this.state.userPagination}
+                //             onRowClick={this.userTableRowClick} />
+                //     </Spin>
+                // </div>

+ 29 - 1
js/component/manageCenter/idea/bigShot/star.jsx

@@ -346,6 +346,31 @@ const Star = React.createClass({
             });
         }.bind(this));
     },
+    cleanCache() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/star/cleanCache',
+            data: {
+                'cacheKey': 'big_shot_star_cache_key'
+            },
+            success: function (data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                } else {
+                    message.success('清除缓存成功!');
+                };
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
     search() {
         this.loadData();
     },
@@ -382,7 +407,9 @@ const Star = React.createClass({
             <div className="admin-content" >
                 <div className="admin-content-title">科技明星管理</div>
                 <div className="admin-content-warp">
-                    <div className="admin-content-header">明星列表</div>
+                    <div className="admin-content-header">
+                        <span>明星列表</span>
+                    </div>
                     <div className="admin-content-search">
                         <Input placeholder="编号" style={{ width: 100 }}
                             value={this.state.searchNumber}
@@ -402,6 +429,7 @@ const Star = React.createClass({
                             onChange={(e) => { this.setState({ searchUnit: e.target.value }); }} />
                         <Button type="primary" onClick={this.search}>搜索</Button>
                         <Button onClick={this.reset}>重置</Button>
+                        <Button type="primary" onClick={() => { this.cleanCache(); }}>清除缓存</Button>
                     </div>
                     <Spin spinning={this.state.loading}>
                         <Table columns={this.state.columns}

+ 61 - 5
js/component/manageCenter/idea/content.jsx

@@ -9,7 +9,7 @@ class Content extends Component {
         super();
         this.state = {
             loading: false,
-            component: 'div',
+            component: <div></div>,
         };
     }
     componentWillMount() {
@@ -25,7 +25,7 @@ class Content extends Component {
                 require.ensure([], () => {
                     const Star = require('./bigShot/star').default;
                     this.setState({
-                        component: Star
+                        component: <Star />
                     });
                 });
                 break;
@@ -33,7 +33,7 @@ class Content extends Component {
                 require.ensure([], () => {
                     const Lecture = require('./bigShot/lecture').default;
                     this.setState({
-                        component: Lecture
+                        component: <Lecture />
                     });
                 });
                 break;
@@ -41,7 +41,63 @@ class Content extends Component {
                 require.ensure([], () => {
                     const Banner = require('./bannerManage/bannerManage').default;
                     this.setState({
-                        component: Banner
+                        component: <Banner />
+                    });
+                });
+                break;
+            case 'flash':
+                require.ensure([], () => {
+                    const News = require('./news/news').default;
+                    this.setState({
+                        component: <News newsType={1} />
+                    });
+                });
+                break;
+            case 'nationalPolicy':
+                require.ensure([], () => {
+                    const News = require('./news/news').default;
+                    this.setState({
+                        component: <News newsType={4} />
+                    });
+                });
+                break;
+            case 'localPolicy':
+                require.ensure([], () => {
+                    const News = require('./news/news').default;
+                    this.setState({
+                        component: <News newsType={5} />
+                    });
+                });
+                break;
+            case 'jitao':
+                require.ensure([], () => {
+                    const News = require('./news/news').default;
+                    this.setState({
+                        component: <News newsType={3} />
+                    });
+                });
+                break;
+            case 'contact':
+                require.ensure([], () => {
+                    const News = require('./news/news').default;
+                    this.setState({
+                        component: <News newsType={2} />
+                    });
+                });
+                break;
+            case 'activity':
+                require.ensure([], () => {
+                    const Activity = require('./activity/activity').default;
+                    this.setState({
+                        component: <Activity />
+                    });
+                });
+                break;
+            case 'activityUserList':
+                require.ensure([], () => {
+                    const ActivityUserList = require('./activity/activityUserList').default;
+                    this.setState({
+                        component: <ActivityUserList />
                     });
                 });
                 break;
@@ -53,7 +109,7 @@ class Content extends Component {
             <div className="manage-content">
                 <LeftTab handlekey={this.getKey.bind(this)} />
                 <div className="content-right">
-                    <this.state.component />
+                    {this.state.component}
                 </div>
             </div>
         )

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

@@ -15,6 +15,7 @@
             }
             >button {
                 float: right;
+                margin-right: 20px;
             }
         }
         .admin-content-search {
@@ -59,6 +60,29 @@
     }
 }
 
+.news-modal {
+    .quill {
+        margin-top: 40px;
+        margin-bottom: 40px;
+        .ql-editor {
+            min-height: 400px;
+        }
+    }
+    .ant-modal-body {
+        padding-bottom: 50px;
+        .modal-box {
+            float: left;
+        }
+        .news-box {
+            float: left;
+            width: 280px;
+            .modal-box-detail {
+                width: 160px;
+            }
+        }
+    }
+}
+
 .avatar-uploader,
 .avatar-uploader-trigger,
 .avatar {

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

@@ -12,6 +12,8 @@ const LeftTab = React.createClass({
             subKey: 'sub1',
             keyList: [
                 { key: 'sub1', value: ['star', 'lecture'] },
+                { key: 'sub2', value: ['flash', 'localPolicy', 'nationalPolicy', 'contact','jitao'] },
+                { key: 'sub3', value: ['activity','activityUserList'] },
                 { key: 'sub10', value: ['banner'] }
             ]
         };
@@ -52,6 +54,31 @@ const LeftTab = React.createClass({
                         科技讲堂
                     </Menu.Item>
                 </SubMenu>
+                <SubMenu key="sub2" title={<span>策源地</span>}>
+                    <Menu.Item key="flash">
+                        科技快讯
+                    </Menu.Item>
+                    <Menu.Item key="nationalPolicy">
+                        国家政策
+                    </Menu.Item>
+                    <Menu.Item key="localPolicy">
+                        地方政策
+                    </Menu.Item>
+                    <Menu.Item key="jitao">
+                        技淘动态
+                    </Menu.Item>
+                    <Menu.Item key="contact">
+                        政府往来
+                    </Menu.Item>
+                </SubMenu>
+                <SubMenu key="sub3" title={<span>活动圈</span>}>
+                    <Menu.Item key="activity">
+                        活动圈
+                    </Menu.Item>
+                    <Menu.Item key="activityUserList">
+                        报名用户列表
+                    </Menu.Item>
+                </SubMenu>
                 <SubMenu key="sub10" title={<span>广告图</span>}>
                     <Menu.Item key="banner">
                         广告图管理

+ 510 - 0
js/component/manageCenter/idea/news/news.jsx

@@ -0,0 +1,510 @@
+import React from 'react';
+import { Icon, Button, Spin, message, Table, Input, Modal, DatePicker, Upload, Select, Radio } from 'antd';
+import { beforeUpload, getBase64 } from '../../../tools';
+import Editors from '../../../richTextEditors'
+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/news/upload"}
+                data={{ 'sign': 'news_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 News = React.createClass({
+    loadData(pageNo, theType) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/news/list',
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                type: theType || this.props.newsType || 0, //新闻类型
+                title: this.state.searchTitle,
+                author: this.state.searchAuthor,
+                startCreateTime: this.state.startDate, //新闻开始时间 yyyy-MM-dd
+                endCreateTime: this.state.endDate, //新闻结束时间 yyyy-MM-dd
+                source: this.state.searchSource,
+                hot: this.state.searchHot, //是否放在首页
+            },
+            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 ? thisdata.id.toString() : null,
+                            createTime: thisdata.createTime,
+                            editTime: thisdata.editTime,
+                            title: thisdata.title,
+                            titleImg: thisdata.titleImg,
+                            author: thisdata.author,
+                            type: thisdata.type,
+                            hot: thisdata.hot,
+                            source: thisdata.source,
+                            sourceUrl: thisdata.sourceUrl,
+                            summary: thisdata.summary,
+                            content: thisdata.content,
+                            createTimeFormattedDate: thisdata.createTimeFormattedDate,
+                        });
+                    };
+                    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/news/detail',
+            data: {
+                id: this.state.RowData.id //新闻主键ID(数字类型,非字符串)
+            },
+            success: function (data) {
+                let theObj = {};
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    theObj = data.data;
+                };
+                this.setState({
+                    RowData: theObj,
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            loading: false,
+            visible: false,
+            selectedRowKeys: [],
+            selectedRows: [],
+            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: 'title',
+                    key: 'title',
+                    width: '20%'
+                }, {
+                    title: '发布时间',
+                    dataIndex: 'createTimeFormattedDate',
+                    key: 'createTimeFormattedDate',
+                }, {
+                    title: '作者',
+                    dataIndex: 'author',
+                    key: 'author',
+                }, {
+                    title: '来源',
+                    dataIndex: 'source',
+                    key: 'source',
+                }, {
+                    title: '简介',
+                    dataIndex: 'summary',
+                    key: 'summary',
+                    width: '50%'
+                }
+            ],
+            tableData: []
+        };
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        this.loadDetailData();
+        this.setState({
+            visible: true
+        });
+    },
+    componentWillMount() {
+        this.loadData();
+    },
+    componentWillReceiveProps(nextProps) {
+        if (this.props.newsType != nextProps.newsType) {
+            this.loadData(1, nextProps.newsType);
+        };
+    },
+    submit() {
+        if (!this.state.RowData.title) {
+            message.warning('必须填写一个标题!');
+            return;
+        };
+        if (!this.state.RowData.createTimeFormattedDate) {
+            message.warning('必须选择一个发布时间!');
+            return;
+        };
+        if (!this.state.RowData.author) {
+            message.warning('必须填写一个作者!');
+            return;
+        };
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + (this.state.RowData.id ? '/api/admin/news/update' : '/api/admin/news/add'),
+            data: {
+                id: this.state.RowData.id || null, //主键,如果不填主键则为新增记录,填主键则为更新
+                title: this.state.RowData.title,
+                titleImg: this.state.RowData.titleImg,
+                author: this.state.RowData.author,
+                type: this.props.newsType,
+                hot: this.state.RowData.hot,
+                source: this.state.RowData.source,
+                sourceUrl: this.state.RowData.sourceUrl,
+                summary: this.state.RowData.summary,
+                content: this.state.RowData.content,
+                createTimeFormattedDate: this.state.RowData.createTimeFormattedDate,
+            },
+            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/news/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.searchTitle = undefined;
+        this.state.searchAuthor = undefined;
+        this.state.startDate = undefined;
+        this.state.endDate = undefined;
+        this.state.searchSource = undefined;
+        this.state.searchHot = undefined;
+        this.loadData();
+    },
+    cleanCache(sign) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/news/cleanCache',
+            data: {
+                'cacheKey': sign
+            },
+            success: function (data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                } else {
+                    message.success('清除缓存成功!');
+                };
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    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">
+                    {(() => {
+                        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-search">
+                        <Input placeholder="标题" style={{ width: 200 }}
+                            value={this.state.searchTitle}
+                            onChange={(e) => { this.setState({ searchTitle: e.target.value }); }} />
+                        <Input placeholder="作者" style={{ width: 100 }}
+                            value={this.state.searchAuthor}
+                            onChange={(e) => { this.setState({ searchAuthor: e.target.value }); }} />
+                        <Input placeholder="来源" style={{ width: 100 }}
+                            value={this.state.searchSource}
+                            onChange={(e) => { this.setState({ searchSource: e.target.value }); }} />
+                        <Select placeholder="显示在首页"
+                            style={{ width: 100 }}
+                            value={this.state.searchHot}
+                            onChange={(e) => { this.setState({ searchHot: e }) }}>
+                            <Select.Option value="0" >不显示</Select.Option>
+                            <Select.Option value="1" >显示</Select.Option>
+                        </Select>
+                        <span>发布时间</span>
+                        <DatePicker style={{ width: 110 }}
+                            format="YYYY-MM-DD"
+                            placeholder="选择开始时间"
+                            value={this.state.startDate ? moment(this.state.startDate, "YYYY-MM-DD") : undefined}
+                            onChange={(t, str) => {
+                                this.setState({ startDate: str });
+                            }} />
+                        <span>到</span>
+                        <DatePicker style={{ width: 110 }}
+                            format="YYYY-MM-DD"
+                            placeholder="选择结束时间"
+                            value={this.state.endDate ? moment(this.state.endDate, "YYYY-MM-DD") : 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>
+                        <Button type="primary" onClick={() => { this.cleanCache('news_list_cache_key'); }}>清除策源地缓存</Button>
+                        <Button type="primary" onClick={() => { this.cleanCache('news_portal_list_cache_key'); }}>清除列表页缓存</Button>
+                        {this.props.newsType == 2 || this.props.newsType == 3 ? <Button type="primary" onClick={() => { this.cleanCache('news_index_list_cache_key'); }}>清除首页缓存</Button> : <div></div>}
+                    </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={1000} className="news-modal"
+                    visible={this.state.visible}
+                    maskClosable={false}
+                    footer={null}
+                    afterClose={() => { this.state.RowData = {}; }}
+                    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.title}
+                                        onChange={(e) => {
+                                            this.state.RowData.title = 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 type="textarea" rows={3} 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">
+                                    <Input value={this.state.RowData.source}
+                                        onChange={(e) => {
+                                            this.state.RowData.source = 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.sourceUrl}
+                                        onChange={(e) => {
+                                            this.state.RowData.sourceUrl = e.target.value;
+                                            this.setState({ RowData: this.state.RowData });
+                                        }} />
+                                </div>
+                            </div>
+                            <div className="modal-box" style={{ position: 'absolute', right: '0', width: '480px' }}>
+                                <span className="modal-box-title">标题图片</span>
+                                <div className="modal-box-detail clearfix" style={{ width: '360px' }}>
+                                    <Avatar sign={'news_title_picture'} visible={this.state.visible}
+                                        imageUrl={this.state.RowData.titleImg ? (globalConfig.avatarHost + "/upload" + this.state.RowData.titleImg) : null}
+                                        urlData={(url) => { this.state.RowData.titleImg = url }} />
+                                </div>
+                            </div>
+                        </div>
+                        <div className="clearfix">
+                            <div className="modal-box news-box">
+                                <span className="modal-box-title">作者</span>
+                                <div className="modal-box-detail">
+                                    <Input value={this.state.RowData.author}
+                                        onChange={(e) => {
+                                            this.state.RowData.author = e.target.value;
+                                            this.setState({ RowData: this.state.RowData });
+                                        }} />
+                                </div>
+                            </div>
+                            <div className="modal-box news-box">
+                                <span className="modal-box-title">发布时间</span>
+                                <div className="modal-box-detail">
+                                    <DatePicker style={{ width: '120px' }}
+                                        format="YYYY-MM-DD"
+                                        placeholder="选择发布时间"
+                                        value={this.state.RowData.createTimeFormattedDate ? moment(this.state.RowData.createTimeFormattedDate, "YYYY-MM-DD") : undefined}
+                                        onChange={(t, str) => {
+                                            this.state.RowData.createTimeFormattedDate = str;
+                                            this.setState({ RowData: this.state.RowData });
+                                        }} />
+                                </div>
+                            </div>
+                            {this.props.newsType == 2 || this.props.newsType == 3 ? <div className="modal-box news-box">
+                                <span className="modal-box-title">发布在首页</span>
+                                <div className="modal-box-detail">
+                                    <Radio.Group value={this.state.RowData.hot} onChange={(e) => {
+                                        this.state.RowData.hot = e.target.value;
+                                        this.setState({ RowData: this.state.RowData });
+                                    }} >
+                                        <Radio value={0}>否</Radio>
+                                        <Radio value={1}>是</Radio>
+                                    </Radio.Group>
+                                </div>
+                            </div> : <div></div>}
+                        </div>
+                        <div className="modal-box">
+                            <span className="modal-box-title">新闻内容</span>
+                        </div>
+                        <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>
+                        </div>
+                    </Spin>
+                </Modal>
+            </div >
+        );
+    }
+});
+
+export default News;

+ 3 - 1
js/component/manageCenter/servicesManage/contract/contractDetail.jsx

@@ -110,6 +110,8 @@ const ContractDetailForm = Form.create()(React.createClass({
                                 return '26-30个工作日';
                             case 35:
                                 return '31-35个工作日';
+                            default:
+                                return '不加急(45个工作日)';
                         }
                     },
                     width: 220
@@ -353,7 +355,7 @@ const ContractDetailForm = Form.create()(React.createClass({
                         "contractId": item.contractId,  //合同ID
                         "copyrightName": item.copyrightName,  //项目名称
                         "serialNumber": item.serialNumber,
-                        "state": item.state,   //状态
+                        "status": item.status,   //状态
                         "inUrgent": item.inUrgent, //加急天数
                         "principal": item.principal,  //当前负责人(技术员)
                         "tableType": "copyright"

+ 2 - 1
js/component/manageCenter/servicesManage/copyright/copyright.jsx

@@ -208,6 +208,7 @@ const copyright = React.createClass({
     getInitialState() {
         return {
             visible: false,
+            RowData: {},
             stateOption: [],
             companyOption: [],
             authorOption: [],
@@ -283,7 +284,7 @@ const copyright = React.createClass({
         this.getCompanyList();
         this.getStateList();
         this.getContractList();
-        getVacations(function(data){ _me.setState({ vacations: data }); });
+        getVacations(function (data) { _me.setState({ vacations: data }); });
         if (window.location.search) {
             let theObj = getSearchUrl(window.location.search);
             if (theObj.rid) {

+ 2 - 2
js/component/manageCenter/servicesManage/highTech/fosterDesc/activity.jsx

@@ -1,8 +1,8 @@
 import React from 'react';
 import { Icon, Button, Upload, Input, Spin, Table, message, Select, Modal, DatePicker, Cascader, Transfer, InputNumber, Switch, Form } from 'antd';
 import { technicalSourceList } from '../../../../dataDic.js';
-import { techFieldList } from '../../../../DicTechFieldList.js';
-import { getTechField, getTechnicalSource, beforeUploadFile, newDownloadFile, getProportion, saveProportion, getPreview } from '../../../../tools.js';
+import { techFieldList, getTechField } from '../../../../DicTechFieldList.js';
+import { getTechnicalSource, beforeUploadFile, newDownloadFile, getProportion, saveProportion, getPreview } from '../../../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';

+ 28 - 2
js/component/manageCenter/servicesManage/highTech/fosterDesc/annualReport.jsx

@@ -84,7 +84,7 @@ const AnnualReportDescFrom = Form.create()(React.createClass({
                         </div>
                         <div className="half-item">
                             <p className="item-title">高新技术企业认定时间: </p>
-                            <p>{theData.issuingDateFormattedDate}</p>
+                            <p>{theData.issuingDate}</p>
                         </div>
                         <div className="half-item">
                             <p className="item-title">企业是否上市: </p>
@@ -115,7 +115,7 @@ const AnnualReportDescFrom = Form.create()(React.createClass({
                         </div>
                         <div className="half-item">
                             <p className="item-title">企业联系人: </p>
-                            <p>{theData.contacts}</p>
+                            <p>{this.props.contactsObj[theData.contacts]}</p>
                         </div>
                     </div>
                     <div className="activityCost-title"><span>本年度获得的知识产权数: </span></div>
@@ -432,6 +432,7 @@ const AnnualReportDesc = React.createClass({
                     footer=''>
                     <Spin spinning={this.state.loading} className='spin-box'>
                         <AnnualReportDescFrom
+                            contactsObj={this.props.contactsObj}
                             uid={this.props.uid}
                             data={this.props.data}
                             detailData={this.state.detailData}
@@ -626,6 +627,29 @@ const AnnualReport = React.createClass({
             });
         }.bind(this));
     },
+    getContactsList(theUid) {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/getContacts",
+            data: {
+                uid: theUid || this.props.data.uid
+            },
+            success: function (data) {
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                        return;
+                    };
+                } else {
+                    this.setState({
+                        contactsObj: data.data || {}
+                    });
+                };
+            }.bind(this),
+        });
+    },
     getInitialState() {
         return {
             selectedRowKeys: [],
@@ -670,6 +694,7 @@ const AnnualReport = React.createClass({
     },
     componentWillMount() {
         this.loadData();
+        this.getContactsList();
     },
     tableRowClick(record, index) {
         this.state.RowData = record;
@@ -769,6 +794,7 @@ const AnnualReport = React.createClass({
                 <AnnualReportDesc
                     uid={this.props.data.uid}
                     data={this.state.RowData}
+                    contactsObj={this.state.contactsObj}
                     showDesc={this.state.showDesc} closeDesc={this.closeDesc} />
                 <AnnualReportAdd
                     uid={this.props.data.uid}

+ 2 - 2
js/component/manageCenter/servicesManage/highTech/fosterDesc/techProduct.jsx

@@ -1,8 +1,8 @@
 import React from 'react';
 import { Switch, Icon, Upload, Form, Button, Radio, Input, Spin, Table, message, Select, Modal, Cascader, Transfer, InputNumber } from 'antd';
 import { technicalSourceList } from '../../../../dataDic.js';
-import { techFieldList } from '../../../../DicTechFieldList.js';
-import { getPreview, getTechField, getTechnicalSource, beforeUploadFile, newDownloadFile, getProportion, saveProportion } from '../../../../tools.js';
+import { techFieldList, getTechField } from '../../../../DicTechFieldList.js';
+import { getPreview, getTechnicalSource, beforeUploadFile, newDownloadFile, getProportion, saveProportion } from '../../../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';

+ 3 - 3
js/component/manageCenter/servicesManage/highTech/highTechApply.jsx

@@ -320,7 +320,7 @@ const CognizanceDescFrom = Form.create()(React.createClass({
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
-        const theData = this.state.data;
+        const theData = this.state.data || {};
         const formItemLayout = {
             labelCol: { span: 6 },
             wrapperCol: { span: 12 },
@@ -510,11 +510,11 @@ const CognizanceDescFrom = Form.create()(React.createClass({
                         <div className="clearfix">
                             <div className="half-item">
                                 <span className="item-title">净资产增长率: </span>
-                                <span>{isNaN(this.state.netAssetRate) ? '数据错误无法计算' : (this.state.netAssetRate * 100).toFixed(2) + '%'}</span>
+                                <span>{isNaN(this.state.netAssetRate) || this.state.netAssetRate === Infinity ? '数据错误无法计算' : (this.state.netAssetRate * 100).toFixed(2) + '%'}</span>
                             </div>
                             <div className="half-item">
                                 <span className="item-title">销售收入增长率: </span>
-                                <span>{isNaN(this.state.salesRevenueRate) ? '数据错误无法计算' : (this.state.salesRevenueRate * 100).toFixed(2) + '%'}</span>
+                                <span>{isNaN(this.state.salesRevenueRate) || this.state.salesRevenueRate === Infinity ? '数据错误无法计算' : (this.state.salesRevenueRate * 100).toFixed(2) + '%'}</span>
                             </div>
                         </div>
                         <div className="clearfix">

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

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

+ 3 - 0
js/component/manageCenter/set/leftTab.jsx

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

+ 24 - 0
js/component/manageCenter/set/site.jsx

@@ -0,0 +1,24 @@
+import React from 'react';
+import theme from 'react-quill/dist/quill.snow.css'
+import ReactQuill from 'react-quill'
+
+class Site extends React.Component {
+  constructor(props) {
+    super(props)
+    this.state = { text: '' }
+    this.handleChange = this.handleChange.bind(this)
+  }
+
+  handleChange(value) {
+    this.setState({ text: value })
+  }
+
+  render() {
+    return (
+      <ReactQuill value={this.state.text}
+                  onChange={this.handleChange} />
+    )
+  }
+}
+
+export default Site;

+ 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;

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

@@ -184,8 +184,8 @@ const Content = React.createClass({
         if (window.location.search) {
             let theUrl = window.location.search
             this.state.keyword = theUrl.substring(1, theUrl.length);
+            this.state.keyword = decodeURIComponent(this.state.keyword);
         };
-
         this.loadData();
     },
     industryChange(e) {
@@ -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/achievementDesc.jsx

@@ -351,7 +351,7 @@ const AchievementDetail = React.createClass({
                         </Row>
                         <Row>
                             <Col span={4}>成果所有人名称</Col>
-                            <Col span={8}>{theData.username || theData.unitName}</Col>
+                            <Col span={8}>{theData.ownerName}</Col>
                             <Col span={4}>合作方式</Col>
                             <Col span={8}>
                                 {(() => {

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

@@ -162,6 +162,7 @@ const Content = React.createClass({
         if (window.location.search) {
             let theUrl = window.location.search
             this.state.keyword = theUrl.substring(1, theUrl.length);
+            this.state.keyword = decodeURIComponent(this.state.keyword);
         };
         this.loadData();
     },
@@ -239,7 +240,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>

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

@@ -325,7 +325,7 @@ const DemandDetail = React.createClass({
                         </Row>
                         <Row>
                             <Col span={4}>雇佣方名称</Col>
-                            <Col span={8}>{theData.username || theData.unitName}</Col>
+                            <Col span={8}>{theData.employerName}</Col>
                             <Col span={4}>固定周期</Col>
                             <Col span={8}>{theData.fixedCycle}</Col>
                         </Row>

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

@@ -109,7 +109,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.state.searchName = decodeURIComponent(this.state.searchName);
         };
 
         this.loadData();
@@ -268,7 +269,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>

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

@@ -106,9 +106,9 @@ 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.state.searchName = decodeURIComponent(this.state.searchName);
         };
-
         this.loadData();
     },
     fieldFirstChange(e) {
@@ -219,7 +219,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>

+ 18 - 8
js/component/portal/top.jsx

@@ -20,7 +20,11 @@ const LoginTop = React.createClass({
             dataType: "json",
             url: globalConfig.context + "/login",
         }).done(function (data) {
-            window.location.href = globalConfig.context + "/user/login.html"
+            if (window.userData.mobile) {
+                window.location.href = globalConfig.context + "/user/login.html"
+            } else if (window.adminData.mobile) {
+                window.location.href = globalConfig.context + "/admin/login.html"
+            };
         });
     },
     componentDidMount() {
@@ -34,10 +38,16 @@ const LoginTop = React.createClass({
                         <div className="top-welcomeText">欢迎您来到科技认知计算交易平台-公测版</div>
                         <div className="top-alink">
                             <a href={globalConfig.context + "/portal/index.html"}>返回首页</a>
-                            {window.userData.number ?
+                            {window.userData.mobile || window.adminData.mobile ?
                                 <span>
-                                    <a href={globalConfig.context + "/user/account/index"}>尊敬的{userData.nickname || userData.number}</a>
-                                    <a onClick={this.logOut}>退出</a>
+                                    {(() => {
+                                        if (window.userData.mobile) {
+                                            return <a href={globalConfig.context + "/user/account/index"}>尊敬的 {userData.nickname || userData.number}</a>
+                                        } else if (window.adminData.mobile) {
+                                            return <a href={globalConfig.context + "/admin/index"}>尊敬的 {adminData.name || adminData.mobile}</a>
+                                        }
+                                    })()}
+                                    <a onClick={() => { this.logOut() }}>退出</a>
                                 </span>
                                 : <span>
                                     <a href={globalConfig.context + "/user/login.html"}>登录</a>
@@ -60,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>

+ 118 - 0
js/component/richTextEditors.jsx

@@ -0,0 +1,118 @@
+import React from 'react';
+import theme from 'react-quill/dist/quill.snow.css';
+import { message } from 'antd';
+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;
+            this.state.value = '';
+        }
+    },
+    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;

+ 1 - 1
js/component/subscriberDetail/content.jsx

@@ -365,7 +365,7 @@ const Content = React.createClass({
                                         <img src={achievement_ico_1} alt="交易方式" />
                                     </span>
                                     <span className="detial_sub_title">交易方式: </span>
-                                    <span className="money_text">{getTransferMode(item.transferMode)}</span>
+                                    <span className="money_text">{item.bargainingMode == 1 ? '定价' : '面议'}</span>
                                 </div>
                                 <div className="detial_sub">
                                     <span className="detial_sub_icon">

+ 29 - 72
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
@@ -94,7 +95,7 @@ module.exports = {
             d2 = d2.getFullYear() + "-" +
                 ((d2.getMonth() + 1) < 10 ? '0' + (d2.getMonth() + 1) : (d2.getMonth() + 1)) + "-" +
                 (d2.getDate() < 10 ? '0' + d2.getDate() : d2.getDate()) + " ";
-            return d2;
+                return d2;
         } else {
             return '';
         }
@@ -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 = '';
@@ -335,33 +295,6 @@ module.exports = {
             return year + month + day;
         }
     },
-    getStepList(pid,url) {
-        let stepList = [];
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,
-            cache: false,
-            url: globalConfig.context + url + "?pid=" + pid,
-            success: function (data) {
-                if (!data.data) {
-                    if (data.error && data.error.length ) {
-                        return;
-                    };
-                };
-                for (var item in data.data) {
-                    stepList.push(
-                        <Timeline.Item key={item}> 
-                            <span>{module.exports.getPatentState(data.data[item].state)}</span> 
-                            {module.exports.getTime(data.data[item].recordTime)} 
-                        </Timeline.Item>
-                    )
-                };
-            }.bind(this),
-        });
-        return stepList;
-    },
-
 
     //各种通过接口获取下拉列表
 
@@ -666,5 +599,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>,

+ 3 - 2
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.0.35",
+  "version": "1.0.38",
   "description": "",
   "main": "index.js",
   "scripts": {
@@ -53,6 +53,7 @@
     "jspdf": "^1.3.3",
     "prop-types": "^15.5.10",
     "react": "^15.4.1",
-    "react-dom": "^15.4.1"
+    "react-dom": "^15.4.1",
+    "react-quill": "^1.0.0"
   }
 }

+ 1 - 0
webpack/entry.config.js

@@ -19,6 +19,7 @@ module.exports = {
     'admin/login': './js/admin/login.js',
     'admin/set': './js/admin/set.js',
     'admin/userManage': './js/admin/userManage.js',
+    'admin/idea': './js/admin/idea.js',
     //admin-servicesManage
     'admin/servicesManage/contract': './js/admin/servicesManage/contract.js',
     'admin/servicesManage/patent': './js/admin/servicesManage/patent.js',

+ 50 - 40
webpack/module.config.js

@@ -3,55 +3,65 @@ const ExtractTextPlugin = require("extract-text-webpack-plugin");
 module.exports = function (theme) {
   return {
     rules: [{
-        test: /\.jsx?$/,
-        exclude: /node_modules/,
-        use: {
-          loader: 'babel-loader',
-          options: {
-            "presets": ["es2015", "react"],
-            "plugins": [
-              ["antd", {
-                "style": true
-              }]
-            ]
-          }
+      test: /\.jsx?$/,
+      exclude: /node_modules/,
+      use: {
+        loader: 'babel-loader',
+        options: {
+          "presets": ["es2015", "react"],
+          "plugins": [
+            ["antd", {
+              "style": true
+            }]
+          ]
         }
-      },
-      {
-        test: /\.less$/,
-        use: ExtractTextPlugin.extract({
-          fallback: 'style-loader',
-          use: [{
-            loader: 'css-loader',
-            options: {
-              importLoaders: 1
-            }
-          }, {
-            loader: 'less-loader',
-            options: {
-              modifyVars: theme
-            }
-          }]
-        })
-      }, {
-        test: /\.(png|jpg)$/,
+      }
+    }, {
+      test: /\.css$/,
+      use: ExtractTextPlugin.extract({
+        fallback: 'style-loader',
         use: [{
-          loader: 'url-loader',
+          loader: 'css-loader',
           options: {
-            limit: 10240,
-            name: '[path][name].[ext]'
+            importLoaders: 1
           }
         }]
-      }, {
-        test: /\.(woff|svg|eot|ttf)$/,
+      })
+    }, {
+      test: /\.less$/,
+      use: ExtractTextPlugin.extract({
+        fallback: 'style-loader',
         use: [{
-          loader: 'url-loader',
+          loader: 'css-loader',
+          options: {
+            importLoaders: 1
+          }
+        }, {
+          loader: 'less-loader',
           options: {
-            limit: 1,
-            name: '[path][name].[ext]'
+            modifyVars: theme
           }
         }]
-      }
+      })
+    }, {
+      test: /\.(png|jpg)$/,
+      use: [{
+        loader: 'url-loader',
+        options: {
+          limit: 10240,
+          name: '[path][name].[ext]'
+        }
+      }]
+    }, {
+      test: /\.(woff|svg|eot|ttf)$/,
+      use: [{
+        loader: 'url-loader',
+        options: {
+          limit: 1,
+          name: '[path][name].[ext]'
+        }
+      }]
+    }
     ]
   };
 }