fix : 방첩활동 중간저장
parent
a576faa1cb
commit
cb12ee46d0
|
|
@ -114,6 +114,7 @@ public class CounterIntelligenceController {
|
||||||
public ModelAndView ciaSaftyDemandList(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceActivity cia){
|
public ModelAndView ciaSaftyDemandList(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceActivity cia){
|
||||||
ModelAndView mav = new ModelAndView("counterIntelligence/ciaSaftyDemandList");
|
ModelAndView mav = new ModelAndView("counterIntelligence/ciaSaftyDemandList");
|
||||||
|
|
||||||
|
cia.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||||
cia.setQueryInfo();
|
cia.setQueryInfo();
|
||||||
mav.addObject("sdiList", ciService.selectCiaSaftyDemandList(cia));
|
mav.addObject("sdiList", ciService.selectCiaSaftyDemandList(cia));
|
||||||
cia.setContentCnt(ciService.selectCiaSaftyDemandListCnt(cia));
|
cia.setContentCnt(ciService.selectCiaSaftyDemandListCnt(cia));
|
||||||
|
|
@ -152,4 +153,13 @@ public class CounterIntelligenceController {
|
||||||
ciService.saveSaftyDemand(cia);
|
ciService.saveSaftyDemand(cia);
|
||||||
return ciKey;
|
return ciKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/ciaSaftyDemandViewModal")
|
||||||
|
public ModelAndView ciaSaftyDemandViewModal(@AuthenticationPrincipal UserInfo loginUser, CounterIntelligenceActivity cia){
|
||||||
|
ModelAndView mav = new ModelAndView("counterIntelligence/ciaSaftyDemandViewModal");
|
||||||
|
mav.addObject("lineSeparator", '\n');
|
||||||
|
mav.addObject("viewUserSeq", loginUser.getUserSeq());
|
||||||
|
mav.addObject("cia", ciService.selectSaftyDemandInfo(cia));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,10 @@
|
||||||
from counter_intelligence_activity cia,
|
from counter_intelligence_activity cia,
|
||||||
safty_demand_info sdi
|
safty_demand_info sdi
|
||||||
where cia.ci_key = sdi.ci_key
|
where cia.ci_key = sdi.ci_key
|
||||||
|
and cia.wrt_organ in
|
||||||
|
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
ORDER BY cia.ci_key DESC
|
ORDER BY cia.ci_key DESC
|
||||||
LIMIT #{rowCnt} OFFSET #{firstIndex}
|
LIMIT #{rowCnt} OFFSET #{firstIndex}
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -171,6 +175,10 @@
|
||||||
from counter_intelligence_activity cia,
|
from counter_intelligence_activity cia,
|
||||||
safty_demand_info sdi
|
safty_demand_info sdi
|
||||||
where cia.ci_key = sdi.ci_key
|
where cia.ci_key = sdi.ci_key
|
||||||
|
and cia.wrt_organ in
|
||||||
|
<foreach collection="downOrganCdList" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
ORDER BY cia.ci_key DESC
|
ORDER BY cia.ci_key DESC
|
||||||
)a
|
)a
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -50,5 +50,21 @@ $(document).on('click', '#saveBtn', function (){
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '.sdiTr', function (){
|
$(document).on('click', '.sdiTr', function (){
|
||||||
getCiaSaftyDemandEditModal($(this).find(".ciKey").val());
|
getCiaSaftyDemandViewModal($(this).find(".ciKey").val());
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function getCiaSaftyDemandViewModal(ciKey){
|
||||||
|
$.ajax({
|
||||||
|
url: '/counterIntelligence/ciaSaftyDemandViewModal',
|
||||||
|
data: {ciKey: ciKey},
|
||||||
|
type: 'GET',
|
||||||
|
dataType:"html",
|
||||||
|
success: function(html){
|
||||||
|
$("#ciWorkViewModalBody").empty().append(html)
|
||||||
|
$("#ciWorkViewModal").modal('show');
|
||||||
|
},
|
||||||
|
error:function(){
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@
|
||||||
<main>
|
<main>
|
||||||
<div class="row justify-content-between">
|
<div class="row justify-content-between">
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<h4>방첩공작</h4>
|
<h4>치안수요 분석결과</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<p class="mb-0 mt-2">외사방첩관리 > 방첩공작</p>
|
<p class="mb-0 mt-2">외사방첩관리 > 방첩활동 > 치안수요 분석결과</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||||
|
|
|
||||||
|
|
@ -1,62 +1,82 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
<div class="modal-header bg-dark">
|
<div class="modal-header bg-dark">
|
||||||
<h5 class="modal-title text-white">치안수요 등록</h5>
|
<h5 class="modal-title text-white" id="ciWorkViewModalLabel">방첩공작 열람</h5>
|
||||||
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close f-invert" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" id="ivsgtEditBody">
|
<div class="modal-body" id="ciWorkViewBody">
|
||||||
<form action="#" method="post" id="ciaSaftyDemandEditForm">
|
<input type="hidden" id="ciKey" th:value="${cia.ciKey}">
|
||||||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
<ul class="nav nav-tabs" id="userTab" role="tablist">
|
||||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
<li class="nav-item" role="presentation">
|
||||||
<input type="hidden" name="ciType" value="SDI">
|
<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" th:if="${#lists.size(cia.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(cia.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">
|
<div class="row mb-1">
|
||||||
<label for="wrtNm" class="col-sm-1 col-form-label col-form-label-sm text-center">작성자</label>
|
<div class="col-sm-9"></div>
|
||||||
<div class="col-sm-2">
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">작성일시</label>
|
||||||
<input type="text" class="form-control form-control-sm" placeholder="작성자자동입력" readonly>
|
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${#temporals.format(cia.wrtDt, 'yyyy-MM-dd HH:mm')}"></label>
|
||||||
</div>
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">작성자</label>
|
||||||
<label for="wrtDt" 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="${cia.wrtUserNm}"></label>
|
||||||
<div class="col-sm-2">
|
|
||||||
<input type="text" class="form-control form-control-sm" th:value="${#temporals.format(cia.wrtDt, 'yyyy-MM-dd HH:mm')}" placeholder="작성일자동입력" readonly>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<hr class="my-1">
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label for="contentInfoDiv" 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-center fw-bold">사건개요</label>
|
||||||
<div class="col-sm-11" id="contentInfoDiv">
|
<div class="col-sm-11 form-control-sm" th:utext="${#strings.replace(cia.saftyDemandInfo.localInfo, lineSeparator, '<br>')}"></div>
|
||||||
<textarea class="form-control form-control-sm" rows="5" cols="30" name="localInfo" th:utext="${cia.saftyDemandInfo.localInfo}"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<hr class="my-1">
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label for="contentInfoDiv" 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-center fw-bold">내용</label>
|
||||||
<div class="col-sm-11" id="contentInfoDiv">
|
<div class="col-sm-11 form-control-sm" th:utext="${ciWork.content}"></div>
|
||||||
<textarea class="form-control form-control-sm" rows="5" cols="30" name="outlookProblem" th:utext="${cia.saftyDemandInfo.outlookProblem}"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<hr class="my-1">
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<label for="fileInputer" 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-center fw-bold">해시태그</label>
|
||||||
<div class="col-sm-11" style="min-height: 70px;">
|
<label class="col-sm-11 col-form-label col-form-label-sm text-start" th:text="${ciWork.hashTags}"></label>
|
||||||
<div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv">
|
</div>
|
||||||
<th:block th:if="${#arrays.isEmpty(cia.fileList)}">
|
</div>
|
||||||
<br>파일을 업로드 해주세요.
|
<div class="tab-pane fade p-2" id="fileTabPanel" role="tabpanel" tabindex="0">
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<table class="table table-sm" id="fileTable">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>파일명</th>
|
||||||
|
<th>사이즈</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<th:block th:if="${#lists.isEmpty(cia.fileList)}">
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">파일이 없습니다.</td>
|
||||||
|
</tr>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:unless="${#arrays.isEmpty(cia.fileList)}">
|
<th:block th:unless="${#lists.isEmpty(cia.fileList)}">
|
||||||
<div class='row-col-6' th:each="file:${cia.fileList}">
|
<th:block th:each="file:${cia.fileList}">
|
||||||
<span th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn} ${file.fileSize}|"></span>
|
<tr class="fileInfoTr">
|
||||||
<a href='#' class='uploadedFileDelete text-danger text-decoration-none'>삭제</a>
|
<td>
|
||||||
</div>
|
<a href="#" class="fileDownLink" data-board="ciWork"
|
||||||
|
th:data-parentkey="${file.ciKey}" th:data-fileseq="${file.fileSeq}"
|
||||||
|
th:text="|${file.origNm}.${file.fileExtn}|"></a>
|
||||||
|
</td>
|
||||||
|
<td th:text="${file.fileSize}"></td>
|
||||||
|
</tr>
|
||||||
</th:block>
|
</th:block>
|
||||||
</div>
|
</th:block>
|
||||||
<input type="file" class="d-none" id="fileInputer" multiple>
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer justify-content-between bg-light">
|
</div>
|
||||||
<div class="col-auto">
|
</div>
|
||||||
|
<div class="modal-footer bg-light">
|
||||||
|
<th:block th:if="${viewUserSeq eq ciWork.wrtUserSeq}">
|
||||||
|
<button type="button" class="btn btn-warning" id="editCiWorkBtn" th:data-ciwkey="${cia.ciKey}">수정</button>
|
||||||
|
</th:block>
|
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
|
||||||
<button type="button" class="btn btn-warning" id="saveTempBtn">임시저장</button>
|
|
||||||
<button type="button" class="btn btn-primary" id="saveBtn">저장</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</html>
|
|
||||||
Loading…
Reference in New Issue