ws2z3gr2017 hace 7 años
padre
commit
196395bdd0

+ 2 - 2
js/component/account/achievement/techAchievementDesc.jsx

@@ -239,7 +239,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
                     <div className="clearfix">
                         <FormItem className="half-item"
                             {...formItemLayout}
-                            label="编号" >
+                            label="编号11" >
                             <span>{theData.serialNumber}</span>
                         </FormItem>
                         <FormItem className="half-item"
@@ -972,7 +972,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
                     <FormItem
                         labelCol={{ span: 4 }}
                         wrapperCol={{ span: 18 }}
-                        label="成熟度证明材料(图片)" >
+                        label="成熟度证明材料(图片)11" >
                         <PicturesWall
                             pictureSign="achievement_maturity_picture"
                             fileList={this.getMaturityPictureUrl}

+ 72 - 48
js/component/manageCenter/achievement/techAchievementDesc.jsx

@@ -9,25 +9,25 @@ import { beforeUploadFile, splitUrl, companySearch, getTransferMode, getAchievem
 import throttle from '../../throttle.js';
 
 const KeyWordTagGroup = React.createClass({
-    getInitialState () {
+    getInitialState() {
         return {
             tags: [],
             inputVisible: false,
             inputValue: ''
         };
     },
-    handleClose (removedTag) {
+    handleClose(removedTag) {
         const tags = this.state.tags.filter(tag => tag !== removedTag);
         this.props.tagsArr(tags);
         this.setState({ tags });
     },
-    showInput () {
+    showInput() {
         this.setState({ inputVisible: true }, () => this.input.focus());
     },
-    handleInputChange (e) {
+    handleInputChange(e) {
         this.setState({ inputValue: e.target.value });
     },
-    handleInputConfirm () {
+    handleInputConfirm() {
         const state = this.state;
         const inputValue = state.inputValue;
         let tags = state.tags;
@@ -41,15 +41,15 @@ const KeyWordTagGroup = React.createClass({
             inputValue: '',
         });
     },
-    componentWillMount () {
+    componentWillMount() {
         this.state.tags = this.props.keyWordArr;
     },
-    componentWillReceiveProps (nextProps) {
+    componentWillReceiveProps(nextProps) {
         if (this.props.keyWordArr != nextProps.keyWordArr) {
             this.state.tags = nextProps.keyWordArr;
         };
     },
-    render () {
+    render() {
         const { tags, inputVisible, inputValue } = this.state;
         return (
             <div className="keyWord-tips">
@@ -80,31 +80,31 @@ const KeyWordTagGroup = React.createClass({
 });
 
 const PicturesWall = React.createClass({
-    getInitialState () {
+    getInitialState() {
         return {
             previewVisible: false,
             previewImage: '',
             fileList: [],
         }
     },
-    handleCancel () {
+    handleCancel() {
         this.setState({ previewVisible: false })
     },
-    handlePreview (file) {
+    handlePreview(file) {
         this.setState({
             previewImage: file.url || file.thumbUrl,
             previewVisible: true,
         });
     },
-    handleChange (info) {
+    handleChange(info) {
         let fileList = info.fileList;
         this.setState({ fileList });
         this.props.fileList(fileList);
     },
-    componentWillReceiveProps (nextProps) {
+    componentWillReceiveProps(nextProps) {
         this.state.fileList = nextProps.pictureUrl;
     },
-    render () {
+    render() {
         const { previewVisible, previewImage, fileList } = this.state;
         const uploadButton = (
             <div>
@@ -132,7 +132,7 @@ const PicturesWall = React.createClass({
 });
 
 const AchievementDetailShow = Form.create()(React.createClass({
-    getInitialState () {
+    getInitialState() {
         return {
             loading: false,
             buttonLoading: false,
@@ -146,7 +146,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
             businessPlanFileList: []
         };
     },
-    loadData (id, detailApiUrl) {
+    loadData(id, detailApiUrl) {
         this.setState({
             loading: true
         });
@@ -184,7 +184,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
             });
         }.bind(this));
     },
-    offShelf () {
+    offShelf() {
         this.setState({
             loading: true
         });
@@ -207,7 +207,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
             }
         }.bind(this));
     },
-    modifyBroker () {
+    modifyBroker() {
         this.props.form.validateFields((err, values) => {
             if (!err) {
                 this.setState({
@@ -237,7 +237,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
             }
         });
     },
-    formSubmit () {
+    formSubmit() {
         this.props.form.validateFields((err, values) => {
             if (values.auditStatus == 3 && !values.techBrokerId) {
                 message.warning('必须选择一个技术经纪人!');
@@ -275,7 +275,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
             }
         });
     },
-    handleSubmit (e) {
+    handleSubmit(e) {
         e.preventDefault();
         this.props.form.validateFields((err, values) => {
             if (values.auditStatus == 4) {
@@ -287,7 +287,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
             };
         });
     },
-    buildMatchList () {
+    buildMatchList() {
         this.setState({
             buttonLoading: true
         });
@@ -310,7 +310,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
             };
         }.bind(this));
     },
-    getContactsList (theUid) {
+    getContactsList(theUid) {
         $.ajax({
             method: "get",
             dataType: "json",
@@ -333,10 +333,10 @@ const AchievementDetailShow = Form.create()(React.createClass({
             }.bind(this),
         });
     },
-    componentWillMount () {
+    componentWillMount() {
         this.loadData(this.props.data.id, this.props.detailApiUrl);
     },
-    componentWillReceiveProps (nextProps) {
+    componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
             this.loadData(nextProps.data.id, nextProps.detailApiUrl);
             this.state.textFileList = [];
@@ -345,7 +345,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
             this.props.form.resetFields();
         };
     },
-    render () {
+    render() {
         const theData = this.state.data || {};
         const { getFieldDecorator } = this.props.form;
         const FormItem = Form.Item
@@ -386,7 +386,19 @@ const AchievementDetailShow = Form.create()(React.createClass({
                             label="类型" >
                             <span>{getAchievementCategory(theData.category)}</span>
                         </FormItem>
-                    </div>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="军民融合" >
+                            {(() => {
+                                switch (theData.jmrhFlag) {
+                                    case "0":
+                                        return <span>否</span>;
+                                    case "1":
+                                        return <span>是</span>;
+                                }
+                            })()}
+                        </FormItem>
+                    </div>            
                     <div className="clearfix">
                         <FormItem className="half-item"
                             {...formItemLayout}
@@ -730,7 +742,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
 }));
 
 const AchievementDetailForm = Form.create()(React.createClass({
-    getInitialState () {
+    getInitialState() {
         return {
             loading: false,
             auditStatus: 0,
@@ -745,7 +757,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
             dataSource: [],
         };
     },
-    loadData (id, detailApiUrl) {
+    loadData(id, detailApiUrl) {
         this.setState({
             loading: true
         });
@@ -784,7 +796,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
             });
         }.bind(this));
     },
-    getContactsList (theUid) {
+    getContactsList(theUid) {
         $.ajax({
             method: "get",
             dataType: "json",
@@ -813,16 +825,16 @@ const AchievementDetailForm = Form.create()(React.createClass({
             }.bind(this),
         });
     },
-    getTagsArr (e) {
+    getTagsArr(e) {
         this.setState({ tags: e });
     },
-    getMaturityPictureUrl (e) {
+    getMaturityPictureUrl(e) {
         this.setState({ maturityPictureUrl: e });
     },
-    getTechnicalPictureUrl (e) {
+    getTechnicalPictureUrl(e) {
         this.setState({ technicalPictureUrl: e });
     },
-    handleSearch (e) {
+    handleSearch(e) {
         if (this.props.detailApiUrl.indexOf('org') != -1) {
             $.ajax({
                 method: "get",
@@ -877,7 +889,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
             });
         };
     },
-    handleSubmit (e) {
+    handleSubmit(e) {
         e.preventDefault();
         this.props.form.validateFields((err, values) => {
             //keyword长度判断
@@ -959,7 +971,8 @@ const AchievementDetailForm = Form.create()(React.createClass({
                         releaseStatus: values.releaseStatus,
                         techPlanUrl: this.state.techPlanUrl,
                         businessPlanUrl: this.state.businessPlanUrl,
-                        auditStatus: this.state.auditStatus
+                        auditStatus: this.state.auditStatus,
+                        jmrhFlag: values.jmrhFlag,
                     }
                 }).done(function (data) {
                     this.state.auditStatus = 0;
@@ -976,13 +989,13 @@ const AchievementDetailForm = Form.create()(React.createClass({
             }
         });
     },
-    componentWillMount () {
+    componentWillMount() {
         this.state.therottleSearch = throttle(this.handleSearch, 1000, { leading: false }).bind(this);
         if (this.props.data && this.props.data.id) {
             this.loadData(this.props.data.id, this.props.detailApiUrl);
         };
     },
-    componentWillReceiveProps (nextProps) {
+    componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
             if (nextProps.data && nextProps.data.id) {
                 this.loadData(nextProps.data.id, nextProps.detailApiUrl);
@@ -998,7 +1011,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
             this.props.form.resetFields();
         };
     },
-    render () {
+    render() {
         const theData = this.state.data || {};
         const { getFieldDecorator } = this.props.form;
         const FormItem = Form.Item
@@ -1051,6 +1064,18 @@ const AchievementDetailForm = Form.create()(React.createClass({
                                 </Select>
                                 )}
                         </FormItem>
+                        <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="军民融合" >
+                                {getFieldDecorator('jmrhFlag', {
+                                    initialValue: theData.jmrhFlag
+                                })(
+                                    <Radio.Group>
+                                        <Radio value="0">否</Radio>
+                                        <Radio value="1">是</Radio>
+                                    </Radio.Group>
+                                    )}
+                        </FormItem>
                         <div className="clearfix">
                             <FormItem className="half-item"
                                 {...formItemLayout}
@@ -1130,7 +1155,6 @@ const AchievementDetailForm = Form.create()(React.createClass({
                             {...formItemLayout}
                             label="成熟度" >
                             {getFieldDecorator('maturity', {
-                                rules: [{ type: 'string', required: true, message: '此项为必填项!' }],
                                 initialValue: theData.maturity
                             })(
                                 <Select placeholder="选择成熟度" style={{ width: 160 }} >
@@ -1497,7 +1521,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
 }));
 
 const AchievementDetail = React.createClass({
-    getInitialState () {
+    getInitialState() {
         return {
             visible: false,
             tabsKey: 1,
@@ -1551,7 +1575,7 @@ const AchievementDetail = React.createClass({
             dataSource: [],
         };
     },
-    getTechBrodersList () {
+    getTechBrodersList() {
         this.setState({
             loading: true
         });
@@ -1584,7 +1608,7 @@ const AchievementDetail = React.createClass({
             });
         }.bind(this));
     },
-    getTableList () {
+    getTableList() {
         this.setState({
             loading: true
         });
@@ -1627,31 +1651,31 @@ const AchievementDetail = React.createClass({
             });
         }.bind(this));
     },
-    tableRowClick (record, index) {
+    tableRowClick(record, index) {
         window.open(globalConfig.context + '/portal/detail/demandDetail.html?id=' + record.id + '&type=' + record.dataCategory);
     },
-    handleCancel (e) {
+    handleCancel(e) {
         this.setState({
             visible: false,
         });
         this.props.closeDesc(false);
     },
-    handleOk (e) {
+    handleOk(e) {
         this.setState({
             visible: false,
         });
         this.props.closeDesc(false, true);
     },
-    componentWillMount () {
+    componentWillMount() {
         this.getTechBrodersList();
     },
-    componentWillReceiveProps (nextProps) {
+    componentWillReceiveProps(nextProps) {
         if (!this.state.visible && nextProps.showDesc) {
             this.state.tabsKey = "1";
         };
         this.state.visible = nextProps.showDesc;
     },
-    render () {
+    render() {
         if (this.props.data) {
             return (
                 <div className="patent-desc">

+ 2 - 1
js/component/manageCenter/idea/content.less

@@ -112,4 +112,5 @@
     vertical-align: middle;
     font-size: 28px;
     color: #999;
-}
+}
+.jmrhFlag{margin-right: 15px;}

+ 21 - 6
js/component/manageCenter/idea/news/news.jsx

@@ -65,7 +65,7 @@ const News = React.createClass({
                 startCreateTime: this.state.startDate, //新闻开始时间 yyyy-MM-dd
                 endCreateTime: this.state.endDate, //新闻结束时间 yyyy-MM-dd
                 source: this.state.searchSource,
-                hot: this.state.searchHot, //是否放在首页
+                hot: this.state.searchHot, //是否放在首页                    
             },
             success: function (data) {
                 let theArr = [];
@@ -85,12 +85,13 @@ const News = React.createClass({
                             titleImg: thisdata.titleImg,
                             author: thisdata.author,
                             type: thisdata.type,
-                            hot: thisdata.hot,
+                            hot: thisdata.hot,                                                       
                             source: thisdata.source,
                             sourceUrl: thisdata.sourceUrl,
                             summary: thisdata.summary,
                             content: thisdata.content,
                             createTimeFormattedDate: thisdata.createTimeFormattedDate,
+                            
                         });
                     };
                     this.state.pagination.current = data.data.pageNo;
@@ -203,7 +204,7 @@ const News = React.createClass({
             this.state.startDate = undefined;
             this.state.endDate = undefined;
             this.state.searchSource = undefined;
-            this.state.searchHot = undefined;
+            this.state.searchHot = undefined;         
             this.loadData(1, nextProps.newsType);
         };
     },
@@ -234,13 +235,16 @@ const News = React.createClass({
                 titleImg: this.state.RowData.titleImg,
                 author: this.state.RowData.author,
                 type: this.props.newsType,
-                hot: this.state.RowData.hot || 0,
+                hot: this.state.RowData.hot || 0,          
                 source: this.state.RowData.source,
                 sourceUrl: this.state.RowData.sourceUrl,
                 summary: this.state.RowData.summary,
                 content: this.state.RowData.content,
                 createTimeFormattedDate: this.state.RowData.createTimeFormattedDate,
+                jmrhFlag: this.state.RowData.jmrhFlag ,               
             },
+            
+            
             success: function (data) {
                 if (data.error && data.error.length) {
                     message.warning(data.error[0].message);
@@ -333,6 +337,7 @@ const News = React.createClass({
             }
         };
         const hasSelected = this.state.selectedRowKeys.length > 0;
+      
         return (
             <div className="admin-content" >
                 <div className="admin-content-title">
@@ -360,7 +365,7 @@ const News = React.createClass({
                             onChange={(e) => { this.setState({ searchAuthor: e.target.value }); }} />
                         <Input placeholder="来源" style={{ width: 100 }}
                             value={this.state.searchSource}
-                            onChange={(e) => { this.setState({ searchSource: e.target.value }); }} />
+                            onChange={(e) => { this.setState({ searchSource: e.target.value }); }} />                                                   
                         {this.props.newsType == 2 || this.props.newsType == 3 ? <Select placeholder="显示在首页"
                             style={{ width: 100 }}
                             value={this.state.searchHot}
@@ -478,9 +483,19 @@ const News = React.createClass({
                                         value={this.state.RowData.createTimeFormattedDate ? moment(this.state.RowData.createTimeFormattedDate, "YYYY-MM-DD") : undefined}
                                         onChange={(t, str) => {
                                             this.state.RowData.createTimeFormattedDate = str;
-                                            this.setState({ RowData: this.state.RowData });
+                                            this.setState({ RowData: this.state.RowData});
                                         }} />
                                 </div>
+                            </div>   
+	                            <div className="modal-box news-box">
+		                        <span className="modal-box-title jmrhFlag">军民融合:</span>  	                        
+	                            <Radio.Group value={this.state.RowData.jmrhFlag} onChange={(e) => {
+	                                this.state.RowData.jmrhFlag = e.target.value;
+	                                this.setState({jmrhFlag: this.state.jmrhFlag });
+	                            }} >
+	                                <Radio value={0}>否</Radio>
+	                                <Radio value={1}>是</Radio>
+	                            </Radio.Group> 
                             </div>
                             {this.props.newsType == 2 || this.props.newsType == 3 ? <div className="modal-box news-box">
                                 <span className="modal-box-title">发布在首页</span>

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

@@ -320,7 +320,7 @@ const AchievementDetail = React.createClass({
                             <Col span={8}>{getInnovation(theData.innovation)}</Col>
                         </Row>
                         <Row>
-                            <Col span={4}>成熟度证明材料(图片)</Col>
+                            <Col span={4}>成熟度证明材料(图片)1</Col>
                             <Col span={20}>
                                 <Upload className="demandDetailShow-upload"
                                     listType="picture-card"

+ 1 - 1
package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.0.39",
+  "version": "1.0.40",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {

+ 1 - 1
package.json

@@ -5,7 +5,7 @@
   "main": "index.js",
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1",
-    "dlldev": "webpack --progress --colors --config ./webpack-dll.config.js --env.deploy dev --env.host 'http://afts.hnzhiming.com'",
+    "dlldev": "webpack --progress --colors --config ./webpack-dll.config.js --env.deploy dev --env.host 'http://127.0.0.1'",
     "dlltest": "webpack --progress --colors --config ./webpack-dll.config.js --env.deploy test --env.host 'http://afts.hnzhiming.com'",
     "dllstage": "webpack --progress --colors --config ./webpack-dll.config.js --env.deploy stage --env.host 'http://aftts.hnzhiming.com'",
     "dllpro": "webpack --progress --colors --config ./webpack-dll.config.js --env.deploy prod --env.host 'http://static.goafanti.com'",

+ 2 - 1
webpack.config.js

@@ -230,7 +230,8 @@ module.exports = (function () {
             }
         }));
     }
-    let staticHost = 'http://afts.hnzhiming.com';
+    //let staticHost = 'http://afts.hnzhiming.com';
+     let staticHost = 'http://127.0.0.1';
     switch (argv.env.deploy) {
         case 'stage':
             staticHost = 'http://aftts.hnzhiming.com';