DatasetControl 인스턴스 생성방법 수정

main
이범준 3 months ago
parent 7e7ffea547
commit 4b90fb5f0d

@ -104,6 +104,7 @@
<script>
LoadScript("mngt01010Script",wctx.url("/resources/js/fims/mngt/mngt01010.js?ver=${ver}"));
/**************************************************************************
* Global Variable
@ -124,18 +125,7 @@ $(document).ready(function(){
/**************************************************************************
* DatasetControl, DatasetSupport, FormFields
**************************************************************************/
var ctrl = $P.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.NTC_ID : "",
urls : {
load : wctx.url("/mngt/mngt01/010/list.do"),
getInfo : wctx.url("/mngt/mngt01/020/info.do")
},
formats: {
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat
}
});
var ctrl = newMngt01010Control($P);
ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };
ctrl.beforeCurrent = null;

@ -62,6 +62,8 @@
</div>
<script>
LoadScript("mngt01020Script",wctx.url("/resources/js/fims/mngt/mngt01020.js?ver=${ver}"));
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
pageObject["${pageName}"].provided = {};
@ -85,22 +87,8 @@ $(document).ready(function(){
**************************************************************************/
$P.formFields = new FimsFormFields($P.selectorn("frmEdit"));
var ctrl = $P.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData : true,
keymapper : info => info ? info.NTC_ID : "",
urls : {
create : wctx.url("/mngt/mngt01/020/create.do"),
update : wctx.url("/mngt/mngt01/020/update.do"),
remove : wctx.url("/mngt/mngt01/020/remove.do")
},
formats: {
}
});
var ctrl = newMngt01020Control($P);
/**************************************************************************
* Dataset.on
**************************************************************************/
ctrl.dataset.onCurrentChange = (dataItem) => {
if(!dataItem){
return;

@ -16,6 +16,7 @@
<script>
LoadScript("fullCalendarScript","/webjars/3rd-party/sneat/libs/fullcalendar/fullcalendar.js");
LoadScript("mngt02010Script",wctx.url("/resources/js/fims/mngt/mngt02010.js?ver=${ver}"));
pageObject["${pageName}"] = newDoctxFinder("${pageName}");

@ -57,6 +57,8 @@
</div>
</div>
<script>
LoadScript("mngt02020Script",wctx.url("/resources/js/fims/mngt/mngt02020.js?ver=${ver}"));
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
pageObject["${pageName}"].provided = {};
@ -80,18 +82,7 @@ $(document).ready(function(){
**************************************************************************/
$P.formFields = new FimsFormFields($P.selectorn("frmEdit"));
var ctrl = $P.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData : false,
keymapper : info => info ? info.SCHDL_ID : "",
urls : {
create : wctx.url("/mngt/mngt02/020/create.do"),
update : wctx.url("/mngt/mngt02/020/update.do"),
remove : wctx.url("/mngt/mngt02/020/remove.do")
},
formats: {
}
});
var ctrl = newMngt02020Control($P);
ctrl.dataset.onCurrentChange = (dataItem) => {
if(!dataItem){

@ -231,6 +231,7 @@
</div>
<script>
LoadScript("ogdp01010Script",wctx.url("/resources/js/fims/ogdp/ogdp01010.js?ver=${ver}"));
pageObject["${pageName}"] = newDoctxFinder("${pageName}");

@ -136,6 +136,7 @@
<script>
LoadScript("ogdp02010Script",wctx.url("/resources/js/fims/ogdp/ogdp02010.js?ver=${ver}"));
/**************************************************************************
* Global Variable
@ -156,18 +157,7 @@ $(document).ready(function(){
/**************************************************************************
* DatasetControl, DatasetSupport, FormFields
**************************************************************************/
var ctrl = $P.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.DEPT_CD : "",
urls : {
load : wctx.url("/ogdp/getDeptStngList.do"),
getInfo : wctx.url("/ogdp/getDeptStngInfo.do")
},
formats: {
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat
}
});
var ctrl = newOgdp02020Control($P);
ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };
ctrl.beforeCurrent = null;

@ -256,6 +256,8 @@
</div>
<script>
LoadScript("ogdp02020Script",wctx.url("/resources/js/fims/ogdp/ogdp02020.js?ver=${ver}"));
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
pageObject["${pageName}"].provided = {};
@ -279,16 +281,7 @@ $(document).ready(function(){
**************************************************************************/
$P.formFields = new FimsFormFields($P.selectorn("frmEdit"));
var ctrl = $P.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData : true,
keymapper : info => info ? info.DEPT_CD : "",
urls : {
update : wctx.url("/ogdp/updateDeptStng.do")
},
formats: {
}
});
var ctrl = newOgdp02010Control($P);
ctrl.dataset.onCurrentChange = (dataItem) => {
if(!dataItem){

@ -0,0 +1,15 @@
function newMngt01010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.NTC_ID : "",
urls : {
load : wctx.url("/mngt/mngt01/010/list.do"),
getInfo : wctx.url("/mngt/mngt01/020/info.do")
},
formats: {
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat
}
});
return page.ctrl;
}

@ -0,0 +1,15 @@
function newMngt01020Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData : true,
keymapper : info => info ? info.NTC_ID : "",
urls : {
create : wctx.url("/mngt/mngt01/020/create.do"),
update : wctx.url("/mngt/mngt01/020/update.do"),
remove : wctx.url("/mngt/mngt01/020/remove.do")
},
formats: {
}
});
return page.ctrl;
}

@ -0,0 +1,15 @@
function newMngt02020Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData : false,
keymapper : info => info ? info.SCHDL_ID : "",
urls : {
create : wctx.url("/mngt/mngt02/020/create.do"),
update : wctx.url("/mngt/mngt02/020/update.do"),
remove : wctx.url("/mngt/mngt02/020/remove.do")
},
formats: {
}
});
return page.ctrl;
}

@ -0,0 +1,15 @@
function newOgdp02020Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.DEPT_CD : "",
urls : {
load : wctx.url("/ogdp/getDeptStngList.do"),
getInfo : wctx.url("/ogdp/getDeptStngInfo.do")
},
formats: {
REG_DT : datetimeFormat,
MDFCN_DT : datetimeFormat
}
});
return page.ctrl;
}

@ -0,0 +1,13 @@
function newOgdp02010Control(page, doctx = ""){
page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData : true,
keymapper : info => info ? info.DEPT_CD : "",
urls : {
update : wctx.url("/ogdp/updateDeptStng.do")
},
formats: {
}
});
return page.ctrl;
}
Loading…
Cancel
Save