Compare commits
2 Commits
a93fa295ed
...
12feac5480
| Author | SHA1 | Date |
|---|---|---|
|
|
12feac5480 | |
|
|
56c5db686f |
|
|
@ -9,7 +9,7 @@ import EgovPaging from 'components/EgovPaging';
|
|||
|
||||
import { itemIdxByPage } from 'utils/calc';
|
||||
|
||||
function EgovAdminBoardList(props) {
|
||||
function AdminPostMgtList(props) {
|
||||
console.group("EgovAdminBoardList");
|
||||
console.log("[Start] EgovAdminBoardList ------------------------------");
|
||||
console.log("EgovAdminBoardList [props] : ", props);
|
||||
|
|
@ -100,7 +100,7 @@ function EgovAdminBoardList(props) {
|
|||
<ul>
|
||||
<li><Link to={URL.MAIN} className="home">Home</Link></li>
|
||||
<li><Link to={URL.ADMIN}>사이트관리</Link></li>
|
||||
<li>게시판생성 관리</li>
|
||||
<li>게시물 관리</li>
|
||||
</ul>
|
||||
</div>
|
||||
{/* <!--// Location --> */}
|
||||
|
|
@ -117,7 +117,7 @@ function EgovAdminBoardList(props) {
|
|||
<h1 className="tit_1">사이트관리</h1>
|
||||
</div>
|
||||
|
||||
<h2 className="tit_2">게시판생성 관리</h2>
|
||||
<h2 className="tit_2">게시물 관리</h2>
|
||||
|
||||
{/* <!-- 검색조건 --> */}
|
||||
<div className="condition">
|
||||
|
|
@ -196,4 +196,4 @@ function EgovAdminBoardList(props) {
|
|||
);
|
||||
}
|
||||
|
||||
export default EgovAdminBoardList;
|
||||
export default AdminPostMgtList;
|
||||
|
|
@ -1,13 +1,90 @@
|
|||
import React, { useState, useEffect, useCallback } from 'react';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import React, {useState, useEffect, useCallback} from 'react';
|
||||
import {Link, useLocation} from 'react-router-dom';
|
||||
|
||||
import * as EgovNet from 'api/egovFetch';
|
||||
import URL from 'constants/url';
|
||||
|
||||
import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin';
|
||||
import {default as EgovLeftNav} from 'components/leftmenu/EgovLeftNavAdmin';
|
||||
import Modal from "react-bootstrap/Modal";
|
||||
import CODE from "../../../constants/code";
|
||||
import EgovAdminBoardEdit from "../board/EgovAdminBoardEdit";
|
||||
import {format} from "date-fns";
|
||||
|
||||
function StandardCodeMgt(props) {
|
||||
|
||||
const location = useLocation();
|
||||
|
||||
const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || { pageIndex: 1, searchCnd: '0', searchWrd: '' });// 기존 조회에서 접근 했을 시 || 신규로 접근 했을 시
|
||||
const [paginationInfo, setPaginationInfo] = useState({});
|
||||
const [listTag, setListTag] = useState([]);
|
||||
|
||||
const [show, setShow] = useState(false);
|
||||
const [modalBody, setModalBody] = useState();
|
||||
const handleClose = () => setShow(false);
|
||||
const handleShow = () => setShow(true);
|
||||
|
||||
const retrieveList = useCallback(() => {
|
||||
handleClose();
|
||||
console.groupCollapsed("AdminBoardList.retrieveList()");
|
||||
|
||||
const retrieveListURL = '/admin/boards/board-list';
|
||||
|
||||
const requestOptions = {
|
||||
method: "GET",
|
||||
headers: {
|
||||
'Content-type': 'application/json',
|
||||
|
||||
},
|
||||
body: JSON.stringify()
|
||||
}
|
||||
|
||||
EgovNet.requestFetch(retrieveListURL,
|
||||
requestOptions,
|
||||
(resp) => {
|
||||
|
||||
let mutListTag = [];
|
||||
listTag.push(<p className="no_data" key="0">검색된 결과가 없습니다.</p>); // 게시판 목록 초기값
|
||||
|
||||
// 리스트 항목 구성
|
||||
resp.result.boardList.forEach(function (item, index) {
|
||||
if (index === 0) mutListTag = []; // 목록 초기화
|
||||
|
||||
mutListTag.push(
|
||||
<div className="list_item">
|
||||
<div>{item.bbsSeq}</div>
|
||||
<div>{item.bbsId}</div>
|
||||
<div>{item.bbsTitle}</div>
|
||||
<div>{item.frstCrtId}</div>
|
||||
<div>{item.frstCrtDt ? format(item.frstCrtDt, "yyyy-MM-dd HH:mm") : ""}</div>
|
||||
<div>{item.lastChgDt ? format(item.lastChgDt, "yyyy-MM-dd HH:mm") : ""}</div>
|
||||
<div><button className={"btn btn_blue_h31 px-1"} onClick={()=>{editBoard(item)}}>수정</button></div>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
setListTag(mutListTag);
|
||||
console.log("@@@ resp : ");
|
||||
},
|
||||
function (resp) {
|
||||
console.log("err response : ", resp);
|
||||
}
|
||||
);
|
||||
console.groupEnd("EgovAdminBoardList.retrieveList()");
|
||||
},[]);
|
||||
|
||||
useEffect(() => {
|
||||
retrieveList(searchCondition);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
function editBoard(item){
|
||||
handleShow();
|
||||
if(item != undefined) {
|
||||
item.mode = CODE.MODE_MODIFY;
|
||||
}
|
||||
setModalBody(<EgovAdminBoardEdit props={item} reloadFunction={retrieveList}/>)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="container">
|
||||
<div className="c_wrap">
|
||||
|
|
@ -15,7 +92,7 @@ function StandardCodeMgt(props) {
|
|||
<div className="location">
|
||||
<ul>
|
||||
<li><Link to={URL.MAIN} className="home">Home</Link></li>
|
||||
<li><Link to={URL.ADMIN} >사이트관리</Link></li>
|
||||
<li><Link to={URL.ADMIN}>사이트관리</Link></li>
|
||||
<li>게시판현황</li>
|
||||
<li>키워드 관리</li>
|
||||
</ul>
|
||||
|
|
@ -29,11 +106,78 @@ function StandardCodeMgt(props) {
|
|||
|
||||
<div className="contents NOTICE_LIST" id="contents">
|
||||
<div className="top_tit">
|
||||
<h1 className="tit_1">키워드 관리</h1>
|
||||
<h1 className="tit_1">사이트관리</h1>
|
||||
</div>
|
||||
<h2 className="tit_2">키워드 관리</h2>
|
||||
{/* <!-- 검색조건 --> */}
|
||||
{/*<div className="condition">
|
||||
<ul>
|
||||
<li className="third_1 L">
|
||||
<span className="lb">검색유형선택</span>
|
||||
<label className="f_select" htmlFor="searchCnd">
|
||||
<select id="searchCnd" name="searchCnd" title="검색유형선택" ref={cndRef}
|
||||
onChange={e => {
|
||||
cndRef.current.value = e.target.value;
|
||||
}}
|
||||
>
|
||||
<option value="0">게시판명</option>
|
||||
<option value="1">게시판유형</option>
|
||||
</select>
|
||||
</label>
|
||||
</li>
|
||||
<li className="third_2 R">
|
||||
<span className="lb">검색어</span>
|
||||
<span className="f_search w_400">
|
||||
<input type="text" name="" defaultValue={searchCondition && searchCondition.searchWrd} placeholder="" ref={wrdRef}
|
||||
onChange={e => {
|
||||
wrdRef.current.value = e.target.value;
|
||||
}}
|
||||
/>
|
||||
<button type="button"
|
||||
onClick={() => {
|
||||
retrieveList({ ...searchCondition, pageIndex: 1, searchCnd: cndRef.current.value, searchWrd: wrdRef.current.value });
|
||||
}}>조회</button>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<Link to={URL.ADMIN_BOARD_CREATE} className="btn btn_blue_h46 pd35">등록</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>*/}
|
||||
{/* <!--// 검색조건 --> */}
|
||||
|
||||
{/* <!-- 게시판목록 --> */}
|
||||
<div className="board_list BRD006">
|
||||
<div className="head">
|
||||
<span>번호</span>
|
||||
<span>아이디</span>
|
||||
<span>제목</span>
|
||||
<span>작성자</span>
|
||||
<span>작성일</span>
|
||||
<span>수정일</span>
|
||||
<span><button className={"btn btn_blue_h31 px-1"} onClick={()=>{editBoard(undefined)}}>추가</button></span>
|
||||
</div>
|
||||
<div className="result">
|
||||
{listTag}
|
||||
</div>
|
||||
</div>
|
||||
{/* <!--// 게시판목록 --> */}
|
||||
|
||||
<div className="board_bot">
|
||||
{/* <!-- Paging --> */}
|
||||
{/*<EgovPaging pagination={paginationInfo} moveToPage={passedPage => {
|
||||
retrieveList({ ...searchCondition, pageIndex: passedPage, searchCnd: cndRef.current.value, searchWrd: wrdRef.current.value })
|
||||
}} />*/}
|
||||
{/* <!--/ Paging --> */}
|
||||
</div>
|
||||
|
||||
{/* <!--// 본문 --> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Modal show={show} onHide={handleClose} keyboard={false}>
|
||||
{modalBody}
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ function EgovAdminBoardList(props) {
|
|||
<ul>
|
||||
<li><Link to={URL.MAIN} className="home">Home</Link></li>
|
||||
<li><Link to={URL.ADMIN}>사이트관리</Link></li>
|
||||
<li>게시판생성 관리</li>
|
||||
<li>게시판 관리</li>
|
||||
</ul>
|
||||
</div>
|
||||
{/* <!--// Location --> */}
|
||||
|
|
@ -117,7 +117,7 @@ function EgovAdminBoardList(props) {
|
|||
<h1 className="tit_1">사이트관리</h1>
|
||||
</div>
|
||||
|
||||
<h2 className="tit_2">게시판생성 관리</h2>
|
||||
<h2 className="tit_2">게시판 관리</h2>
|
||||
|
||||
{/* <!-- 검색조건 --> */}
|
||||
{/*<div className="condition">
|
||||
|
|
|
|||
|
|
@ -5,9 +5,85 @@ import * as EgovNet from 'api/egovFetch';
|
|||
import URL from 'constants/url';
|
||||
|
||||
import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin';
|
||||
import CODE from "../../../constants/code";
|
||||
import Modal from "react-bootstrap/Modal";
|
||||
import AboutSiteModal from "./aboutSiteMgt/AboutSiteModal";
|
||||
|
||||
function StandardCodeMgt(props) {
|
||||
|
||||
const location = useLocation();
|
||||
|
||||
const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || { pageIndex: 1, searchCnd: '0', searchWrd: '' });// 기존 조회에서 접근 했을 시 || 신규로 접근 했을 시
|
||||
const [paginationInfo, setPaginationInfo] = useState({});
|
||||
const [listTag, setListTag] = useState([]);
|
||||
|
||||
const [show, setShow] = useState(false);
|
||||
const [modalBody, setModalBody] = useState();
|
||||
const handleClose = () => setShow(false);
|
||||
const handleShow = () => setShow(true);
|
||||
|
||||
const retrieveList = useCallback(() => {
|
||||
handleClose();
|
||||
console.groupCollapsed("AdminPartnerSiteList.retrieveList()");
|
||||
|
||||
const retrieveListURL = '/admin/config/partner-site-list';
|
||||
|
||||
const requestOptions = {
|
||||
method: "GET",
|
||||
headers: {
|
||||
'Content-type': 'application/json',
|
||||
|
||||
},
|
||||
body: JSON.stringify()
|
||||
}
|
||||
|
||||
EgovNet.requestFetch(retrieveListURL,
|
||||
requestOptions,
|
||||
(resp) => {
|
||||
|
||||
let mutListTag = [];
|
||||
listTag.push(<p className="no_data" key="0">검색된 결과가 없습니다.</p>); // 게시판 목록 초기값
|
||||
|
||||
// 리스트 항목 구성
|
||||
resp.result.partnerSiteList.forEach(function (item, index) {
|
||||
if (index === 0) mutListTag = []; // 목록 초기화
|
||||
|
||||
mutListTag.push(
|
||||
<div className="list_item">
|
||||
<div>{item.siteSeq}</div>
|
||||
<div>{item.siteTitle}</div>
|
||||
<div>{item.siteUrl}</div>
|
||||
<div>{item.fileGrpId}</div>
|
||||
<div>{item.siteOrder}</div>
|
||||
<div>{item.useYn}</div>
|
||||
<div><button className={"btn btn_blue_h31 px-1"} onClick={()=>{editBoard(item)}}>수정</button></div>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
setListTag(mutListTag);
|
||||
console.log("@@@ resp : ");
|
||||
},
|
||||
function (resp) {
|
||||
console.log("err response : ", resp);
|
||||
}
|
||||
);
|
||||
console.groupEnd("EgovAdminBoardList.retrieveList()");
|
||||
},[]);
|
||||
|
||||
useEffect(() => {
|
||||
retrieveList(searchCondition);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
function editBoard(item){
|
||||
handleShow();
|
||||
if(item != undefined) {
|
||||
item.mode = CODE.MODE_MODIFY;
|
||||
}
|
||||
setModalBody(<AboutSiteModal props={item} reloadFunction={retrieveList}/>)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="container">
|
||||
<div className="c_wrap">
|
||||
|
|
@ -15,7 +91,7 @@ function StandardCodeMgt(props) {
|
|||
<div className="location">
|
||||
<ul>
|
||||
<li><Link to={URL.MAIN} className="home">Home</Link></li>
|
||||
<li><Link to={URL.ADMIN} >사이트관리</Link></li>
|
||||
<li><Link to={URL.ADMIN}>사이트관리</Link></li>
|
||||
<li>환경설정</li>
|
||||
<li>관련사이트 관리</li>
|
||||
</ul>
|
||||
|
|
@ -31,9 +107,75 @@ function StandardCodeMgt(props) {
|
|||
<div className="top_tit">
|
||||
<h1 className="tit_1">관련사이트 관리</h1>
|
||||
</div>
|
||||
{/* <!-- 검색조건 --> */}
|
||||
{/*<div className="condition">
|
||||
<ul>
|
||||
<li className="third_1 L">
|
||||
<span className="lb">검색유형선택</span>
|
||||
<label className="f_select" htmlFor="searchCnd">
|
||||
<select id="searchCnd" name="searchCnd" title="검색유형선택" ref={cndRef}
|
||||
onChange={e => {
|
||||
cndRef.current.value = e.target.value;
|
||||
}}
|
||||
>
|
||||
<option value="0">게시판명</option>
|
||||
<option value="1">게시판유형</option>
|
||||
</select>
|
||||
</label>
|
||||
</li>
|
||||
<li className="third_2 R">
|
||||
<span className="lb">검색어</span>
|
||||
<span className="f_search w_400">
|
||||
<input type="text" name="" defaultValue={searchCondition && searchCondition.searchWrd} placeholder="" ref={wrdRef}
|
||||
onChange={e => {
|
||||
wrdRef.current.value = e.target.value;
|
||||
}}
|
||||
/>
|
||||
<button type="button"
|
||||
onClick={() => {
|
||||
retrieveList({ ...searchCondition, pageIndex: 1, searchCnd: cndRef.current.value, searchWrd: wrdRef.current.value });
|
||||
}}>조회</button>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<Link to={URL.ADMIN_BOARD_CREATE} className="btn btn_blue_h46 pd35">등록</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>*/}
|
||||
{/* <!--// 검색조건 --> */}
|
||||
|
||||
{/* <!-- 게시판목록 --> */}
|
||||
<div className="board_list BRD006">
|
||||
<div className="head">
|
||||
<span>번호</span>
|
||||
<span>사이트명</span>
|
||||
<span>URL</span>
|
||||
<span>배너이미지</span>
|
||||
<span>정렬순서</span>
|
||||
<span>사용여부</span>
|
||||
<span><button className={"btn btn_blue_h31 px-1"} onClick={()=>{editBoard(undefined)}}>추가</button></span>
|
||||
</div>
|
||||
<div className="result">
|
||||
{listTag}
|
||||
</div>
|
||||
</div>
|
||||
{/* <!--// 게시판목록 --> */}
|
||||
|
||||
<div className="board_bot">
|
||||
{/* <!-- Paging --> */}
|
||||
{/*<EgovPaging pagination={paginationInfo} moveToPage={passedPage => {
|
||||
retrieveList({ ...searchCondition, pageIndex: passedPage, searchCnd: cndRef.current.value, searchWrd: wrdRef.current.value })
|
||||
}} />*/}
|
||||
{/* <!--/ Paging --> */}
|
||||
</div>
|
||||
|
||||
{/* <!--// 본문 --> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Modal show={show} onHide={handleClose} keyboard={false}>
|
||||
{modalBody}
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,178 @@
|
|||
import React, {useState, useEffect, useRef} from 'react';
|
||||
import {Link, useNavigate, useLocation, useParams} from 'react-router-dom';
|
||||
import Modal from "react-bootstrap/Modal";
|
||||
|
||||
import * as EgovNet from 'api/egovFetch';
|
||||
import URL from 'constants/url';
|
||||
import CODE from 'constants/code';
|
||||
|
||||
import {default as EgovLeftNav} from 'components/leftmenu/EgovLeftNavAdmin';
|
||||
import EgovRadioButtonGroup from 'components/EgovRadioButtonGroup';
|
||||
import {Form} from "react-bootstrap";
|
||||
|
||||
|
||||
function AboutSiteModal({props, reloadFunction}) {
|
||||
console.group("AboutSiteModal");
|
||||
console.log("[Start] AboutSiteModal ------------------------------");
|
||||
console.log("AboutSiteModal [props] : ", props);
|
||||
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
const checkRef = useRef([]);
|
||||
|
||||
console.log("AboutSiteModal [location] : ", location);
|
||||
|
||||
let item = null;
|
||||
item = props;
|
||||
console.log("@@@ item : " + JSON.stringify(item));
|
||||
|
||||
const [modeInfo, setModeInfo] = useState(item != null ? {mode: props.mode} : {mode: CODE.MODE_CREATE});
|
||||
const [boardDetail, setBoardDetail] = useState({});
|
||||
console.log("@@@ mode : " + modeInfo.mode);
|
||||
|
||||
useEffect(() => {
|
||||
initMode();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
const initMode = () => {
|
||||
if (modeInfo.mode === CODE.MODE_MODIFY) {
|
||||
setBoardDetail(item);
|
||||
}
|
||||
}
|
||||
|
||||
function editBoard(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
const form = e.target;
|
||||
const info = {
|
||||
bbsId: form.bbsId.value,
|
||||
bbsTitle: form.bbsTitle.value,
|
||||
bbsDesc: form.bbsDesc.value
|
||||
}
|
||||
if (modeInfo.mode === CODE.MODE_MODIFY) {
|
||||
info.bbsSeq = props.bbsSeq;
|
||||
}
|
||||
EgovNet.requestFetch(
|
||||
'/admin/boards/board-mgt',
|
||||
{
|
||||
method: "PUT",
|
||||
headers: {
|
||||
'Content-type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(info)
|
||||
},
|
||||
(resp) => {
|
||||
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
||||
alert("저장되었습니다.");
|
||||
reloadFunction();
|
||||
} else if (Number(resp.resultCode) === Number(CODE.RCV_ERROR_AUTH)) {
|
||||
console.log("토큰 갱신중.")
|
||||
} else {
|
||||
alert(resp.result.resultMessage)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
function deleteBoard(bbs){
|
||||
if(window.confirm("삭제하시겠습니까?")) {
|
||||
EgovNet.requestFetch(
|
||||
'/admin/boards/board-mgt',
|
||||
{
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
'Content-type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(bbs)
|
||||
},
|
||||
(resp) => {
|
||||
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
||||
alert("삭제되었습니다.")
|
||||
reloadFunction();
|
||||
} else if (Number(resp.resultCode) === Number(CODE.RCV_ERROR_AUTH)) {
|
||||
console.log("토큰 갱신중.")
|
||||
} else {
|
||||
alert(resp.result.resultMessage)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
console.log("------------------------------AboutSiteModal [End]");
|
||||
console.groupEnd("AboutSiteModal");
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* <!-- 본문 --> */}
|
||||
<Modal.Header closeButton>
|
||||
<Modal.Title>
|
||||
{modeInfo.mode === CODE.MODE_CREATE && '관련사이트 생성'}
|
||||
{modeInfo.mode === CODE.MODE_MODIFY && '관련사이트 수정'}
|
||||
</Modal.Title>
|
||||
</Modal.Header>
|
||||
|
||||
<Modal.Body>
|
||||
<div className="board_view2">
|
||||
<Form onSubmit={(e) => {editBoard(e)}} noValidate>
|
||||
<dl>
|
||||
<dt><label htmlFor="bbsId">사이트명</label><span className="req">필수</span></dt>
|
||||
<dd>
|
||||
<Form.Control className="f_input2 w_full" type="text" name="bbsId" placeholder="사이트명" required
|
||||
defaultValue={props?.siteTitle} readOnly={props!==undefined}/>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label htmlFor="bbsTitle">URL</label><span className="req">필수</span></dt>
|
||||
<dd>
|
||||
<Form.Control className="f_input2 w_full" type="text" name="bbsTitle" placeholder="URL" required
|
||||
defaultValue={props?.siteUrl}/>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label htmlFor="bbsDesc">배너이미지</label><span className="req">필수</span></dt>
|
||||
<dd>
|
||||
<Form.Control className="f_txtar w_full" type="text" name="bbsDesc" placeholder="배너이미지" required
|
||||
defaultValue={props?.fileGrpId}/>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label htmlFor="bbsDesc">정렬순서</label><span className="req">필수</span></dt>
|
||||
<dd>
|
||||
<Form.Control className="f_txtar w_full" type="text" name="bbsDesc" placeholder="정렬순서" required
|
||||
defaultValue={props?.siteOrder}/>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label htmlFor="bbsDesc">사용여부</label><span className="req">필수</span></dt>
|
||||
<dd>
|
||||
<Form.Control className="f_txtar w_full" type="text" name="bbsDesc" placeholder="사용여부" required
|
||||
defaultValue={props?.useYn}/>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
{/* <!-- 버튼영역 --> */}
|
||||
<div className="board_btn_area">
|
||||
<div className="left_col btn1">
|
||||
<button type="submit" className="btn btn_skyblue_h46 w_100">저장
|
||||
</button>
|
||||
{modeInfo.mode === CODE.MODE_MODIFY &&
|
||||
<button type={"button"} className="btn btn_skyblue_h46 w_100" onClick={()=>{deleteBoard(props)}}>삭제</button>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div className="right_col btn1">
|
||||
<button type={"button"} className="btn btn_blue_h46 w_100" onClick={()=>{reloadFunction()}}>목록</button>
|
||||
</div>
|
||||
</div>
|
||||
{/* <!--// 버튼영역 --> */}
|
||||
</Form>
|
||||
</div>
|
||||
</Modal.Body>
|
||||
</>
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
export default AboutSiteModal;
|
||||
|
|
@ -117,6 +117,7 @@ import StandardCodeInfo from "../pages/standardCode/info/StandardCodeInfo";
|
|||
|
||||
import * as EgovNet from 'api/egovFetch'; // jwt토큰 위조 검사 때문에 추가
|
||||
import initPage from 'js/ui';
|
||||
import AdminPostMgtList from "../pages/admin/board/AdminPostMgtList";
|
||||
|
||||
const RootRoutes = () => {
|
||||
//useLocation객체를 이용하여 정규표현식을 사용한 /admin/~ 으로 시작하는 경로와 비교에 사용(아래 1줄) */}
|
||||
|
|
@ -291,7 +292,7 @@ const SecondRoutes = () => {
|
|||
|
||||
{/* 관리자 - 게시판 현황 */}
|
||||
<Route path={URL.ADMIN__BOARDS__LIST} element={<AdminBoardsList />} />
|
||||
<Route path={URL.ADMIN__BOARDS__POSTS} element={<AdminBoardsPosts />} />
|
||||
<Route path={URL.ADMIN__BOARDS__POSTS} element={<AdminPostMgtList />} />
|
||||
<Route path={URL.ADMIN__BOARDS__KEYWORDS} element={<AdminBoardsKeywords />} />
|
||||
|
||||
{/* 관리자 - 건설기준 관리 */}
|
||||
|
|
|
|||
|
|
@ -130,4 +130,5 @@ public class AdminBoardsController extends BaseController {
|
|||
resultVO.setResult(resultMap);
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -445,4 +445,24 @@ public class AdminConfigController extends BaseController {
|
|||
return resultVO;
|
||||
}
|
||||
|
||||
/* ---- 관련사이트 관리 ----- */
|
||||
@Operation(
|
||||
summary = "관련사이트 목록 조회",
|
||||
description = "관련사이트 목록 조회",
|
||||
tags = {"AdminConfigController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/partner-site-list", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResultVO getPartnerSiteList() throws Exception {
|
||||
ResultVO resultVO = new ResultVO();
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
|
||||
resultMap.put("partnerSiteList", adminConfigService.selectPartnerSiteList());
|
||||
resultVO.setResult(resultMap);
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
package com.dbnt.kcscbackend.admin.config.entity;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@NoArgsConstructor
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@Table(name = "tn_partner_site")
|
||||
public class TnPartnerSite {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "site_seq")
|
||||
private int siteSeq;
|
||||
|
||||
@Column(name = "site_title", nullable = false, length = 500)
|
||||
private String siteTitle;
|
||||
|
||||
@Column(name = "site_url", nullable = false, length = 500)
|
||||
private String siteUrl;
|
||||
|
||||
@Column(name = "file_grp_id", length = 255)
|
||||
private String fileGrpId;
|
||||
|
||||
@Column(name = "site_order", nullable = false)
|
||||
private int siteOrder;
|
||||
|
||||
@Column(name = "use_yn", nullable = false, length = 1)
|
||||
private char useYn;
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.dbnt.kcscbackend.admin.config.repository;
|
||||
|
||||
import com.dbnt.kcscbackend.admin.config.entity.TnPartnerSite;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TnPartnerSiteRepository extends JpaRepository<TnPartnerSite, Long> {
|
||||
|
||||
List<TnPartnerSite> findAllByOrderBySiteOrder();
|
||||
|
||||
}
|
||||
|
|
@ -1,10 +1,13 @@
|
|||
package com.dbnt.kcscbackend.admin.config.service;
|
||||
|
||||
import com.dbnt.kcscbackend.admin.boards.entity.TnBbs;
|
||||
import com.dbnt.kcscbackend.admin.config.entity.TbMenuRole;
|
||||
import com.dbnt.kcscbackend.admin.config.entity.TcMenu;
|
||||
import com.dbnt.kcscbackend.admin.config.entity.TnPartnerSite;
|
||||
import com.dbnt.kcscbackend.admin.config.mapper.TcMenuMapper;
|
||||
import com.dbnt.kcscbackend.admin.config.repository.TbMenuRoleRepository;
|
||||
import com.dbnt.kcscbackend.admin.config.repository.TcMenuRepository;
|
||||
import com.dbnt.kcscbackend.admin.config.repository.TnPartnerSiteRepository;
|
||||
import com.dbnt.kcscbackend.commonCode.entity.TcCodeGrp;
|
||||
import com.dbnt.kcscbackend.commonCode.entity.TcCodeItem;
|
||||
import com.dbnt.kcscbackend.commonCode.repository.TcCodeGrpRepository;
|
||||
|
|
@ -27,6 +30,7 @@ public class AdminConfigService extends EgovAbstractServiceImpl {
|
|||
private final TcMenuRepository menuRepository;
|
||||
private final TbMenuRoleRepository menuRoleRepository;
|
||||
private final TcMenuMapper menuMapper;
|
||||
private final TnPartnerSiteRepository tnPartnerSiteRepository;
|
||||
|
||||
public List<TcCodeGrp> selectCodeGrpList(){
|
||||
return codeGrpRepository.findByUseYn("Y");
|
||||
|
|
@ -165,4 +169,9 @@ public class AdminConfigService extends EgovAbstractServiceImpl {
|
|||
}
|
||||
menuRoleRepository.saveAll(roleList);
|
||||
}
|
||||
|
||||
public List<TnPartnerSite> selectPartnerSiteList() {
|
||||
return tnPartnerSiteRepository.findAllByOrderBySiteOrder();
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue