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

增加创建时间筛选

mentoswzq 4 éve%!(EXTRA string=óta)
szülő
commit
0e33db3cfc

+ 27 - 11
js/component/account/achievement/techAchievement.jsx

@@ -28,6 +28,8 @@ const DemandList = React.createClass({
                 endDate: this.state.releaseDate[1],
                 dataCategory:this.state.dataCategorySearch,
                 auditStatus:this.state.auditStatusSearch,
+                cStartDate: this.state.releaseCreateTime[0],
+                cEndDate: this.state.releaseCreateTime[1],
             },
             success: function (data) {
                 let theArr = [];
@@ -71,6 +73,7 @@ const DemandList = React.createClass({
         return {
             uploadFileLoading:false,
             searchMore: true,
+            releaseCreateTime: [],
             validityPeriodDate: [],
             releaseDate: [],
             selectedRowKeys: [],
@@ -275,11 +278,15 @@ const DemandList = React.createClass({
         this.loadData();
     },
     reset() {
-        this.state.nameSearch = '';
-        this.state.releaseDate = [];
-        this.state.dataCategorySearch = undefined;
-        this.state.auditStatusSearch = undefined;
-        this.loadData();
+        this.setState({
+            nameSearch: '',
+            releaseDate: [],
+            dataCategorySearch: undefined,
+            auditStatusSearch: undefined,
+            releaseCreateTime: []
+        },()=>{
+            this.loadData();
+        })
     },
     searchSwitch() {
         this.setState({
@@ -384,12 +391,21 @@ const DemandList = React.createClass({
                         删除<Icon type="minus" />
                     </Button>
                     <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
-                    <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
-                        <span>发布时间 :</span>
-                        <RangePicker
-                            value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
-                            this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
-                            onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
+                    <div style={{display:'flex'}}>
+                        <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
+                            <span>发布时间 :</span>
+                            <RangePicker
+                                value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
+                                    this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
+                                onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
+                        </div>
+                        <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {marginLeft:'10px',marginRight:'10px'}}>
+                            <span>创建时间 :</span>
+                            <RangePicker
+                                value={[this.state.releaseCreateTime[0] ? moment(this.state.releaseCreateTime[0]) : null,
+                                    this.state.releaseCreateTime[1] ? moment(this.state.releaseCreateTime[1]) : null]}
+                                onChange={(data, dataString) => { this.setState({ releaseCreateTime: dataString }); }} />
+                        </div>
                     </div>
                 </div>
                 <div className="patent-table">

+ 9 - 2
js/component/account/demand/techDemand.jsx

@@ -142,7 +142,7 @@ const DemandList = React.createClass({
                     render:(text,recard) => {
                         return  <div className="btnRight">
                                    {recard.auditStatus!='1'&&recard.auditStatus!='2'&&<Button type="primary" style={{ background: "#3fcf9e", border: "none", color: "#fff" }} onClick={(e)=>{e.stopPropagation(),this.submission(recard)}}>提交审核</Button>}
-                                   {recard.auditStatus!='1'&&recard.auditStatus=='2'&&<Button type="success" onClick={(e)=>{ e.stopPropagation(),this.updateFun(recard)}}>刷新发布</Button>}
+                                   {/*{recard.auditStatus!='1'&&recard.auditStatus=='2'&&<Button type="success" onClick={(e)=>{ e.stopPropagation(),this.updateFun(recard)}}>刷新发布</Button>}*/}
                                    {recard.auditStatus!='1'&&recard.auditStatus=='2'&&<Button type="danger" onClick={(e)=>{e.stopPropagation(),this.revokeFun(recard)}}>撤销发布</Button>}
                                 </div>
                     }
@@ -410,7 +410,14 @@ const DemandList = React.createClass({
                         <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
                             <span>审核状态 :</span>
                             <Select  style={{ width: 120,marginTop:'0px' }} value={this.state.searchAuditStatus}
-                                onChange={(e) => { this.setState({ searchAuditStatus: e }) }}>
+                                onChange={(e) => {
+                                    if(e === -1){
+                                        this.setState({ searchAuditStatus: '' })
+                                    }else{
+                                        this.setState({ searchAuditStatus: e })
+                                    }
+                                }}>
+                                    <Select.Option value={-1}>无</Select.Option>
                                     <Select.Option value={0}>草稿</Select.Option>
                                     <Select.Option value={1}>审核中</Select.Option>
                                     <Select.Option value={2}>审核通过</Select.Option>

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.2.7",
+  "version": "1.2.8",
   "description": "",
   "main": "index.js",
   "scripts": {

+ 1 - 1
yarn.lock

@@ -2655,7 +2655,7 @@ file-loader@^0.10.1:
   dependencies:
     loader-utils "^1.0.2"
 
-"file-saver@github:eligrey/FileSaver.js#1.3.8":
+file-saver@eligrey/FileSaver.js#1.3.8:
   version "1.3.8"
   resolved "https://codeload.github.com/eligrey/FileSaver.js/tar.gz/e865e37af9f9947ddcced76b549e27dc45c1cb2e"