From 59c7fdfee9e7bfa7b1968ef0dc1f1fe1fd4968d4 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Thu, 15 Jun 2023 17:48:01 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B4=88=EA=B8=B0=EC=9E=90=EB=A3=8C=20?= =?UTF-8?q?=EB=A9=94=EC=9D=B8=ED=99=94=EB=A9=B4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/jsp/fims/crdn/initData-main.jsp | 38 ++++++++----------- .../js/fims/framework/cmm/xit-tui-grid.js | 10 ++--- 2 files changed, 18 insertions(+), 30 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/initData-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/initData-main.jsp index 0e82b584..fbc5c6cd 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/initData-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/initData-main.jsp @@ -144,8 +144,8 @@
- - + +
@@ -219,7 +219,7 @@ var popupDiv; var callbackSearch = () => searchCrdnList(); -var crdnControl = new FimsDatasetControl({ +var crdnControl = new DatasetControl({ prefix:"crdn", prefixName:"초기자료", infoSize:"xl", @@ -227,36 +227,26 @@ var crdnControl = new FimsDatasetControl({ load : wctx.url("/{biz}/crdn/list.do") }, keymapper:info => info ? info.CRDN_ID : "", - dataGetter:obj => obj.crdnList + dataGetter:obj => obj.crdnList, + appendData:true }); -crdnControl._paginationInfo.pagingType = "scroll"; -crdnControl._paginationInfo.fetchSize = 50; -crdnControl._paginationInfo.scrollFuncName = scrollCrdns; -crdnControl.onDatasetChange = obj => { - - var prefix = obj.prefixInfo; - crdnControl._paginationInfo.totalSize = obj[prefix+"Total"]; +crdnControl.scrollFuncName = scrollCrdns; - if(crdnControl._paginationInfo.pagingType == "nav"){ - crdnControl._paginationInfo.pageNum = (obj[prefix+"Start"]+obj[prefix+"Fetch"])/obj[prefix+"Fetch"]; - } +crdnControl.onDatasetChange = obj => { + var prefix = obj.infoPrefix; renderCrdnList(obj); - if(crdnControl._paginationInfo.paging && crdnControl._paginationInfo.pagingType == "nav"){ - $("#grid1Paging").setPaging({ + $("#crdnPaging").setPagingInfo({ list: crdnControl.dataset, - prefix: "grid1", + prefix: "crdn", start: obj[prefix+"Start"], totalSize: obj[prefix+"Total"], fetchSize: obj[prefix+"Fetch"], func: "crdnControl.load({index})" }); - } - //집계 표시 - crdnControl.totalCountSetting(obj); }; function searchCrdnList(){ @@ -266,11 +256,12 @@ function searchCrdnList(){ } function scrollCrdns(){ - crdnControl.load(crdnControl._paginationInfo.pageNum + 1, "more"); + + crdnControl.load(crdnControl.query.pageNum + 1); } function renderCrdnList(data) { - if(crdnControl._paginationInfo.paging && crdnControl._paginationInfo.pagingType == "nav"){ + if(!crdnControl.appendData){ GRID.clear(); } @@ -293,6 +284,7 @@ const fnBiz = { ,crdnSeCd: CUR_TAB_IDX === 2 ? '09' : $('input:radio[name=crdnSeCd]:checked').val() ,crdnSttsCd: CUR_TAB_IDX === 2 ? 'NON-INIT' : $('#crdnSttsCd').val() ,ctznAnsYn: $('input:radio[name=ctznAnsYn]:checked').val() + ,fetchSize: 20 } } ,pagePopup: function(flag, params){ @@ -661,7 +653,7 @@ const gridOptions = { columnOptions: { frozenCount: 3 }, - paginationInfoRef : crdnControl._paginationInfo + scrollFuncName : crdnControl.scrollFuncName }; const initGrid = () => { diff --git a/src/main/webapp/resources/js/fims/framework/cmm/xit-tui-grid.js b/src/main/webapp/resources/js/fims/framework/cmm/xit-tui-grid.js index 74e654c2..5ac71425 100644 --- a/src/main/webapp/resources/js/fims/framework/cmm/xit-tui-grid.js +++ b/src/main/webapp/resources/js/fims/framework/cmm/xit-tui-grid.js @@ -149,7 +149,7 @@ const TuiGrid = { this.instance = null; // rowNum fix - if(options.paginationInfoRef != null && options.paginationInfoRef.pagingType != null && options.paginationInfoRef.pagingType == 'nav') { + if(options.scrollFuncName != null) { options.rowHeaders.filter((r, idx) => { if (r === 'rowNum') { options.rowHeaders[idx] = { @@ -175,12 +175,8 @@ const TuiGrid = { $(".tui-grid-pagination").attr("hidden","hidden"); - if(options.paginationInfoRef != null){ - this.instance.paginationInfoRef = options.paginationInfoRef; - - if(this.instance.paginationInfoRef.scrollFuncName != null) { - this.instance.on('scrollEnd', this.instance.paginationInfoRef.scrollFuncName); - } + if(options.scrollFuncName != null){ + this.instance.on('scrollEnd', options.scrollFuncName); } return this.instance;