DatasetControl keyMapper 설정 수정

main
이범준 3 months ago
parent c640b606d0
commit 9ddb9c1f07

@ -163,7 +163,7 @@
</thead> </thead>
<tbody name="crdnTbody"></tbody> <tbody name="crdnTbody"></tbody>
<template is="curly-brackets" name="crdnRow"> <template is="curly-brackets" name="crdnRow">
<tr data-key="CRDN_ID"> <tr data-index="DATA-INDEX">
<td onclick ondblclick class="text-end">ROW_NUM</td> <td onclick ondblclick class="text-end">ROW_NUM</td>
<td onclick ondblclick class="text-center">CVLCPT_RCPT_NO</td> <td onclick ondblclick class="text-center">CVLCPT_RCPT_NO</td>
<td onclick ondblclick class="text-center">CVLCPT_LIST_NO</td> <td onclick ondblclick class="text-center">CVLCPT_LIST_NO</td>
@ -398,8 +398,8 @@ $(document).ready(function(){
var notFound = [$P.findn("crdnNotFound").innerHTML]; var notFound = [$P.findn("crdnNotFound").innerHTML];
var found = $P.findn("crdnRow").innerHTML; var found = $P.findn("crdnRow").innerHTML;
var replacer = (str, dataItem) => str var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');") .replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('{DATA-INDEX}');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');"); .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('{CRDN_ID}');");
return { return {
found : found, found : found,
@ -421,23 +421,30 @@ $(document).ready(function(){
//보안모드 //보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked")); fn_securityModeToggle($("#securityMode--top").is(":checked"));
$P.holdList.forEach(function(item){ $P.holdList.forEach(function(h_item){
$P.$findn("crdnTbody").find("tr[data-key='"+item+"']").addClass("bg-dark");
let filtered = ctrl.dataset.getDataset("item").filter(item => item.data.CRDN_ID == h_item);
if(filtered.length > 0){
$P.$findn("crdnTbody").find("tr[data-index='"+filtered[0].index+"']").addClass("bg-dark");
}
}); });
} }
$P.clickCrdnList = (dataKey) => { $P.clickCrdnList = (dataIndex) => {
if(dataKey == ""){ if(dataIndex == ""){
$P.$findn("bottomCrdnPlc").val(""); $P.$findn("bottomCrdnPlc").val("");
return; return;
} }
$P.$findn("crdnTbody").setCurrentRow(dataKey); $P.$findn("crdnTbody").setCurrentRow(dataIndex);
$P.$findn("bottomCrdnPlc").val(ctrl.dataset.getData(dataKey)["CRDN_PLC"]); $P.$findn("bottomCrdnPlc").val(ctrl.dataset.getData(dataIndex)["CRDN_PLC"]);
if($P.holdList.includes(dataKey)){
let crdnId = ctrl.dataset.getData(dataIndex)["CRDN_ID"];
if($P.holdList.includes(crdnId)){
$P.$findn("btnOpenCvlcptOrgnl").hide(); $P.$findn("btnOpenCvlcptOrgnl").hide();
$P.$findn("btnDelete").hide(); $P.$findn("btnDelete").hide();
$P.$findn("btnDeleteSameRcptYmd").hide(); $P.$findn("btnDeleteSameRcptYmd").hide();
@ -447,7 +454,7 @@ $(document).ready(function(){
$P.$findn("btnDeleteSameRcptYmd").show(); $P.$findn("btnDeleteSameRcptYmd").show();
} }
Apply.toDataset.current(ctrl.dataset, dataKey); Apply.toDataset.current(ctrl.dataset, dataIndex);
} }
$P.dblclickCrdnList = (dataKey) => { $P.dblclickCrdnList = (dataKey) => {
@ -499,19 +506,31 @@ $(document).ready(function(){
}); });
} }
$P.fnHold = (argCrdnId) => {
$P.fnHold = () => { var curKey;
var curKey = ctrl.dataset.getCurrent()["CRDN_ID"]; if(argCrdnId != null){
curKey = argCrdnId;
} else {
curKey = ctrl.dataset.getCurrent()["CRDN_ID"];
}
if($P.holdList.includes(curKey)){ if($P.holdList.includes(curKey)){
return; return;
} }
$P.holdList.push(curKey); $P.holdList.push(curKey);
$P.$findn("crdnTbody").find("tr[data-key='"+curKey+"']").addClass("bg-dark"); let dataIndex;
if(argCrdnId != null){
dataIndex = ctrl.dataset.getDataset("item").filter(item => item.data.CRDN_ID == argCrdnId).index;
} else {
dataIndex = ctrl.dataset.getCurrent("item").index;
}
$P.$findn("crdnTbody").find("tr[data-index='"+dataIndex+"']").addClass("bg-dark");
if(dataIndex == ctrl.dataset.getCurrent("item").index){
$P.$findn("btnOpenCvlcptOrgnl").hide(); $P.$findn("btnOpenCvlcptOrgnl").hide();
$P.$findn("btnDelete").hide(); $P.$findn("btnDelete").hide();
$P.$findn("btnDeleteSameRcptYmd").hide(); $P.$findn("btnDeleteSameRcptYmd").hide();
} }
}
$P.fnRemove = (rcptYmd) => { $P.fnRemove = (rcptYmd) => {
@ -542,13 +561,13 @@ $(document).ready(function(){
ctrl.dataset.select(curKey,true); ctrl.dataset.select(curKey,true);
} }
var selected = ctrl.dataset.getKeys("selected"); var selected = ctrl.dataset.getDataset("selected");
if (selected.length < 1) { if (selected.length < 1) {
return; return;
} }
var params = { var params = {
"crdnIds" : selected.join(",") "crdnIds" : selected.map(item => item.CRDN_ID).join(",")
}; };
ajax.post({ ajax.post({
@ -629,51 +648,55 @@ $(document).ready(function(){
} }
$P.provide = { $P.provide = {
"getCountStatus" : function(currentKey){ "getCountStatus" : function(currentCrdnId){
var ds = ctrl.dataset.getDataset(); var dsArray = ctrl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey); var arrayIndex = dsArray.findIndex(item => item.CRDN_ID == currentCrdnId);
return (index+1) + " of " + ds.length; return (arrayIndex+1) + " of " + dsArray.length;
}, },
"getNextKey" : function(currentKey){ "getNextKey" : function(currentCrdnId){
var ds = ctrl.dataset.getDataset(); var dsArray = ctrl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey); var arrayIndex = dsArray.findIndex(item => item.CRDN_ID == currentCrdnId);
if(ds.length > index+1){ if(dsArray.length > arrayIndex+1){
if($P.holdList.includes(ds[index+1]["CRDN_ID"])){ if($P.holdList.includes(dsArray[arrayIndex+1]["CRDN_ID"])){
return $P.provide.getNextKey(ds[index+1]["CRDN_ID"]); return $P.provide.getNextKey(dsArray[arrayIndex+1]["CRDN_ID"]);
} else { } else {
return ds[index+1]["CRDN_ID"]; return dsArray[arrayIndex+1]["CRDN_ID"];
} }
} else { } else {
return ""; return "";
} }
}, },
"getPrevKey" : function(currentKey){ "getPrevKey" : function(currentCrdnId){
var ds = ctrl.dataset.getDataset(); var dsArray = ctrl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey); var arrayIndex = dsArray.findIndex(item => item.CRDN_ID == currentCrdnId);
if(index != 0 && ds.length > 1){ if(arrayIndex != 0 && dsArray.length > 1){
if($P.holdList.includes(ds[index-1]["CRDN_ID"])){ if($P.holdList.includes(dsArray[arrayIndex-1]["CRDN_ID"])){
return $P.provide.getPrevKey(ds[index-1]["CRDN_ID"]); return $P.provide.getPrevKey(dsArray[arrayIndex-1]["CRDN_ID"]);
} else { } else {
return ds[index-1]["CRDN_ID"]; return dsArray[arrayIndex-1]["CRDN_ID"];
} }
} else { } else {
return ""; return "";
} }
}, },
"selectRow" : function(currentKey){ "selectRow" : function(currentCrdnId){
$P.clickCrdnList(currentKey); let filtered = ctrl.dataset.getDataset("item").filter(item => item.data.CRDN_ID == currentCrdnId);
if(filtered.length > 0){
$P.clickCrdnList(filtered[0].index);
}
}, },
"holdRow" : function(currentKey){ "holdRow" : function(currentCrdnId){
$P.fnHold(currentKey); $P.fnHold(currentCrdnId);
}, },
"refreshList" : function(){ "refreshList" : function(){
$P.refreshCrdnList(); $P.refreshCrdnList();
}, },
"hasData" : function(key){ "hasData" : function(crdnId){
if(ctrl.dataset.getData(key) == null){ let filtered = ctrl.dataset.getDataset("item").filter(item => item.data.CRDN_ID == crdnId);
return false; if(filtered.length > 0){
} else {
return true; return true;
} else {
return false;
} }
}, },
}; };

@ -186,10 +186,10 @@
</thead> </thead>
<tbody name="crdnTbody"></tbody> <tbody name="crdnTbody"></tbody>
<template is="curly-brackets" name="crdnRow"> <template is="curly-brackets" name="crdnRow">
<tr data-key="CRDN_ID"> <tr data-index="DATA-INDEX">
<td onclick ondblclick class="text-end">ROW_NUM</td> <td onclick ondblclick class="text-end">ROW_NUM</td>
<td class="text-center"> <td class="text-center">
<input type="checkbox" name="gridCheckbox" name="gridCheckbox" value="CRDN_ID" <input type="checkbox" name="gridCheckbox" name="gridCheckbox" value="DATA-INDEX"
onchange="pageObject['${pageName}'].checkCrdnList(this, this.checked);" /> onchange="pageObject['${pageName}'].checkCrdnList(this, this.checked);" />
</td> </td>
<td onclick ondblclick class="text-center">CVLCPT_RCPT_NO</td> <td onclick ondblclick class="text-center">CVLCPT_RCPT_NO</td>
@ -358,8 +358,8 @@ $(document).ready(function(){
var notFound = [$P.findn("crdnNotFound").innerHTML]; var notFound = [$P.findn("crdnNotFound").innerHTML];
var found = $P.findn("crdnRow").innerHTML; var found = $P.findn("crdnRow").innerHTML;
var replacer = (str, dataItem) => str var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');") .replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('{DATA-INDEX}');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');"); .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('{CRDN_ID}');");
return { return {
found : found, found : found,
@ -382,10 +382,10 @@ $(document).ready(function(){
fn_securityModeToggle($("#securityMode--top").is(":checked")); fn_securityModeToggle($("#securityMode--top").is(":checked"));
$P.$findn("crdnTbody").find("tr[data-key]").each(function(item){ $P.$findn("crdnTbody").find("tr[data-index]").each(function(item){
var crdnId = this.dataset.key; var dataIndex = this.dataset.index;
var data = ctrl.dataset.getData(crdnId); var data = ctrl.dataset.getData(dataIndex);
if(data.COPY_EXIST_YN == "Y"){ if(data.COPY_EXIST_YN == "Y"){
$(this).addClass("text-red"); $(this).addClass("text-red");
@ -408,13 +408,13 @@ $(document).ready(function(){
Apply.toDataset.selection(ctrl.dataset, element, bool); Apply.toDataset.selection(ctrl.dataset, element, bool);
} }
$P.clickCrdnList = (dataKey) => { $P.clickCrdnList = (dataIndex) => {
if(dataKey == ""){ if(dataIndex == ""){
return; return;
} }
$P.$findn("crdnTbody").setCurrentRow(dataKey); $P.$findn("crdnTbody").setCurrentRow(dataIndex);
Apply.toDataset.current(ctrl.dataset, dataKey); Apply.toDataset.current(ctrl.dataset, dataIndex);
} }
$P.dblclickCrdnList = (dataKey) => { $P.dblclickCrdnList = (dataKey) => {
@ -532,7 +532,7 @@ $(document).ready(function(){
$P.fnExecuteAnswer = () => { $P.fnExecuteAnswer = () => {
var count = ctrl.dataset.getKeys("selected").length; var count = ctrl.dataset.getDataset("selected").length;
dialog.alert({ dialog.alert({
content : "선택된 "+count+"건의 자료를 답변등록을 실행하시겠습니까?", content : "선택된 "+count+"건의 자료를 답변등록을 실행하시겠습니까?",
@ -547,7 +547,7 @@ $(document).ready(function(){
$P.fnAnswerComplete = () => { $P.fnAnswerComplete = () => {
var count = ctrl.dataset.getKeys("selected").length; var count = ctrl.dataset.getDataset("selected").length;
dialog.alert({ dialog.alert({
content : "선택된 "+count+"건의 자료를 답변완료 상태로 변경하시겠습니까?", content : "선택된 "+count+"건의 자료를 답변완료 상태로 변경하시겠습니까?",
@ -567,7 +567,7 @@ $(document).ready(function(){
url : ctrl.urls.update, url : ctrl.urls.update,
data : { data : {
"processType" : processType, "processType" : processType,
"crdnIds" : ctrl.dataset.getKeys("selected").join(",") "crdnIds" : ctrl.dataset.getDataset("selected").map(item=>item.CRDN_ID).join(",")
}, },
success : (resp) => { success : (resp) => {
if(resp.saved){ if(resp.saved){
@ -641,31 +641,34 @@ $(document).ready(function(){
} }
$P.provide = { $P.provide = {
"getCountStatus" : function(currentKey){ "getCountStatus" : function(currentCrdnId){
var ds = ctrl.dataset.getDataset(); var dsArray = ctrl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey); var arrayIndex = dsArray.findIndex(item => item.CRDN_ID == currentCrdnId);
return (index+1) + " of " + ds.length; return (arrayIndex+1) + " of " + dsArray.length;
}, },
"getNextKey" : function(currentKey){ "getNextKey" : function(currentCrdnId){
var ds = ctrl.dataset.getDataset(); var dsArray = ctrl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey); var arrayIndex = dsArray.findIndex(item => item.CRDN_ID == currentCrdnId);
if(ds.length > index+1){ if(dsArray.length > arrayIndex+1){
return ds[index+1]["CRDN_ID"]; return dsArray[arrayIndex+1]["CRDN_ID"];
} else { } else {
return ""; return "";
} }
}, },
"getPrevKey" : function(currentKey){ "getPrevKey" : function(currentCrdnId){
var ds = ctrl.dataset.getDataset(); var dsArray = ctrl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey); var arrayIndex = dsArray.findIndex(item => item.CRDN_ID == currentCrdnId);
if(index != 0 && ds.length > 1){ if(arrayIndex != 0 && dsArray.length > 1){
return ds[index-1]["CRDN_ID"]; return dsArray[arrayIndex-1]["CRDN_ID"];
} else { } else {
return ""; return "";
} }
}, },
"selectRow" : function(currentKey){ "selectRow" : function(currentCrdnId){
$P.clickCrdnList(currentKey); let filtered = ctrl.dataset.getDataset("item").filter(item => item.data.CRDN_ID == currentCrdnId);
if(filtered.length > 0){
$P.clickCrdnList(filtered[0].index);
}
}, },
"refreshList" : function(){ "refreshList" : function(){
$P.refreshCrdnList(); $P.refreshCrdnList();

@ -164,7 +164,7 @@
</thead> </thead>
<tbody name="crdnTbody"></tbody> <tbody name="crdnTbody"></tbody>
<template is="curly-brackets" name="crdnRow"> <template is="curly-brackets" name="crdnRow">
<tr data-key="CRDN_ID"> <tr data-index="DATA-INDEX">
<td onclick ondblclick class="text-end">ROW_NUM</td> <td onclick ondblclick class="text-end">ROW_NUM</td>
<td onclick ondblclick class="text-center">CVLCPT_RCPT_NO</td> <td onclick ondblclick class="text-center">CVLCPT_RCPT_NO</td>
<td onclick ondblclick class="text-center">CVLCPT_LIST_NO</td> <td onclick ondblclick class="text-center">CVLCPT_LIST_NO</td>
@ -357,8 +357,8 @@ $(document).ready(function(){
var notFound = [$P.findn("crdnNotFound").innerHTML]; var notFound = [$P.findn("crdnNotFound").innerHTML];
var found = $P.findn("crdnRow").innerHTML; var found = $P.findn("crdnRow").innerHTML;
var replacer = (str, dataItem) => str var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');") .replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('{DATA-INDEX}');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');"); .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('{CRDN_ID}');");
return { return {
@ -383,14 +383,14 @@ $(document).ready(function(){
} }
$P.clickCrdnList = (dataKey) => { $P.clickCrdnList = (dataIndex) => {
if(dataKey == ""){ if(dataIndex == ""){
return; return;
} }
$P.$findn("crdnTbody").setCurrentRow(dataKey); $P.$findn("crdnTbody").setCurrentRow(dataIndex);
Apply.toDataset.current(ctrl.dataset, dataKey); Apply.toDataset.current(ctrl.dataset, dataIndex);
} }
$P.dblclickCrdnList = (dataKey) => { $P.dblclickCrdnList = (dataKey) => {
@ -430,25 +430,25 @@ $(document).ready(function(){
var curKey = cur["CRDN_ID"]; var curKey = cur["CRDN_ID"];
ctrl.dataset.select(curKey,true); ctrl.dataset.select(curKey,true);
var selected = ctrl.dataset.getKeys("selected"); var selected = ctrl.dataset.getDataset("selected");
if (selected.length < 1) { if (selected.length < 1) {
return; return;
} }
var params = { var params = {
"crdnIds" : selected.join(",") "crdnIds" : selected.map(item=>item.CRDN_ID).join(",")
}; };
ajax.post({ ajax.post({
url : ctrl.urls.remove, url : ctrl.urls.remove,
data : params, data : params,
success : (resp) => { success : (resp) => {
$P.saveCallback(selected, resp); $P.saveCallback(resp);
} }
}); });
} }
$P.saveCallback = (selected, resp) => { $P.saveCallback = (resp) => {
if (resp.saved){ if (resp.saved){
$P.toast.show(); $P.toast.show();
AppSupport.sleep(1000).then(() => $P.refreshCrdnList()); AppSupport.sleep(1000).then(() => $P.refreshCrdnList());
@ -499,40 +499,44 @@ $(document).ready(function(){
} }
$P.provide = { $P.provide = {
"getCountStatus" : function(currentKey){ "getCountStatus" : function(currentCrdnId){
var ds = ctrl.dataset.getDataset(); var dsArray = ctrl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey); var arrayindex = dsArray.findIndex(item => item.CRDN_ID == currentCrdnId);
return (index+1) + " of " + ds.length; return (arrayindex+1) + " of " + dsArray.length;
}, },
"getNextKey" : function(currentKey){ "getNextKey" : function(currentCrdnId){
var ds = ctrl.dataset.getDataset(); var dsArray = ctrl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey); var arrayindex = dsArray.findIndex(item => item.CRDN_ID == currentCrdnId);
if(ds.length > index+1){ if(dsArray.length > arrayindex+1){
return ds[index+1]["CRDN_ID"]; return dsArray[arrayindex+1]["CRDN_ID"];
} else { } else {
return ""; return "";
} }
}, },
"getPrevKey" : function(currentKey){ "getPrevKey" : function(currentCrdnId){
var ds = ctrl.dataset.getDataset(); var dsArray = ctrl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey); var arrayindex = dsArray.findIndex(item => item.CRDN_ID == currentCrdnId);
if(index != 0 && ds.length > 1){ if(arrayindex != 0 && dsArray.length > 1){
return ds[index-1]["CRDN_ID"]; return dsArray[arrayindex-1]["CRDN_ID"];
} else { } else {
return ""; return "";
} }
}, },
"selectRow" : function(currentKey){ "selectRow" : function(currentCrdnId){
$P.clickCrdnList(currentKey); let filtered = ctrl.dataset.getDataset("item").filter(item => item.data.CRDN_ID == currentCrdnId);
if(filtered.length > 0){
$P.clickCrdnList(filtered[0].index);
}
}, },
"refreshList" : function(){ "refreshList" : function(){
$P.refreshCrdnList(); $P.refreshCrdnList();
}, },
"hasData" : function(key){ "hasData" : function(crdnId){
if(ctrl.dataset.getData(key) == null){ let filtered = ctrl.dataset.getDataset("item").filter(item=>item.data.CRDN_ID == crdnId);
return false; if(filtered.length > 0){
} else {
return true; return true;
} else {
return false;
} }
}, },
}; };

@ -86,7 +86,7 @@
</thead> </thead>
<tbody name="dmndTbody"></tbody> <tbody name="dmndTbody"></tbody>
<template is="curly-brackets" name="dmndRow"> <template is="curly-brackets" name="dmndRow">
<tr data-key="INDIV_ID"> <tr data-index="DATA-INDEX">
<td onclick class="text-end">ROW_NUM</td> <td onclick class="text-end">ROW_NUM</td>
<td onclick class="text-center">DMND_YMD</td> <td onclick class="text-center">DMND_YMD</td>
<td onclick class="text-center">RGTR</td> <td onclick class="text-center">RGTR</td>
@ -274,7 +274,7 @@ $(document).ready(function(){
var notFound = [$P.findn("dmndNotFound").innerHTML]; var notFound = [$P.findn("dmndNotFound").innerHTML];
var found = $P.findn("dmndRow").innerHTML; var found = $P.findn("dmndRow").innerHTML;
var replacer = (str, dataItem) => str var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickDmndList('" + dataItem.getValue("INDIV_ID") + "');"); .replace(/{onclick}/gi, "pageObject['${pageName}'].clickDmndList('{DATA-INDEX}');");
return { return {
found : found, found : found,
@ -294,13 +294,13 @@ $(document).ready(function(){
$P.findn("table-responsive").changeContent(trs, initScroll, noMore); $P.findn("table-responsive").changeContent(trs, initScroll, noMore);
} }
$P.clickDmndList = (dataKey) => { $P.clickDmndList = (dataIndex) => {
if(dataKey == ""){ if(dataIndex == ""){
return; return;
} }
$P.$findn("dmndTbody").setCurrentRow(dataKey); $P.$findn("dmndTbody").setCurrentRow(dataIndex);
Apply.toDataset.current(ctrl.dataset, dataKey); Apply.toDataset.current(ctrl.dataset, dataIndex);
} }
$P.fnRemove = (allCompleteDataIds) => { $P.fnRemove = (allCompleteDataIds) => {
@ -317,26 +317,26 @@ $(document).ready(function(){
ctrl.dataset.select(curKey,true); ctrl.dataset.select(curKey,true);
} }
var selected = ctrl.dataset.getKeys("selected"); var selected = ctrl.dataset.getDataset("selected");
if (selected.length < 1) { if (selected.length < 1) {
return; return;
} }
var params = { var params = {
"indivIds" : selected.join(",") "indivIds" : selected.map(item=>item.INDIV_ID).join(",")
}; };
ajax.post({ ajax.post({
url : ctrl.urls.remove, url : ctrl.urls.remove,
data : params, data : params,
success : (resp) => { success : (resp) => {
$P.removeCallback(selected, resp); $P.removeCallback(resp);
} }
}); });
} }
$P.removeCallback = (selected, resp) => { $P.removeCallback = (resp) => {
if (resp.saved){ if (resp.saved){
$P.$findn("toastText").html("삭제 되었습니다."); $P.$findn("toastText").html("삭제 되었습니다.");
$P.toast.show(); $P.toast.show();

@ -1,7 +1,8 @@
function newCvlc01010Control(page, doctx = ""){ function newCvlc01010Control(page, doctx = ""){
page.ctrl = new DatasetControl({ page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true, dataGetter : obj => obj["List"],
keymapper : info => info ? info.CRDN_ID : "", appendData:true,
keys : ["CRDN_ID"],
urls : { urls : {
load : "", load : "",
getInfo : "", getInfo : "",

@ -1,7 +1,8 @@
function newCvlc02010Control(page, doctx = ""){ function newCvlc02010Control(page, doctx = ""){
page.ctrl = new DatasetControl({ page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true, dataGetter : obj => obj["List"],
keymapper : info => info ? info.CRDN_ID : "", appendData:true,
keys : ["CRDN_ID"],
urls : { urls : {
load : "", load : "",
getInfo : "", getInfo : "",

@ -1,7 +1,8 @@
function newCvlc03010Control(page, doctx = ""){ function newCvlc03010Control(page, doctx = ""){
page.ctrl = new DatasetControl({ page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true, dataGetter : obj => obj["List"],
keymapper : info => info ? info.CRDN_ID : "", appendData:true,
keys : ["CRDN_ID"],
urls : { urls : {
load : "", load : "",
getInfo : "", getInfo : "",

@ -1,7 +1,8 @@
function newCvlc04010Control(page, doctx = ""){ function newCvlc04010Control(page, doctx = ""){
page.ctrl = new DatasetControl({ page.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true, dataGetter : obj => obj["List"],
keymapper : info => info ? info.INDIV_ID : "", appendData:true,
keys : ["INDIV_ID"],
urls : { urls : {
load : "", load : "",
create : "", create : "",

Loading…
Cancel
Save