|
|
|
@ -51,9 +51,9 @@
|
|
|
|
|
<input type="file" id="localFile--${pageName}" name="localFile" />
|
|
|
|
|
</c:if>
|
|
|
|
|
<span class="justify-content-end float-end me-4">
|
|
|
|
|
<c:if test="${taskSeCd == 'ECA' or taskSeCd == 'DPV'}">
|
|
|
|
|
<button type="button" id="btnSearch--${pageName}" class="btn btn-primary">조회</button>
|
|
|
|
|
</c:if>
|
|
|
|
|
|
|
|
|
|
<button type="button" id="btnSearch--${pageName}" class="btn btn-primary">조회</button>
|
|
|
|
|
|
|
|
|
|
<c:if test="${taskSeCd == 'PVS' or taskSeCd == 'BPV' or taskSeCd == '미세먼지'}">
|
|
|
|
|
<button type="button" id="btnFileUpload--${pageName}" class="btn btn-primary">등록</button>
|
|
|
|
|
</c:if>
|
|
|
|
@ -65,13 +65,13 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="d-flex flex-row justify-content-evenly">
|
|
|
|
|
<div class="card my-4 px-4" style="max-width:700px;height:600px;">
|
|
|
|
|
<div class="card my-4 px-4" style="min-width:700px;max-width:700px;height:600px;">
|
|
|
|
|
<form id="frmGrid--${pageName}">
|
|
|
|
|
<div>
|
|
|
|
|
<span class="container-page-btn">
|
|
|
|
|
<div class="d-flex flex-row justify-content-between">
|
|
|
|
|
<label id="crdnPaging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
|
|
|
|
|
<ul id="crdnPaging--${pageName}" class="pagination pagination-primary">
|
|
|
|
|
<label id="parsedInfoPaging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
|
|
|
|
|
<ul id="parsedInfoPaging--${pageName}" class="pagination pagination-primary">
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<span class="container-window-btn-right">
|
|
|
|
@ -82,67 +82,120 @@
|
|
|
|
|
<div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
|
|
|
|
|
<div id="table-responsive--${pageName}" class="table-responsive"
|
|
|
|
|
style="overflow-x: scroll;height:560px;overflow-y: scroll;">
|
|
|
|
|
<table id="DataTables_Table_0--${pageName}"
|
|
|
|
|
class="datatables-ajax table table-bordered dataTable no-footer">
|
|
|
|
|
<thead class="sticky-thead">
|
|
|
|
|
<tr id="crdnTheadTr--${pageName}">
|
|
|
|
|
<th style="min-width: 80px;" title="더블클릭시 축소/확대 됩니다."
|
|
|
|
|
class="downsize" ondblclick="fnDownsizeToggle(this);" href="#">
|
|
|
|
|
파일명 <i class='bx bx-expand'></i>
|
|
|
|
|
</th>
|
|
|
|
|
<th style="min-width: 80px;">타임스탬프</th>
|
|
|
|
|
<th style="min-width: 80px;">사이즈</th>
|
|
|
|
|
<th style="min-width: 80px;">단속자료</th>
|
|
|
|
|
<th style="min-width: 80px;">디바이스ID</th>
|
|
|
|
|
<th style="min-width: 80px;">날짜/시간</th>
|
|
|
|
|
<th style="min-width: 80px;">차량번호</th>
|
|
|
|
|
<th style="min-width: 80px;">총사진갯수</th>
|
|
|
|
|
<th style="min-width: 80px;">사진시퀀스</th>
|
|
|
|
|
<th style="min-width: 80px;">위치좌표x</th>
|
|
|
|
|
<th style="min-width: 80px;">위치좌표y</th>
|
|
|
|
|
<th style="min-width: 80px;">입력구분</th>
|
|
|
|
|
<th style="min-width: 80px;">위반장소</th>
|
|
|
|
|
<th style="min-width: 80px;">위반장소(주소)</th>
|
|
|
|
|
<th style="min-width: 80px;">법정동</th>
|
|
|
|
|
<th style="min-width: 80px;">파일확장자</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody id="crdnTbody--${pageName}"></tbody>
|
|
|
|
|
<template id="crdnRow--${pageName}">
|
|
|
|
|
<tr data-key="{FILE_NAME}">
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}"
|
|
|
|
|
title="{FILE_NAME}"
|
|
|
|
|
class="text-start text-truncate max-w-th">{FILE_NAME}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{TIMESTAMP}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{FILE_SIZE}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{TEMP_GROUP_ID}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{DEVICE_ID}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_YMD_TM}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{VHRNO}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{PHOTO_CNT}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{PHOTO_SEQ_NM}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{LOCATION_X}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{LOCATION_Y}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{INPUT_SE}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_PLC}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_ADDRESS}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_STDG_NM}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{EXTENSION}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</template>
|
|
|
|
|
<template id="crdnNotFound--${pageName}">
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top" colspan="17" class="dataTables_empty text-center">정보를 찾지 못했습니다.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</template>
|
|
|
|
|
</table>
|
|
|
|
|
<span class="ino" hidden>
|
|
|
|
|
<table
|
|
|
|
|
class="datatables-ajax table table-bordered dataTable no-footer">
|
|
|
|
|
<thead class="sticky-thead">
|
|
|
|
|
<tr id="parsedInfoTheadTr--${pageName}">
|
|
|
|
|
<th style="min-width: 80px;">단속자료</th>
|
|
|
|
|
<th style="min-width: 80px;" title="더블클릭시 축소/확대 됩니다."
|
|
|
|
|
class="downsize" ondblclick="fnDownsizeToggle(this);" href="#">
|
|
|
|
|
파일명 <i class='bx bx-expand'></i>
|
|
|
|
|
</th>
|
|
|
|
|
<th style="min-width: 80px;">타임스탬프</th>
|
|
|
|
|
<th style="min-width: 80px;">사이즈</th>
|
|
|
|
|
<th style="min-width: 80px;">디바이스ID</th>
|
|
|
|
|
<th style="min-width: 80px;">날짜/시간</th>
|
|
|
|
|
<th style="min-width: 80px;">차량번호</th>
|
|
|
|
|
<th style="min-width: 80px;">총사진갯수</th>
|
|
|
|
|
<th style="min-width: 80px;">사진시퀀스</th>
|
|
|
|
|
<th style="min-width: 80px;">위치좌표x</th>
|
|
|
|
|
<th style="min-width: 80px;">위치좌표y</th>
|
|
|
|
|
<th style="min-width: 80px;">입력구분</th>
|
|
|
|
|
<th style="min-width: 80px;">위반장소</th>
|
|
|
|
|
<th style="min-width: 80px;">위반장소(주소)</th>
|
|
|
|
|
<th style="min-width: 80px;">법정동</th>
|
|
|
|
|
<th style="min-width: 80px;">파일확장자</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody></tbody>
|
|
|
|
|
<template class="found">
|
|
|
|
|
<tr data-key="{FILE_NAME}">
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{TEMP_GROUP_ID}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}"
|
|
|
|
|
title="{FILE_NAME}"
|
|
|
|
|
class="text-start text-truncate max-w-th">{FILE_NAME}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{TIMESTAMP}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{FILE_SIZE}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{DEVICE_ID}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_YMD_TM}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{VHRNO}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{PHOTO_CNT}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{PHOTO_SEQ_NM}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{LOCATION_X}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{LOCATION_Y}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{INPUT_SE}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_PLC}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_ADDRESS}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_STDG_NM}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{EXTENSION}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</template>
|
|
|
|
|
<template class="notFound">
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top" colspan="17" class="dataTables_empty text-center">정보를 찾지 못했습니다.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</template>
|
|
|
|
|
</table>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="hitecom" hidden>
|
|
|
|
|
<table
|
|
|
|
|
class="datatables-ajax table table-bordered dataTable no-footer">
|
|
|
|
|
<thead class="sticky-thead">
|
|
|
|
|
<tr id="parsedInfoTheadTr--${pageName}">
|
|
|
|
|
<th style="min-width: 80px;">단속자료</th>
|
|
|
|
|
<th style="min-width: 80px;" title="더블클릭시 축소/확대 됩니다."
|
|
|
|
|
class="downsize" ondblclick="fnDownsizeToggle(this);" href="#">
|
|
|
|
|
파일명 <i class='bx bx-expand'></i>
|
|
|
|
|
</th>
|
|
|
|
|
<th style="min-width: 80px;">장비번호</th>
|
|
|
|
|
<th style="min-width: 80px;">차량속도</th>
|
|
|
|
|
<th style="min-width: 80px;">날짜</th>
|
|
|
|
|
<th style="min-width: 80px;">시간</th>
|
|
|
|
|
<th style="min-width: 80px;">차량번호</th>
|
|
|
|
|
<th style="min-width: 80px;">번호판위치x</th>
|
|
|
|
|
<th style="min-width: 80px;">번호판위치y</th>
|
|
|
|
|
<th style="min-width: 80px;">번호판width</th>
|
|
|
|
|
<th style="min-width: 80px;">번호판height</th>
|
|
|
|
|
<th style="min-width: 80px;">위치좌표x</th>
|
|
|
|
|
<th style="min-width: 80px;">위치좌표y</th>
|
|
|
|
|
<th style="min-width: 80px;">총사진갯수</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody></tbody>
|
|
|
|
|
<template class="found">
|
|
|
|
|
<tr data-key="{FILE_NAME}">
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{TEMP_GROUP_ID}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}"
|
|
|
|
|
title="{FILE_NAME}"
|
|
|
|
|
class="text-start text-truncate max-w-th">{FILE_NAME}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{EQUIPMENT}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CAR_VELOCITY}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_YMD}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_TM}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{VHRNO}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{MOSC_X}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{MOSC_Y}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{PLATE_WIDTH}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{PLATE_HEIGHT}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{GPS_X}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{GPS_Y}</td>
|
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{PHOTO_CNT}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</template>
|
|
|
|
|
<template class="notFound">
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top" colspan="17" class="dataTables_empty text-center">정보를 찾지 못했습니다.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</template>
|
|
|
|
|
</table>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card my-4 px-4 justify-content-center" style="width:600px;height:600px;">
|
|
|
|
|
<img id="img--${pageName}" src="" style="object-fit:contain;" />
|
|
|
|
|
<div id="imageArea--${pageName}" class="card my-4 px-4 justify-content-center" style="width:600px;height:600px;">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="card my-4 px-2" style="width:120px;height:600px;min-width:120px;">
|
|
|
|
@ -163,30 +216,34 @@ pageObject["${pageName}"] = {};
|
|
|
|
|
$(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
var $P = pageObject["${pageName}"];
|
|
|
|
|
$P.entType = "";
|
|
|
|
|
|
|
|
|
|
$P.tempGroup = {};
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.crdnControl = new DatasetControl({
|
|
|
|
|
$P.parsedInfoControl = new DatasetControl({
|
|
|
|
|
urls : { },
|
|
|
|
|
keymapper : info => info ? info.FILE_NAME : "",
|
|
|
|
|
dataGetter : obj => obj["List"],
|
|
|
|
|
formats: {
|
|
|
|
|
CRDN_YMD_TM : datetimeFormat
|
|
|
|
|
CRDN_YMD_TM : datetimeFormat,
|
|
|
|
|
CRDN_YMD : dateFormat,
|
|
|
|
|
CRDN_TM : timeFormat
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.crdnControl.onDatasetChange = (obj) => {
|
|
|
|
|
$P.renderCrdnList(obj["Total"]);
|
|
|
|
|
$P.parsedInfoControl.onDatasetChange = (obj) => {
|
|
|
|
|
|
|
|
|
|
$P.renderParsedInfoList(obj["Total"], $P.entType);
|
|
|
|
|
|
|
|
|
|
$("#crdnPaging--${pageName}").setPagingInfo({
|
|
|
|
|
list: $P.crdnControl.dataset,
|
|
|
|
|
prefix: "crdnPaging--${pageName}",
|
|
|
|
|
$("#parsedInfoPaging--${pageName}").setPagingInfo({
|
|
|
|
|
list: $P.parsedInfoControl.dataset,
|
|
|
|
|
prefix: "parsedInfoPaging--${pageName}",
|
|
|
|
|
start: obj["Start"],
|
|
|
|
|
totalSize: obj["Total"],
|
|
|
|
|
fetchSize: obj["Fetch"],
|
|
|
|
@ -194,24 +251,42 @@ $(document).ready(function(){
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.onCurrentChange = (item) => {
|
|
|
|
|
$P.parsedInfoControl.onCurrentChange = (item) => {
|
|
|
|
|
$("#imageArea--${pageName}").html("");
|
|
|
|
|
|
|
|
|
|
if(item && item.data){
|
|
|
|
|
var dataKey = item.data.FILE_NAME;
|
|
|
|
|
$("#crdnTbody--${pageName}").setCurrentRow(dataKey);
|
|
|
|
|
|
|
|
|
|
var url = item.data.FILE_PATH;
|
|
|
|
|
$("#img--${pageName}").attr("src",url);
|
|
|
|
|
} else {
|
|
|
|
|
$("#img--${pageName}").attr("src","");
|
|
|
|
|
if($P.entType != ""){
|
|
|
|
|
$("#table-responsive--${pageName}").find("."+$P.entType).find("tbody").setCurrentRow(dataKey);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(item.data.ENT_TYPE == "INO"){
|
|
|
|
|
var src = item.data.FILE_PATH;
|
|
|
|
|
$P.renderImage(src);
|
|
|
|
|
} else if(item.data.ENT_TYPE == "HITECOM"){
|
|
|
|
|
var srcArr = [
|
|
|
|
|
"data:image/jpg;base64,"+item.data.CAR_IMAGE,
|
|
|
|
|
"data:image/jpg;base64,"+item.data.PLATE_IMAGE
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
for(var i=1; i <= item.data.PHOTO_CNT-2; i++){
|
|
|
|
|
srcArr.push("data:image/jpg;base64," + item.data["MOVING_IMAGE"+i])
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.renderImage(srcArr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* pageObject.function
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
|
|
$P.searchFileList = () => {
|
|
|
|
|
if($("#entType--${pageName}").val() == ""){
|
|
|
|
|
//ftp체크
|
|
|
|
|
$P.checkFTP() = () => {
|
|
|
|
|
if($("#entType--${pageName}").val() == ""){
|
|
|
|
|
dialog.alert("장비업체를 선택하세요.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -227,24 +302,27 @@ $(document).ready(function(){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ajax.post({
|
|
|
|
|
url : wctx.url("/${taskSeCd}/crdn/crdn05/020/list.do"),
|
|
|
|
|
url : wctx.url("/${taskSeCd}/crdn/crdn05/020/importFileFromServer.do"),
|
|
|
|
|
data : { entType : $("#entType--${pageName}").val() },
|
|
|
|
|
success : (resp) => {
|
|
|
|
|
$("#img--${pageName}").attr("src","");
|
|
|
|
|
$P.crdnControl.setData(resp);
|
|
|
|
|
if(resp.saved){
|
|
|
|
|
$P.searchFileList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//로컬파일업로드
|
|
|
|
|
$P.uploadLocalFile = () => {
|
|
|
|
|
if($("#entType--${pageName}").val() == ""){
|
|
|
|
|
dialog.alert("장비업체를 선택하세요.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($("#entType--${pageName}").val() != "가산정보통신"
|
|
|
|
|
&& $("#entType--${pageName}").val() != "엘리소프트"
|
|
|
|
|
&& $("#entType--${pageName}").val() != "하이테콤"
|
|
|
|
|
if($("#entType--${pageName}").val() != "GASAN"
|
|
|
|
|
&& $("#entType--${pageName}").val() != "ELISOFT"
|
|
|
|
|
&& $("#entType--${pageName}").val() != "HITECOM"
|
|
|
|
|
&& $("#entType--${pageName}").val() != "XIT"
|
|
|
|
|
){
|
|
|
|
|
dialog.alert("해당 과태료 업무와 관련된 장비업체가 아닙니다.");
|
|
|
|
@ -258,31 +336,103 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
dialog.alert("주정차,전용차로,미세먼지 과태료 파일 등록 기능은 서비스 준비 중입니다.");
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
ajax.post({
|
|
|
|
|
url : wctx.url("/${taskSeCd}/crdn/crdn05/020/importFileFromClient.do"),
|
|
|
|
|
data : { entType : $("#entType--${pageName}").val() },
|
|
|
|
|
success : (resp) => {
|
|
|
|
|
if(resp.saved){
|
|
|
|
|
$P.searchFileList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.renderCrdnList = (total) => {
|
|
|
|
|
var crdnList = $P.crdnControl.dataset;
|
|
|
|
|
var empty = crdnList.empty;
|
|
|
|
|
var notFound = [document.getElementById("crdnNotFound--${pageName}").innerHTML];
|
|
|
|
|
var found = document.getElementById("crdnRow--${pageName}").innerHTML;
|
|
|
|
|
var replacer = (str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("FILE_NAME") + "');");
|
|
|
|
|
|
|
|
|
|
var trs = empty ? notFound : crdnList.inStrings(found,replacer);
|
|
|
|
|
|
|
|
|
|
$("#crdnTbody--${pageName}").html(trs.join());
|
|
|
|
|
//서버에 등록된 파일 조회
|
|
|
|
|
$P.searchFileList = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.parsedInfoControl.setData([]);
|
|
|
|
|
|
|
|
|
|
if($("#entType--${pageName}").val() == "INO"){
|
|
|
|
|
$P.entType = "ino";
|
|
|
|
|
} else if($("#entType--${pageName}").val() == "HITECOM"){
|
|
|
|
|
$P.entType = "hitecom";
|
|
|
|
|
} else {
|
|
|
|
|
$P.entType = "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!empty){
|
|
|
|
|
fnDownsizeCheck(document.getElementById("DataTables_Table_0--${pageName}"));
|
|
|
|
|
$("#table-responsive--${pageName}").find("span").attr("hidden","hidden");
|
|
|
|
|
$("#table-responsive--${pageName}").find("."+$P.entType).removeAttr("hidden");
|
|
|
|
|
|
|
|
|
|
ajax.post({
|
|
|
|
|
url : wctx.url("/${taskSeCd}/crdn/crdn05/020/list.do"),
|
|
|
|
|
data : { entType : $("#entType--${pageName}").val() },
|
|
|
|
|
success : (resp) => {
|
|
|
|
|
$P.parsedInfoControl.setData(resp);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//테이블 렌더링
|
|
|
|
|
$P.renderParsedInfoList = (total, entType) => {
|
|
|
|
|
if(entType != ""){
|
|
|
|
|
var parsedInfoList = $P.parsedInfoControl.dataset;
|
|
|
|
|
var empty = parsedInfoList.empty;
|
|
|
|
|
var notFound = [$("#table-responsive--${pageName}").find("."+entType).find("template.notFound")[0].innerHTML];
|
|
|
|
|
var found = $("#table-responsive--${pageName}").find("."+entType).find("template.found")[0].innerHTML;
|
|
|
|
|
var replacer = (str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickParsedInfoList('" + dataItem.getValue("FILE_NAME") + "');");
|
|
|
|
|
|
|
|
|
|
var trs = empty ? notFound : parsedInfoList.inStrings(found,replacer);
|
|
|
|
|
|
|
|
|
|
$("#table-responsive--${pageName}").find("."+entType).find("tbody").html(trs.join());
|
|
|
|
|
|
|
|
|
|
if(!empty){
|
|
|
|
|
fnDownsizeCheck($("#table-responsive--${pageName}").find("."+entType).find("table")[0]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.clickCrdnList = (dataKey) => {
|
|
|
|
|
//사진 표시
|
|
|
|
|
$P.renderImage = (src) => {
|
|
|
|
|
|
|
|
|
|
if(Array.isArray(src)){
|
|
|
|
|
var div = document.createElement("div");
|
|
|
|
|
div.style["margin-top"] = "20px";
|
|
|
|
|
div.style["margin-bottom"] = "20px";
|
|
|
|
|
div.style["overflow-y"] = "scroll";
|
|
|
|
|
for(var i=0; i < src.length; i++){
|
|
|
|
|
var span = document.createElement("span");
|
|
|
|
|
span.style["max-width"] = "260px";
|
|
|
|
|
span.style["max-height"] = "260px";
|
|
|
|
|
var img = document.createElement("img");
|
|
|
|
|
img.style["object-fit"] = "contain";
|
|
|
|
|
img.style["max-width"] = "inherit";
|
|
|
|
|
img.style["max-height"] = "inherit";
|
|
|
|
|
img.src = src[i];
|
|
|
|
|
span.appendChild(img);
|
|
|
|
|
div.appendChild(span);
|
|
|
|
|
}
|
|
|
|
|
$("#imageArea--${pageName}").append(div);
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
var img = document.createElement("img");
|
|
|
|
|
img.style["object-fit"] = "contain";
|
|
|
|
|
img.src = src;
|
|
|
|
|
$("#imageArea--${pageName}").append(img);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.clickParsedInfoList = (dataKey) => {
|
|
|
|
|
if(dataKey == ""){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.setCurrent(dataKey);
|
|
|
|
|
$P.parsedInfoControl.setCurrent(dataKey);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.createCrdn = () => {
|
|
|
|
@ -295,7 +445,7 @@ $(document).ready(function(){
|
|
|
|
|
var firstGroupKey = Object.keys($P.tempGroup)[0];
|
|
|
|
|
var formData = new FormData(document.getElementById("frmMultipart--${pageName}"));
|
|
|
|
|
formData.append("taskSeCd", "${taskSeCd}");
|
|
|
|
|
formData.append("entType", $("#entType--${pageName}").val());
|
|
|
|
|
formData.append("entType", $P.entType);
|
|
|
|
|
for(var i=0; i<$P.tempGroup[firstGroupKey].length; i++){
|
|
|
|
|
formData.append("linkFileInfos", JSON.stringify($P.tempGroup[firstGroupKey][i]));
|
|
|
|
|
}
|
|
|
|
@ -328,7 +478,7 @@ $(document).ready(function(){
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.deleteFile = () => {
|
|
|
|
|
var current = $P.crdnControl.getCurrent();
|
|
|
|
|
var current = $P.parsedInfoControl.getCurrent();
|
|
|
|
|
if(current == null) return;
|
|
|
|
|
|
|
|
|
|
var fileName = current.FILE_NAME;
|
|
|
|
@ -336,7 +486,7 @@ $(document).ready(function(){
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : wctx.url("/${taskSeCd}/crdn/crdn05/020/remove.do"),
|
|
|
|
|
data : {
|
|
|
|
|
entType : $("#entType--${pageName}").val(),
|
|
|
|
|
entType : $P.entType,
|
|
|
|
|
fileName : fileName
|
|
|
|
|
},
|
|
|
|
|
success : (resp) => {
|
|
|
|
@ -348,44 +498,52 @@ $(document).ready(function(){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.removeCallback = (removedFileName) => {
|
|
|
|
|
$P.crdnControl.dataset.remove(removedFileName);
|
|
|
|
|
$P.parsedInfoControl.dataset.remove(removedFileName);
|
|
|
|
|
$P.removeTableRow(removedFileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.removeTableRow = (removedFileName) => {
|
|
|
|
|
var fileListTable = document.getElementById("DataTables_Table_0--${pageName}");
|
|
|
|
|
if($P.entType != ""){
|
|
|
|
|
var fileListTable = $("#table-responsive--${pageName}").find("."+$P.entType).find("table");
|
|
|
|
|
|
|
|
|
|
var targetArr = [];
|
|
|
|
|
if(Array.isArray(removedFileName)){
|
|
|
|
|
targetArr = removedFileName;
|
|
|
|
|
} else {
|
|
|
|
|
targetArr = [removedFileName];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for(var i = 0; i < targetArr.length; i++){
|
|
|
|
|
var target = targetArr[i];
|
|
|
|
|
var tr = $(fileListTable).find("tbody").find("tr[data-key='"+target+"']");
|
|
|
|
|
var trIndex = $(fileListTable).find("tbody tr").index(tr);
|
|
|
|
|
fileListTable.deleteRow(trIndex+1);
|
|
|
|
|
var targetArr = [];
|
|
|
|
|
if(Array.isArray(removedFileName)){
|
|
|
|
|
targetArr = removedFileName;
|
|
|
|
|
} else {
|
|
|
|
|
targetArr = [removedFileName];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for(var i = 0; i < targetArr.length; i++){
|
|
|
|
|
var target = targetArr[i];
|
|
|
|
|
var tr = $(fileListTable).find("tbody").find("tr[data-key='"+target+"']");
|
|
|
|
|
var trIndex = $(fileListTable).find("tbody tr").index(tr);
|
|
|
|
|
fileListTable.deleteRow(trIndex+1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* element.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$("#btnSearch--${pageName}").on("click", function(){ $P.searchFileList(); });
|
|
|
|
|
$("#btnSearch--${pageName}").on("click", function(){ $P.checkFTP(); });
|
|
|
|
|
|
|
|
|
|
$("#btnFileUpload--${pageName}").on("click", function(){ $P.uploadLocalFile(); });
|
|
|
|
|
|
|
|
|
|
$("#btnInsertCrdn--${pageName}").on("click", function(){
|
|
|
|
|
$P.tempGroup = Object.groupBy($P.crdnControl.dataset.getDataset(), ({ TEMP_GROUP_ID }) => "temp"+TEMP_GROUP_ID);
|
|
|
|
|
$P.tempGroup = Object.groupBy($P.parsedInfoControl.dataset.getDataset(), ({ TEMP_GROUP_ID }) => "temp"+TEMP_GROUP_ID);
|
|
|
|
|
|
|
|
|
|
if($.isEmptyObject($P.tempGroup)){
|
|
|
|
|
alert("처리할 자료가 없습니다.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.createCrdn();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#btnDelete--${pageName}").on("click", function(){ $P.deleteFile(); });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.setData([]);
|
|
|
|
|
$P.parsedInfoControl.setData([]);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
</script>
|