소스코드 정리

main
이범준 1 year ago
parent 90530ef3a4
commit 228052dc86

@ -152,12 +152,14 @@
**************************************************************************/ **************************************************************************/
var FIM002 = new CommonCodes(${FIM002}); var FIM002 = new CommonCodes(${FIM002});
var FIM026 = new CommonCodes(${FIM026}); var FIM026 = new CommonCodes(${FIM026});
pageObject["${pageName}"] = {};
$(document).ready(function(){
pageObject['${pageName}'] = {}; var thisPO = pageObject["${pageName}"];
pageObject['${pageName}'].crdnControl = new DatasetControl({ thisPO.crdnControl = new DatasetControl({
prefix:"crdn", prefix:"crdn",
prefixName:"종합", prefixName:"종합",
infoSize:"xl", infoSize:"xl",
@ -182,13 +184,13 @@ pageObject['${pageName}'].crdnControl = new DatasetControl({
appendData:true appendData:true
}); });
pageObject['${pageName}'].crdnControl.onDatasetChange = obj => { thisPO.crdnControl.onDatasetChange = obj => {
var prefix = obj.infoPrefix; var prefix = obj.infoPrefix;
pageObject['${pageName}'].renderCrdnList(obj); thisPO.renderCrdnList(obj);
$("#crdnPaging--${pageName}").setPagingInfo({ $("#crdnPaging--${pageName}").setPagingInfo({
list: pageObject['${pageName}'].crdnControl.dataset, list: thisPO.crdnControl.dataset,
prefix: "crdn", prefix: "crdn",
start: obj[prefix+"Start"], start: obj[prefix+"Start"],
totalSize: obj[prefix+"Total"], totalSize: obj[prefix+"Total"],
@ -199,38 +201,38 @@ pageObject['${pageName}'].crdnControl.onDatasetChange = obj => {
}; };
pageObject['${pageName}'].fnResetAndChangeBiz = sysSeCd => { thisPO.fnResetAndChangeBiz = sysSeCd => {
$("#crdnTbody--${pageName}").html(""); $("#crdnTbody--${pageName}").html("");
pageObject['${pageName}'].crdnControl.urls.load = wctx.url("/crdn/crdn06/010/"+ sysSeCd +"/list.do"); thisPO.crdnControl.urls.load = wctx.url("/crdn/crdn06/010/"+ sysSeCd +"/list.do");
pageObject['${pageName}'].crdnControl.urls.getInfo = wctx.url("/sprt/sprt01/020/"+ sysSeCd +"/info.do"); thisPO.crdnControl.urls.getInfo = wctx.url("/sprt/sprt01/020/"+ sysSeCd +"/info.do");
} }
pageObject['${pageName}'].searchCrdnList = () => { thisPO.searchCrdnList = () => {
pageObject['${pageName}'].crdnControl.query = pageObject['${pageName}'].getParams(); thisPO.crdnControl.query = thisPO.getParams();
$("#crdnTbody--${pageName}").html(""); $("#crdnTbody--${pageName}").html("");
pageObject['${pageName}'].crdnControl.load(1); thisPO.crdnControl.load(1);
} }
pageObject['${pageName}'].scrollCrdnList = () => { thisPO.scrollCrdnList = () => {
pageObject['${pageName}'].crdnControl.load(pageObject['${pageName}'].crdnControl.query.pageNum + 1); thisPO.crdnControl.load(thisPO.crdnControl.query.pageNum + 1);
} }
pageObject['${pageName}'].renderCrdnList = data => { thisPO.renderCrdnList = data => {
if(!pageObject['${pageName}'].crdnControl.appendData){ if(!thisPO.crdnControl.appendData){
$("#crdnTbody--${pageName}").html(""); $("#crdnTbody--${pageName}").html("");
} }
var crdnList = pageObject['${pageName}'].crdnControl.dataset; var crdnList = thisPO.crdnControl.dataset;
var empty = crdnList.empty; var empty = crdnList.empty;
var trs = empty ? [ pageObject['${pageName}'].tbodyTemplate.notFound ] : crdnList.inStrings(pageObject['${pageName}'].tbodyTemplate.found); var trs = empty ? [ thisPO.tbodyTemplate.notFound ] : crdnList.inStrings(thisPO.tbodyTemplate.found);
$("#crdnTbody--${pageName}").html(trs.join()); $("#crdnTbody--${pageName}").html(trs.join());
} }
pageObject['${pageName}'].getParams = () => { thisPO.getParams = () => {
var form = $("#frmSearch--${pageName}"); var form = $("#frmSearch--${pageName}");
return { return {
@ -251,7 +253,7 @@ pageObject['${pageName}'].getParams = () => {
/* ******************************* /* *******************************
* Grid * Grid
******************************* */ ******************************* */
pageObject['${pageName}'].gridColumns = [ thisPO.gridColumns = [
{ header: '차량번호', name: 'VHRNO', width: 80, align: 'center' }, { header: '차량번호', name: 'VHRNO', width: 80, align: 'center' },
{ header: '단속구분(신고방법)', name: 'CRDN_SE_CD', width: 100, align: 'center' }, { header: '단속구분(신고방법)', name: 'CRDN_SE_CD', width: 100, align: 'center' },
{ header: '위반일시', name: 'CRDN_YMD_TM', width: 120, align: 'center' }, { header: '위반일시', name: 'CRDN_YMD_TM', width: 120, align: 'center' },
@ -277,7 +279,7 @@ pageObject['${pageName}'].gridColumns = [
{ header: '서손사유코드', name: 'LEVY_EXCL_RSN_CD', hidden: true }, { header: '서손사유코드', name: 'LEVY_EXCL_RSN_CD', hidden: true },
{ header: 'interfaceSeqN', name: 'INTERFACE_SEQN', hidden: true } { header: 'interfaceSeqN', name: 'INTERFACE_SEQN', hidden: true }
]; ];
pageObject['${pageName}'].gridOptions = { thisPO.gridOptions = {
theadTr: 'crdnTheadTr--${pageName}', theadTr: 'crdnTheadTr--${pageName}',
rowHeader: 'No.', rowHeader: 'No.',
trDataKey: 'CRDN_ID', trDataKey: 'CRDN_ID',
@ -285,15 +287,10 @@ pageObject['${pageName}'].gridOptions = {
prefixName : "단속", prefixName : "단속",
clickEvent : "pageObject['${pageName}'].crdnControl.setCurrent('{CRDN_ID}')", clickEvent : "pageObject['${pageName}'].crdnControl.setCurrent('{CRDN_ID}')",
dblClickEvent : "pageObject['${pageName}'].crdnControl.getInfo({})", dblClickEvent : "pageObject['${pageName}'].crdnControl.getInfo({})",
columns: pageObject['${pageName}'].gridColumns columns: thisPO.gridColumns
}; };
pageObject['${pageName}'].tbodyTemplate = {}; thisPO.tbodyTemplate = {};
$(document).ready(function(){
var thisPO = pageObject['${pageName}'];
//페이지로딩 후 초기화 //페이지로딩 후 초기화
thisPO.tbodyTemplate = initGrid(thisPO.gridOptions); thisPO.tbodyTemplate = initGrid(thisPO.gridOptions);

@ -152,12 +152,14 @@
**************************************************************************/ **************************************************************************/
var FIM002 = new CommonCodes(${FIM002}); var FIM002 = new CommonCodes(${FIM002});
var FIM026 = new CommonCodes(${FIM026}); var FIM026 = new CommonCodes(${FIM026});
pageObject["${pageName}"] = {};
$(document).ready(function(){
pageObject['${pageName}'] = {}; var thisPO = pageObject["${pageName}"];
pageObject['${pageName}'].crdnControl = new DatasetControl({ thisPO.crdnControl = new DatasetControl({
prefix:"crdn", prefix:"crdn",
prefixName:"종합", prefixName:"종합",
infoSize:"xl", infoSize:"xl",
@ -182,13 +184,13 @@ pageObject['${pageName}'].crdnControl = new DatasetControl({
appendData:true appendData:true
}); });
pageObject['${pageName}'].crdnControl.onDatasetChange = obj => { thisPO.crdnControl.onDatasetChange = obj => {
var prefix = obj.infoPrefix; var prefix = obj.infoPrefix;
pageObject['${pageName}'].renderCrdnList(obj); thisPO.renderCrdnList(obj);
$("#crdnPaging--${pageName}").setPagingInfo({ $("#crdnPaging--${pageName}").setPagingInfo({
list: pageObject['${pageName}'].crdnControl.dataset, list: thisPO.crdnControl.dataset,
prefix: "crdn", prefix: "crdn",
start: obj[prefix+"Start"], start: obj[prefix+"Start"],
totalSize: obj[prefix+"Total"], totalSize: obj[prefix+"Total"],
@ -199,38 +201,38 @@ pageObject['${pageName}'].crdnControl.onDatasetChange = obj => {
}; };
pageObject['${pageName}'].fnResetAndChangeBiz = sysSeCd => { thisPO.fnResetAndChangeBiz = sysSeCd => {
$("#crdnTbody--${pageName}").html(""); $("#crdnTbody--${pageName}").html("");
pageObject['${pageName}'].crdnControl.urls.load = wctx.url("/crdn/crdn06/010/"+ sysSeCd +"/list.do"); thisPO.crdnControl.urls.load = wctx.url("/crdn/crdn06/010/"+ sysSeCd +"/list.do");
pageObject['${pageName}'].crdnControl.urls.getInfo = wctx.url("/sprt/sprt01/020/"+ sysSeCd +"/info.do"); thisPO.crdnControl.urls.getInfo = wctx.url("/sprt/sprt01/020/"+ sysSeCd +"/info.do");
} }
pageObject['${pageName}'].searchCrdnList = () => { thisPO.searchCrdnList = () => {
pageObject['${pageName}'].crdnControl.query = pageObject['${pageName}'].getParams(); thisPO.crdnControl.query = thisPO.getParams();
$("#crdnTbody--${pageName}").html(""); $("#crdnTbody--${pageName}").html("");
pageObject['${pageName}'].crdnControl.load(1); thisPO.crdnControl.load(1);
} }
pageObject['${pageName}'].scrollCrdnList = () => { thisPO.scrollCrdnList = () => {
pageObject['${pageName}'].crdnControl.load(pageObject['${pageName}'].crdnControl.query.pageNum + 1); thisPO.crdnControl.load(thisPO.crdnControl.query.pageNum + 1);
} }
pageObject['${pageName}'].renderCrdnList = data => { thisPO.renderCrdnList = data => {
if(!pageObject['${pageName}'].crdnControl.appendData){ if(!thisPO.crdnControl.appendData){
$("#crdnTbody--${pageName}").html(""); $("#crdnTbody--${pageName}").html("");
} }
var crdnList = pageObject['${pageName}'].crdnControl.dataset; var crdnList = thisPO.crdnControl.dataset;
var empty = crdnList.empty; var empty = crdnList.empty;
var trs = empty ? [ pageObject['${pageName}'].tbodyTemplate.notFound ] : crdnList.inStrings(pageObject['${pageName}'].tbodyTemplate.found); var trs = empty ? [ thisPO.tbodyTemplate.notFound ] : crdnList.inStrings(thisPO.tbodyTemplate.found);
$("#crdnTbody--${pageName}").html(trs.join()); $("#crdnTbody--${pageName}").html(trs.join());
} }
pageObject['${pageName}'].getParams = () => { thisPO.getParams = () => {
var form = $("#frmSearch--${pageName}"); var form = $("#frmSearch--${pageName}");
return { return {
@ -251,7 +253,7 @@ pageObject['${pageName}'].getParams = () => {
/* ******************************* /* *******************************
* Grid * Grid
******************************* */ ******************************* */
pageObject['${pageName}'].gridColumns = [ thisPO.gridColumns = [
{ header: '차량번호', name: 'VHRNO', width: 80, align: 'center' }, { header: '차량번호', name: 'VHRNO', width: 80, align: 'center' },
{ header: '단속구분(신고방법)', name: 'CRDN_SE_CD', width: 100, align: 'center' }, { header: '단속구분(신고방법)', name: 'CRDN_SE_CD', width: 100, align: 'center' },
{ header: '위반일시', name: 'CRDN_YMD_TM', width: 120, align: 'center' }, { header: '위반일시', name: 'CRDN_YMD_TM', width: 120, align: 'center' },
@ -277,7 +279,7 @@ pageObject['${pageName}'].gridColumns = [
{ header: '서손사유코드', name: 'LEVY_EXCL_RSN_CD', hidden: true }, { header: '서손사유코드', name: 'LEVY_EXCL_RSN_CD', hidden: true },
{ header: 'interfaceSeqN', name: 'INTERFACE_SEQN', hidden: true } { header: 'interfaceSeqN', name: 'INTERFACE_SEQN', hidden: true }
]; ];
pageObject['${pageName}'].gridOptions = { thisPO.gridOptions = {
theadTr: 'crdnTheadTr--${pageName}', theadTr: 'crdnTheadTr--${pageName}',
rowHeader: 'No.', rowHeader: 'No.',
trDataKey: 'CRDN_ID', trDataKey: 'CRDN_ID',
@ -285,15 +287,10 @@ pageObject['${pageName}'].gridOptions = {
prefixName : "단속", prefixName : "단속",
clickEvent : "pageObject['${pageName}'].crdnControl.setCurrent('{CRDN_ID}')", clickEvent : "pageObject['${pageName}'].crdnControl.setCurrent('{CRDN_ID}')",
dblClickEvent : "pageObject['${pageName}'].crdnControl.getInfo({})", dblClickEvent : "pageObject['${pageName}'].crdnControl.getInfo({})",
columns: pageObject['${pageName}'].gridColumns columns: thisPO.gridColumns
}; };
pageObject['${pageName}'].tbodyTemplate = {}; thisPO.tbodyTemplate = {};
$(document).ready(function(){
var thisPO = pageObject['${pageName}'];
//페이지로딩 후 초기화 //페이지로딩 후 초기화
thisPO.tbodyTemplate = initGrid(thisPO.gridOptions); thisPO.tbodyTemplate = initGrid(thisPO.gridOptions);

@ -1,2 +1,3 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> <%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
개별총정보 상세화면
Loading…
Cancel
Save