Forráskód Böngészése

Accept Merge Request #43 merge : (test -> master)

Merge Request: merge
Created By: @seirios
Accepted By: @seirios
URL: https://coding.net/t/aft/p/AFT-WEB/git/merge/43
seirios 7 éve%!(EXTRA string=óta)
szülő
commit
ff082dbf99
39 módosított fájl, 2116 hozzáadás és 153 törlés
  1. 16 0
      js/admin/idea.js
  2. 63 18
      js/component/account/achievement/techAchievementDesc.jsx
  3. 1 1
      js/component/account/demand/techDemandDesc.jsx
  4. 1 2
      js/component/account/index/normal.jsx
  5. 1 1
      js/component/account/services/cognizance.jsx
  6. 22 1
      js/component/account/services/patentAdd.jsx
  7. 1 1
      js/component/certify/personal.jsx
  8. 1 2
      js/component/groupCertify/personal.jsx
  9. 43 19
      js/component/manageCenter/achievement/techAchievement.jsx
  10. 31 3
      js/component/manageCenter/achievement/techAchievementDesc.jsx
  11. 60 34
      js/component/manageCenter/demand/techDemand.jsx
  12. 7 3
      js/component/manageCenter/demand/techDemandDesc.jsx
  13. 456 0
      js/component/manageCenter/idea/bannerManage/bannerManage.jsx
  14. 655 0
      js/component/manageCenter/idea/bigShot/lecture.jsx
  15. 448 0
      js/component/manageCenter/idea/bigShot/star.jsx
  16. 63 0
      js/component/manageCenter/idea/content.jsx
  17. 91 0
      js/component/manageCenter/idea/content.less
  18. 65 0
      js/component/manageCenter/idea/leftTab.jsx
  19. 1 1
      js/component/manageCenter/index/content.jsx
  20. 1 1
      js/component/manageCenter/servicesManage/contract/contractDetail.jsx
  21. 7 7
      js/component/manageCenter/servicesManage/highTech/fosterDesc/annualReport.jsx
  22. 4 2
      js/component/manageCenter/servicesManage/highTech/fosterDesc/companyDetail.jsx
  23. 3 3
      js/component/manageCenter/servicesManage/highTech/fosterDesc/intellectualDesc.jsx
  24. 2 2
      js/component/manageCenter/servicesManage/highTech/highTechApply.jsx
  25. 8 4
      js/component/manageCenter/servicesManage/highTech/highTechInfo.jsx
  26. 1 1
      js/component/manageCenter/topTab.jsx
  27. 3 3
      js/component/manageCenter/userManage/customerList.jsx
  28. 1 1
      js/component/manageCenter/userManage/customerSearch.jsx
  29. 1 4
      js/component/manageCenter/userManage/orgDesc.jsx
  30. 23 21
      js/component/manageCenter/userManage/orgList.jsx
  31. 2 2
      js/component/manageCenter/userManage/userList.jsx
  32. 1 1
      js/component/portal/search/achievement.jsx
  33. 9 2
      js/component/portal/search/demand.jsx
  34. 10 10
      js/component/portal/top.jsx
  35. 1 1
      js/component/sign/account.jsx
  36. 1 1
      js/component/sign/groupAccount.jsx
  37. 1 1
      js/component/sign/modal.jsx
  38. 7 0
      webpack.config.js
  39. 4 0
      webpack/entry.config.js

+ 16 - 0
js/admin/idea.js

@@ -0,0 +1,16 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+import '../../css/base.less';
+
+import TopTab from '../component/manageCenter/topTab.jsx';
+import Footer from '../component/manageCenter/bottom.jsx';
+import Content from '../component/manageCenter/idea/content.jsx';
+
+ReactDOM.render(
+    <div className="wrap clearfix">
+        <TopTab active={'idea'}/>
+        <Content />
+        <Footer />
+    </div>,
+    document.getElementById('root')
+)

+ 63 - 18
js/component/account/achievement/techAchievementDesc.jsx

