|
|
@ -54,16 +54,64 @@
|
|
|
|
* Global Variable
|
|
|
|
* Global Variable
|
|
|
|
**************************************************************************/
|
|
|
|
**************************************************************************/
|
|
|
|
let GRID = null;
|
|
|
|
let GRID = null;
|
|
|
|
var callbackSearch = () => search$$s();
|
|
|
|
|
|
|
|
var pageNav = null;
|
|
|
|
var pageNav = null;
|
|
|
|
|
|
|
|
|
|
|
|
/* *******************************
|
|
|
|
var callbackSearch = () => search$$s();
|
|
|
|
* Biz function
|
|
|
|
|
|
|
|
******************************* */
|
|
|
|
let $$Control = new FimsDatasetControl({
|
|
|
|
|
|
|
|
prefix:"aaa",
|
|
|
|
|
|
|
|
prefixName:"ㅁㅁㅁ",
|
|
|
|
|
|
|
|
infoSize:"xl",
|
|
|
|
|
|
|
|
urls : {
|
|
|
|
|
|
|
|
load : fimsApiUrl.FIND_CCTV_EC_EXTRL_REGLT_CNTCS
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
keymapper:info => info ? info.SOME_KEY : "",
|
|
|
|
|
|
|
|
dataGetter:obj => obj.data.contents
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$$Control.onDatasetChange = obj => {
|
|
|
|
|
|
|
|
let pagination = obj.data.pagination;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$$Control._paginationInfo.pageNum = pagination.page;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$$Control.totalCountSetting(obj);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render$$List(obj.data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($$Control._paginationInfo.pagingType != "scroll"){
|
|
|
|
|
|
|
|
let start = 0;
|
|
|
|
|
|
|
|
if(pagination.page > 1 && pagination.totalPage > 1 && pagination.totalCount > $$Control._paginationInfo.fetchSize){
|
|
|
|
|
|
|
|
start = $$Control._paginationInfo.fetchSize * (pagination.page - 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$("#grid1Paging").setPaging({
|
|
|
|
|
|
|
|
list: $$Control.dataset,
|
|
|
|
|
|
|
|
prefix: "grid1",
|
|
|
|
|
|
|
|
start: start,
|
|
|
|
|
|
|
|
totalSize: pagination.totalCount,
|
|
|
|
|
|
|
|
fetchSize: $$Control._paginationInfo.fetchSize,
|
|
|
|
|
|
|
|
func: "$$$Control.load({index})",
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
function search$$s(){
|
|
|
|
function search$$s(){
|
|
|
|
GRID.reloadData();
|
|
|
|
let formFiels = new FimsFormFields("#frmSearch");
|
|
|
|
|
|
|
|
$$Control.query = formFiels.get();
|
|
|
|
|
|
|
|
GRID.clear();
|
|
|
|
|
|
|
|
$$Control.load(1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function render$$List(data) {
|
|
|
|
|
|
|
|
if($$Control._paginationInfo.pagingType != "scroll"){
|
|
|
|
|
|
|
|
GRID.clear();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
GRID.appendRows(data.contents);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* *******************************
|
|
|
|
|
|
|
|
* Biz function
|
|
|
|
|
|
|
|
******************************* */
|
|
|
|
const fnBiz = {
|
|
|
|
const fnBiz = {
|
|
|
|
pagePopup: function(flag, params){
|
|
|
|
pagePopup: function(flag, params){
|
|
|
|
let url;
|
|
|
|
let url;
|
|
|
@ -126,8 +174,6 @@
|
|
|
|
sortable: false,
|
|
|
|
sortable: false,
|
|
|
|
align: 'center',
|
|
|
|
align: 'center',
|
|
|
|
formatter: 'listItemText',
|
|
|
|
formatter: 'listItemText',
|
|
|
|
//TODO: 편집불가인 경우 disabled: true???
|
|
|
|
|
|
|
|
//editable: false,
|
|
|
|
|
|
|
|
disabled: true,
|
|
|
|
disabled: true,
|
|
|
|
editor: {
|
|
|
|
editor: {
|
|
|
|
type: "select",
|
|
|
|
type: "select",
|
|
|
@ -194,19 +240,14 @@
|
|
|
|
columnOptions: {
|
|
|
|
columnOptions: {
|
|
|
|
frozenCount: 3
|
|
|
|
frozenCount: 3
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
,paginationInfoRef : $$Control._paginationInfo
|
|
|
|
|
|
|
|
,pageOptions: {
|
|
|
|
const gridDatasource = {
|
|
|
|
type : $$Control._paginationInfo.pagingType,
|
|
|
|
initialRequest: true, // 화면 load시 조회 안함 - default
|
|
|
|
perPage: $$Control._paginationInfo.fetchSize
|
|
|
|
api: {
|
|
|
|
|
|
|
|
readData: {
|
|
|
|
|
|
|
|
url: fimsApiUrl.FIND_CCTV_EC_EXTRL_REGLT_CNTCS
|
|
|
|
|
|
|
|
,serializer: (params) => fnAddPageInfo(document.frmSearch, params)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
GRID = TuiGrid.of(gridOptions, gridDatasource);
|
|
|
|
GRID = TuiGrid.of(gridOptions, null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|