Leeyh1121 5 months ago
commit 3382682e95

@ -140,6 +140,7 @@
// pageObject // pageObject
let $P = pageObject["${pageName}"]; let $P = pageObject["${pageName}"];
$P.fileInfos = ${fileInfos};
$P.fileArr = []; $P.fileArr = [];
// FormFields // FormFields
@ -233,10 +234,23 @@
} }
let create = (info.dscdmngId == ""); let create = (info.dscdmngId == "");
//파일정보 변경 여부 체크
let fileChangeYn = "N";
if(fileArr.length != $P.fileInfos.length){
fileChangeYn = "Y";
} else if(fileArr.length > 0){
for(let i=0; i < fileArr.length; i++){
if(fileArr[i].id != $P.fileInfos[i].FILE_ID){
fileChangeYn = "Y";
break;
}
}
}
upload({ upload({
url: '<c:url value="${apiHost}/api/biz/nims/v1/saveDsuseMgtRslt" />' url: '<c:url value="${apiHost}/api/biz/nims/v1/saveDsuseMgtRslt" />'
, data: { , data: {
fileChangeYn: "Y", fileChangeYn: fileChangeYn,
dsuseMgtRsltJsonStr: JSON.stringify(saveData), dsuseMgtRsltJsonStr: JSON.stringify(saveData),
dsuseDsuseImgFiles: fileArr dsuseDsuseImgFiles: fileArr
} }
@ -446,7 +460,7 @@
}); });
console.log("#${usrRptIdNo}"); console.log("#${usrRptIdNo}");
@ -477,11 +491,11 @@
// 3. Dataset 설정 // 3. Dataset 설정
$P.control.setData([${dsuseRsltInfo}]); $P.control.setData([${dsuseRsltInfo}]);
let fileInfos = ${fileInfos};
if(fileInfos.length > 0){ if($P.fileInfos.length > 0){
let promiseArr = []; let promiseArr = [];
fileInfos.forEach(f => promiseArr.push(fnCreateFileFromFileInfo(f))); $P.fileInfos.forEach(f => promiseArr.push(fnCreateFileFromFileInfo(f)));
Promise.all(promiseArr).then((values) => { Promise.all(promiseArr).then((values) => {
$P.fileArr = $P.fileArr.concat(values); $P.fileArr = $P.fileArr.concat(values);

Loading…
Cancel
Save