@@ -249,6 +249,11 @@ const AchievementDetailShow = Form.create()(React.createClass({
                         </FormItem>
                         <FormItem className="half-item"
                             {...formItemLayout}
+                            label="联系人" >
+                            <span>{this.props.contactsObj[theData.contacts]}</span>
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
                             label="数据类别" >
                             {(() => {
                                 switch (theData.dataCategory) {
@@ -534,23 +539,15 @@ const AchievementDetailShow = Form.create()(React.createClass({
                         </FormItem>
                     </div>
                     <div className="clearfix">
-                        <FormItem className="half-item"
-                            {...formItemLayout}
-                            label="议价方式" >
-                            {(() => {
-                                switch (theData.bargainingMode) {
-                                    case "0":
-                                        return <span>面议</span>;
-                                    case "1":
-                                        return <span>定价</span>;
-                                }
-                            })()}
-                        </FormItem>
-                        <FormItem className="half-item"
+                        {theData.bargainingMode == 1 ? <FormItem className="half-item"
                             {...formItemLayout}
                             label="转让价格" >
                             <span>{theData.transferPrice} 万元</span>
-                        </FormItem>
+                        </FormItem> : <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="转让价格" >
+                                <span>面议</span>
+                            </FormItem>}
                     </div>
                     <FormItem
                         labelCol={{ span: 4 }}
@@ -654,6 +651,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                 this.setState({
                     data: thisData,
                     orgDisplay: thisData.ownerType,
+                    transferPriceDis: thisData.transferMode == 1 ? true : false,
                     tags: thisData.keyword ? thisData.keyword.split(",") : [],
                     technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
                     maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : []
@@ -713,6 +711,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                         dataCategory: values.dataCategory,
                         serialNumber: this.props.data.serialNumber,
                         name: values.name,
+                        contacts: values.contacts,
                         keyword: this.state.tags ? this.state.tags.join(",") : [],
                         keywords: this.state.tags,
                         category: values.category,
@@ -810,6 +809,18 @@ const AchievementDetailForm = Form.create()(React.createClass({
                         </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>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
                             label="数据类别" >
                             {getFieldDecorator('dataCategory', {
                                 rules: [{ required: true, message: '此项为必填项!' }],
@@ -1045,13 +1056,13 @@ const AchievementDetailForm = Form.create()(React.createClass({
                             {getFieldDecorator('bargainingMode', {
                                 initialValue: theData.bargainingMode
                             })(
-                                <Radio.Group>
+                                <Radio.Group onChange={((e) => { this.setState({ transferPriceDis: (e.target.value == 1 ? true : false) }) })}>
                                     <Radio value="0">面议</Radio>
                                     <Radio value="1">定价</Radio>
                                 </Radio.Group>
                                 )}
                         </FormItem>
-                        <FormItem className="half-item"
+                        {this.state.transferPriceDis ? <FormItem className="half-item"
                             {...formItemLayout}
                             label="转让价格" >
                             {getFieldDecorator('transferPrice', {
@@ -1060,7 +1071,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                                 <InputNumber min={0} max={999999} step={0.01} />
                                 )}
                             <span style={{ marginLeft: '20px' }}>万元</span>
-                        </FormItem>
+                        </FormItem> : <div></div>}
                     </div>
                     <FormItem
                         labelCol={{ span: 4 }}
@@ -1208,6 +1219,7 @@ const AchievementDetail = React.createClass({
         return {
             visible: false,
             tabsKey: 1,
+            contactsObj: {},
             columns: [
                 {
                     title: '编号',
@@ -1306,6 +1318,37 @@ const AchievementDetail = React.createClass({
         });
         this.props.closeDesc(false, true);
     },
+    componentWillMount() {
+        this.getContactsOption();
+    },
+    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)
+        });
+    },
     componentWillReceiveProps(nextProps) {
         if (nextProps.showDesc) {
             this.state.tabsKey = "1";
@@ -1332,17 +1375,19 @@ const AchievementDetail = React.createClass({
                             }} >
                             <Tabs.TabPane tab="成果详情" key="1">
                                 {(() => {
-                                    if (this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
+                                    if (this.props.data.id && this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
                                         return <AchievementDetailShow
                                             data={this.props.data}
                                             closeDesc={this.handleCancel}
                                             visible={this.state.visible}
+                                            contactsObj={this.state.contactsObj}
                                             handleOk={this.handleOk} />
                                     } else {
                                         return <AchievementDetailForm
                                             data={this.props.data}
                                             achievementCategoryOption={this.props.achievementCategoryOption}
                                             closeDesc={this.handleCancel}
+                                            contactsOption={this.state.contactsOption}
                                             visible={this.state.visible}
                                             handleOk={this.handleOk} />
                                     }

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

@@ -1097,7 +1097,7 @@ const DemandDetail = React.createClass({
                             }} >
                             <Tabs.TabPane tab="需求详情" key="1">
                                 {(() => {
-                                    if (this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
+                                    if (this.props.data.id && this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
                                         return <DemandDetailShow
                                             data={this.props.data}
                                             demandTypeOption={this.props.demandTypeOption}

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

@@ -83,7 +83,6 @@ const Content = React.createClass({
                             <p><a href={globalConfig.context + "/user/account/set.html"}>填写完整资料</a>,有助于提高您的资信</p>
                             <p><a href={globalConfig.context + "/portal/search/achievement.html"}>成果搜索</a></p>
                             <p><a href={globalConfig.context + "/portal/search/demand.html"}>需求搜索</a></p>
-                            <p><a href={globalConfig.context + "/portal/search/subscriber.html"}>用户搜索</a></p>
                             <p className="userdata-relate" style={{ 'display': 'none' }}>
                                 <Button className="relateqq"><img src={qq} alt="" /> QQ账号登录</Button>
                                 <Button className="relateweibo"><img src={weibo} alt="" />微博账号登录</Button>
@@ -96,7 +95,7 @@ const Content = React.createClass({
                         <ul className="record-list clearfix">
                             <li>专利:<a href={globalConfig.context + "/user/account/services.html#patent"}>{this.state.patentNum || 0}</a> 项</li>
                             <li>软著:<a href={globalConfig.context + "/user/account/services.html#copyright"}>{this.state.copyrightNum || 0}</a> 项</li>
-                            <li>知识产权:<a href={globalConfig.context + "/user/account/services.html#cognizance"}>{this.state.intellectualPropertyNum || 0}</a> 项</li>
+                            <li>知识产权:<a href={globalConfig.context + "/user/account/services.html#intellectual"}>{this.state.intellectualPropertyNum || 0}</a> 项</li>
                             <li>科技项目:<a href={globalConfig.context + "/user/account/services.html#technology"}>{this.state.techProjectNum || 0}</a> 项</li>
                             <li>技术成果:<a href={globalConfig.context + "/user/account/achievement.html#techAchievement"}>{this.state.achievementNum || 0}</a> 项</li>
                             <li>发布需求:<a href={globalConfig.context + "/user/account/demand.html#techDemand"}>{this.state.demandNum || 0}</a> 项</li>

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

@@ -115,7 +115,7 @@ const CognizanceDescFrom = Form.create()(React.createClass({
                 key: 'grossProfit',
             }],
             stateColumns: [{
-                title: '专利状态',
+                title: '状态',
                 dataIndex: 'state',
                 key: 'state',
                 render: (text) => { return getCognizanceState(text) }

+ 22 - 1
js/component/account/services/patentAdd.jsx

@@ -12,7 +12,28 @@ const PatentAddFrom = Form.create()(React.createClass({
         };
     },
     componentWillMount() {
-        this.state.contactsOption = setUserContactsList();
+        let theOption = [];
+        $.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>
+                        );
+                    };
+                };
+            }
+        });
+        this.setState({ contactsOption: theOption });
     },
     handleSubmit(e) {
         e.preventDefault();

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

@@ -83,7 +83,7 @@ const Content = Form.create()(React.createClass({
     getInitialState() {
         return {
             loading: false,
-            vsCodeSrc: globalConfig.context + '/open/getVCode'
+            vsCodeSrc: ''
         };
     },
     handleSubmit(e) {

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

@@ -98,7 +98,7 @@ const Content = Form.create()(React.createClass({
             loading: false,
             field: [],
             fileList: [],
-            vsCodeSrc: globalConfig.context + '/open/getVCode'
+            vsCodeSrc: ''
         };
     },
     handleSubmit(e) {
@@ -163,7 +163,6 @@ const Content = Form.create()(React.createClass({
                         this.props.changeStep(2);
                     } else {
                         message.warning(data.error[0].message);
-                        this.reloadVCode();
                         this.setState({
                             loading: false
                         });

+ 43 - 19
js/component/manageCenter/achievement/techAchievement.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload } from 'antd';
+import { Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
@@ -25,6 +25,9 @@ const AchievementList = React.createClass({
                 pageSize: this.state.pagination.pageSize,
                 serialNumber: this.state.serialNumber, //编号
                 name: this.state.name, //名称
+                ownerName: this.state.searchType == 1 ? this.state.searchName : undefined,
+                username: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('org') == -1 ? this.state.searchName : undefined,
+                unitName: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('user') == -1 ? this.state.searchName : undefined,
                 keyword: this.state.keyword, // 关键词
                 category: this.state.category, //类型(0--专利, 2--软著, 3--项目, 4--版权, 5--工业设计, 6--配方, 7--非标)
                 releaseDateStartDate: this.state.releaseDate[0],
@@ -76,6 +79,7 @@ const AchievementList = React.createClass({
     getInitialState() {
         return {
             searchMore: true,
+            searchType: 0,
             validityPeriodDate: [],
             releaseDate: [],
             selectedRowKeys: [],
@@ -158,9 +162,19 @@ const AchievementList = React.createClass({
     },
     componentWillReceiveProps(nextProps) {
         if (this.props['data-listApiUrl'] != nextProps['data-listApiUrl']) {
-            this.loadData(null, nextProps['data-listApiUrl']);
             this.state.selectedRowKeys = [];
             this.state.selectedRows = [];
+            this.state.serialNumber = undefined;
+            this.state.name = undefined;
+            this.state.keyword = undefined;
+            this.state.category = undefined;
+            this.state.ownerType = undefined;
+            this.state.releaseStatus = undefined;
+            this.state.auditStatus = undefined;
+            this.state.searchName = undefined;
+            this.state.searchType = 0;
+            this.state.releaseDate = [];
+            this.loadData(null, nextProps['data-listApiUrl']);
         };
     },
     tableRowClick(record, index) {
@@ -224,6 +238,7 @@ const AchievementList = React.createClass({
         this.state.ownerType = undefined;
         this.state.releaseStatus = undefined;
         this.state.auditStatus = undefined;
+        this.state.searchName = undefined;
         this.state.releaseDate = [];
         this.loadData();
     },
@@ -286,23 +301,15 @@ const AchievementList = React.createClass({
                     <Input placeholder="关键字"
                         value={this.state.keyword}
                         onChange={(e) => { this.setState({ keyword: e.target.value }); }} />
-                    <Select placeholder="选择类型" style={{ width: 160 }}
-                        value={this.state.category}
-                        onChange={(e) => { this.setState({ category: e }) }}>
-                        {this.state.achievementCategoryOption}
-                    </Select>
-                    <Select placeholder="选择审核状态"
-                        style={{ width: 160 }}
-                        value={this.state.auditStatus}
-                        onChange={(e) => { this.setState({ auditStatus: e }) }}>
-                        {this.state.auditStatusOption}
-                    </Select>
-                    <Select placeholder="选择是否发布" style={{ width: 120 }}
-                        value={this.state.releaseStatus}
-                        onChange={(e) => { this.setState({ releaseStatus: e }) }}>
-                        <Select.Option value="0" >未发布</Select.Option>
-                        <Select.Option value="1" >已发布</Select.Option>
-                    </Select>
+                    <Input placeholder="所有人名称"
+                        value={this.state.searchName}
+                        onChange={(e) => { this.setState({ searchName: e.target.value }); }} />
+                    <Radio.Group value={this.state.searchType} onChange={(e) => {
+                        this.setState({ searchType: e.target.value })
+                    }}>
+                        <Radio value={0}>认证用户</Radio>
+                        <Radio value={1}>非认证用户</Radio>
+                    </Radio.Group>
                     <Button type="primary" onClick={this.search}>搜索</Button>
                     <Button onClick={this.reset}>重置</Button>
                     <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
@@ -310,6 +317,23 @@ const AchievementList = React.createClass({
                         onClick={this.delectRow}>删除<Icon type="minus" /></Button>
                     <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
                     <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
+                        <Select placeholder="选择类型" style={{ width: 160 }}
+                            value={this.state.category}
+                            onChange={(e) => { this.setState({ category: e }) }}>
+                            {this.state.achievementCategoryOption}
+                        </Select>
+                        <Select placeholder="选择审核状态"
+                            style={{ width: 160 }}
+                            value={this.state.auditStatus}
+                            onChange={(e) => { this.setState({ auditStatus: e }) }}>
+                            {this.state.auditStatusOption}
+                        </Select>
+                        <Select placeholder="选择是否发布" style={{ width: 120 }}
+                            value={this.state.releaseStatus}
+                            onChange={(e) => { this.setState({ releaseStatus: e }) }}>
+                            <Select.Option value="0" >未发布</Select.Option>
+                            <Select.Option value="1" >已发布</Select.Option>
+                        </Select>
                         <span>发布时间 :</span>
                         <RangePicker
                             value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,

+ 31 - 3
js/component/manageCenter/achievement/techAchievementDesc.jsx

@@ -136,6 +136,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
         return {
             loading: false,
             buttonLoading: false,
+            contactsObj: {},
             data: {},
             tags: [],
             technicalPictureUrl: [],
@@ -173,6 +174,9 @@ const AchievementDetailShow = Form.create()(React.createClass({
                     technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
                     maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : []
                 });
+                if (thisData.ownerId) {
+                    this.getContactsList(thisData.ownerId);
+                };
             }.bind(this),
         }).always(function () {
             this.setState({
@@ -276,6 +280,29 @@ const AchievementDetailShow = Form.create()(React.createClass({
             };
         }.bind(this));
     },
+    getContactsList(theUid) {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/getContacts",
+            data: {
+                uid: theUid
+            },
+            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),
+        });
+    },
     componentWillMount() {
         this.loadData(this.props.data.id, this.props.detailApiUrl);
     },
@@ -491,7 +518,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
                                 <FormItem className="half-item"
                                     {...formItemLayout}
                                     label="联系电话" >
-                                    <span>{theData.iOwnerMobile}</span>
+                                    <span>{this.state.contactsObj[theData.contacts]}</span>
                                 </FormItem>
                                 <FormItem className="half-item"
                                     {...formItemLayout}
@@ -687,6 +714,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                     data: thisData,
                     orgDisplay: thisData.ownerType,
                     switchValue: Boolean(!thisData.ownerId),
+                    transferPriceDis: thisData.transferMode == 1 ? true : false,
                     tags: thisData.keyword ? (thisData.keyword.replace(/(,|、)/g, ",")).split(',') : [],
                     technicalPictureUrl: thisData.technicalPictureUrl ? splitUrl(thisData.technicalPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
                     maturityPictureUrl: thisData.maturityPictureUrl ? splitUrl(thisData.maturityPictureUrl, ',', globalConfig.avatarHost + '/upload') : []
@@ -1252,7 +1280,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                             })(
                                 <Radio.Group onChange={(e) => {
                                     this.setState({
-                                        transferPriceDis: (e.target.value == 0 ? false : true)
+                                        transferPriceDis: (e.target.value == 1 ? true : false)
                                     })
                                 }}>
                                     <Radio value="0">面议</Radio>
@@ -1586,7 +1614,7 @@ const AchievementDetail = React.createClass({
                                 }} >
                                 <Tabs.TabPane tab="成果详情" key="1">
                                     {(() => {
-                                        if (this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
+                                        if (this.props.data.id && this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
                                             return <AchievementDetailShow
                                                 data={this.props.data}
                                                 detailApiUrl={this.props.detailApiUrl}

+ 60 - 34
js/component/manageCenter/demand/techDemand.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload } from 'antd';
+import { Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
@@ -35,7 +35,10 @@ const DemandList = React.createClass({
                 validityPeriodEndDate: this.state.validityPeriodDate[1],
                 releaseDateStartDate: this.state.releaseDate[0],
                 releaseDateEndDate: this.state.releaseDate[1],
-                auditStatus: this.state.auditStatus
+                auditStatus: this.state.auditStatus,
+                employerName: this.state.searchType == 1 ? this.state.searchName : undefined,
+                username: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('org') == -1 ? this.state.searchName : undefined,
+                unitName: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('user') == -1 ? this.state.searchName : undefined,
             },
             success: function (data) {
                 let theArr = [];
@@ -87,6 +90,7 @@ const DemandList = React.createClass({
     getInitialState() {
         return {
             searchMore: true,
+            searchType: 0,
             validityPeriodDate: [],
             releaseDate: [],
             selectedRowKeys: [],
@@ -276,9 +280,21 @@ const DemandList = React.createClass({
     },
     componentWillReceiveProps(nextProps) {
         if (this.props['data-listApiUrl'] != nextProps['data-listApiUrl']) {
-            this.loadData(null, nextProps['data-listApiUrl']);
             this.state.selectedRowKeys = [];
             this.state.selectedRows = [];
+            this.state.serialNumber = undefined;
+            this.state.name = undefined;
+            this.state.keyword = undefined;
+            this.state.infoSources = undefined;
+            this.state.demandType = undefined;
+            this.state.searchName = undefined;
+            this.state.searchType = 0;
+            this.state.status = undefined;
+            this.state.releaseStatus = undefined;
+            this.state.auditStatus = undefined;
+            this.state.validityPeriodDate = [];
+            this.state.releaseDate = [];
+            this.loadData(null, nextProps['data-listApiUrl']);
         };
     },
     tableRowClick(record, index) {
@@ -340,7 +356,8 @@ const DemandList = React.createClass({
         this.state.keyword = undefined;
         this.state.infoSources = undefined;
         this.state.demandType = undefined;
-        this.state.username = undefined;
+        this.state.searchName = undefined;
+        this.state.searchType = 0;
         this.state.status = undefined;
         this.state.releaseStatus = undefined;
         this.state.auditStatus = undefined;
@@ -407,36 +424,15 @@ const DemandList = React.createClass({
                     <Input placeholder="关键字"
                         value={this.state.keyword}
                         onChange={(e) => { this.setState({ keyword: e.target.value }); }} />
-                    <Select placeholder="选择信息来源" style={{ width: 120 }}
-                        value={this.state.infoSources}
-                        onChange={(e) => { this.setState({ infoSources: e }) }}>
-                        <Select.Option value="0" >平台采集</Select.Option>
-                        <Select.Option value="1" >客户发布</Select.Option>
-                        <Select.Option value="2" >批量导入</Select.Option>
-                        <Select.Option value="3" >三方对接</Select.Option>
-                    </Select>
-                    <Select placeholder="选择需求类型"
-                        style={{ width: 120 }}
-                        value={this.state.demandType}
-                        onChange={(e) => { this.setState({ demandType: e }) }}>
-                        {this.state.demandTypeOption}
-                    </Select>
-                    <Select placeholder="选择需求状态" style={{ width: 120 }}
-                        value={this.state.status}
-                        onChange={(e) => { this.setState({ status: e }) }}>
-                        <Select.Option value="0" >进行中</Select.Option>
-                        <Select.Option value="1" >未解决</Select.Option>
-                        <Select.Option value="2" >已解决</Select.Option>
-                    </Select>
-                    <Select placeholder="选择审核状态" style={{ width: 160 }}
-                        value={this.state.auditStatus}
-                        onChange={(e) => { this.setState({ auditStatus: e }) }}>
-                        <Select.Option value="0" >未提交审核(草稿)</Select.Option>
-                        <Select.Option value="1" >提交审核</Select.Option>
-                        <Select.Option value="2" >审核中</Select.Option>
-                        <Select.Option value="3" >审核通过</Select.Option>
-                        <Select.Option value="4" >审核未通过</Select.Option>
-                    </Select>
+                    <Input placeholder="雇主名称"
+                        value={this.state.searchName}
+                        onChange={(e) => { this.setState({ searchName: e.target.value }); }} />
+                    <Radio.Group value={this.state.searchType} onChange={(e) => {
+                        this.setState({ searchType: e.target.value })
+                    }}>
+                        <Radio value={0}>认证用户</Radio>
+                        <Radio value={1}>非认证用户</Radio>
+                    </Radio.Group>
                     <Button type="primary" onClick={this.search}>搜索</Button>
                     <Button onClick={this.reset}>重置</Button>
                     <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
@@ -444,6 +440,36 @@ const DemandList = React.createClass({
                         onClick={this.delectRow}>删除<Icon type="minus" /></Button>
                     <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
                     <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
+                        <Select placeholder="选择信息来源" style={{ width: 120 }}
+                            value={this.state.infoSources}
+                            onChange={(e) => { this.setState({ infoSources: e }) }}>
+                            <Select.Option value="0" >平台采集</Select.Option>
+                            <Select.Option value="1" >客户发布</Select.Option>
+                            <Select.Option value="2" >批量导入</Select.Option>
+                            <Select.Option value="3" >三方对接</Select.Option>
+                        </Select>
+                        <Select placeholder="选择需求类型"
+                            style={{ width: 120 }}
+                            value={this.state.demandType}
+                            onChange={(e) => { this.setState({ demandType: e }) }}>
+                            {this.state.demandTypeOption}
+                        </Select>
+                        <Select placeholder="选择需求状态" style={{ width: 120 }}
+                            value={this.state.status}
+                            onChange={(e) => { this.setState({ status: e }) }}>
+                            <Select.Option value="0" >进行中</Select.Option>
+                            <Select.Option value="1" >未解决</Select.Option>
+                            <Select.Option value="2" >已解决</Select.Option>
+                        </Select>
+                        <Select placeholder="选择审核状态" style={{ width: 160 }}
+                            value={this.state.auditStatus}
+                            onChange={(e) => { this.setState({ auditStatus: e }) }}>
+                            <Select.Option value="0" >未提交审核(草稿)</Select.Option>
+                            <Select.Option value="1" >提交审核</Select.Option>
+                            <Select.Option value="2" >审核中</Select.Option>
+                            <Select.Option value="3" >审核通过</Select.Option>
+                            <Select.Option value="4" >审核未通过</Select.Option>
+                        </Select>
                         <Select placeholder="选择是否发布" style={{ width: 120 }}
                             value={this.state.releaseStatus}
                             onChange={(e) => { this.setState({ releaseStatus: e }) }}>

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

@@ -295,12 +295,16 @@ const DemandDetailShow = Form.create()(React.createClass({
     },
     componentWillMount() {
         this.loadData(this.props.data.id, this.props.detailApiUrl);
-        this.getContactsList(this.props.data.employerId);
+        if (this.props.data.employerId) {
+            this.getContactsList(this.props.data.employerId);
+        };
     },
     componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
             this.loadData(nextProps.data.id, nextProps.detailApiUrl);
-            this.getContactsList(nextProps.data.employerId);
+            if (nextProps.data.employerId) {
+                this.getContactsList(nextProps.data.employerId);
+            };
             this.props.form.resetFields();
         };
     },
@@ -1386,7 +1390,7 @@ const DemandDetail = React.createClass({
                                 }} >
                                 <Tabs.TabPane tab="需求详情" key="1">
                                     {(() => {
-                                        if (this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
+                                        if (this.props.data.id && this.props.data.auditStatus != "0" && this.props.data.auditStatus != "4") {
                                             return <DemandDetailShow
                                                 data={this.props.data}
                                                 detailApiUrl={this.props.detailApiUrl}

+ 456 - 0
js/component/manageCenter/idea/bannerManage/bannerManage.jsx

@@ -0,0 +1,456 @@
+import React from 'react';
+import { Icon, Button, Spin, message, Table, Input, Modal, DatePicker, Upload, Select } from 'antd';
+import { beforeUpload, getBase64 } from '../../../tools';
+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.id != nextProps.id) {
+            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/banners/upload"}
+                data={{ 'sign': this.props.sign }}
+                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 Lecture = React.createClass({
+    loadData(pageNo) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/banners/list',
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                key: this.state.searchKey
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.length; i++) {
+                        let thisdata = data.data[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id, //主键
+                            sign: thisdata.sign,  // 位置标示
+                            text: thisdata.text,  //广告图描述
+                            imgurl: thisdata.imgurl, //广告图url
+                            url: thisdata.url, //跳转链接
+                            width: thisdata.width, //宽度
+                            height: thisdata.height, //高度
+                            startDate: thisdata.startDate, //广告图开始时间
+                            endDate: thisdata.endDate //广告图结束时间
+                        });
+                    };
+                    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));
+    },
+    loadKeys() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            url: globalConfig.context + '/api/admin/banners/keys',
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let item in data.data) {
+                        let thisdata = data.data[item];
+                        theArr.push(
+                            <Select.Option value={item} key={item}>{thisdata}</Select.Option>
+                        );
+                    };
+                };
+                this.setState({
+                    keysOption: theArr,
+                    keysObj: data.data
+                });
+            }.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: 'sign',
+                    key: 'sign',
+                    render: text => { return this.state.keysObj[text] }
+                }, {
+                    title: '广告图描述',
+                    dataIndex: 'text',
+                    key: 'text',
+                }, {
+                    title: '广告图url',
+                    dataIndex: 'imgurl',
+                    key: 'imgurl',
+                }, {
+                    title: '跳转链接',
+                    dataIndex: 'url',
+                    key: 'url',
+                }, {
+                    title: '宽度',
+                    dataIndex: 'width',
+                    key: 'width',
+                }, {
+                    title: '高度',
+                    dataIndex: 'height',
+                    key: 'height',
+                }, {
+                    title: '开始时间',
+                    dataIndex: 'startDate',
+                    key: 'startDate',
+                }, {
+                    title: '结束时间',
+                    dataIndex: 'endDate',
+                    key: 'endDate',
+                }
+            ],
+            tableData: []
+        };
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        this.setState({
+            visible: true
+        });
+    },
+    componentWillMount() {
+        this.loadKeys();
+        this.loadData();
+    },
+    clearCache() {
+        if (!this.state.searchKey) {
+            message.warning('必须选择一个位置!');
+            return;
+        };
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/banners/clearCache',
+            data: {
+                key: this.state.searchKey  // 位置标示,必填
+            },
+            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));
+    },
+    submit() {
+        if (!this.state.RowData.sign) {
+            message.warning('必须选择一个位置!');
+            return;
+        };
+        if (!this.state.RowData.imgurl) {
+            message.warning('必须上传一张广告图!');
+            return;
+        };
+        if (!this.state.RowData.url) {
+            message.warning('必须填写跳转链接!');
+            return;
+        };
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/banners/save',
+            data: {
+                id: this.state.RowData.id || null, //主键,如果不填主键则为新增记录,填主键则为更新
+                sign: this.state.RowData.sign,  // 位置标示,必填
+                text: this.state.RowData.text,  //广告图描述,长度 255
+                imgurl: this.state.RowData.imgurl, //广告图url,必填,长度 255
+                url: this.state.RowData.url, //跳转链接,必填,长度255
+                width: this.state.RowData.width, //宽度,非必填,最大99999
+                height: this.state.RowData.height, //高度,非必填,最大99999
+                startDate: this.state.RowData.startDate, //广告图开始时间,非必填
+                endDate: this.state.RowData.endDate //广告图结束时间,非必填
+            },
+            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() {
+        if (this.state.selectedRows.length > 1) {
+            return;
+        };
+        this.setState({
+            selectedRowKeys: [],
+            loading: this.state.selectedRows.length > 0
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/banners/delete",
+            data: {
+                id: this.state.selectedRows[0].id
+            }
+        }).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.searchKey = 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">广告图管理</div>
+                <div className="admin-content-warp">
+                    <div className="admin-content-header">广告图列表</div>
+                    <div className="admin-content-search">
+                        <Select placeholder="选择广告图位置"
+                            style={{ width: 200 }}
+                            value={this.state.searchKey}
+                            onChange={(e) => { this.setState({ searchKey: e }) }}>
+                            {this.state.keysOption}
+                        </Select>
+                        <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}>
+                            删除<Icon type="minus" />
+                        </Button>
+                        <Button type="primary" style={{ float: 'right' }}
+                            onClick={() => { this.setState({ RowData: {}, visible: true }) }}>
+                            添加<Icon type="plus" />
+                        </Button>
+                    </div>
+                    <Spin spinning={this.state.loading}>
+                        <Table className="no-all-select" columns={this.state.columns}
+                            dataSource={this.state.tableData}
+                            pagination={this.state.pagination}
+                            rowSelection={rowSelection}
+                            onRowClick={this.tableRowClick} />
+                    </Spin>
+                </div>
+                <Modal title="广告图详情" width={1000}
+                    visible={this.state.visible}
+                    maskClosable={false}
+                    footer={null}
+                    afterClose={() => { this.state.RowData = {} }}
+                    onCancel={() => { this.setState({ visible: false }) }} >
+                    <Spin spinning={this.state.loading}>
+                        <div className="modal-box">
+                            <span className="modal-box-title">广告图位置</span>
+                            {this.state.RowData.id ? <div className="modal-box-detail">
+                                {this.state.keysObj[this.state.RowData.sign]}
+                            </div> : <div className="modal-box-detail">
+                                    <Select placeholder="选择广告图位置"
+                                        style={{ width: 200 }}
+                                        value={this.state.RowData.sign}
+                                        onChange={(e) => {
+                                            this.state.RowData.sign = e;
+                                            this.setState({ RowData: this.state.RowData })
+                                        }}>
+                                        {this.state.keysOption}
+                                    </Select>
+                                </div>}
+                        </div>
+                        <div className="modal-box">
+                            <span className="modal-box-title">广告图描述</span>
+                            <div className="modal-box-detail">
+                                <Input value={this.state.RowData.text}
+                                    onChange={(e) => {
+                                        this.state.RowData.text = 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.url}
+                                    onChange={(e) => {
+                                        this.state.RowData.url = 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.width}
+                                    onChange={(e) => {
+                                        this.state.RowData.width = 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.height}
+                                    onChange={(e) => {
+                                        this.state.RowData.height = 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">
+                                <DatePicker
+                                    showTime
+                                    format="YYYY-MM-DD HH:mm:ss"
+                                    placeholder="选择开始时间"
+                                    value={this.state.RowData.startDate ? moment(this.state.RowData.startDate, "YYYY-MM-DD HH:mm:ss") : undefined}
+                                    onChange={(t, str) => {
+                                        this.state.RowData.startDate = str;
+                                        this.setState({ RowData: this.state.RowData });
+                                    }} />
+                                <span>到</span>
+                                <DatePicker
+                                    showTime
+                                    format="YYYY-MM-DD HH:mm:ss"
+                                    placeholder="选择结束时间"
+                                    value={this.state.RowData.endDate ? moment(this.state.RowData.endDate, "YYYY-MM-DD HH:mm:ss") : undefined}
+                                    onChange={(t, str) => {
+                                        this.state.RowData.endDate = str;
+                                        this.setState({ RowData: this.state.RowData });
+                                    }} />
+                            </div>
+                        </div>
+                        <div className="modal-box">
+                            <span className="modal-box-title">上传图片</span>
+                            <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}
+                                    urlData={(url) => { this.state.RowData.imgurl = url }} />
+                            </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 Lecture;

+ 655 - 0
js/component/manageCenter/idea/bigShot/lecture.jsx

@@ -0,0 +1,655 @@
+import React from 'react';
+import { Icon, Button, Spin, message, Table, Cascader, Input, Modal, DatePicker, Upload, Checkbox } from 'antd';
+import { techFieldList, getTechField } from '../../../DicTechFieldList';
+import { beforeUpload, getBase64 } from '../../../tools';
+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.uid != nextProps.uid) {
+            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/lecture/upload"}
+                data={{ 'uid': this.props.uid, 'sign': 'lecture_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 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
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/lecture/list',
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.lecturePagination.pageSize,
+                username: this.state.searchLectureUser, //用户名称
+                name: this.state.searchLectureName, //讲座名称
+                startLectureTime: this.state.startLectureTime,
+                endLectureTime: this.state.endLectureTime
+            },
+            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,
+                            uid: thisdata.uid,
+                            lectureTime: thisdata.lectureTime,
+                            endTime: thisdata.endTime,
+                            name: thisdata.name,
+                            summary: thisdata.summary,
+                            username: thisdata.username,
+                            lectureUrl: thisdata.lectureUrl,
+                            lectureTimeFormattedDate: thisdata.lectureTimeFormattedDate,
+                            endTimeFormattedDate: thisdata.endTimeFormattedDate,
+                            hot: thisdata.hot,
+                            dynamic: thisdata.dynamic
+                        });
+                    };
+                    this.state.lecturePagination.current = data.data.pageNo;
+                    this.state.lecturePagination.total = data.data.totalCount;
+                };
+                this.setState({
+                    lectureTableData: theArr,
+                    lecturePagination: this.state.lecturePagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    loadHotData() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/lecture/hotList',
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.length; i++) {
+                        let thisdata = data.data[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+                            uid: thisdata.uid,
+                            lectureTime: thisdata.lectureTime,
+                            endTime: thisdata.endTime,
+                            name: thisdata.name,
+                            summary: thisdata.summary,
+                            username: thisdata.username,
+                            lectureUrl: thisdata.lectureUrl,
+                            lectureTimeFormattedDate: thisdata.lectureTimeFormattedDate,
+                            endTimeFormattedDate: thisdata.endTimeFormattedDate,
+                            hot: thisdata.hot,
+                            dynamic: thisdata.dynamic
+                        });
+                    };
+                };
+                this.setState({
+                    hotTableData: theArr
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    loadDynamicData() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/lecture/dynamic',
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.length; i++) {
+                        let thisdata = data.data[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+                            uid: thisdata.uid,
+                            lectureTime: thisdata.lectureTime,
+                            endTime: thisdata.endTime,
+                            name: thisdata.name,
+                            summary: thisdata.summary,
+                            username: thisdata.username,
+                            lectureUrl: thisdata.lectureUrl,
+                            lectureTimeFormattedDate: thisdata.lectureTimeFormattedDate,
+                            endTimeFormattedDate: thisdata.endTimeFormattedDate,
+                            hot: thisdata.hot,
+                            dynamic: thisdata.dynamic
+                        });
+                    };
+                };
+                this.setState({
+                    dynamicTableData: theArr
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    loadData() {
+        this.loadUserData();
+        this.loadLectureData();
+        this.loadHotData();
+        this.loadDynamicData();
+    },
+    getInitialState() {
+        return {
+            loading: false,
+            addVisible: false,
+            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 + '条数据';
+                }
+            },
+            lecturePagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadLectureData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    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',
+                }
+            ],
+            lectureColumns: [
+                {
+                    title: '讲堂名称',
+                    dataIndex: 'name',
+                    key: 'name',
+                }, {
+                    title: '开讲人姓名',
+                    dataIndex: 'username',
+                    key: 'username',
+                }, {
+                    title: '描述',
+                    dataIndex: 'summary',
+                    key: 'summary',
+                    width: '50%'
+                }, {
+                    title: '开始时间',
+                    dataIndex: 'lectureTimeFormattedDate',
+                    key: 'lectureTimeFormattedDate',
+                }, {
+                    title: '结束时间',
+                    dataIndex: 'endTimeFormattedDate',
+                    key: 'endTimeFormattedDate',
+                }, {
+                    title: '展示图',
+                    dataIndex: 'lectureUrl',
+                    key: 'lectureUrl',
+                    render: text => {
+                        if (text) {
+                            return '已上传'
+                        } else {
+                            return '未上传'
+                        };
+                    }
+                }
+            ],
+            userTableData: [],
+            lectureTableData: [],
+            hotTableData: [],
+            dynamicTableData: []
+        };
+    },
+    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/lecture/delete",
+            data: {
+                ids: deletedIds
+            }
+        }).done(function (data) {
+            if (data.error && data.error.length) {
+                message.warning(data.error[0].message);
+            } else {
+                message.success('删除成功!');
+                this.loadData();
+            };
+            this.setState({
+                loading: false,
+            });
+        }.bind(this));
+    },
+    componentWillMount() {
+        this.loadData();
+    },
+    submit() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + (this.state.addModal.id ? '/api/admin/lecture/update' : '/api/admin/lecture/add'),
+            data: {
+                'id': this.state.addModal.id,
+                "uid": this.state.addModal.uid,
+                "name": this.state.addModal.name,
+                "summary": this.state.addModal.summary,
+                "lectureUrl": this.state.addModal.lectureUrl,
+                "lectureTimeFormattedDate": this.state.addModal.lectureTimeFormattedDate,
+                "endTimeFormattedDate": this.state.addModal.endTimeFormattedDate,
+                "hot": this.state.addModal.showBig ? 1 : 0,
+                "dynamic": this.state.addModal.showStar ? 1 : 0
+            },
+            success: function (data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                } else {
+                    message.success('保存成功!');
+                    this.setState({ addVisible: false });
+                    this.loadData();
+                };
+            }.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;
+        this.state.startLectureTime = undefined;
+        this.state.endLectureTime = undefined;
+        this.loadLectureData();
+    },
+    userTableRowClick(record, index) {
+        this.state.addModal.uid = record.uid;
+        this.state.addModal.username = record.username;
+        this.setState({
+            addVisible: true
+        });
+    },
+    listTableRowClick(record, index) {
+        this.state.addModal = record;
+        this.state.addModal.showBig = record.hot ? true : false;
+        this.state.addModal.showStar = record.dynamic ? true : false;
+        this.setState({
+            addVisible: true
+        });
+    },
+    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" >
+                <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='danger' disabled={!hasSelected} onClick={this.delectRow}>
+                            删除<Icon type="minus" />
+                        </Button>
+                    </div>
+                    <div className="admin-content-search">
+                        <Input placeholder="开讲人名称" style={{ width: 160 }}
+                            value={this.state.searchLectureUser}
+                            onChange={(e) => { this.setState({ searchLectureUser: e.target.value }); }} />
+                        <Input placeholder="讲座标题" style={{ width: 160 }}
+                            value={this.state.searchLectureName}
+                            onChange={(e) => { this.setState({ searchLectureName: e.target.value }); }} />
+                        <span>开始时间</span>
+                        <DatePicker
+                            showTime
+                            format="YYYY-MM-DD HH:mm:ss"
+                            placeholder="选择开始搜索时间"
+                            value={this.state.startLectureTime ? moment(this.state.startLectureTime, "YYYY-MM-DD HH:mm:ss") : undefined}
+                            onChange={(t, str) => {
+                                this.setState({ startLectureTime: str });
+                            }} />
+                        <span>到</span>
+                        <DatePicker
+                            showTime
+                            format="YYYY-MM-DD HH:mm:ss"
+                            placeholder="选择结束搜索时间"
+                            value={this.state.endLectureTime ? moment(this.state.endLectureTime, "YYYY-MM-DD HH:mm:ss") : undefined}
+                            onChange={(t, str) => {
+                                this.setState({ endLectureTime: str });
+                            }} />
+                        <Button type="primary" onClick={() => { this.loadLectureData() }}>搜索</Button>
+                        <Button onClick={this.resetList}>重置</Button>
+                    </div>
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.lectureColumns}
+                            dataSource={this.state.lectureTableData}
+                            rowSelection={rowSelection}
+                            onRowClick={this.listTableRowClick}
+                            pagination={this.state.lecturePagination} />
+                    </Spin>
+                </div>
+                <div className="clearfix">
+                    <div className="admin-content-warp" style={{ width: '50%', float: 'left' }}>
+                        <div className="admin-content-header">
+                            <span>大咖页列表</span>
+                        </div>
+                        <Spin spinning={this.state.loading}>
+                            <Table columns={this.state.lectureColumns}
+                                dataSource={this.state.hotTableData}
+                                onRowClick={this.listTableRowClick}
+                                pagination={false} />
+                        </Spin>
+                    </div>
+                    <div className="admin-content-warp" style={{ width: '50%', float: 'left' }}>
+                        <div className="admin-content-header">
+                            <span>明星动态列表</span>
+                        </div>
+                        <Spin spinning={this.state.loading}>
+                            <Table columns={this.state.lectureColumns}
+                                dataSource={this.state.dynamicTableData}
+                                onRowClick={this.listTableRowClick}
+                                pagination={false} />
+                        </Spin>
+                    </div>
+                </div>
+                <Modal
+                    title="科技讲堂详情" width={600}
+                    visible={this.state.addVisible}
+                    maskClosable={false}
+                    footer={null}
+                    afterClose={() => { this.state.addModal = {} }}
+                    onCancel={() => { this.setState({ addVisible: false }) }} >
+                    <Spin spinning={this.state.loading}>
+                        <div className="modal-box">
+                            <span className="modal-box-title">开讲人</span>
+                            <div className="modal-box-detail">
+                                {this.state.addModal.username}
+                            </div>
+                        </div>
+                        <div className="modal-box">
+                            <span className="modal-box-title">讲堂标题</span>
+                            <div className="modal-box-detail">
+                                <Input value={this.state.addModal.name}
+                                    onChange={(e) => {
+                                        this.state.addModal.name = e.target.value;
+                                        this.setState({ addModal: this.state.addModal });
+                                    }} />
+                            </div>
+                        </div>
+                        <div className="modal-box">
+                            <span className="modal-box-title">讲堂描述</span>
+                            <div className="modal-box-detail">
+                                <Input type="textarea" value={this.state.addModal.summary} rows={4}
+                                    onChange={(e) => {
+                                        this.state.addModal.summary = e.target.value;
+                                        this.setState({ addModal: this.state.addModal });
+                                    }} />
+                            </div>
+                        </div>
+                        <div className="modal-box">
+                            <span className="modal-box-title">开讲时间</span>
+                            <div className="modal-box-detail">
+                                <DatePicker
+                                    showTime
+                                    format="YYYY-MM-DD HH:mm:ss"
+                                    placeholder="选择开始时间"
+                                    value={this.state.addModal.lectureTimeFormattedDate ? moment(this.state.addModal.lectureTimeFormattedDate, "YYYY-MM-DD HH:mm:ss") : undefined}
+                                    onChange={(t, str) => {
+                                        this.state.addModal.lectureTimeFormattedDate = str;
+                                        this.setState({ addModal: this.state.addModal });
+                                    }} />
+                                <span>到</span>
+                                <DatePicker
+                                    showTime
+                                    format="YYYY-MM-DD HH:mm:ss"
+                                    placeholder="选择结束时间"
+                                    value={this.state.addModal.endTimeFormattedDate ? moment(this.state.addModal.endTimeFormattedDate, "YYYY-MM-DD HH:mm:ss") : undefined}
+                                    onChange={(t, str) => {
+                                        this.state.addModal.endTimeFormattedDate = str;
+                                        this.setState({ addModal: this.state.addModal });
+                                    }} />
+                            </div>
+                        </div>
+                        <div className="modal-box">
+                            <span className="modal-box-title">讲堂图片</span>
+                            <div className="modal-box-detail clearfix">
+                                <Avatar uid={this.state.addModal.uid}
+                                    imageUrl={this.state.addModal.lectureUrl ? (globalConfig.avatarHost + "/upload" + this.state.addModal.lectureUrl) : null}
+                                    urlData={(url) => { this.state.addModal.lectureUrl = url }} />
+                            </div>
+                        </div>
+                        <div className="modal-box">
+                            <span className="modal-box-title">其他选项</span>
+                            <div className="modal-box-detail clearfix">
+                                <Checkbox checked={this.state.addModal.showBig}
+                                    onChange={(e) => {
+                                        this.state.addModal.showBig = e.target.checked;
+                                        this.setState({ addModal: this.state.addModal });
+                                    }}>显示到大咖说</Checkbox>
+                                <Checkbox checked={this.state.addModal.showStar}
+                                    onChange={(e) => {
+                                        this.state.addModal.showStar = e.target.checked;
+                                        this.setState({ addModal: this.state.addModal });
+                                    }}>显示到明星动态</Checkbox>
+                            </div>
+                        </div>
+                        <div className="modal-box">
+                            <Button type="primary" onClick={this.submit}>提交</Button>
+                            <Button type="ghost" onClick={() => { this.setState({ addVisible: false }) }}>取消</Button>
+                        </div>
+                    </Spin>
+                </Modal>
+            </div>
+        );
+    }
+});
+
+export default Lecture;

+ 448 - 0
js/component/manageCenter/idea/bigShot/star.jsx

@@ -0,0 +1,448 @@
+import React from 'react';
+import { Icon, Button, Spin, message, Table, Cascader, Input } from 'antd';
+import { techFieldList, getTechField } from '../../../DicTechFieldList';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+
+const Star = React.createClass({
+    loadData(pageNo) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/star/list',
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                number: this.state.searchNumber, //编号
+                username: this.state.searchName, //名称
+                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.pagination.current = data.data.pageNo;
+                    this.state.pagination.total = data.data.totalCount;
+                };
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    loadHotData() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/star/hotList',
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.length; i++) {
+                        let thisdata = data.data[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.setState({
+                    hotTableData: theArr
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    loadStarData() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/star/starList',
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.length; i++) {
+                        let thisdata = data.data[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.setState({
+                    starTableData: theArr
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            loading: false,
+            hotSelectedRowKeys: [],
+            hotSelectedRows: [],
+            starSelectedRowKeys: [],
+            starSelectedRows: [],
+            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: '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',
+                }, {
+                    title: '操作',
+                    dataIndex: 'action',
+                    key: 'action',
+                    render: (text, record, index) => {
+                        return <div>
+                            <Button onClick={() => { this.addIndex(record) }} type="primary" style={{ marginRight: '10px' }}>添加到大咖说</Button>
+                            <Button onClick={() => { this.addStar(record) }} type="primary">添加到明星页</Button>
+                        </div>
+                    }
+                }
+            ],
+            otherColumns: [
+                {
+                    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',
+                }
+            ],
+            dataSource: [],
+            hotTableData: [],
+            starTableData: []
+        };
+    },
+    addIndex(record) {
+        let theBool = true;
+        this.state.hotTableData.map((item, i) => {
+            if (item.uid == record.uid) {
+                message.warning('该条记录已经存在于大咖列表中!');
+                theBool = false;
+                return;
+            };
+            if (i == 4) {
+                message.warning('大咖列表最多只能显示4条记录!');
+                theBool = false;
+                return;
+            };
+        });
+        if (theBool) {
+            this.state.hotTableData.push(record);
+            this.setState({ hotTableData: this.state.hotTableData });
+        };
+    },
+    addStar(record) {
+        let theBool = true;
+        this.state.starTableData.map((item, i) => {
+            if (item.uid == record.uid) {
+                message.warning('该条记录已经存在于明星列表中!');
+                theBool = false;
+                return;
+            };
+            if (i == 6) {
+                message.warning('明星列表最多只能显示6条记录!');
+                theBool = false;
+                return;
+            };
+        });
+        if (theBool) {
+            this.state.starTableData.push(record);
+            this.setState({ starTableData: this.state.starTableData });
+        };
+    },
+    hotDelectRow() {
+        let deletedArr = this.state.hotTableData.concat();
+        for (let idx = 0; idx < this.state.hotSelectedRows.length; idx++) {
+            let deleteIndex = this.state.hotSelectedRows[idx];
+            if (deleteIndex.uid) {
+                for (let n = 0; n < deletedArr.length; n++) {
+                    if (deleteIndex.uid == deletedArr[n].uid) {
+                        deletedArr.splice(n, 1);
+                    };
+                };
+            };
+        };
+        this.setState({
+            hotTableData: deletedArr,
+            hotSelectedRowKeys: []
+        });
+    },
+    starDelectRow() {
+        let deletedArr = this.state.starTableData.concat();
+        for (let idx = 0; idx < this.state.starSelectedRows.length; idx++) {
+            let deleteIndex = this.state.starSelectedRows[idx];
+            if (deleteIndex.uid) {
+                for (let n = 0; n < deletedArr.length; n++) {
+                    if (deleteIndex.uid == deletedArr[n].uid) {
+                        deletedArr.splice(n, 1);
+                    };
+                };
+            };
+        };
+        this.setState({
+            starTableData: deletedArr,
+            starSelectedRowKeys: []
+        });
+    },
+    componentWillMount() {
+        this.loadData();
+        this.loadHotData();
+        this.loadStarData();
+    },
+    submit() {
+        let hotArr = [], starArr = [];
+        for (let i = 0; i < this.state.hotTableData.length; i++) {
+            let hotUid = this.state.hotTableData[i].uid;
+            if (hotUid) {
+                hotArr.push(hotUid);
+            };
+        };
+        for (let n = 0; n < this.state.starTableData.length; n++) {
+            let starUid = this.state.starTableData[n].uid;
+            if (starUid) {
+                starArr.push({
+                    uid: starUid,
+                    star: 1
+                });
+            };
+        };
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/star/save',
+            data: {
+                data: JSON.stringify(starArr),
+                hot: hotArr
+            },
+            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();
+    },
+    reset() {
+        this.state.searchPfs = undefined;
+        this.state.searchUnit = undefined;
+        this.state.searchNumber = undefined;
+        this.state.searchName = undefined;
+        this.state.searchField = [];
+        this.loadData();
+    },
+    render() {
+        const hotRowSelection = {
+            selectedRowKeys: this.state.hotSelectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    hotSelectedRows: selectedRows,
+                    hotSelectedRowKeys: selectedRowKeys
+                });
+            }
+        };
+        const starRowSelection = {
+            selectedRowKeys: this.state.starSelectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    starSelectedRows: selectedRows,
+                    starSelectedRowKeys: selectedRowKeys
+                });
+            }
+        };
+        const hotHasSelected = this.state.hotSelectedRowKeys.length > 0;
+        const starHasSelected = this.state.starSelectedRowKeys.length > 0;
+        return (
+            <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.searchNumber}
+                            onChange={(e) => { this.setState({ searchNumber: e.target.value }); }} />
+                        <Input placeholder="用户名" style={{ width: 160 }}
+                            value={this.state.searchName}
+                            onChange={(e) => { this.setState({ searchName: 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.search}>搜索</Button>
+                        <Button onClick={this.reset}>重置</Button>
+                    </div>
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            pagination={this.state.pagination} />
+                    </Spin>
+                </div>
+                <div className="clearfix">
+                    <div className="admin-content-warp" style={{ width: '50%', float: 'left' }}>
+                        <div className="admin-content-header">
+                            <span>大咖显示列表</span>
+                            <Button type='danger' disabled={!hotHasSelected} onClick={this.hotDelectRow}>
+                                删除<Icon type="minus" />
+                            </Button>
+                        </div>
+                        <Spin spinning={this.state.loading}>
+                            <Table columns={this.state.otherColumns}
+                                dataSource={this.state.hotTableData}
+                                rowSelection={hotRowSelection}
+                                pagination={false} />
+                        </Spin>
+                    </div>
+                    <div className="admin-content-warp" style={{ width: '50%', float: 'left' }}>
+                        <div className="admin-content-header">
+                            <span>明星显示列表</span>
+                            <Button type='danger' disabled={!starHasSelected} onClick={this.starDelectRow}>
+                                删除<Icon type="minus" />
+                            </Button>
+                        </div>
+                        <Spin spinning={this.state.loading}>
+                            <Table columns={this.state.otherColumns}
+                                dataSource={this.state.starTableData}
+                                rowSelection={starRowSelection}
+                                pagination={false} />
+                        </Spin>
+                    </div>
+                </div>
+                <Button onClick={this.submit} type="primary" style={{ marginTop: '20px' }}>保存</Button>
+            </div >
+        );
+    }
+});
+
+export default Star;

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

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

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

@@ -0,0 +1,91 @@
+.admin-content {
+    background: #fff;
+    padding: 20px;
+    color: #666;
+    .admin-content-title {
+        font-size: 16px;
+    }
+    .admin-content-warp {
+        padding: 10px;
+        .admin-content-header {
+            margin-bottom: 10px;
+            line-height: 28px;
+            >span {
+                font-size: 14px
+            }
+            >button {
+                float: right;
+            }
+        }
+        .admin-content-search {
+            margin-bottom: 10px;
+            >* {
+                margin-top: 10px;
+                margin-right: 10px;
+            }
+        }
+    }
+}
+
+.ant-modal-body {
+    .modal-box {
+        overflow: hidden;
+        line-height: 28px;
+        margin-bottom: 10px;
+        .modal-box-title {
+            float: left;
+            width: 84px;
+            text-align: right;
+            margin-right: 20px;
+        }
+        .modal-box-detail {
+            float: left;
+            width: 400px;
+            >span {
+                margin-right: 6px;
+            }
+        }
+        >button {
+            margin-right: 20px;
+        }
+    }
+}
+
+.no-all-select {
+    .ant-table-selection {
+        .ant-checkbox {
+            display: none;
+        }
+    }
+}
+
+.avatar-uploader,
+.avatar-uploader-trigger,
+.avatar {
+    width: 150px;
+    height: 150px;
+}
+
+.avatar-uploader {
+    display: block;
+    padding: 1px;
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    img {
+        position: absolute;
+        top: -1px;
+        left: -1px;
+        height: 150px;
+    } //
+    float: left;
+    margin-right: 20px;
+}
+
+.avatar-uploader-trigger {
+    display: table-cell;
+    vertical-align: middle;
+    font-size: 28px;
+    color: #999;
+}

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

@@ -0,0 +1,65 @@
+import React from 'react';
+import { Menu, Icon } from 'antd';
+import '../leftTab.less';
+const SubMenu = Menu.SubMenu;
+const MenuItemGroup = Menu.ItemGroup;
+
+
+const LeftTab = React.createClass({
+    getInitialState() {
+        return {
+            current: 'star',
+            subKey: 'sub1',
+            keyList: [
+                { key: 'sub1', value: ['star', 'lecture'] },
+                { key: 'sub10', value: ['banner'] }
+            ]
+        };
+    },
+    handleClick(e) {
+        this.props.handlekey(e.key);
+        this.setState({
+            current: e.key,
+        });
+    },
+    componentWillMount() {
+        const _me = this;
+        if (window.location.hash) {
+            let theKey = window.location.hash.substr(1);
+            this.state.keyList.map(function (item1) {
+                item1.value.map(function (item2) {
+                    if (theKey == item2) {
+                        _me.state.subKey = item1.key
+                    };
+                });
+            });
+            this.state.current = theKey;
+        };
+    },
+    render() {
+        return (
+            <Menu onClick={this.handleClick}
+                selectedKeys={[this.state.current]}
+                defaultOpenKeys={[this.state.subKey]}
+                mode="vertical"
+                className="account-left"
+                mode="inline" >
+                <SubMenu key="sub1" title={<span>大咖说</span>}>
+                    <Menu.Item key="star">
+                        科技明星
+                    </Menu.Item>
+                    <Menu.Item key="lecture">
+                        科技讲堂
+                    </Menu.Item>
+                </SubMenu>
+                <SubMenu key="sub10" title={<span>广告图</span>}>
+                    <Menu.Item key="banner">
+                        广告图管理
+                    </Menu.Item>
+                </SubMenu>
+            </Menu>
+        );
+    }
+});
+
+export default LeftTab;

+ 1 - 1
js/component/manageCenter/index/content.jsx

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

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

@@ -505,7 +505,7 @@ const ContractDetailForm = Form.create()(React.createClass({
                         "cid": this.props.data.id,
                         "comment": values.comment,
                         "status": values.status,
-                        "recordTimeFormattedDate": values.recordTime.format("YYYY-MM-DD HH:mm:ss"),
+                        "recordTimeFormattedDate": values.recordTime ? values.recordTime.format("YYYY-MM-DD HH:mm:ss") : null,
                         "principals": values.principals //流转分发人
                     }
                 }).done(function (data) {

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

@@ -92,16 +92,16 @@ const AnnualReportDescFrom = Form.create()(React.createClass({
                         </div>
                         <div className="half-item">
                             <p className="item-title">上市时间: </p>
-                            <p>{theData.listedDateFormattedDate}</p>
+                            <p>{theData.listedDate}</p>
                         </div>
                         <div className="half-item">
                             <p className="item-title">上市类型: </p>
                             <p>
                                 {(() => {
                                     switch (theData.listedType) {
-                                        case 0:
+                                        case '0':
                                             return "股票型上市公司";
-                                        case 1:
+                                        case '1':
                                             return "债券型上市公司";
                                         default:
                                             return "";
@@ -322,7 +322,7 @@ const AnnualReportDescFrom = Form.create()(React.createClass({
 }));
 
 const AnnualReportDesc = React.createClass({
-    loadData(v) {
+    loadData(v, year, uid) {
         this.setState({
             loading: true
         });
@@ -332,8 +332,8 @@ const AnnualReportDesc = React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/admin/annualReportDetail",
             data: {
-                year: this.props.data ? this.props.data.year : (new Date().getFullYear() - 1),
-                uid: this.props.uid
+                year: year ? year : (new Date().getFullYear() - 1),
+                uid: uid ? uid : this.props.data.uid
             }
         }).done((data) => {
             if (!data.data) {
@@ -398,7 +398,7 @@ const AnnualReportDesc = React.createClass({
     },
     componentWillReceiveProps(nextProps) {
         if (nextProps.showDesc) {
-            this.loadData(nextProps.showDesc);
+            this.loadData(nextProps.showDesc, nextProps.data.year, nextProps.data.uid);
         };
     },
     showModal() {

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

@@ -97,8 +97,9 @@ const CompanyDetail = Form.create()(React.createClass({
                 };
                 return;
             };
-            data.data.map(function (item) {
+            data.data.map(function (item, i) {
                 theTableData.push({
+                    key: i,
                     id: item.id,
                     uid: item.uid,
                     type: item.type,
@@ -136,8 +137,9 @@ const CompanyDetail = Form.create()(React.createClass({
                 };
                 return;
             };
-            data.data.map(function (item) {
+            data.data.map(function (item, i) {
                 theTableData.push({
+                    key: i,
                     id: item.id,
                     uid: item.uid,
                     type: item.type,

+ 3 - 3
js/component/manageCenter/servicesManage/highTech/fosterDesc/intellectualDesc.jsx

@@ -26,7 +26,7 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                 this.state.data = {};
             } else { this.state.data = data.data };
         }).always(function () {
-            this.props.spinState(true);
+            this.props.spinState(false);
         }.bind(this));
     },
     getInitialState() {
@@ -49,7 +49,7 @@ const IntellectualDescFrom = Form.create()(React.createClass({
                 <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
             )
         });
-        if (this.props.data.id && this.props.data.type && this.props.data.type) {
+        if (this.props.data.id && this.props.data.type != undefined && this.props.data.type != null) {
             this.loadData();
         };
     },
@@ -91,7 +91,7 @@ const IntellectualDescFrom = Form.create()(React.createClass({
     },
     componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
-            if (nextProps.data.id) {
+            if (nextProps.data.id && nextProps.data.type != undefined && nextProps.data.type != null) {
                 this.loadData(nextProps.data.id, nextProps.data.type);
             };
             this.state.data = {};

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

@@ -510,11 +510,11 @@ const CognizanceDescFrom = Form.create()(React.createClass({
                         <div className="clearfix">
                             <div className="half-item">
                                 <span className="item-title">净资产增长率: </span>
-                                <span>{(this.state.netAssetRate * 100).toFixed(2) + '%'}</span>
+                                <span>{isNaN(this.state.netAssetRate) ? '数据错误无法计算' : (this.state.netAssetRate * 100).toFixed(2) + '%'}</span>
                             </div>
                             <div className="half-item">
                                 <span className="item-title">销售收入增长率: </span>
-                                <span>{(this.state.salesRevenueRate * 100).toFixed(2) + '%'}</span>
+                                <span>{isNaN(this.state.salesRevenueRate) ? '数据错误无法计算' : (this.state.salesRevenueRate * 100).toFixed(2) + '%'}</span>
                             </div>
                         </div>
                         <div className="clearfix">

+ 8 - 4
js/component/manageCenter/servicesManage/highTech/highTechInfo.jsx

@@ -184,6 +184,10 @@ const highTechInfo = React.createClass({
                     dataIndex: 'standardName',
                     key: 'standardName'
                 }, {
+                    title: '制定时间',
+                    dataIndex: 'year',
+                    key: 'year'
+                }, {
                     title: '标准级别',
                     dataIndex: 'standardLevel',
                     key: 'standardLevel',
@@ -351,7 +355,7 @@ const highTechInfo = React.createClass({
                     uid: item.uid,
                     type: item.type,
                     name: item.name,
-                    orgCode: item.idNumber,
+                    orgCode: item.orgCode,
                     investment: item.investment
                 });
             });
@@ -1034,7 +1038,7 @@ const highTechInfo = React.createClass({
                         <div className="clearfix">
                             <div className="half-item">
                                 <span className="item-title">年份</span>
-                                <span>{theData.year}</span>
+                                <span>{theData.year + 1}</span>
                             </div>
                             <div className="half-item">
                                 <span className="item-title">公司名字</span>
@@ -1111,7 +1115,7 @@ const highTechInfo = React.createClass({
                             </div>
                             <div className="half-item">
                                 <span className="item-title">注册时间</span>
-                                <span>{theData.registrationTime}</span>
+                                <span>{theData.registrationTimeFormattedDate}</span>
                             </div>
                             <div className="half-item">
                                 <span className="item-title">企业规模</span>
@@ -1216,7 +1220,7 @@ const highTechInfo = React.createClass({
                             </div>
                             <div className="half-item">
                                 <span className="item-title">上市时间</span>
-                                <span>{theData.listedDate}</span>
+                                <span>{theData.listedDateFormattedDate}</span>
                             </div>
                             <div className="half-item">
                                 <span className="item-title">股票代码</span>

+ 1 - 1
js/component/manageCenter/topTab.jsx

@@ -495,7 +495,7 @@ const TopTab = React.createClass({
                         <Col style={{ display: window.showServices ? 'block' : 'none' }} className={this.props.active === 'services' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/servicesManage/contract.html"}>科技服务管理</a></Col>
                         <Col style={{ display: window.showAchievement ? 'block' : 'none' }} className={this.props.active === 'achievement' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/achievement.html"}>科技成果管理</a></Col>
                         <Col style={{ display: window.showDemand ? 'block' : 'none' }} className={this.props.active === 'demand' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/demand.html"}>科技需求管理</a></Col>
-                        <Col style={{ display: window.showIdea ? 'block' : 'none' }} className={this.props.active === 'idea' ? 'active' : ''} span={3}><a href="">科技思想管理</a></Col>
+                        <Col style={{ display: window.showIdea ? 'block' : 'none' }} className={this.props.active === 'idea' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/idea.html"}>科技思想管理</a></Col>
                         <Col style={{ display: window.showSystem ? 'block' : 'none' }} className={this.props.active === 'system' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/set.html"}>系统设置</a></Col>
                     </Row>
                 </div>

+ 3 - 3
js/component/manageCenter/userManage/customerList.jsx

@@ -187,7 +187,7 @@ const CustomerList = React.createClass({
                 auditStatus: this.state.searchAuditStatus
             },
             success: function (data) {
-                if (!data.data) {
+                if (!data.data || !data.data.list) {
                     if (data.error && data.error.length) {
                         message.warning(data.error[0].message);
                     }
@@ -209,9 +209,9 @@ const CustomerList = React.createClass({
                             theName: thisdata.type == 0 ? thisdata.username : thisdata.unitName
                         });
                     };
+                    this.state.pagination.current = data.data.pageNo;
+                    this.state.pagination.total = data.data.totalCount;
                 };
-                this.state.pagination.current = data.data.pageNo;
-                this.state.pagination.total = data.data.totalCount;
                 this.setState({
                     dataSource: this.state.data,
                     pagination: this.state.pagination

+ 1 - 1
js/component/manageCenter/userManage/customerSearch.jsx

@@ -72,7 +72,7 @@ const CustomerSearch = React.createClass({
                     </Col>
                     <Col span={1}></Col>
                     <Col span={2}>
-                        <Select style={{ width: 100 }}
+                        <Select
                             value={this.state.searchType}
                             onChange={(e) => { this.setState({ searchType: e }) }} >
                             <Select.Option value="0">个人用户</Select.Option>

+ 1 - 4
js/component/manageCenter/userManage/orgDesc.jsx

@@ -899,10 +899,7 @@ const OrgCertify = Form.create()(React.createClass({
                             label="上年度纳税报表" >
                             <div className="idcard-img clearfix">
                                 {this.state.lastYearTaxReportUrl ? <div>
-                                    <div className="idcard-imgbox">
-                                        <img src={globalConfig.context + '/open/writeImage?path=' + this.state.lastYearTaxReportUrl} alt="点击查看大图"
-                                            onClick={(e) => { window.open(e.target.src) }} />
-                                    </div>
+                                    <a onClick={newDownloadFile.bind(null, this.state.lastYearTaxReportId, "last_year_ratepay", "/api/admin/patent/downloadRatepay")}>上年度纳税报表</a>
                                 </div> : <div>
                                         <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</p>
                                     </div>}

+ 23 - 21
js/component/manageCenter/userManage/orgList.jsx

@@ -108,28 +108,30 @@ const OrgList = React.createClass({
                 auditStatus: this.state.searchAuditStatus
             },
             success: function (data) {
-                if (data.error.length || !data.data || !data.data.list) {
-                    message.warning(data.error[0].message);
-                    return;
-                }
-                for (let i = 0; i < data.data.list.length; i++) {
-                    let thisdata = data.data.list[i];
-                    this.state.data.push({
-                        key: i,
-                        id: thisdata.id,
-                        mobile: thisdata.mobile,
-                        email: thisdata.email,
-                        createTime: thisdata.createTime,
-                        aftUsername: thisdata.aftUsername,
-                        number: thisdata.number,
-                        orgAuditStatus: thisdata.orgAuditStatus,
-                        createTimeFormattedDate: thisdata.createTimeFormattedDate,
-                        adminName: thisdata.adminName,
-                        unitName: thisdata.unitName
-                    });
+                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];
+                        this.state.data.push({
+                            key: i,
+                            id: thisdata.id,
+                            mobile: thisdata.mobile,
+                            email: thisdata.email,
+                            createTime: thisdata.createTime,
+                            aftUsername: thisdata.aftUsername,
+                            number: thisdata.number,
+                            orgAuditStatus: thisdata.orgAuditStatus,
+                            createTimeFormattedDate: thisdata.createTimeFormattedDate,
+                            adminName: thisdata.adminName,
+                            unitName: thisdata.unitName
+                        });
+                    };
+                    this.state.pagination.current = data.data.pageNo;
+                    this.state.pagination.total = data.data.totalCount;
                 };
-                this.state.pagination.current = data.data.pageNo;
-                this.state.pagination.total = data.data.totalCount;
                 this.setState({
                     dataSource: this.state.data,
                     pagination: this.state.pagination

+ 2 - 2
js/component/manageCenter/userManage/userList.jsx

@@ -128,9 +128,9 @@ const UserList = React.createClass({
                             adminName: thisdata.adminName
                         });
                     };
+                    this.state.pagination.current = data.data.pageNo;
+                    this.state.pagination.total = data.data.totalCount;
                 };
-                this.state.pagination.current = data.data.pageNo;
-                this.state.pagination.total = data.data.totalCount;
                 this.setState({
                     dataSource: this.state.data,
                     pagination: this.state.pagination

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

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

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

@@ -239,7 +239,7 @@ const Content = React.createClass({
                         </Col>
                         <Col span={6}>
                             <div className="nav-search">
-                                <Input onChange={(e) => { this.state.keyword = e.target.value; }} />
+                                <Input placeholder="请输入关键词" onChange={(e) => { this.state.keyword = e.target.value; }} />
                                 <Button onClick={() => { this.loadData() }}>
                                     <img src={searchImg} alt="" />
                                 </Button>
@@ -265,7 +265,14 @@ const Content = React.createClass({
                                         <span className="detial_sub_icon">
                                             <img src={demand_ico_5} alt="需求" />
                                         </span>
-                                        <span className="detial_sub_title">需求: </span>
+                                        <span className="detial_sub_title">关键词: </span>
+                                        <span className="detial_sub_text">{item.keyword}</span>
+                                    </div>
+                                    <div className="detial_sub">
+                                        <span className="detial_sub_icon">
+                                            <img src={demand_ico_5} alt="需求" />
+                                        </span>
+                                        <span className="detial_sub_title">需求描述: </span>
                                         <span className="detial_sub_text">{item.problemDes}</span>
                                     </div>
                                     <div className="detial_sub">

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

@@ -59,7 +59,7 @@ const LoginTop = React.createClass({
                                 <li className="home"><a href={globalConfig.context + "/portal/index.html"}>首页</a> </li>
                                 <li className="active">
                                     <a href={globalConfig.context + '/portal/search/achievement.html'}>技术交易</a>
-                                    <ul className="secondary_navigation_nav" style={{left:'-112.875px'}}>
+                                    <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>
@@ -68,20 +68,20 @@ const LoginTop = React.createClass({
                                 </li>
                                 <li>
                                     <a href={globalConfig.context + '/portal/scienceTechnology/bigShot.html'}>大咖说</a>
-                                    <ul className="secondary_navigation_nav">
+                                    <ul className="secondary_navigation_nav" style={{ 'width': (2 * 75) + 'px', left: '-' + (2 * 75 / 2 - 74.25 / 2) + 'px' }}>
                                         <li><a href={globalConfig.context + '/portal/scienceTechnology/star.html'}>科技明星</a></li>
                                         <li><a href={globalConfig.context + '/portal/scienceTechnology/lecture.html'}>科技讲堂</a></li>
                                     </ul>
                                 </li>
                                 <li>
                                     <a href={globalConfig.context + '/portal/activity/activityIndex.html'}>活动圈</a>
-                                    <ul className="secondary_navigation_nav">
+                                    <ul className="secondary_navigation_nav" style={{ 'width': (1 * 75) + 'px', left: '-' + (1 * 75 / 2 - 74.25 / 2) + 'px' }}>
                                         <li><a href={globalConfig.context + '/portal/activity/details.html'}>活动详情</a></li>
                                     </ul>
                                 </li >
                                 <li>
                                     <a href={globalConfig.context + '/portal/websiteBuild/websiteBuildIndex.html'}>建设兵团</a>
-                                    <ul className="secondary_navigation_nav">
+                                    <ul className="secondary_navigation_nav" style={{ 'width': (3 * 75) + 'px', left: '-' + (3 * 75 / 2 - 74.25 / 2) + 'px' }}>
                                         <li><a href={globalConfig.context + '/portal/websiteBuild/websiteBuildIndex.html#customized'}>平台定制</a></li>
                                         <li><a href={globalConfig.context + '/portal/websiteBuild/websiteBuildIndex.html#operates'}>平台运营</a></li>
                                         <li><a href={globalConfig.context + '/portal/websiteBuild/websiteBuildIndex.html#event_planning'}>活动筹划</a></li>
@@ -89,7 +89,7 @@ const LoginTop = React.createClass({
                                 </li>
                                 <li>
                                     <a href={globalConfig.context + '/portal/international/internationalIndex.html'}>国际业务</a>
-                                    <ul className="secondary_navigation_nav" >
+                                    <ul className="secondary_navigation_nav" style={{ 'width': (3 * 75) + 'px', left: '-' + (3 * 75 / 2 - 74.25 / 2) + 'px' }}>
                                         <li><a href={globalConfig.context + '/portal/international/internationalIndex.html#internationalTechnology'}>国际技术</a></li>
                                         <li><a href={globalConfig.context + '/portal/international/internationalIndex.html#internationalPartner'}>国际伙伴</a></li>
                                         <li><a href={globalConfig.context + '/portal/international/internationalIndex.html#internationalExpert'}>国际专家</a></li>
@@ -97,7 +97,7 @@ const LoginTop = React.createClass({
                                 </li>
                                 <li>
                                     <a href={globalConfig.context + '/portal/service/serviceIndex.html'}>服务汇</a>
-                                    <ul className="secondary_navigation_nav">
+                                    <ul className="secondary_navigation_nav" style={{ 'width': (3 * 75) + 'px', left: '-' + (3 * 75 / 2 - 74.25 / 2) + 'px' }}>
                                         <li ><a href={globalConfig.context + '/portal/highTech/authentication.html'}>高企培育</a></li>
                                         <li ><a href={globalConfig.context + '/portal/ipr/service.html'}>知识产权</a></li >
                                         <li ><a href={globalConfig.context + '/portal/evaluation/index.html'}>技术评估</a></li>
@@ -105,15 +105,15 @@ const LoginTop = React.createClass({
                                 </li>
                                 <li>
                                     <a href={globalConfig.context + '/portal/news/newsIndex.html'}>策源地</a>
-                                    <ul className="secondary_navigation_nav">
+                                    <ul className="secondary_navigation_nav" style={{ 'width': (3 * 75) + 'px', left: '-' + (3 * 75 / 2 - 74.25 / 2) + 'px' }}>
                                         <li><a href={globalConfig.context + '/portal/news/newsIndex.html'}>新闻快讯</a></li>
                                         <li><a href={globalConfig.context + '/portal/news/newsIndex.html'}>科技政策</a></li>
                                         <li><a href={globalConfig.context + '/portal/news/newsIndex.html'}>政策解读</a></li>
                                     </ul>
                                 </li>
                                 <li>
-                                    <a href={globalConfig.context + '/portal/entrepreneurship/entrepreneurshipIndex.html'}>创圈</a>
-                                    <ul className="secondary_navigation_nav">
+                                    <a href={globalConfig.context + '/portal/entrepreneurship/entrepreneurshipIndex.html'}>创圈</a>
+                                    <ul className="secondary_navigation_nav" style={{ 'width': (3 * 75) + 'px', left: '-' + (3 * 75 / 2 - 74.25 / 2) + 'px' }}>
                                         <li><a href={globalConfig.context + '/portal/entrepreneurship/entrepreneurshipIndex.html'}>项目圈</a></li>
                                         <li><a href={globalConfig.context + '/portal/entrepreneurship/entrepreneurshipIndex.html#chuangke'}>创客圈</a></li>
                                         <li><a href={globalConfig.context + '/portal/entrepreneurship/entrepreneurshipIndex.html#jieyi'}>结义园</a></li>
@@ -121,7 +121,7 @@ const LoginTop = React.createClass({
                                 </li>
                                 <li>
                                     <a href={globalConfig.context + '/portal/financial/financialIndex.html'}>金融圈</a>
-                                    <ul className="secondary_navigation_nav">
+                                    <ul className="secondary_navigation_nav" style={{ 'width': (1 * 75) + 'px', left: '-' + (1 * 75 / 2 - 74.25 / 2) + 'px' }}>
                                         <li ><a href={globalConfig.context + '/portal/financial/financialIndex.html'}>金融街</a></li>
                                     </ul>
                                 </li>

+ 1 - 1
js/component/sign/account.jsx

@@ -267,7 +267,7 @@ const LoginContent = Form.create()(React.createClass({
                                 )}
                         </FormItem>
                         <FormItem {...tailFormItemLayout}>
-                            <Button type="primary" htmlType="submit" size="large">提 交</Button>
+                            <Button disabled={!this.props.form.getFieldValue('agreement')} type="primary" htmlType="submit" size="large">提 交</Button>
                         </FormItem>
                     </Form>
                     <div className="account-right">

+ 1 - 1
js/component/sign/groupAccount.jsx

@@ -281,7 +281,7 @@ const Group = Form.create()(React.createClass({
                                 )}
                         </FormItem>
                         <FormItem {...tailFormItemLayout}>
-                            <Button type="primary" htmlType="submit" size="large">提 交</Button>
+                            <Button disabled={!this.props.form.getFieldValue('agreement')} type="primary" htmlType="submit" size="large">提 交</Button>
                         </FormItem>
                     </Form>
                     <Modal showDesc={this.state.showDesc} closeModal={this.closeModal} />

+ 1 - 1
js/component/sign/modal.jsx

@@ -14,7 +14,7 @@ const TheModal = React.createClass({
     },
     render() {
         return (
-            <Modal title="免责声明 DISCLAIMER" style={{ width: 1000, height: 600 }}
+            <Modal title="免责声明 DISCLAIMER" width={1000}
                 visible={this.state.visible}
                 onCancel={() => { this.props.closeModal() }}
                 footer={null}>

+ 7 - 0
webpack.config.js

@@ -182,6 +182,13 @@ module.exports = (function () {
             template: './template/template.html',
             chunks: ['admin/set', 'vendors']
         }),
+        //admin-idea
+        new HtmlWebpackPlugin({
+            title: '管理员-科技思想管理',
+            filename: 'admin/idea.html',
+            template: './template/template.html',
+            chunks: ['admin/idea', 'vendors']
+        }),
 
         //portal 门户
         new HtmlWebpackPlugin({

+ 4 - 0
webpack/entry.config.js

@@ -110,6 +110,10 @@ module.exports = {
       'webpack/hot/only-dev-server',
       './js/admin/set.js'
     ],
+    'admin/idea': ['webpack-dev-server/client?http://127.0.0.1:80', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './js/admin/idea.js'
+    ],
     //admin-servicesManage
     'admin/servicesManage/contract': ['webpack-dev-server/client?http://127.0.0.1:80', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',