feat: 팝업 페이지 이동 모듈화 반영
parent
2621be2937
commit
e6e1321022
@ -1,131 +0,0 @@
|
||||
// 이전/다음 페이지 navigation data
|
||||
var gridInfo = {
|
||||
// 현재 gridData 목록
|
||||
curGridDatas: null
|
||||
// 현재 rowData
|
||||
,curRowData: null
|
||||
// 현재 데이타 위치
|
||||
,curRowPos: null
|
||||
// 현재 데이타 위치
|
||||
,curGridDataPos: null
|
||||
// 현재 page
|
||||
,page: null
|
||||
// 페이지당 갯수
|
||||
,perPage: null
|
||||
// 전체 데이타 count
|
||||
,totalCount: null
|
||||
// 페이지 이동 구분
|
||||
,isNext: null
|
||||
}
|
||||
|
||||
function loadPageNavigation(res, GRID, curData){
|
||||
if(gridInfo !== null && gridInfo?.isNext !== 'undefinded' && gridInfo?.isNext !== null) {
|
||||
GRID.resetData(res.data.contents);
|
||||
|
||||
if(gridInfo.isNext){
|
||||
gridInfo.curRowPos = (gridInfo.page - 1) * gridInfo.perPage + 1;
|
||||
gridInfo.curGridDataPos = 0;
|
||||
} else{
|
||||
gridInfo.curRowPos = gridInfo.page * gridInfo.perPage;
|
||||
gridInfo.curGridDataPos = gridInfo.perPage - 1;
|
||||
}
|
||||
// grid page data position reset
|
||||
gridInfo.isNext = null;
|
||||
gridInfo.curGridDatas = GRID.store.data.rawData;
|
||||
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
|
||||
|
||||
fnBiz.pagePopup('detail', curData);
|
||||
}
|
||||
if(gridInfo?.isNext) gridInfo.isNext = null;
|
||||
}
|
||||
|
||||
//개별총정보 팝업내 다음/이전페이지
|
||||
function onClickCrackdownNavigationBtn(evDiv, GRID, gridInfo, curData) {
|
||||
if (evDiv === 'next') {
|
||||
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
|
||||
gridInfo.isNext = true;
|
||||
gridInfo.page++;
|
||||
GRID.getPagination().movePageTo(gridInfo.page);
|
||||
|
||||
}else{
|
||||
gridInfo.curRowPos++;
|
||||
gridInfo.curGridDataPos++;
|
||||
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
|
||||
//func()
|
||||
fnBiz.pagePopup('detail', curData);
|
||||
}
|
||||
|
||||
} else {
|
||||
if(gridInfo.curGridDataPos === 0){
|
||||
gridInfo.isNext = false;
|
||||
gridInfo.page--;
|
||||
GRID.getPagination().movePageTo(gridInfo.page);
|
||||
|
||||
}else {
|
||||
gridInfo.curRowPos--;
|
||||
gridInfo.curGridDataPos--;
|
||||
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
|
||||
//func()
|
||||
fnBiz.pagePopup('detail', curData);
|
||||
//fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onClickCtznStmtNavigationBtn(evDiv) {
|
||||
if (evDiv === 'next') {
|
||||
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
|
||||
gridInfo.isNext = true;
|
||||
gridInfo.page++;
|
||||
GRID.getPagination().movePageTo(gridInfo.page);
|
||||
|
||||
}else{
|
||||
gridInfo.curRowPos++;
|
||||
gridInfo.curGridDataPos++;
|
||||
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
|
||||
fnBiz.pagePopup('detail', {interfaceSeqN: gridInfo.curRowData.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData.ctznSttemntDetailSn});
|
||||
}
|
||||
|
||||
} else {
|
||||
if(gridInfo.curGridDataPos === 0){
|
||||
gridInfo.isNext = false;
|
||||
gridInfo.page--;
|
||||
GRID.getPagination().movePageTo(gridInfo.page);
|
||||
|
||||
}else {
|
||||
gridInfo.curRowPos--;
|
||||
gridInfo.curGridDataPos--;
|
||||
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
|
||||
fnBiz.pagePopup('detail', {interfaceSeqN: gridInfo.curRowData.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData.ctznSttemntDetailSn});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onClickRegltNavigationBtn(evDiv) {
|
||||
if (evDiv === 'next') {
|
||||
if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){
|
||||
gridInfo.isNext = true;
|
||||
gridInfo.page++;
|
||||
GRID.getPagination().movePageTo(gridInfo.page);
|
||||
|
||||
}else{
|
||||
gridInfo.curRowPos++;
|
||||
gridInfo.curGridDataPos++;
|
||||
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
|
||||
fnBiz.pagePopup('detail', {regltId: gridInfo.curRowData.regltId});
|
||||
}
|
||||
|
||||
} else {
|
||||
if(gridInfo.curGridDataPos === 0){
|
||||
gridInfo.isNext = false;
|
||||
gridInfo.page--;
|
||||
GRID.getPagination().movePageTo(gridInfo.page);
|
||||
|
||||
}else {
|
||||
gridInfo.curRowPos--;
|
||||
gridInfo.curGridDataPos--;
|
||||
gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos];
|
||||
fnBiz.pagePopup('detail', {regltId: gridInfo.curRowData.regltId});
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue