Commit 51d946629a446c874bdd0fb1ae44fffa7c7c91bb
1 parent
745ac17f
2处:页面跳转、每页数据限制;阿里云此次为前端上传且已此次更新操作已按要求报备丁书杰
Showing
2 changed files
with
22 additions
and
9 deletions
show/src/bundle.js
No preview for this file type
source/src/js/components/searchAlarm.js
... | ... | @@ -25,7 +25,7 @@ class SearchAlarm extends React.Component { |
25 | 25 | checkAll: false, |
26 | 26 | checkedList: [], |
27 | 27 | |
28 | - | |
28 | + couldClick:true, | |
29 | 29 | |
30 | 30 | previewVisible: false, |
31 | 31 | previewImage: '', |
... | ... | @@ -47,7 +47,12 @@ class SearchAlarm extends React.Component { |
47 | 47 | |
48 | 48 | onOk = (value) => { |
49 | 49 | // 开始查询【日期选择】 |
50 | - this.queryImg() | |
50 | + let that = this | |
51 | + this.setState({ | |
52 | + couldClick:false | |
53 | + },function(){ | |
54 | + that.queryImg() | |
55 | + }) | |
51 | 56 | } |
52 | 57 | queryImg = () =>{ |
53 | 58 | let that = this |
... | ... | @@ -58,7 +63,7 @@ class SearchAlarm extends React.Component { |
58 | 63 | 'reqInfo':{ |
59 | 64 | 'dateTimeS':this.state.startTime, |
60 | 65 | 'dateTimeE':this.state.endTime, |
61 | - 'curPage':1, | |
66 | + 'curPage':this.state.currentPage, | |
62 | 67 | 'pageNum':this.state.defaultPageSize |
63 | 68 | } |
64 | 69 | }) |
... | ... | @@ -79,8 +84,12 @@ class SearchAlarm extends React.Component { |
79 | 84 | } |
80 | 85 | getImgData = (resList, currI) =>{ |
81 | 86 | var that = this |
82 | - if(currI == resList.length) | |
87 | + if(currI == resList.length){ | |
88 | + that.setState({ | |
89 | + couldClick:true | |
90 | + }) | |
83 | 91 | return; |
92 | + } | |
84 | 93 | else{ |
85 | 94 | axios.post(global.constants.commonUrl+'/syImgMs/getImgData', |
86 | 95 | { |
... | ... | @@ -161,10 +170,14 @@ class SearchAlarm extends React.Component { |
161 | 170 | // 页码 |
162 | 171 | onPageChange = page => { |
163 | 172 | // 更新新页数据 后端交互 |
164 | - this.setState({ | |
165 | - currentPage: page | |
166 | - }); | |
167 | - this.queryImg() | |
173 | + let that = this | |
174 | + if(that.state.couldClick){ | |
175 | + that.setState({ | |
176 | + currentPage: page | |
177 | + },function(){ | |
178 | + that.queryImg() | |
179 | + }); | |
180 | + } | |
168 | 181 | }; |
169 | 182 | |
170 | 183 | ... | ... |