Commit e7b47b78 authored by xinglei's avatar xinglei

修改bug

parent f6933625
...@@ -52,7 +52,7 @@ class AmosGridTable extends Component { ...@@ -52,7 +52,7 @@ class AmosGridTable extends Component {
if (nextProps.totals > 0 && Math.ceil(nextProps.totals / pageSize) < current ) { if (nextProps.totals > 0 && Math.ceil(nextProps.totals / pageSize) < current ) {
this.setState({ current: Math.ceil(nextProps.totals / pageSize)}) this.setState({ current: Math.ceil(nextProps.totals / pageSize)})
} }
if (nextProps.current === 0 && (nextProps.current !== this.state.current)){ if (nextProps.current === 0 && this.state.current !== 1 && (nextProps.current !== this.state.current)){
this.onPaginationChange(nextProps.current); this.onPaginationChange(nextProps.current);
} }
} }
......
...@@ -173,6 +173,9 @@ class MonitorPointConfig extends Component { ...@@ -173,6 +173,9 @@ class MonitorPointConfig extends Component {
//前端的current 即后端的pageNumber //前端的current 即后端的pageNumber
param.pageNumber = param.current; param.pageNumber = param.current;
} }
if (param.current < 0){
return;
}
Object.assign(searchParam, { ...param }); Object.assign(searchParam, { ...param });
getMonitorPointListAction(searchParam, param.pageNumber, param.pageSize).then(data => { getMonitorPointListAction(searchParam, param.pageNumber, param.pageSize).then(data => {
this.setState({ this.setState({
......
...@@ -130,6 +130,9 @@ class Monitor extends Component { ...@@ -130,6 +130,9 @@ class Monitor extends Component {
} }
Object.assign(searchParam, { ...param }); Object.assign(searchParam, { ...param });
searchParam.equipClassify = 2; searchParam.equipClassify = 2;
if (param.current < 0){
return;
}
getFireEquipmentListAction(searchParam, searchParam.pageNumber, searchParam.pageSize).then(data => { getFireEquipmentListAction(searchParam, searchParam.pageNumber, searchParam.pageSize).then(data => {
this.setState({ this.setState({
dataList: data.content, dataList: data.content,
...@@ -149,8 +152,8 @@ class Monitor extends Component { ...@@ -149,8 +152,8 @@ class Monitor extends Component {
this.pageConfig.pageSize = pageSize; this.pageConfig.pageSize = pageSize;
} }
if (current !== undefined) { if (current !== undefined) {
//this.pageConfig.current = current -1 ;
this.pageConfig.current = current; this.pageConfig.current = current;
//this.pageConfig.current = current - 1;
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment