Browse Source

增加列表中显示是否是精品

ws2z3gr2017 7 years ago
parent
commit
de0f197491

+ 12 - 0
js/component/dataDic.js

@@ -40,6 +40,7 @@ module.exports = {
             key: "发明专利"
         }
     ],
+    
     patentFieldList:[
        {
             value: "0",
@@ -801,4 +802,15 @@ module.exports = {
             key: "线下现场"
         }
     ],
+    //是否精品
+    boutique:[
+        {
+            value: "0",
+            key: "否"
+        }, {
+            value: "1",
+            key: "是"
+        }
+    ],
+    
 };

+ 13 - 4
js/component/manageCenter/achievement/techAchievement.jsx

@@ -6,7 +6,7 @@ import moment from 'moment';
 import './techAchievement.less';
 import TechAchievementDesc from './techAchievementDesc.jsx';
 import { achievementCategoryList, techAuditStatusList } from '../../dataDic.js';
-import { beforeUploadFile, companySearch, getAchievementCategory, getSearchUrl, getTechAuditStatus } from '../../tools.js';
+import { beforeUploadFile, companySearch, getAchievementCategory, getSearchUrl, getTechAuditStatus ,getboutique} from '../../tools.js';
 import BatchImport from './batchImport';
 
 const AchievementList = React.createClass({
@@ -33,7 +33,8 @@ const AchievementList = React.createClass({
                 releaseDateStartDate: this.state.releaseDate[0],
                 releaseDateEndDate: this.state.releaseDate[1],
                 releaseStatus: this.state.releaseStatus ? Number(this.state.releaseStatus) : undefined, //是否发布(0--未发布,1--已发布)
-                auditStatus: this.state.auditStatus
+                auditStatus: this.state.auditStatus,
+                boutique:this.state.boutique
             },
             success: function (data) {
                 let theArr = [];
@@ -59,7 +60,8 @@ const AchievementList = React.createClass({
                             status: thisdata.status,
                             releaseDate: thisdata.releaseDate,
                             releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
-                            auditStatus: thisdata.auditStatus
+                            auditStatus: thisdata.auditStatus,
+                            boutique: thisdata.boutique
                         });
                     };
                     this.state.pagination.current = data.data.pageNo;
@@ -124,7 +126,14 @@ const AchievementList = React.createClass({
                     dataIndex: 'auditStatus',
                     key: 'auditStatus',
                     render: text => { return getTechAuditStatus(text) }
-                }, {
+                }, 
+                {
+                    title: '是否精品',
+                    dataIndex: 'boutique',
+                    key: 'boutique',
+                    render: text => { return getboutique(text) }
+                },
+                {
                     title: '发布时间',
                     dataIndex: 'releaseDateFormattedDate',
                     key: 'releaseDateFormattedDate',

+ 12 - 3
js/component/manageCenter/demand/techDemand.jsx

@@ -6,7 +6,7 @@ import moment from 'moment';
 import './techDemand.less';
 import TechDemandDesc from './techDemandDesc.jsx';
 import { demandTypeList } from '../../dataDic.js';
-import { companySearch, getDemandType, getSearchUrl, beforeUploadFile } from '../../tools.js';
+import { companySearch, getDemandType, getSearchUrl, beforeUploadFile ,getboutique} from '../../tools.js';
 import BatchImport from './batchImport';
 
 const DemandList = React.createClass({
@@ -36,6 +36,7 @@ const DemandList = React.createClass({
                 releaseDateStartDate: this.state.releaseDate[0],
                 releaseDateEndDate: this.state.releaseDate[1],
                 auditStatus: this.state.auditStatus,
+                boutique:this.state.boutique,
                 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,
@@ -70,7 +71,8 @@ const DemandList = React.createClass({
                             principalId: thisdata.principalId,
                             validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
                             releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
-                            auditStatus: thisdata.auditStatus
+                            auditStatus: thisdata.auditStatus,
+                            boutique: thisdata.boutique
                         });
                     };
                     this.state.pagination.current = data.data.pageNo;
@@ -117,7 +119,14 @@ const DemandList = React.createClass({
                     title: '需求名称',
                     dataIndex: 'name',
                     key: 'name',
-                }, {
+                }, 
+              	{
+                    title: '是否精品',
+                    dataIndex: 'boutique',
+                    key: 'boutique',
+                    render: text => { return getboutique(text) }
+                },
+                {
                     title: '关键字',
                     dataIndex: 'keyword',
                     key: 'keyword',

+ 14 - 1
js/component/tools.js

@@ -28,7 +28,8 @@ import {
     innovationList,
     orderStatusList,
     activityForm,
-    activityType
+    activityType,
+    boutique
 } from './dataDic.js';
 module.exports = {
     splitUrl: function (string, i, url) {
@@ -624,4 +625,16 @@ module.exports = {
             return theType;
         }
     },
+    //是否精品
+     getboutique: function (e) {
+         if (e) {
+            let theType = '';
+            boutique.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
 }