- Add Docker Compose configurations for dev, prod, and standalone environments - Add database initialization scripts (init-db.sh, init-db-docker.sh) - Add enhanced start-docker-linux.sh with DB init support - Add comprehensive database initialization guide - Support for automatic dbexport.pgsql import on first run - Include safety checks for production environment
192 lines
8.5 KiB
Plaintext
192 lines
8.5 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%
|
|
/** 넌진짜 그러면 안되 pch제타맨
|
|
<jsp:include page="/WEB-INF/view/common/fileWidget_include.jsp">
|
|
<jsp:param name="fileType" value="AS_IMG_01" />
|
|
<jsp:param name="fileTypeTxt" value="AS 이미지01" />
|
|
<jsp:param name="viewType" value="IMG1" />
|
|
<jsp:param name="imgStyle" value="width:96% !important; height:132px; margin:0;padding:0;" />
|
|
<jsp:param name="isModify" value="${isModify}" />
|
|
<jsp:param name="targetObjid" value="${info.OBJID}" />
|
|
<jsp:param name="actionType" value="${param.actionType}" />
|
|
<jsp:param name="writer" value="${info.WRITER}" />
|
|
<jsp:param name="connectUserId" value="${connectUserId}" />
|
|
</jsp:include>
|
|
*/
|
|
String fileType = (String)request.getParameter("fileType" ); //${param.fileType } 파일타입코드
|
|
String fileTypeTxt = (String)request.getParameter("fileTypeTxt" ); //${param.fileTypeTxt } 파일타입설명
|
|
String targetObjid = (String)request.getParameter("targetObjid" ); //${param.targetObjid } key
|
|
String viewType = (String)request.getParameter("viewType" ); //${param.viewType } 뷰타입 : IMG1 / IMG2 / LIST
|
|
String imgStyle = (String)request.getParameter("imgStyle" ); //${param.imgStyle } 뷰타입 : IMG 일때 이미지 스타일 (ex: width:96% !important; height:132px; margin:0;padding:0;)
|
|
String isModify = (String)request.getParameter("isModify" ); //${param.isModify } 수정가능여부(결재중 등 수정불가)
|
|
String actionType = (String)request.getParameter("actionType" ); //${param.actionType } 등록regist / 수정
|
|
String writer = (String)request.getParameter("writer" ); //${param.writer } 등록자
|
|
String connectUserId = (String)request.getParameter("connectUserId"); //${param.connectUserId } 접속자
|
|
%>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
fnc_setFileDropZone("${param.fileType}"+"DropZone", "${param.targetObjid}", "${param.fileType}", "${param.fileTypeTxt}", "fn_fileCallback${param.fileType}", false, null, null);
|
|
fn_fileCallback<%= fileType %>();
|
|
$("input[type=button]#btnUpload${param.fileType}").click(function(){
|
|
var files = $("input[type=file]#${param.fileType}")[0].files;
|
|
if(files.length > 0){
|
|
fnc_fileMultiUpload(files, null, "${param.targetObjid}", "${param.fileType}", "${param.fileType}", null, "fn_fileCallback${param.fileType}");
|
|
$("input[type=file]#${param.fileType}").val(""); //file객체 초기화
|
|
}else{
|
|
Swal.fire("선택된 File이 없습니다.");
|
|
}
|
|
});
|
|
|
|
<% if(!isModify.equals("true")){ %>
|
|
$('input:file#${param.fileType}').remove();
|
|
$("div#${param.fileType}DropZone").remove(); //파일드롭존
|
|
$("div#delete_btn${param.fileType}").parent("a").remove(); //파일삭제
|
|
<% } %>
|
|
});
|
|
|
|
//첨부파일 목록을 가져온다.
|
|
function fn_fileCallback<%= fileType %>(){
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${param.targetObjid}", "docType":"${param.fileType}"},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
if(0 < data.length){
|
|
//첨부파일 목록 영역 show
|
|
$("#${param.fileType}FileArea").empty();
|
|
|
|
<% if(viewType.equals("IMG2")){ %>
|
|
$("#${param.fileType}DropZone").hide();
|
|
$("#${param.fileType}FileArea").show();
|
|
<% } %>
|
|
|
|
$.each(data, function(i){
|
|
var appendText = "";
|
|
<% if(viewType.equals("IMG1") || viewType.equals("IMG2")){ %>
|
|
var path = data[i].FILE_PATH;
|
|
var fileName = data[i].SAVED_FILE_NAME;
|
|
var fileExt = data[i].UPPER_FILE_EXT;
|
|
var srcLocation = encodeURI("/common/viewImage.do?realFileName="+data[i].REAL_FILE_NAME+"&savedFileName="+data[i].SAVED_FILE_NAME+"&attDir="+data[i].FILE_PATH);
|
|
//appendText+= "<img src='"+srcLocation+"' style='width:96% !important; height:132px; margin:0;padding:0;' onclick=\"openImagePopUp(this.src)\" style='cursor:pointer;' />";
|
|
appendText+= "<img src='"+srcLocation+"' style='${param.imgStyle}' style='cursor:pointer;' onclick=\"openImagePopUp${param.fileType}(this.src)\" />";
|
|
appendText+= "<div class='align_l'><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'> "+data[i].REAL_FILE_NAME+"</a>";
|
|
<% if(actionType.equals("regist") || writer.equals( connectUserId ) || connectUserId.equals("plm_admin")){ %>
|
|
appendText+= "<a href='javascript:fn_fileDelete${param.fileType}(\""+data[i].OBJID+"\")'><div class='delete_btn' id='delete_btn${param.fileType}'></div></a>";
|
|
<% } %>
|
|
appendText+= "</div>";
|
|
<% }else{ %>
|
|
appendText += "<tr>";
|
|
appendText += " <td>"+[i+1]+"</td>";
|
|
appendText += " <td class='align_l'><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'> "+data[i].REAL_FILE_NAME+"</a>";
|
|
<% if(actionType.equals("regist") || writer.equals( connectUserId ) || connectUserId.equals("plm_admin")){ %>
|
|
appendText += " <a href='javascript:fn_fileDelete${param.fileType}(\""+data[i].OBJID+"\")'><div class='delete_btn' id='delete_btn${param.fileType}'></div></a>";
|
|
<% } %>
|
|
appendText += " </td>";
|
|
appendText += " <td>"+data[i].REGDATE+"</td>";
|
|
appendText += "</tr>";
|
|
<% } %>
|
|
$("#${param.fileType}FileArea").append(appendText);
|
|
});
|
|
}else{
|
|
$("#${param.fileType}DropZone").show();
|
|
$("#${param.fileType}FileArea").empty();
|
|
/* var appendText = "";
|
|
appendText += "<tr>";
|
|
appendText += "<td>첨부 파일이 없습니다.</td>";
|
|
appendText +="</tr>";
|
|
$("#${param.fileType}FileArea").append(appendText); */
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}//파일 첨부 END
|
|
//첨부 파일 삭제
|
|
function fn_fileDelete<%= fileType %>(fileObjid){
|
|
if(confirm("파일을 삭제하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/common/deleteFileInfo.do",
|
|
type:"POST",
|
|
data:{"objId":fileObjid},
|
|
dataType:"json",
|
|
async:true,
|
|
success:function(data){
|
|
fn_fileCallback<%= fileType %>();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
//이미지보기팝업
|
|
function openImagePopUp<%= fileType %>(url){
|
|
var img=new Image();
|
|
img.src=url;
|
|
fn_centerPopup(img.width+30, img.height+30, url, "ImgPopUp${param.fileType}");
|
|
}
|
|
</script>
|
|
<% if(viewType.equals("IMG1")){ %>
|
|
<div id="${param.fileType}DropZone" class="dropzone" style="width:95% !important; height:30px; margin-top:30px;padding:0; line-height: 30px;">Drag & Drop Image Files Here</div>
|
|
<div class="in_table_scroll_wrap" style="height: 100%; width:100%;">
|
|
<div id="${param.fileType}FileArea"></div>
|
|
</div>
|
|
<% }else if(viewType.equals("IMG2")){ %>
|
|
<div id="${param.fileType}DropZone" class="dropzone" style="width:95%;height:93%; border:2px dotted rgb(130, 150, 194); display: flex; justify-content:center; align-items:center; ">
|
|
<div class="blink">Drag & Drop Image Files Here</div>
|
|
</div>
|
|
<div id="${param.fileType}FileArea" style="display:none;"></div>
|
|
<% }else{ %>
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
<col width="12.5%">
|
|
</colgroup>
|
|
<tr>
|
|
<td colspan="6">
|
|
<div id="${param.fileType}DropZone" class="dropzone" style="width:99%; height:30px; !important;">Drag & Drop Files Here</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="6">
|
|
<div class="project_form_in_table" style="width: 100%" id="${param.fileType}FileAreaTable">
|
|
<input type="file" name="${param.fileType}" id="${param.fileType}" multiple>
|
|
<input type="button" id="btnUpload${param.fileType}" value="Upload" class="upload_btns">
|
|
<div style="overflow-y: scroll;">
|
|
<table style="width: 100%;">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="*">
|
|
<col width="20%">
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td>No</td>
|
|
<td>첨부파일명</td>
|
|
<td>등록일</td>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
<div class="plm_scroll_table" style="height: 45px;">
|
|
<table class="fileListscrollTbody">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="*">
|
|
<col width="20%">
|
|
</colgroup>
|
|
<tbody id="${param.fileType}FileArea"></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<% } %> |