공통게시판 수정3
parent
7dafd7ce53
commit
d39f33b8df
|
|
@ -1,5 +1,6 @@
|
|||
package com.dbnt.faisp.publicBoard;
|
||||
|
||||
import com.dbnt.faisp.codeMgt.service.CodeMgtService;
|
||||
import com.dbnt.faisp.config.Role;
|
||||
import com.dbnt.faisp.publicBoard.model.PublicBoard;
|
||||
import com.dbnt.faisp.publicBoard.model.PublicComment;
|
||||
|
|
@ -20,6 +21,7 @@ import java.util.List;
|
|||
@RequestMapping("/publicBoard")
|
||||
public class PublicBoardController {
|
||||
private final PublicBoardService publicBoardService;
|
||||
private final CodeMgtService codeMgtService;
|
||||
|
||||
@GetMapping("/noticePage")
|
||||
public ModelAndView organMgtPage(@AuthenticationPrincipal UserInfo loginUser, PublicBoard publicBoard) {
|
||||
|
|
@ -69,6 +71,7 @@ public class PublicBoardController {
|
|||
mav.addObject("referenceList", publicBoardService.selectContentList(publicBoard));
|
||||
publicBoard.setContentCnt(publicBoardService.selectContentListCnt(publicBoard));
|
||||
publicBoard.setPaginationInfo();
|
||||
mav.addObject("tabStatusList", codeMgtService.selectCodeMgtList("RPC"));
|
||||
mav.addObject("searchParams", publicBoard);
|
||||
return mav;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ public class PublicBoard extends BaseModel {
|
|||
private LocalDateTime wrtDt;
|
||||
@Column(name = "organ_chk")
|
||||
private String organChk;
|
||||
@Column(name = "tab_status")
|
||||
private String tabStatus;
|
||||
|
||||
@Transient
|
||||
private Integer fileCnt;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@
|
|||
<if test='publicType != null and publicType != ""'>
|
||||
and a.public_type = #{publicType}
|
||||
</if>
|
||||
<if test='wrtOrgan != null and wrtOrgan != ""'>
|
||||
and a.wrt_organ = #{wrtOrgan}
|
||||
</if>
|
||||
<if test="title != null and title != ''">
|
||||
AND a.title LIKE CONCAT('%', #{title}, '%')
|
||||
</if>
|
||||
|
|
@ -18,6 +21,9 @@
|
|||
<if test='endDate != null and endDate != ""'>
|
||||
and a.wrt_dt <= #{endDate}::date+1
|
||||
</if>
|
||||
<if test='tabStatus != null and tabStatus != ""'>
|
||||
and a.tab_status = #{tabStatus}
|
||||
</if>
|
||||
<if test="downOrganCdList != null or upOrganCdList != null">
|
||||
and a.public_key in (
|
||||
<if test="downOrganCdList != null">
|
||||
|
|
|
|||
|
|
@ -168,6 +168,12 @@ function contentCheck(formId){
|
|||
alert("제목을 입력해주세요.")
|
||||
flag = false;
|
||||
}
|
||||
if($("#publicType").val()==="PLB003"){
|
||||
if(!$("#tabStatus").val()){
|
||||
alert("분류를 선택해주세요.")
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
flag = fileCheck(flag, files);
|
||||
return flag;
|
||||
}
|
||||
|
|
@ -17,4 +17,8 @@ $(document).on('click', '#saveBtn', function (){
|
|||
$(document).on('click', '#editBtn', function (){
|
||||
$("#viewModal").modal('hide')
|
||||
getEditModal($("#viewModalPublicKey").val(), "PLB003")
|
||||
})
|
||||
})
|
||||
$(document).on('click', '.referenceTab', function (){
|
||||
location.href = "/publicBoard/referencePage?tabStatus="+$(this).attr('data-tabcd')
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
<li class="nav-item"><a href="#" class="nav-link p-1 link-dark"><i class="bi bi-bell-fill"></i></a></li>
|
||||
<li class="nav-item"><a href="/publicBoard/noticePage" class="nav-link p-1 link-dark">공지사항</a></li>
|
||||
<li class="nav-item"><a href="/publicBoard/boardPage" class="nav-link p-1 link-dark">게시판</a></li>
|
||||
<li class="nav-item"><a href="/publicBoard/referencePage" class="nav-link p-1 link-dark">자료실</a></li>
|
||||
<li class="nav-item"><a href="/publicBoard/referencePage?tabStatus=RPC001" class="nav-link p-1 link-dark">자료실</a></li>
|
||||
<li class="nav-item"><a href="/publicBoard/qnaPage" class="nav-link p-1 link-dark">Q&A</a></li>
|
||||
<li class="nav-item"><a href="/myInfo/myInfoPage" class="nav-link p-1 link-dark">마이페이지</a></li>
|
||||
<li class="nav-item"><a href="/logout" class="nav-link p-1 link-dark">로그아웃</a></li>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="제목" name="contentTitle" th:value="${searchParams.title}">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="제목" name="contentTitle" th:value="${searchParams.title}">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="제목" name="contentTitle" th:value="${searchParams.title}">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||
<input type="hidden" name="publicKey" th:value="${info.publicKey}">
|
||||
<input type="hidden" name="publicType" th:value="${info.publicType}">
|
||||
<input type="hidden" name="publicType" id="publicType" th:value="${info.publicType}">
|
||||
<input type="hidden" name="wrtOrgan" th:value="${info.wrtOrgan}">
|
||||
<input type="hidden" name="wrtPart" th:value="${info.wrtPart}">
|
||||
<input type="hidden" name="wrtUserSeq" th:value="${info.wrtUserSeq}">
|
||||
|
|
@ -18,14 +18,33 @@
|
|||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" id="wrtUserNm" name="wrtUserNm" th:value="${info.wrtUserNm}" readonly>
|
||||
</div>
|
||||
<label for="wrtDt" class="col-sm-2 col-form-label text-center">작성일시</label>
|
||||
<label for="wrtDt" class="col-sm-1 col-form-label text-center">작성일시</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" id="wrtDt" name="wrtDt" th:value="${#temporals.format(info.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
|
||||
</div>
|
||||
<div class="col-sm-auto my-auto">
|
||||
<input type="checkbox" id="organChk" name="organChk" value="T" th:checked="${info.organChk eq 'T'}">
|
||||
</div>
|
||||
<label for="organChk" class="col-sm-3 col-form-label text-left">소속관서에만 노출</label>
|
||||
<label for="organChk" class="col-sm-2 col-form-label text-left">소속관서에만 노출</label>
|
||||
<!-- <div class="col-sm-2" >-->
|
||||
<!-- <select class="form-select form-select-sm" name="tabStatusList" id="tabStatusList" style="font-size: 1rem">-->
|
||||
<!-- <option value="">메뉴 선택-</option>-->
|
||||
<!-- <th:block th:each="tab:${tab.get('RPC')}">-->
|
||||
<!-- <option th:value="${tab.itemCd}" th:text="${tab.itemValue}"-->
|
||||
<!-- th:selected=""></option>-->
|
||||
<!-- </th:block>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<div class="col-sm-2">
|
||||
<select class="form-select form-select-sm" name="tabStatus" id="tabStatus" style="font-size: 1rem">
|
||||
<option value="">분류 선택</option>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('RPC')}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}">
|
||||
</option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="title" class="col-sm-2 col-form-label text-center">제목</label>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,14 @@
|
|||
<div layout:fragment="content">
|
||||
<main class="pt-3">
|
||||
<h4>자료실</h4>
|
||||
<ul class="nav nav-tabs" id="boardTab" role="tablist">
|
||||
<th:block th:each="tab:${tabStatusList}">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link referenceTab" th:data-tabcd="${tab.itemCd}" th:classappend="${tab.itemCd eq searchParams.tabStatus?'active':''}" data-bs-toggle="tab" type="button" role="tab" th:text="${tab.itemValue}"></button>
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
|
||||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||
<div class="row mx-0">
|
||||
|
|
@ -17,6 +25,7 @@
|
|||
<div class="card-body">
|
||||
<form method="get" th:action="@{/publicBoard/referencePage}">
|
||||
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||
<input type="hidden" name="tabStatus" th:value="${searchParams.tabStatus}">
|
||||
<div class="row justify-content-between pe-3 py-1">
|
||||
<div class="col-auto">
|
||||
<select class="form-select" name="rowCnt" id="rowCnt">
|
||||
|
|
@ -31,14 +40,15 @@
|
|||
<select class="form-select form-select-sm" name="wrtOrgan">
|
||||
<option value="">관서 선택</option>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
|
||||
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd
|
||||
)}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.wrtOrgan}"></option>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="제목" name="contentTitle" th:value="${searchParams.title}">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="제목" name="title" th:value="${searchParams.title}">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
<div class="row">
|
||||
<div class="col-12">
|
||||
<input type="hidden" name="publicKeyKey" id="viewModalPublicKey" th:value="${info.publicKey}">
|
||||
|
||||
<div class="mb-3 row">
|
||||
<label for="wrtUserNm" class="col-sm-1 col-form-label text-center">작성자</label>
|
||||
<div class="col-sm-2">
|
||||
|
|
@ -21,6 +22,13 @@
|
|||
<input type="checkbox" id="organChk" name="organChk" th:checked="${info.organChk eq 'T'}" disabled>
|
||||
</div>
|
||||
<label for="organChk" class="col-sm-2 col-form-label text-left">소속관서에만 노출</label>
|
||||
<div class="col-sm-2">
|
||||
<th:block th:each="commonCode:${session.commonCode.get('RPC')}">
|
||||
<th:block th:if="${commonCode.itemCd eq info.tabStatus}">
|
||||
<input type="text" class="form-control border-0" id="tabStatus" name="tabStatus" th:value="${commonCode.itemValue}" readonly>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
|
|
|
|||
Loading…
Reference in New Issue