|
|
|
@ -132,15 +132,17 @@ export class ListService<QueryParamsType = ABP.PageQueryParams | any> implements |
|
|
|
} |
|
|
|
|
|
|
|
private resetPageWhenUnchanged() { |
|
|
|
const maxPage = Number(Number(this._totalCount / this._maxResultCount).toFixed()) // 2
|
|
|
|
const skipCount = this._page * this._maxResultCount; // 20
|
|
|
|
if(skipCount === this._totalCount){ |
|
|
|
if(this.page === maxPage && this.page > 0){ |
|
|
|
this._skipCount = skipCount - this._maxResultCount |
|
|
|
this.page = this.page - 1; |
|
|
|
} |
|
|
|
}else{ |
|
|
|
const maxPage = Number(Number(this.totalCount / this._maxResultCount).toFixed()); |
|
|
|
const skipCount = this._page * this._maxResultCount; |
|
|
|
|
|
|
|
if (skipCount !== this._totalCount) { |
|
|
|
this._skipCount = skipCount; |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (this.page === maxPage && this.page > 0) { |
|
|
|
this._skipCount = skipCount - this._maxResultCount; |
|
|
|
this.page = this.page - 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|