feat: 단속관리 진행
parent
0ad9cbbe52
commit
ee91b5c13a
@ -0,0 +1,131 @@
|
|||||||
|
// 이전/다음 페이지 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});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,211 @@
|
|||||||
|
// 이전/다음 페이지 navigation data
|
||||||
|
|
||||||
|
class PageNavigation {
|
||||||
|
grid = null;
|
||||||
|
|
||||||
|
// 현재 gridData 목록
|
||||||
|
gridInfo = {
|
||||||
|
curGridDatas: null
|
||||||
|
// 현재 rowData
|
||||||
|
, curRowData: null
|
||||||
|
// 현재 데이타 위치
|
||||||
|
, curRowPos: null
|
||||||
|
// 현재 데이타 위치
|
||||||
|
, curGridDataPos: null
|
||||||
|
// 현재 page
|
||||||
|
, page: null
|
||||||
|
// 페이지당 갯수
|
||||||
|
, perPage: null
|
||||||
|
// 전체 데이타 count
|
||||||
|
, totalCount: null
|
||||||
|
// 페이지 이동 구분
|
||||||
|
, isNext: null
|
||||||
|
};
|
||||||
|
curKeyData = null;
|
||||||
|
|
||||||
|
fnGetKeyData = null;
|
||||||
|
|
||||||
|
constructor(GRID, props) {
|
||||||
|
const {page, perPage, totalCount} = GRID.store.data.pageOptions;
|
||||||
|
this.gridInfo = {
|
||||||
|
curGridDatas: GRID.store.data.rawData
|
||||||
|
,curRowData: GRID.store.data.rawData[props.rowKey]
|
||||||
|
,curRowPos: (page - 1) * perPage + GRID.store.data.rawData[props.rowKey].rowKey + 1
|
||||||
|
,curGridDataPos: GRID.store.data.rawData[props.rowKey].rowKey
|
||||||
|
,page
|
||||||
|
,perPage
|
||||||
|
,totalCount
|
||||||
|
,isNext: null
|
||||||
|
}
|
||||||
|
this.grid = GRID;
|
||||||
|
//this.fnGetKeyData = fnGetKeyData;
|
||||||
|
//this.curKeyData = this.fnGetKeyData();
|
||||||
|
};
|
||||||
|
|
||||||
|
loadNavigation(res){
|
||||||
|
if(this.gridInfo !== null && this.gridInfo?.isNext !== 'undefinded' && this.gridInfo?.isNext !== null) {
|
||||||
|
this.grid.resetData(res.data.contents);
|
||||||
|
|
||||||
|
if(this.gridInfo.isNext){
|
||||||
|
this.gridInfo.curRowPos = (this.gridInfo.page - 1) * this.gridInfo.perPage + 1;
|
||||||
|
this.gridInfo.curGridDataPos = 0;
|
||||||
|
} else{
|
||||||
|
this.gridInfo.curRowPos = this.gridInfo.page * this.gridInfo.perPage;
|
||||||
|
this.gridInfo.curGridDataPos = this.gridInfo.perPage - 1;
|
||||||
|
}
|
||||||
|
// grid page data position reset
|
||||||
|
this.gridInfo.isNext = null;
|
||||||
|
this.gridInfo.curGridDatas = this.grid.store.data.rawData;
|
||||||
|
this.gridInfo.curRowData = this.gridInfo.curGridDatas[this.gridInfo.curGridDataPos];
|
||||||
|
|
||||||
|
this.curKeyData = this.fnGetKeyData;
|
||||||
|
//this.curKeyData = this.fnGetKeyData;
|
||||||
|
fnBiz.pagePopup('detail', curKeyData);
|
||||||
|
}
|
||||||
|
if(this.gridInfo?.isNext) this.gridInfo.isNext = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
onClickNavBtn(evDiv, curData) {
|
||||||
|
if (evDiv === 'next') {
|
||||||
|
if(this.gridInfo.curGridDataPos + 1 === this.gridInfo.perPage){
|
||||||
|
this.gridInfo.isNext = true;
|
||||||
|
this.gridInfo.page++;
|
||||||
|
this.grid.getPagination().movePageTo(this.gridInfo.page);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.gridInfo.curRowPos++;
|
||||||
|
this.gridInfo.curGridDataPos++;
|
||||||
|
this.gridInfo.curRowData = this.gridInfo.curGridDatas[this.gridInfo.curGridDataPos];
|
||||||
|
//func()
|
||||||
|
fnBiz.pagePopup('detail', curData);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if(this.gridInfo.curGridDataPos === 0){
|
||||||
|
this.gridInfo.isNext = false;
|
||||||
|
this.gridInfo.page--;
|
||||||
|
this.grid.getPagination().movePageTo(this.gridInfo.page);
|
||||||
|
|
||||||
|
}else {
|
||||||
|
this.gridInfo.curRowPos--;
|
||||||
|
this.gridInfo.curGridDataPos--;
|
||||||
|
this.gridInfo.curRowData = this.gridInfo.curGridDatas[this.gridInfo.curGridDataPos];
|
||||||
|
//func()
|
||||||
|
fnBiz.pagePopup('detail', curData);
|
||||||
|
//fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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