parent
16100e6b7b
commit
c8d058fd66
|
|
@ -320,7 +320,7 @@
|
|||
.calendar_info ul li a {color: #222; font-size: 16px; font-weight: 300;}
|
||||
.calendar_info ul li span {position: absolute; right: 15px; top: 15px; color: #808080; font-size: 16px; font-weight: 300;}
|
||||
|
||||
.viewerDiv{height: calc(100vh - 180px); overflow-y: auto;}
|
||||
.viewerDiv{height: calc(100vh - 190px); overflow-y: auto;}
|
||||
.openDoc{background-color: bisque;}
|
||||
.docLink{
|
||||
color: black;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ function CodeViewer(props) {
|
|||
const updateDocCode = (docCode, docName)=>{
|
||||
setDocCode(docCode);
|
||||
setDocName(docName);
|
||||
getCodeInfo(docCode);
|
||||
setErrorSelector([])
|
||||
getCodeDetailInfo(null, docCode);
|
||||
}
|
||||
|
||||
|
|
@ -116,7 +118,7 @@ function CodeViewer(props) {
|
|||
</option>
|
||||
)
|
||||
})
|
||||
headTag.push(<Form.Select size="sm" onChange={docInfoSelectorChange} disabled={selectFlag}>{optionTag}</Form.Select>)
|
||||
headTag.push(<Form.Select size="sm" id="docInfoSelector" onChange={docInfoSelectorChange} disabled={selectFlag}>{optionTag}</Form.Select>)
|
||||
}else{
|
||||
headTag.push(<div>검색된 결과가 없습니다.</div>); // 코드 목록 초기값
|
||||
}
|
||||
|
|
@ -254,6 +256,7 @@ function CodeViewer(props) {
|
|||
}
|
||||
setDocLoading(false);
|
||||
setSelectFlag(false);
|
||||
document.querySelector(".detailInfoDiv").scrollTop = 0
|
||||
},
|
||||
function (resp) {
|
||||
console.log("err response : ", resp);
|
||||
|
|
@ -321,11 +324,11 @@ function CodeViewer(props) {
|
|||
saveBtn.onclick = (e) => {
|
||||
const errorEditDiv = e.target.parentElement;
|
||||
const content = {
|
||||
docInfoSeq: document.querySelector("#docInfoSelector").value,
|
||||
contTypeCd: errorEditDiv.querySelector(".contTypeCd").value,
|
||||
errorCd: errorEditDiv.querySelector(".errorCd").value
|
||||
}
|
||||
saveErrorCd(content)
|
||||
errorEditDiv.parentElement.querySelector(".errorText").innerText = content.errorCd
|
||||
saveErrorCd(content, errorEditDiv)
|
||||
hideErrorEditDiv(e)
|
||||
}
|
||||
}
|
||||
|
|
@ -350,7 +353,7 @@ function CodeViewer(props) {
|
|||
window.location.href = window.location.origin+window.location.pathname+"#error"+e.target.value
|
||||
}
|
||||
|
||||
function saveErrorCd(content){
|
||||
function saveErrorCd(content, errorEditDiv){
|
||||
EgovNet.requestFetch(
|
||||
'/standardCode/saveErrorCd.do',
|
||||
{
|
||||
|
|
@ -363,6 +366,7 @@ function CodeViewer(props) {
|
|||
(resp) => {
|
||||
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
||||
alert("저장되었습니다.")
|
||||
errorEditDiv.parentElement.querySelector(".errorText").innerText = content.errorCd
|
||||
}else{
|
||||
alert("저장에 실패하였습니다.")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,4 +19,6 @@ public interface TnDocumentContentRepository extends JpaRepository<TnDocumentCon
|
|||
|
||||
Optional<TnDocumentContent> findByContTypeCd(String contTypeCd);
|
||||
|
||||
Optional<TnDocumentContent> findByDocInfoSeqAndContTypeCd(Integer docInfoSeq, String contTypeCd);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class StandardCodeService extends EgovAbstractServiceImpl {
|
|||
|
||||
@Transactional
|
||||
public void saveErrorCd(TnDocumentContent content) {
|
||||
TnDocumentContent saveContent = tnDocumentContentRepository.findByContTypeCd(content.getContTypeCd()).orElse(null);
|
||||
TnDocumentContent saveContent = tnDocumentContentRepository.findByDocInfoSeqAndContTypeCd(content.getDocInfoSeq(), content.getContTypeCd()).orElse(null);
|
||||
if(saveContent!=null){
|
||||
saveContent.setErrorCd(content.getErrorCd());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue