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 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;}
|
.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;}
|
.openDoc{background-color: bisque;}
|
||||||
.docLink{
|
.docLink{
|
||||||
color: black;
|
color: black;
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,8 @@ function CodeViewer(props) {
|
||||||
const updateDocCode = (docCode, docName)=>{
|
const updateDocCode = (docCode, docName)=>{
|
||||||
setDocCode(docCode);
|
setDocCode(docCode);
|
||||||
setDocName(docName);
|
setDocName(docName);
|
||||||
|
getCodeInfo(docCode);
|
||||||
|
setErrorSelector([])
|
||||||
getCodeDetailInfo(null, docCode);
|
getCodeDetailInfo(null, docCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -116,7 +118,7 @@ function CodeViewer(props) {
|
||||||
</option>
|
</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{
|
}else{
|
||||||
headTag.push(<div>검색된 결과가 없습니다.</div>); // 코드 목록 초기값
|
headTag.push(<div>검색된 결과가 없습니다.</div>); // 코드 목록 초기값
|
||||||
}
|
}
|
||||||
|
|
@ -254,6 +256,7 @@ function CodeViewer(props) {
|
||||||
}
|
}
|
||||||
setDocLoading(false);
|
setDocLoading(false);
|
||||||
setSelectFlag(false);
|
setSelectFlag(false);
|
||||||
|
document.querySelector(".detailInfoDiv").scrollTop = 0
|
||||||
},
|
},
|
||||||
function (resp) {
|
function (resp) {
|
||||||
console.log("err response : ", resp);
|
console.log("err response : ", resp);
|
||||||
|
|
@ -321,11 +324,11 @@ function CodeViewer(props) {
|
||||||
saveBtn.onclick = (e) => {
|
saveBtn.onclick = (e) => {
|
||||||
const errorEditDiv = e.target.parentElement;
|
const errorEditDiv = e.target.parentElement;
|
||||||
const content = {
|
const content = {
|
||||||
|
docInfoSeq: document.querySelector("#docInfoSelector").value,
|
||||||
contTypeCd: errorEditDiv.querySelector(".contTypeCd").value,
|
contTypeCd: errorEditDiv.querySelector(".contTypeCd").value,
|
||||||
errorCd: errorEditDiv.querySelector(".errorCd").value
|
errorCd: errorEditDiv.querySelector(".errorCd").value
|
||||||
}
|
}
|
||||||
saveErrorCd(content)
|
saveErrorCd(content, errorEditDiv)
|
||||||
errorEditDiv.parentElement.querySelector(".errorText").innerText = content.errorCd
|
|
||||||
hideErrorEditDiv(e)
|
hideErrorEditDiv(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -350,7 +353,7 @@ function CodeViewer(props) {
|
||||||
window.location.href = window.location.origin+window.location.pathname+"#error"+e.target.value
|
window.location.href = window.location.origin+window.location.pathname+"#error"+e.target.value
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveErrorCd(content){
|
function saveErrorCd(content, errorEditDiv){
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(
|
||||||
'/standardCode/saveErrorCd.do',
|
'/standardCode/saveErrorCd.do',
|
||||||
{
|
{
|
||||||
|
|
@ -363,6 +366,7 @@ function CodeViewer(props) {
|
||||||
(resp) => {
|
(resp) => {
|
||||||
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
||||||
alert("저장되었습니다.")
|
alert("저장되었습니다.")
|
||||||
|
errorEditDiv.parentElement.querySelector(".errorText").innerText = content.errorCd
|
||||||
}else{
|
}else{
|
||||||
alert("저장에 실패하였습니다.")
|
alert("저장에 실패하였습니다.")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,4 +19,6 @@ public interface TnDocumentContentRepository extends JpaRepository<TnDocumentCon
|
||||||
|
|
||||||
Optional<TnDocumentContent> findByContTypeCd(String contTypeCd);
|
Optional<TnDocumentContent> findByContTypeCd(String contTypeCd);
|
||||||
|
|
||||||
|
Optional<TnDocumentContent> findByDocInfoSeqAndContTypeCd(Integer docInfoSeq, String contTypeCd);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public class StandardCodeService extends EgovAbstractServiceImpl {
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void saveErrorCd(TnDocumentContent content) {
|
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){
|
if(saveContent!=null){
|
||||||
saveContent.setErrorCd(content.getErrorCd());
|
saveContent.setErrorCd(content.getErrorCd());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue