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

修复表格分页问题

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