|
|
@ -262,6 +262,9 @@
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card" style="width:500px;">
|
|
|
|
<div class="card" style="width:500px;">
|
|
|
|
|
|
|
|
<form id="frmFile--${pageName}" method="post" enctype="multipart/form-data">
|
|
|
|
|
|
|
|
<input type="file" id="uploadFileList--${pageName}" name="uploadFileList" multiple accept="image/*" hidden />
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-md-12 d-flex justify-content-between">
|
|
|
|
<div class="col-md-12 d-flex justify-content-between">
|
|
|
|
<div class="fs-4 fw-bold">등록된 사진</div>
|
|
|
|
<div class="fs-4 fw-bold">등록된 사진</div>
|
|
|
@ -270,32 +273,20 @@
|
|
|
|
<button type="button" id="btnEditPhoto--${pageName}" class="btn btn-blue">선택 사진 편집</button>
|
|
|
|
<button type="button" id="btnEditPhoto--${pageName}" class="btn btn-blue">선택 사진 편집</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="display3--${pageName}" style="overflow-y: scroll;min-height: 40px;max-height: 340px;border-style: solid;">
|
|
|
|
<div id="display0--${pageName}" style="overflow-y: scroll;min-height: 40px;max-height: 340px;border-style: solid;">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-md-12 d-flex justify-content-between">
|
|
|
|
|
|
|
|
<div class="fs-4 fw-bold">추가한 사진(번호판)</div>
|
|
|
|
|
|
|
|
<button type="button" id="btnNumberPlateDelete--${pageName}" class="btn btn-blue">취소</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="display4--${pageName}" style="overflow-y: scroll;min-height: 40px;max-height: 340px;border-style: solid;">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<form id="frmFile--${pageName}" class="dpv eca" method="post" enctype="multipart/form-data">
|
|
|
|
<form id="frmUploadSet--${pageName}" method="post" enctype="multipart/form-data">
|
|
|
|
<input type="file" id="uploadFileList--${pageName}" name="uploadFileList" multiple accept="image/*" hidden />
|
|
|
|
<input type="file" id="inputUploadSet--${pageName}" name="inputUploadSet" multiple accept="image/*" hidden />
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
<div class="col-md-12 d-flex justify-content-between">
|
|
|
|
<div class="col-md-12 d-flex justify-content-between">
|
|
|
|
<div class="fs-4 fw-bold">추가한 사진</div>
|
|
|
|
<div class="fs-4 fw-bold">추가한 사진</div>
|
|
|
|
|
|
|
|
<button type="button" id="btnOpenVideoCapture--${pageName}" class="btn btn-blue">동영상 캡쳐</button>
|
|
|
|
<button type="button" id="btnAddFile--${pageName}" class="btn btn-blue">사진 추가</button>
|
|
|
|
<button type="button" id="btnAddFile--${pageName}" class="btn btn-blue">사진 추가</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="display--${pageName}" style="overflow-y: scroll;min-height: 40px;max-height: 340px;border-style: solid;">
|
|
|
|
<div id="display--${pageName}" style="overflow-y: scroll;min-height: 40px;max-height: 340px;border-style: solid;">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-md-12 d-flex justify-content-between" id="cpatureTitleArea--${pageName}">
|
|
|
|
|
|
|
|
<div class="fs-4 fw-bold">캡쳐 이미지</div>
|
|
|
|
|
|
|
|
<button type="button" id="btnOpenVideoCapture--${pageName}" class="btn btn-blue">동영상 캡쳐</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="display2--${pageName}" style="overflow-y: scroll;min-height: 40px;max-height: 340px;border-style: solid;">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
@ -312,13 +303,15 @@ $(document).ready(function(){
|
|
|
|
var $P = pageObject["${pageName}"];
|
|
|
|
var $P = pageObject["${pageName}"];
|
|
|
|
|
|
|
|
|
|
|
|
$P.captureFileArr = [];
|
|
|
|
$P.captureFileArr = [];
|
|
|
|
|
|
|
|
$P.localUploadArr = [];
|
|
|
|
|
|
|
|
$P.numberPlateArr = [];
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|
* DatasetControl, Dataset, FormFields
|
|
|
|
* DatasetControl, Dataset, FormFields
|
|
|
|
**************************************************************************/
|
|
|
|
**************************************************************************/
|
|
|
|
$P.formFields = new FimsFormFields("#frmEdit--${pageName}");
|
|
|
|
$P.formFields = new FimsFormFields("#frmEdit--${pageName}");
|
|
|
|
|
|
|
|
|
|
|
|
$P.uploadSet = uploadSupport("#uploadFileList--${pageName}");
|
|
|
|
$P.uploadSet = uploadSupport("#inputUploadSet--${pageName}");
|
|
|
|
|
|
|
|
|
|
|
|
$P.crdnControl = new DatasetControl({
|
|
|
|
$P.crdnControl = new DatasetControl({
|
|
|
|
urls : { load : "", create : wctx.url("/${taskSeCd}/crdn/crdn01/020/save.do") },
|
|
|
|
urls : { load : "", create : wctx.url("/${taskSeCd}/crdn/crdn01/020/save.do") },
|
|
|
@ -344,6 +337,13 @@ $(document).ready(function(){
|
|
|
|
if(formData.get("uploadFileList").size == 0){
|
|
|
|
if(formData.get("uploadFileList").size == 0){
|
|
|
|
formData.delete("uploadFileList");
|
|
|
|
formData.delete("uploadFileList");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($P.localUploadArr.length > 0){
|
|
|
|
|
|
|
|
$P.localUploadArr.forEach(item => formData.append("uploadFileList",item));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if($P.numberPlateArr.length > 0){
|
|
|
|
|
|
|
|
$P.numberPlateArr.forEach(item => formData.append("uploadFileList",item));
|
|
|
|
|
|
|
|
}
|
|
|
|
if($P.captureFileArr.length > 0){
|
|
|
|
if($P.captureFileArr.length > 0){
|
|
|
|
$P.captureFileArr.forEach(item => formData.append("uploadFileList",item));
|
|
|
|
$P.captureFileArr.forEach(item => formData.append("uploadFileList",item));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -362,8 +362,13 @@ $(document).ready(function(){
|
|
|
|
$P.formFields.set(item);
|
|
|
|
$P.formFields.set(item);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.uploadSet.onDatasetChange = () => { $P.fnDisplay(); };
|
|
|
|
$P.uploadSet.onDatasetChange = () => {
|
|
|
|
$P.uploadSet.onRemove = () => { $P.fnDisplay(); };
|
|
|
|
var files = $P.uploadSet.getDataset();
|
|
|
|
|
|
|
|
files.forEach(item => $P.localUploadArr.push(item));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnDisplay();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
$P.uploadSet.onRemove = () => { };
|
|
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.onSave = (resp) => {
|
|
|
|
$P.crdnControl.onSave = (resp) => {
|
|
|
|
if (resp.saved) {
|
|
|
|
if (resp.saved) {
|
|
|
@ -377,17 +382,26 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnDisplay = () => {
|
|
|
|
$P.fnDisplay = () => {
|
|
|
|
var displayArea = document.querySelector("#display--${pageName}");
|
|
|
|
var displayArea = document.querySelector("#display--${pageName}");
|
|
|
|
var imgTags = $P.uploadSet.inStrings("<img src='{url}' width='200' height='200' />").join("\n");
|
|
|
|
|
|
|
|
displayArea.innerHTML = imgTags;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var display2Area = document.querySelector("#display2--${pageName}");
|
|
|
|
var imgTagsFromUploadSet = $P.localUploadArr.map(function(item){
|
|
|
|
var imgTags2 = "";
|
|
|
|
return "<img src='"+item.url+"' width='200' height='200' />";
|
|
|
|
|
|
|
|
}).join("\n");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var imgTagsFromNumberPlate = "";
|
|
|
|
|
|
|
|
if($P.numberPlateArr.length > 0){
|
|
|
|
|
|
|
|
$P.numberPlateArr.forEach(function(item, index){
|
|
|
|
|
|
|
|
imgTagsFromNumberPlate += "<img src='" + item.url + "' width='200' height='200' />";
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var imgTagsFromVideo = "";
|
|
|
|
if($P.captureFileArr.length > 0){
|
|
|
|
if($P.captureFileArr.length > 0){
|
|
|
|
$P.captureFileArr.forEach(function(item, index){
|
|
|
|
$P.captureFileArr.forEach(function(item, index){
|
|
|
|
imgTags2 += "<img src='" + item.url + "' width='200' height='200' />";
|
|
|
|
imgTagsFromVideo += "<img src='" + item.url + "' width='200' height='200' />";
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
display2Area.innerHTML = imgTags2;
|
|
|
|
|
|
|
|
|
|
|
|
displayArea.innerHTML = imgTagsFromUploadSet + imgTagsFromNumberPlate + imgTagsFromVideo;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnSave = () => {
|
|
|
|
$P.fnSave = () => {
|
|
|
@ -430,13 +444,22 @@ $(document).ready(function(){
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.editPhotoCallback = (modifiedFile, originalFileInfo, isNumberPlate) => {
|
|
|
|
|
|
|
|
console.log(modifiedFile);
|
|
|
|
|
|
|
|
console.log(originalFileInfo);
|
|
|
|
|
|
|
|
console.log(isNumberPlate);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|
* element.on
|
|
|
|
* element.on
|
|
|
|
**************************************************************************/
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
$("#btnInst--${pageName}").on('click', () => $P.fnSave());
|
|
|
|
$("#btnInst--${pageName}").on('click', () => $P.fnSave());
|
|
|
|
$("#btnAddFile--${pageName}").on('click', () => { $("#uploadFileList--${pageName}").trigger("click"); });
|
|
|
|
|
|
|
|
|
|
|
|
$("#btnAddFile--${pageName}").on('click', () => { $("#inputUploadSet--${pageName}").trigger("click"); });
|
|
|
|
|
|
|
|
|
|
|
|
$("#btnOpenVideoCapture--${pageName}").on('click', () => {
|
|
|
|
$("#btnOpenVideoCapture--${pageName}").on('click', () => {
|
|
|
|
var crdnId = $("#crdnId--${pageName}").val();
|
|
|
|
var crdnId = $("#crdnId--${pageName}").val();
|
|
|
|
|
|
|
|
|
|
|
@ -446,7 +469,7 @@ $(document).ready(function(){
|
|
|
|
);
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$("#btnEditPhoto--${pageName}").on('click', () => {
|
|
|
|
$("#btnEditPhoto--${pageName}").on('click', () => {
|
|
|
|
var fileId = $("#display3--${pageName}").find("[name='editTarget']:checked").val();
|
|
|
|
var fileId = $("#display0--${pageName}").find("[name='editTarget']:checked").val();
|
|
|
|
|
|
|
|
|
|
|
|
window.open(wctx.url("/sprt/sprt03/020/main.do?openerPageName=${pageName}&fileId="+fileId)
|
|
|
|
window.open(wctx.url("/sprt/sprt03/020/main.do?openerPageName=${pageName}&fileId="+fileId)
|
|
|
|
,"editPhoto"
|
|
|
|
,"editPhoto"
|
|
|
@ -498,8 +521,7 @@ $(document).ready(function(){
|
|
|
|
$P.crdnControl.setData([crdnInfo]);
|
|
|
|
$P.crdnControl.setData([crdnInfo]);
|
|
|
|
|
|
|
|
|
|
|
|
if(crdnInfo.videoExist == "N"){
|
|
|
|
if(crdnInfo.videoExist == "N"){
|
|
|
|
$("#cpatureTitleArea--${pageName}").hide();
|
|
|
|
$("#btnOpenVideoCapture--${pageName}").hide();
|
|
|
|
$("#display2--${pageName}").hide();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(crdnInfo.fileList){
|
|
|
|
if(crdnInfo.fileList){
|
|
|
@ -520,10 +542,10 @@ $(document).ready(function(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$("#display3--${pageName}").append(editPhotoArea);
|
|
|
|
$("#display0--${pageName}").append(editPhotoArea);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
$("#display3--${pageName}").append("등록된 사진이 없습니다.");
|
|
|
|
$("#display0--${pageName}").append("등록된 사진이 없습니다.");
|
|
|
|
$("#btnEditPhoto--crdn01020-info").hide();
|
|
|
|
$("#btnEditPhoto--crdn01020-info").hide();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|