fix : 페이징 수정

main
이범준 2 years ago
parent c1396fdc85
commit df36bc2d8c

@ -58,7 +58,12 @@ Date Author Description
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -88,7 +88,12 @@ Date Author Description
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -81,7 +81,12 @@ Date Author Description
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);
@ -136,7 +141,12 @@ Date Author Description
$2$Control.onDatasetChange = obj => { $2$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$2$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$2$Control._paginationInfo.totalCount = pagination.totalCount;
$2$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$2$Control._paginationInfo.totalCount = obj.count;
}
$2$Control.totalCountSetting(obj); $2$Control.totalCountSetting(obj);

@ -711,7 +711,13 @@ Date Author Description
$1$Control.onDatasetChange = obj => { $1$Control.onDatasetChange = obj => {
if(obj.data.pagination != null){ if(obj.data.pagination != null){
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$1$Control._paginationInfo.pageNum = pagination.pageNum;
if(obj.data.pagination){
$1$Control._paginationInfo.totalCount = pagination.totalCount;
$1$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$1$Control._paginationInfo.totalCount = obj.count;
}
} }
$1$Control.totalCountSetting(obj); $1$Control.totalCountSetting(obj);
@ -734,7 +740,12 @@ Date Author Description
$2$Control.onDatasetChange = obj => { $2$Control.onDatasetChange = obj => {
if(obj.data.pagination != null) { if(obj.data.pagination != null) {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$2$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$2$Control._paginationInfo.totalCount = pagination.totalCount;
$2$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$2$Control._paginationInfo.totalCount = obj.count;
}
} }
$2$Control.totalCountSetting(obj); $2$Control.totalCountSetting(obj);
@ -756,7 +767,12 @@ Date Author Description
$3$Control.onDatasetChange = obj => { $3$Control.onDatasetChange = obj => {
if(obj.data.pagination != null) { if(obj.data.pagination != null) {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$3$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$3$Control._paginationInfo.totalCount = pagination.totalCount;
$3$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$3$Control._paginationInfo.totalCount = obj.count;
}
} }
$3$Control.totalCountSetting(obj); $3$Control.totalCountSetting(obj);
@ -778,7 +794,12 @@ Date Author Description
$4$Control.onDatasetChange = obj => { $4$Control.onDatasetChange = obj => {
if(obj.data.pagination != null) { if(obj.data.pagination != null) {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$4$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$4$Control._paginationInfo.totalCount = pagination.totalCount;
$4$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$4$Control._paginationInfo.totalCount = obj.count;
}
} }
$4$Control.totalCountSetting(obj); $4$Control.totalCountSetting(obj);
@ -800,7 +821,12 @@ Date Author Description
$5$Control.onDatasetChange = obj => { $5$Control.onDatasetChange = obj => {
if(obj.data.pagination != null) { if(obj.data.pagination != null) {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$5$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$5$Control._paginationInfo.totalCount = pagination.totalCount;
$5$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$5$Control._paginationInfo.totalCount = obj.count;
}
} }
$5$Control.totalCountSetting(obj); $5$Control.totalCountSetting(obj);

@ -287,7 +287,12 @@ Date Author Description
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -76,7 +76,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -72,10 +72,13 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
console.log("리턴");
console.log(obj.data.pagination);
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -87,7 +87,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -74,7 +74,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -71,7 +71,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -221,7 +221,12 @@ Date Author Description
$1$Control.onDatasetChange = obj => { $1$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$1$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$1$Control._paginationInfo.totalCount = pagination.totalCount;
$1$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$1$Control._paginationInfo.totalCount = obj.count;
}
$1$Control.totalCountSetting(obj); $1$Control.totalCountSetting(obj);
@ -246,7 +251,12 @@ Date Author Description
$2$Control.onDatasetChange = obj => { $2$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$2$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$2$Control._paginationInfo.totalCount = pagination.totalCount;
$2$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$2$Control._paginationInfo.totalCount = obj.count;
}
$2$Control.totalCountSetting(obj); $2$Control.totalCountSetting(obj);
@ -271,7 +281,12 @@ Date Author Description
$3$Control.onDatasetChange = obj => { $3$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$3$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$3$Control._paginationInfo.totalCount = pagination.totalCount;
$3$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$3$Control._paginationInfo.totalCount = obj.count;
}
$3$Control.totalCountSetting(obj); $3$Control.totalCountSetting(obj);

@ -214,7 +214,12 @@ Date Author Description
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -74,7 +74,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -93,7 +93,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -68,7 +68,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -70,7 +70,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -72,7 +72,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -69,7 +69,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -71,7 +71,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -76,7 +76,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -70,7 +70,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -80,7 +80,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -72,7 +72,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -75,7 +75,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -74,7 +74,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -71,7 +71,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -71,7 +71,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -85,7 +85,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -79,7 +79,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -78,7 +78,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -62,7 +62,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -76,7 +76,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -72,7 +72,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -75,7 +75,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -80,7 +80,12 @@
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -100,7 +100,12 @@ Date Author Description
$$Control.onDatasetChange = obj => { $$Control.onDatasetChange = obj => {
let pagination = obj.data.pagination; let pagination = obj.data.pagination;
$$Control._paginationInfo.pageNum = pagination.pageNum; if(obj.data.pagination){
$$Control._paginationInfo.totalCount = pagination.totalCount;
$$Control._paginationInfo.pageNum = pagination.pageNum;
} else {
$$Control._paginationInfo.totalCount = obj.count;
}
$$Control.totalCountSetting(obj); $$Control.totalCountSetting(obj);

@ -14,9 +14,9 @@ class PageNavigation {
// 현재 데이타 위치 // 현재 데이타 위치
,gridDataPos: null ,gridDataPos: null
// 현재 page // 현재 page
,page: null ,pageNum: null
// 페이지당 갯수 // 페이지당 갯수
,perPage: null ,fetchSize: null
// 전체 데이타 count // 전체 데이타 count
,totalCount: null ,totalCount: null
// 페이지 이동 구분 // 페이지 이동 구분
@ -31,32 +31,29 @@ class PageNavigation {
*/ */
constructor(GRID, gridDatas, gridDataPos) { constructor(GRID, gridDatas, gridDataPos) {
let pageInfo = { let pageInfo = {
page: 1, pageNum: 1,
perPage: null, fetchSize: null,
totalCount: null totalCount: null
} };
// pageOptions type에 따라 paging 정보 위치가 달라 분기 처리 // pageOptions type에 따라 paging 정보 위치가 달라 분기 처리
if(GRID.store.data.pageOptions.type === 'scroll'){ if(GRID.paginationInfoRef.pagingYn === true){
//const {page, perPage, totalCount} = GRID.store.data.pageOptions; const {pageNum, fetchSize, totalCount} = GRID.paginationInfoRef;
const {page, perPage, totalCount} = GRID.store.data.pageOptions; pageInfo.pageNum = pageNum;
pageInfo.page = page; pageInfo.fetchSize = fetchSize;
pageInfo.perPage = perPage;
pageInfo.totalCount = totalCount; pageInfo.totalCount = totalCount;
}else{ }else{
const {itemsPerPage, totalItems} = GRID.getPagination()._options; pageInfo.fetchSize = GRID.paginationInfoRef.totalCount;
pageInfo.page = GRID.getPagination()._currentPage; pageInfo.totalCount = GRID.paginationInfoRef.totalCount;
pageInfo.perPage = itemsPerPage;
pageInfo.totalCount = totalItems;
} }
this.gridInfo = { this.gridInfo = {
gridDatas gridDatas
,gridDataPos ,gridDataPos
,curRowData: gridDatas[gridDataPos] ,curRowData: gridDatas[gridDataPos]
,curRowPos: (pageInfo.page - 1) * pageInfo.perPage + gridDataPos + 1 ,curRowPos: (pageInfo.pageNum - 1) * pageInfo.fetchSize + gridDataPos + 1
,page: pageInfo.page ,pageNum: pageInfo.pageNum
,perPage: pageInfo.perPage ,fetchSize: pageInfo.fetchSize
,totalCount: pageInfo.totalCount ,totalCount: pageInfo.totalCount
,pageMove: null ,pageMove: null
,next: null ,next: null
@ -74,7 +71,7 @@ class PageNavigation {
resetGrid(res, gridDatas, callback) { resetGrid(res, gridDatas, callback) {
this.grid.resetData(res.data?.contents); this.grid.resetData(res.data?.contents);
if (this.gridInfo.next) this.pageNav = new PageNavigation(this.grid, gridDatas, 0); if (this.gridInfo.next) this.pageNav = new PageNavigation(this.grid, gridDatas, 0);
else this.pageNav = new PageNavigation(this.grid, gridDatas, this.gridInfo.perPage - 1); else this.pageNav = new PageNavigation(this.grid, gridDatas, this.gridInfo.fetchSize - 1);
callback(this.pageNav) callback(this.pageNav)
} }
@ -105,15 +102,15 @@ class PageNavigation {
* @param {function} callback 페이지 이동시 호출할 callback * @param {function} callback 페이지 이동시 호출할 callback
*/ */
onClickNavBtn(evDiv, callback) { onClickNavBtn(evDiv, callback) {
const isTypeScroll = this.grid.store?.data.pageOptions.type === 'scroll'; const isTypeScroll = this.grid.paginationInfoRef?.pagingType === 'scroll';
if (evDiv === 'next') { if (evDiv === 'next') {
if(this.gridInfo.gridDataPos + 1 === this.gridInfo.perPage){ if(this.gridInfo.gridDataPos + 1 === this.gridInfo.fetchSize){
this.gridInfo.pageMove = true; this.gridInfo.pageMove = true;
this.gridInfo.next = true; this.gridInfo.next = true;
this.gridInfo.page++; this.gridInfo.pageNum++;
//isTypeScroll ? GRID.store.data.pageOptions.pageMove(this.gridInfo.page) : if(!isTypeScroll)
if(!isTypeScroll) this.grid.getPagination()?.movePageTo(this.gridInfo.page); this.grid.getPagination()?.movePageTo(this.gridInfo.pageNum);
}else{ }else{
this.gridInfo.curRowPos++; this.gridInfo.curRowPos++;
@ -126,9 +123,9 @@ class PageNavigation {
if(this.gridInfo.gridDataPos === 0){ if(this.gridInfo.gridDataPos === 0){
this.gridInfo.pageMove = true; this.gridInfo.pageMove = true;
this.gridInfo.next = false; this.gridInfo.next = false;
this.gridInfo.page--; this.gridInfo.pageNum--;
//isTypeScroll ? GRID.store.data.pageOptions.pageMove?(this.gridInfo.page) : if(!isTypeScroll)
if(!isTypeScroll) this.grid.getPagination()?.movePageTo(this.gridInfo.page); this.grid.getPagination()?.movePageTo(this.gridInfo.pageNum);
}else { }else {
this.gridInfo.curRowPos--; this.gridInfo.curRowPos--;

Loading…
Cancel
Save