diff --git a/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCctvCrackdownMgtForm.jsp b/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCctvCrackdownMgtForm.jsp index ffc91432..59118afe 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCctvCrackdownMgtForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCctvCrackdownMgtForm.jsp @@ -43,13 +43,15 @@
- +<%----%> + +<%----%> diff --git a/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCtznSttemntMgtForm.jsp b/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCtznSttemntMgtForm.jsp index 046b39b7..af0ffc14 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCtznSttemntMgtForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/biz/ec/ecCtznSttemntMgtForm.jsp @@ -410,24 +410,29 @@ }; GRID = TuiGrid.of(gridOptions, gridDatasource, (res) => { - if(gridInfo !== null && gridInfo?.isNext !== 'undefinded' && gridInfo?.isNext !== null) { - GRID.resetData(res.data.contents); + // 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', {interfaceSeqN: gridInfo.curRowData.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData.ctznSttemntDetailSn}); + // } + // if(gridInfo?.isNext) gridInfo.isNext = null; - 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', {interfaceSeqN: gridInfo.curRowData.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData.ctznSttemntDetailSn}); + if(gridInfo?.curRowData) { + pageNav.loadNavigation(res, {interfaceSeqN: gridInfo.curRowData?.interfaceSeqN, ctznSttemntDetailSn: gridInfo.curRowData?.ctznSttemntDetailSn}) } - if(gridInfo?.isNext) gridInfo.isNext = null; + }); } diff --git a/src/main/webapp/WEB-INF/jsp/fims/biz/rt/rtRegltMgtForm.jsp b/src/main/webapp/WEB-INF/jsp/fims/biz/rt/rtRegltMgtForm.jsp index 38f87f61..05bc9a21 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/biz/rt/rtRegltMgtForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/biz/rt/rtRegltMgtForm.jsp @@ -65,33 +65,14 @@ - + diff --git a/src/main/webapp/resources/biz/common/js/bizCmmUtil.js b/src/main/webapp/resources/biz/common/js/bizCmmUtil.js index 889d9a84..9bd0fd4b 100644 --- a/src/main/webapp/resources/biz/common/js/bizCmmUtil.js +++ b/src/main/webapp/resources/biz/common/js/bizCmmUtil.js @@ -1,4 +1,5 @@ // 이전/다음 페이지 navigation data + var gridInfo = { // 현재 gridData 목록 curGridDatas: null @@ -18,9 +19,29 @@ var gridInfo = { ,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) { +function onClickCrackdownNavigationBtn(evDiv, GRID, gridInfo, curData) { if (evDiv === 'next') { if(gridInfo.curGridDataPos + 1 === gridInfo.perPage){ gridInfo.isNext = true; @@ -31,7 +52,8 @@ function onClickCrackdownNavigationBtn(evDiv) { gridInfo.curRowPos++; gridInfo.curGridDataPos++; gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos]; - fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode}); + //func() + fnBiz.pagePopup('detail', curData); } } else { @@ -44,7 +66,9 @@ function onClickCrackdownNavigationBtn(evDiv) { gridInfo.curRowPos--; gridInfo.curGridDataPos--; gridInfo.curRowData = gridInfo.curGridDatas[gridInfo.curGridDataPos]; - fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode}); + //func() + fnBiz.pagePopup('detail', curData); + //fnBiz.pagePopup('detail', {extrlRegltCntcId: gridInfo.curRowData.extrlRegltCntcId, regltSeCode: gridInfo.curRowData.regltSeCode}); } } } @@ -77,3 +101,32 @@ function onClickCtznStmtNavigationBtn(evDiv) { } } } + +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}); + } + } +} diff --git a/src/main/webapp/resources/biz/common/js/bizCmmUtil2.js b/src/main/webapp/resources/biz/common/js/bizCmmUtil2.js new file mode 100644 index 00000000..21b81963 --- /dev/null +++ b/src/main/webapp/resources/biz/common/js/bizCmmUtil2.js @@ -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}); + } + } +} diff --git a/src/main/webapp/resources/biz/common/js/popupPageNavigation.js b/src/main/webapp/resources/biz/common/js/popupPageNavigation.js new file mode 100644 index 00000000..a0d1433e --- /dev/null +++ b/src/main/webapp/resources/biz/common/js/popupPageNavigation.js @@ -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}); + } + } +}