Commit 51d946629a446c874bdd0fb1ae44fffa7c7c91bb

Authored by Yang Xiaoxiao
1 parent 745ac17f

2处:页面跳转、每页数据限制;阿里云此次为前端上传且已此次更新操作已按要求报备丁书杰

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,7 +25,7 @@ class SearchAlarm extends React.Component {
25 checkAll: false, 25 checkAll: false,
26 checkedList: [], 26 checkedList: [],
27 27
28 - 28 + couldClick:true,
29 29
30 previewVisible: false, 30 previewVisible: false,
31 previewImage: '', 31 previewImage: '',
@@ -47,7 +47,12 @@ class SearchAlarm extends React.Component { @@ -47,7 +47,12 @@ class SearchAlarm extends React.Component {
47 47
48 onOk = (value) => { 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 queryImg = () =>{ 57 queryImg = () =>{
53 let that = this 58 let that = this
@@ -58,7 +63,7 @@ class SearchAlarm extends React.Component { @@ -58,7 +63,7 @@ class SearchAlarm extends React.Component {
58 'reqInfo':{ 63 'reqInfo':{
59 'dateTimeS':this.state.startTime, 64 'dateTimeS':this.state.startTime,
60 'dateTimeE':this.state.endTime, 65 'dateTimeE':this.state.endTime,
61 - 'curPage':1, 66 + 'curPage':this.state.currentPage,
62 'pageNum':this.state.defaultPageSize 67 'pageNum':this.state.defaultPageSize
63 } 68 }
64 }) 69 })
@@ -79,8 +84,12 @@ class SearchAlarm extends React.Component { @@ -79,8 +84,12 @@ class SearchAlarm extends React.Component {
79 } 84 }
80 getImgData = (resList, currI) =>{ 85 getImgData = (resList, currI) =>{
81 var that = this 86 var that = this
82 - if(currI == resList.length) 87 + if(currI == resList.length){
  88 + that.setState({
  89 + couldClick:true
  90 + })
83 return; 91 return;
  92 + }
84 else{ 93 else{
85 axios.post(global.constants.commonUrl+'/syImgMs/getImgData', 94 axios.post(global.constants.commonUrl+'/syImgMs/getImgData',
86 { 95 {
@@ -161,10 +170,14 @@ class SearchAlarm extends React.Component { @@ -161,10 +170,14 @@ class SearchAlarm extends React.Component {
161 // 页码 170 // 页码
162 onPageChange = page => { 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