초기자료 메인화면 수정

main
이범준 1 year ago
parent ef82831738
commit 59c7fdfee9

@ -144,8 +144,8 @@
</div>
<div id="grid"></div>
<div class="d-flex flex-row p-3 justify-content-between">
<label id="grid1PagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
<ul id="grid1Paging" class="pagination pagination-primary"></ul>
<label id="crdnPagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
<ul id="crdnPaging" class="pagination pagination-primary"></ul>
</div>
</div>
</div>
@ -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 = () => {

@ -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;

Loading…
Cancel
Save