提交 c66cb44a 编写于 作者: Mosher's avatar Mosher

修复表格分页问题

上级 72bcca6d
......@@ -634,8 +634,10 @@ import { FormItemModel } from '@/model/form-detail';
const arg: any = {...opt};
const page: any = {};
if (this.isEnablePagingBar) {
if(!pageReset) {
Object.assign(page, { page: this.curPage-1, size: this.limit });
}
}
// 设置排序
if (!this.isNoSort && !Object.is(this.minorSortDir, '') && !Object.is(this.minorSortPSDEF, '')) {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
......@@ -657,7 +659,7 @@ import { FormItemModel } from '@/model/form-detail';
return;
}
const data: any = response.data;
this.totalrow = response.data.length;
this.totalrow = pageReset ? response.data.length : this.totalrow;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
this.selections = [];
......@@ -1142,7 +1144,7 @@ import { FormItemModel } from '@/model/form-detail';
return;
}
if (Object.is('load', action)) {
this.load(data);
this.load(data, true);
}
if (Object.is('remove', action)) {
this.remove(data);
......@@ -1342,7 +1344,7 @@ import { FormItemModel } from '@/model/form-detail';
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public pageRefresh(): void {
this.load({});
this.load({}, true);
}
/**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册