Commit 23da796c authored by xinglei's avatar xinglei

修改bug

parent 0b8dde39
......@@ -7,8 +7,8 @@ export default function(data, delRequest){
} else {
resolve(data);
}
}else if(data && data.status === 200){
if (data.result || data.result != ""){
} else if (data && data.status === 200){
if (data.result || data.result !== ''){
resolve(data.result);
} else {
resolve(data);
......
......@@ -52,6 +52,9 @@ class AmosGridTable extends Component {
if (nextProps.totals > 0 && Math.ceil(nextProps.totals / pageSize) < current ) {
this.setState({ current: Math.ceil(nextProps.totals / pageSize)})
}
if (nextProps.current === 0 && (nextProps.current !== this.state.current)){
this.onPaginationChange(nextProps.current);
}
}
componentWillUnmount() {
......@@ -188,7 +191,7 @@ class AmosGridTable extends Component {
showSizeChanger: true,
showTotal: this.showTotal
}, pagination);
let _tempPagination = isPageable === false ? false :tepmPage;
let _tempPagination = isPageable === false ? false : tepmPage;
let bordered = true;
// 当为true 或 undefined时则分页
let _pagination = isPageable === false ? false : _tempPagination;
......
......@@ -438,7 +438,7 @@ class MonitorPointConfig extends Component {
}
render() {
let { dataList, totalCount, form, rules, selectedRowKeys, alarmTypeData, show } = this.state;
let { dataList, totalCount, form, rules, selectedRowKeys, alarmTypeData, show, searchParam } = this.state;
const pagination = { pageSizeOptions: ['10'], defaultPageSize: 10 };//分页:10条每页,默认为10
const formItemLayout = {
labelCol: {
......@@ -494,6 +494,7 @@ class MonitorPointConfig extends Component {
// getPanelHeight={this.getPanelHeight}
// defaultPageConlHeight={this.getPanelHeight}
isChecked={isChecked}
current={searchParam.pageNumber}
/>
</div>
);
......
......@@ -128,8 +128,11 @@ class WaterView extends Component {
let fireStation = record;
let path = {
pathname: fireStationPath,
state: { fireStation, key: '6', type: 'waterResource' }
state: { fireStation, key: '5', type: 'waterResource' }
};
if (record.type === '2'){
path.state = { fireStation, key: '6', type: 'waterResource' };
}
browserHistory.push(path);
}
......
......@@ -95,6 +95,8 @@ class Monitor extends Component {
} else {
this.setState({ name: value });
searchParam.name = value;
searchParam.pageNumber = 0;
searchParam.current = 0;
}
this.getFireEquipmentListData(searchParam);
}
......@@ -147,7 +149,8 @@ class Monitor extends Component {
this.pageConfig.pageSize = pageSize;
}
if (current !== undefined) {
this.pageConfig.current = current - 1;
this.pageConfig.current = current;
//this.pageConfig.current = current - 1;
}
};
......@@ -272,7 +275,7 @@ class Monitor extends Component {
}
render() {
let { name, code, dataList, totalCount, selectedRowKeys, enableEditOp } = this.state;
let { name, code, dataList, totalCount, selectedRowKeys, enableEditOp, searchParam } = this.state;
let _true_ = true;
let url = formatUrl(FasSerUrl.importExcelDataUrl, { type: 'fireResource' });
......@@ -346,6 +349,7 @@ class Monitor extends Component {
isChecked={_true_}
selectedRowKeys={selectedRowKeys}
onRowClick={this.onRowClick}
current={searchParam.current}
/>
</div>
);
......
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