첩보수집활동 SRI 모달 디자인 수정.

강석 최 2022-12-13 17:19:31 +09:00
parent 4ae6c80851
commit 68d95f0bb3
6 changed files with 91 additions and 112 deletions

View File

@ -38,7 +38,7 @@ public class FaRptController {
}
mav.addObject("searchUrl", "/faRpt/faRptBoard");
String accessAuth = authMgtService.selectAccessConfigList
(loginUser.getUserSeq(), "/affairPlan/planMgt").get(0).getAccessAuth();
(loginUser.getUserSeq(), "/faRpt/faRptBoard").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
if(faRptBoard.getActiveTab().equals("send")){

View File

@ -110,7 +110,7 @@ public class SriController {
@GetMapping("/sriViewModal")
public ModelAndView faRptViewModal(@AuthenticationPrincipal UserInfo loginUser, Sri sri){
ModelAndView mav = new ModelAndView("sri/sriViewModal");
mav.addObject("FaSri", sriService.selectFaSriBoard(sri.getFaSriKey(), loginUser.getUserSeq()));
mav.addObject("faSri", sriService.selectFaSriBoard(sri.getFaSriKey(), loginUser.getUserSeq()));
mav.addObject("userSeq",loginUser.getUserSeq());
//메뉴권한 확인
mav.addObject("accessAuth", authMgtService.selectAccessConfigList

View File

@ -68,19 +68,19 @@ public class SriService extends BaseService {
@Transactional
public Sri selectFaSriBoard(Integer faSriKey, Integer userSeq) {
Sri sri = sriRepository.findById(faSriKey).orElse(null);
if(sri != null){
sri.setFileList(sriFileRepository.findByFaSriKey(faSriKey));
sri.setReadUserList(sriReadUserRepository.findByFaSriKey(faSriKey));
if(sri.getStatus().equals("DST007")){
for(SriReadUser readUser: sri.getReadUserList()){
if(readUser.getUserSeq().equals(userSeq)){
readUser.setReadYn("T");
sriReadUserRepository.save(readUser);
}
}
}
}
return sri;
if(sri != null){
sri.setFileList(sriFileRepository.findByFaSriKey(faSriKey));
sri.setReadUserList(sriReadUserRepository.findByFaSriKey(faSriKey));
if(sri.getStatus().equals("DST007")){
for(SriReadUser readUser: sri.getReadUserList()){
if(readUser.getUserSeq().equals(userSeq)){
readUser.setReadYn("T");
sriReadUserRepository.save(readUser);
}
}
}
}
return sri;
}

View File

@ -29,15 +29,7 @@ function getSriEditModal(faSriKey){
language: "ko",
autoclose: true
});
CrossEditor = new NamoSE('editor');
CrossEditor.params.ParentEditor = document.getElementById("editor");
CrossEditor.params.Width = "100%";
CrossEditor.params.UserLang = "auto";
CrossEditor.params.NewToolbar = true;
CrossEditor.params.UploadFileExecutePath = "/Crosseditor/uploadImg";
CrossEditor.params.FullScreen = false;
$("#editor").show();
CrossEditor.EditorStart();
setEditor('editor', '500');
setUploadDiv();
$("#sriEditModal").modal('show');
},

View File

@ -78,7 +78,6 @@
<tr class="table-secondary">
<th></th>
<th th:if="${searchParams.status ne 'receive'}">상태</th>
<th>보고서<br>번호</th>
<th>분류</th>
<th>제출기한</th>
<th>제목</th>
@ -100,7 +99,6 @@
<th:text th:if="${commonCode.itemCd eq sri.status}" th:text="${commonCode.itemValue}"></th:text>
</th:block>
</td>
<td th:text="${sri.faSriKey}"></td>
<td>
<th:block th:each="commonCode:${session.commonCode.get('SRI')}">
<th:text th:if="${commonCode.itemCd eq sri.faSriType}" th:text="${commonCode.itemValue}"></th:text>

View File

@ -5,95 +5,58 @@
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="faSriViewBody">
<div class="row">
<div class="col-8">
<div class="row mb-1">
<label for="wrtUserNm" class="col-sm-2 col-form-label col-form-label-sm text-center">작성자</label>
<div class="col-sm-4">
<input type="hidden" id="faSriKey" th:value="${FaSri.faSriKey}">
<input type="hidden" id="wrtUserSeq" th:value="${FaSri.wrtUserSeq}">
<input type="hidden" id="wrtOrgan" th:value="${FaSri.wrtOrgan}">
<input type="hidden" id="wrtPart" th:value="${FaSri.wrtPart}">
<input type="hidden" id="wrtTitle" th:value="${FaSri.wrtTitle}">
<input type="text" class="form-control form-control-sm border-0" id="wrtUserNm" name="wrtUserNm" th:value="${FaSri.wrtUserNm}" readonly>
</div>
<label for="wrtDt" class="col-sm-2 col-form-label col-form-label-sm text-center">작성일시</label>
<div class="col-sm-4">
<input type="text" class="form-control form-control-sm border-0" id="wrtDt" name="wrtDt" th:value="${#temporals.format(FaSri.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
</div>
</div>
<div class="row mb-1">
<label for="faRptType" class="col-sm-2 col-form-label col-form-label-sm text-center">분류</label>
<div class="col-sm-4">
<th:block th:each="code:${session.commonCode.get('SRI')}">
<th:block th:if="${code.itemCd eq FaSri.faSriType}">
<input type="text" class="form-control form-control-sm border-0" id="faSriType" th:value="${code.itemValue}" readonly>
</th:block>
</th:block>
</div>
<label for="status" class="col-sm-2 col-form-label col-form-label-sm text-center">상태</label>
<div class="col-sm-4">
<input type="hidden" id="faSriKey" th:value="${faSri.faSriKey}">
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="boardTab" data-bs-toggle="tab" data-bs-target="#boardTabPanel" type="button" role="tab" aria-controls="boardTabPanel" aria-selected="true">본문</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="readUserTab" data-bs-toggle="tab" data-bs-target="#readUserTabPanel" type="button" role="tab" aria-controls="readUserTabPanel" aria-selected="false">수신자</button>
</li>
<li class="nav-item" role="presentation" th:if="${#lists.size(faSri.fileList)>0}">
<button class="nav-link" id="fileTab" data-bs-toggle="tab" data-bs-target="#fileTabPanel" type="button" role="tab" aria-controls="fileTabPanel" aria-selected="false" th:text="${#strings.concat('첨부파일(', #lists.size(faSri.fileList), ')')}"></button>
</li>
</ul>
<div class="tab-content bg-white border border-top-0 p-2">
<div class="tab-pane fade p-2 show active" id="boardTabPanel" role="tabpanel" tabindex="0">
<div class="row mb-1" th:if="${faSri.status eq 'DST001'}">
<label class="col-sm-1 col-form-label col-form-label-sm text-center">상태</label>
<label class="col-sm-1 col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('DST')}">
<th:block th:if="${code.itemCd eq FaSri.status}">
<input type="text" class="form-control form-control-sm border-0" id="status" th:value="${code.itemValue}" readonly>
</th:block>
<th:block th:if="${code.itemCd eq faSri.status}" th:text="${code.itemValue}"></th:block>
</th:block>
</div>
</label>
</div>
<div class="row mb-1">
<label for="title" class="col-sm-2 col-form-label col-form-label-sm text-center">제출기한</label>
<div class="col-sm-10">
<input type="text" class="form-control form-control-sm border-0" id="faSriEdate" name="faSriEdate" th:value="${FaSri.faSriEdate}" readonly>
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">분류</label>
<label class="col-sm-1 col-form-label col-form-label-sm text-start">
<th:block th:each="code:${session.commonCode.get('SRI')}">
<th:block th:if="${code.itemCd eq faSri.faSriType}" th:text="${code.itemValue}"></th:block>
</th:block>
</label>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">제출기한</label>
<label class="col-sm-1 col-form-label col-form-label-sm text-start" th:text="${faSri.faSriEdate}"></label>
<div class="col-sm-5"></div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">작성일시</label>
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${#temporals.format(faSri.wrtDt, 'yyyy-MM-dd HH:mm')}"></label>
</div>
<div class="row mb-1">
<label for="title" class="col-sm-2 col-form-label col-form-label-sm text-center">제목</label>
<div class="col-sm-10">
<input type="text" class="form-control form-control-sm border-0" id="title" name="title" th:value="${FaSri.title}" readonly>
</div>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">제목</label>
<label class="col-sm-8 col-form-label col-form-label-sm text-start" th:text="${faSri.title}"></label>
<label class="col-sm-1 col-form-label col-form-label-sm text-center">작성자</label>
<label class="col-sm-2 col-form-label col-form-label-sm text-start">
<th:block th:text="${faSri.wrtUserNm}"></th:block>
</label>
</div>
<hr class="my-1">
<div class="row mb-1 justify-content-center">
<label for="content" class="col-sm-2 col-form-label col-form-label-sm text-center">내용</label>
<div class="col-sm-10" id="content" th:utext="${FaSri.content}">
</div>
</div>
<div class="row mb-3">
<label for="fileTable" class="col-sm-2 col-form-label col-form-label-sm text-center">첨부파일</label>
<div class="col-sm-10">
<table class="table" id="fileTable">
<thead>
<tr>
<th>파일명</th>
<th>사이즈</th>
</tr>
</thead>
<tbody>
<th:block th:if="${#lists.isEmpty(FaSri.fileList)}">
<tr>
<td colspan="2">파일이 없습니다.</td>
</tr>
</th:block>
<th:block th:unless="${#lists.isEmpty(FaSri.fileList)}">
<th:block th:each="file:${FaSri.fileList}">
<tr class="fileInfoTr">
<td><a href="#" class="fileDownLink" data-board="sri"
th:data-parentkey="${file.faSriKey}" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td>
<td th:text="${file.fileSize}"></td>
</tr>
</th:block>
</th:block>
</tbody>
</table>
</div>
<label for="content" class="col-sm-1 col-form-label col-form-label-sm text-center">내용</label>
<div class="col-sm-11 form-control-sm" id="content" th:utext="${faSri.content}"></div>
</div>
</div>
<div class="col-4">
<div class="tab-pane fade p-2" id="readUserTabPanel" role="tabpanel" tabindex="0">
<div class="row">
<div class="col-12 pb-2">
<div class="row justify-content-start">
<div class="col-auto">■ 수신자</div>
</div>
</div>
<div class="col-1">no</div>
<div class="col-9">수신자</div>
<div class="col-2">열람</div>
@ -101,7 +64,7 @@
<hr class="my-1">
<div class="row">
<div class="col-12">
<th:block th:each="readUser, idx:${FaSri.readUserList}">
<th:block th:each="readUser, idx:${faSri.readUserList}">
<div class="row my-1">
<div class="col-1" th:text="${idx.index+1}"></div>
<div class="col-9">
@ -124,21 +87,47 @@
</div>
</div>
</div>
<div class="tab-pane fade p-2" id="fileTabPanel" role="tabpanel" tabindex="0">
<table class="table" id="fileTable">
<thead>
<tr>
<th>파일명</th>
<th>사이즈</th>
</tr>
</thead>
<tbody>
<th:block th:if="${#lists.isEmpty(faSri.fileList)}">
<tr>
<td colspan="2">파일이 없습니다.</td>
</tr>
</th:block>
<th:block th:unless="${#lists.isEmpty(faSri.fileList)}">
<th:block th:each="file:${faSri.fileList}">
<tr class="fileInfoTr">
<td><a href="#" class="fileDownLink" data-board="sri"
th:data-parentkey="${file.faSriKey}" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td>
<td th:text="${file.fileSize}"></td>
</tr>
</th:block>
</th:block>
</tbody>
</table>
</div>
</div>
</div>
<div class="modal-footer justify-content-between bg-light">
<div class="col-auto">
<th:block th:unless="${FaSri.status eq 'DST008'}">
<button type="button" class="btn btn-danger" id="deleteSri" th:if="${userSeq eq FaSri.wrtUserSeq} and ${accessAuth eq 'ACC003'}" th:data-fasrikey="${FaSri.faSriKey}">삭제</button>
<th:block th:unless="${faSri.status eq 'DST008'}">
<button type="button" class="btn btn-danger" id="deleteSri" th:if="${userSeq eq faSri.wrtUserSeq} and ${accessAuth eq 'ACC003'}" th:data-fasrikey="${faSri.faSriKey}">삭제</button>
</th:block>
</div>
<div class="col-auto">
<th:block th:if="${userSeq eq FaSri.wrtUserSeq}">
<button type="button" class="btn btn-warning" id="editFaSriBtn" th:data-fasrikey="${FaSri.faSriKey}">수정</button>
<th:block th:if="${userSeq eq faSri.wrtUserSeq}">
<button type="button" class="btn btn-warning" id="editFaSriBtn" th:data-fasrikey="${faSri.faSriKey}">수정</button>
</th:block>
<th:block th:if="${userSeq ne FaSri.wrtUserSeq}">
<th:block th:unless="${FaSri.faSriEdate eq null}">
<button type="button" class="btn btn-success" id="reSendBtn" th:if="${FaSri.faSriEdate} >= ${#temporals.createToday()}" th:data-fasrikey="${FaSri.faSriKey}">회신</button>
<th:block th:if="${userSeq ne faSri.wrtUserSeq}">
<th:block th:unless="${faSri.faSriEdate eq null}">
<button type="button" class="btn btn-success" id="reSendBtn" th:if="${faSri.faSriEdate} >= ${#temporals.createToday()}" th:data-fasrikey="${faSri.faSriKey}">회신</button>
</th:block>
</th:block>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>