- 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
289 lines
8.9 KiB
Plaintext
289 lines
8.9 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%@include file= "/init.jsp" %>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
|
|
<!-- //JSTL 변수선언 -->
|
|
<c:set var="totalCount" value="${empty TOTAL_COUNT?0:TOTAL_COUNT}" />
|
|
<c:set var="maxPage" value="${empty MAX_PAGE_SIZE?1:MAX_PAGE_SIZE}" />
|
|
<c:set var="nPage" value="${empty param.page?1:param.page}" />
|
|
<c:set var="pageIndex" value="${(nPage-1)/10}" />
|
|
<c:set var="nextPage" value="${empty NEXT_PAGE?1:NEXT_PAGE}" />
|
|
<c:set var="prevPage" value="${empty PREV_PAGE?1:PREV_PAGE}" />
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function(){
|
|
|
|
$(document).ready(function(){
|
|
fnc_datepick();
|
|
});
|
|
|
|
//엔터키로 조회
|
|
$("input").keyup(function(e){
|
|
if(e.keyCode == 13){
|
|
document.form1.page.value = "1";
|
|
fn_search();
|
|
}
|
|
});
|
|
|
|
//Form Popup
|
|
$("#btnRegist").click(function(){
|
|
fn_registFormPopup();
|
|
});
|
|
|
|
//Detail Popup
|
|
$(".btnDetail").click(function(){
|
|
var userId = $(this).attr("data-USER_ID");
|
|
fn_registDetailPopup(userId);
|
|
});
|
|
|
|
//search
|
|
$("#btnSearch").click(function(){
|
|
document.form1.page.value = "1";
|
|
fn_search();
|
|
});
|
|
|
|
// 전체 선택
|
|
$("#firstCheck").click(function(){
|
|
if($("#firstCheck").prop("checked")){
|
|
$("input[name=IdCheck]").prop("checked",true);
|
|
}else{
|
|
$("input[name=IdCheck]").prop("checked",false);
|
|
}
|
|
})
|
|
|
|
// 부분체크해제
|
|
$("input[name=IdCheck]").click(function(){
|
|
if($("#firstCheck").is(":checked")){
|
|
$("#firstCheck").prop("checked",false);
|
|
}
|
|
})
|
|
|
|
//삭제
|
|
$("#btnDelete").click(function(){
|
|
fn_delete();
|
|
});
|
|
|
|
});
|
|
|
|
function fn_delete(){
|
|
if(0 < $("input[name=IdCheck]:checked").length){
|
|
if(confirm("선택한 사용자 정보를 삭제하시겠습니까?")){
|
|
var param = $("#form1").serialize();
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "/admin/deleteUserInfo.do",
|
|
data: param,
|
|
dataType:"json",
|
|
success:function(data){
|
|
if(data.result == 'true'){
|
|
Swal.fire("삭제되었습니다.");
|
|
fn_search();
|
|
};
|
|
}
|
|
,error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}else{
|
|
Swal.fire("선택한 항목이 없습니다.");
|
|
}
|
|
}
|
|
|
|
//조회 기능
|
|
function fn_search(){
|
|
document.form1.action = "/admin/userMngList.do";
|
|
document.form1.submit();
|
|
}
|
|
|
|
//기타사용자 등록 Form Popup
|
|
function fn_registFormPopup(){
|
|
var params = "";
|
|
window.open("/admin/userFormPopup.do"+params,"userFormPopup","width=500,height=620");
|
|
}
|
|
|
|
//기타사용자 상세 Detail Popup
|
|
function fn_registDetailPopup(userId){
|
|
var params = "?userId="+userId;
|
|
window.open("/admin/userFormPopup.do"+params,"userDetailPopup","width=500,height=620");
|
|
}
|
|
|
|
//상태값 수정
|
|
function changeStatus(user_id, status){
|
|
$.ajax({
|
|
url:"/admin/changeUserStatus.do",
|
|
type:"POST",
|
|
data:{"user_id":user_id, "status":status},
|
|
dataType:"text",
|
|
success:function(data){
|
|
fn_search();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
//프로젝트에 해당하는 WBS Task 목록 PopUp을 호출한다.
|
|
function fn_openUserHistory(userId){
|
|
if(null != userId){
|
|
window.open("/admin/userHistoryList.do?user_id="+userId, "", "width=950, height=500");
|
|
}else{
|
|
Swal.fire("잘못된 접근입니다.");
|
|
}
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name="form1" id="form1" method="post">
|
|
<input type="hidden" name="actionType" id="actionType" value="" />
|
|
<section id="commonSection" class="admin1">
|
|
<div class="admin_title">
|
|
<h2>사용자 관리</h2>
|
|
</div>
|
|
<div id="adminFormWrap">
|
|
<table id="adminForm">
|
|
<tbody>
|
|
<tr>
|
|
<%--
|
|
<td class="label"><label>업체구분</label></td>
|
|
<td><input type="text" id="search_userTypeName" name="search_userTypeName" value="${param.search_userTypeName}" maxlength="16"></td>
|
|
--%>
|
|
<td class="label"><label>구분</label></td>
|
|
<td><select id="search_user_type" name="search_user_type" >
|
|
<option value="A">전체</option>
|
|
<option value="U" ${param.search_user_type eq 'U' ? 'selected' : ''}>사용자</option>
|
|
<option value="P" ${param.search_user_type eq 'P' ? 'selected' : ''}>업체</option>
|
|
</select>
|
|
</td>
|
|
|
|
<td class="label"><label>부서명</label></td>
|
|
<td><input type="text" id="search_deptName" name="search_deptName" value="${param.search_deptName}" maxlength="16"></td>
|
|
<td class="label"><label>사용자명</label></td>
|
|
<td><input type="text" id="search_userName" name="search_userName" value="${param.search_userName}" maxlength="16"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div id="adminBtnWrap">
|
|
<input type="button" value="조회" class="btns" id="btnSearch">
|
|
<input type="button" value="사용자 등록" class="btns" id="btnRegist">
|
|
<input type="button" value="삭제" class="btns" id="btnDelete">
|
|
</div>
|
|
<div id="adminTableWrap">
|
|
<div id="tableWrap">
|
|
<table id="adminTable">
|
|
<colgroup>
|
|
<col width="5%" />
|
|
<col width="4%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="12%" />
|
|
<col width="20%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="40px" />
|
|
</colgroup>
|
|
<tr id="thead">
|
|
<td><input type="checkbox" name="" value="" id="firstCheck" ></td>
|
|
<td>No</td>
|
|
<td>부서명</td>
|
|
<td>사용자 ID</td>
|
|
<td>사용자명</td>
|
|
<td>전화번호</td>
|
|
<td>이메일</td>
|
|
<td>등록일</td>
|
|
<td>상태</td>
|
|
<td>퇴직자 처리일</td>
|
|
<td>이력</td>
|
|
</tr>
|
|
<c:choose>
|
|
<c:when test="${!empty LIST}">
|
|
<c:forEach var="info" items="${LIST}" varStatus="status">
|
|
<tr>
|
|
<td><input type="checkbox" name="IdCheck" value="${info.USER_ID}"></td>
|
|
<td>${info.RNUM}</td>
|
|
<td>${info.DEPT_NAME}</td>
|
|
<td style="text-align:left; padding-left: 5px;"><a href="#" class="btnDetail" data-USER_ID="${info.USER_ID}">${info.USER_ID}</a></td>
|
|
<td><a href="#" class="btnDetail" data-USER_ID="${info.USER_ID}">${info.USER_NAME}</a></td>
|
|
<td>${info.CELL_PHONE}</td>
|
|
<td style="text-align:left; padding-left: 5px;">${info.EMAIL}</td>
|
|
<td>${info.REGDATE}</td>
|
|
<td>
|
|
<select onchange="javascript:changeStatus('${info.USER_ID}',this.value);">
|
|
<option value="active" ${info.STATUS eq 'active' ? 'selected' : ''}>활성화</option>
|
|
<option value="inActive" ${info.STATUS eq 'inActive' ? 'selected' : ''}>비활성화</option>
|
|
</select>
|
|
</td>
|
|
<td>${info.ENDDATE}</td>
|
|
<td><input type="button" class="blue_btn" value="이력" onclick="fn_openUserHistory('${info.USER_ID}');" style="float:none;"></td>
|
|
|
|
</tr>
|
|
</c:forEach>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td align="center" colspan="11">조회된 정보가 없습니다.</td>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="pdm_page">
|
|
<input type="hidden" name="page" id="page" value="${nPage}">
|
|
<c:if test="${!empty LIST}">
|
|
<div class="page_pro">
|
|
<center>
|
|
<table>
|
|
<tr>
|
|
<c:choose>
|
|
<c:when test="${nPage > 1}">
|
|
<td><a href="javascript:fnc_goPrev('${prevPage}');">prev</a></td>
|
|
<td> </td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td class="no_more_page">prev</td>
|
|
<td> </td>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
<c:forEach var="v" begin="${nPage>5?nPage-5:1}" end="${nPage>5?nPage+4:10}" step="1" varStatus="status">
|
|
<c:if test="${status.index -1 < maxPage}">
|
|
<c:choose>
|
|
<c:when test="${status.index eq nPage}">
|
|
<td><a href="#" class="now_page">${nPage}</a></td>
|
|
<td> </td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td><a href="javascript:fnc_goPage('${status.index}');">${status.index}</a></td>
|
|
<td> </td>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</c:if>
|
|
</c:forEach>
|
|
<c:choose>
|
|
<c:when test="${nPage < maxPage}">
|
|
<td><a href="javascript:fnc_goNext('${nextPage}');">next</a></td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td class="no_more_page">next</td>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</tr>
|
|
</table>
|
|
<p id="adminPageCount">총 ${totalCount}건</p>
|
|
</center>
|
|
</div>
|
|
</c:if>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |