Compare commits
No commits in common. "master" and "cks" have entirely different histories.
|
|
@ -4,11 +4,7 @@
|
|||
NODE_PATH=src/
|
||||
|
||||
## 절대경로 지정
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
## REACT_APP_EGOV_CONTEXT_URL=https://back.kcsc.dbnt.co.kr
|
||||
>>>>>>> 6849850039413527a8e94951eb8b08586f5bdfe7
|
||||
REACT_APP_EGOV_CONTEXT_URL=58.234.249.138:50688
|
||||
REACT_APP_EGOV_CONTEXT_URL=118.219.150.34:50688
|
||||
|
||||
## [보안] 소스맵 삭제
|
||||
GENERATE_SOURCEMAP=false
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
.github/
|
||||
.Docs/
|
||||
.idea/
|
||||
**/.idea
|
||||
**/.vscode
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
|
@ -30,6 +28,3 @@ yarn-error.log*
|
|||
|
||||
# code
|
||||
.history
|
||||
|
||||
# Develop environment
|
||||
.env.development.local
|
||||
|
|
@ -3,50 +3,23 @@
|
|||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@ant-design/colors": "^6.0.0",
|
||||
"@ant-design/icons": "^4.7.0",
|
||||
"@babel/runtime": "^7.23.9",
|
||||
"@base2/pretty-print-object": "^1.0.2",
|
||||
"@emotion/react": "^11.11.3",
|
||||
"@emotion/styled": "^11.11.0",
|
||||
"@material-ui/core": "^4.12.4",
|
||||
"@material-ui/icons": "^4.11.3",
|
||||
"@mui/icons-material": "^5.15.6",
|
||||
"@mui/material": "^5.14.19",
|
||||
"@mui/styles": "^5.15.3",
|
||||
"apexcharts": "^3.45.2",
|
||||
"bootstrap": "^5.3.2",
|
||||
"date-fns": "^3.2.0",
|
||||
"dompurify": "^3.1.5",
|
||||
"prop-types": "^15.8.1",
|
||||
"qs": "^6.11.0",
|
||||
"react": "^18.2.0",
|
||||
"react-apexcharts": "^1.4.0",
|
||||
"react-bootstrap": "^2.9.0",
|
||||
"react-copy-to-clipboard": "^5.1.0",
|
||||
"react-countup": "^6.5.3",
|
||||
"react-csv": "^2.2.2",
|
||||
"react-datepicker": "^4.8.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-drag-drop-files": "^2.3.10",
|
||||
"react-element-to-jsx-string": "^15.0.0",
|
||||
"react-icons": "^4.11.0",
|
||||
"react-loader-spinner": "^5.4.5",
|
||||
"react-quill": "^2.0.0",
|
||||
"react-router-dom": "^6.4.0",
|
||||
"react-scripts": "5.0.1",
|
||||
"react-slick": "^0.30.2",
|
||||
"react-syntax-highlighter": "^15.5.0",
|
||||
"recharts": "^2.10.3",
|
||||
"slick-carousel": "^1.8.1",
|
||||
"styled-components": "^6.0.9",
|
||||
"web-vitals": "^2.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/jest-dom": "^5.16.4",
|
||||
"@testing-library/react": "^13.3.0",
|
||||
"@testing-library/user-event": "^13.5.0",
|
||||
"react-cookie": "^7.1.4"
|
||||
"@testing-library/user-event": "^13.5.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 352 B |
|
Before Width: | Height: | Size: 477 B |
|
Before Width: | Height: | Size: 476 B |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 535 B |
|
Before Width: | Height: | Size: 195 B |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 515 B |
|
Before Width: | Height: | Size: 554 B |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1020 B |
|
Before Width: | Height: | Size: 992 B |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1007 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 388 B |
|
Before Width: | Height: | Size: 382 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 563 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 195 B |
|
Before Width: | Height: | Size: 297 B |
|
Before Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 380 KiB |
|
Before Width: | Height: | Size: 587 KiB |
|
Before Width: | Height: | Size: 618 B |
|
Before Width: | Height: | Size: 459 B |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 362 B |
|
Before Width: | Height: | Size: 190 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 411 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 880 B |
|
Before Width: | Height: | Size: 30 KiB |
|
|
@ -1,12 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>국가건설기준센터(KCSC)</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="keywords" content="국가건설기준센터,설계기준,표준시방서,시방서,지반코드,구조코드,내진코드,가설코드,교량코드,터널코드,설비코드,조경코드,건축코드,도로코드,철도코드,하천코드,댐코드,상수도코드,하수도코드,항만코드,어항코드,농업기반코드">
|
||||
<link rel="shortcut icon" href="assets/images/kcsc.ico">
|
||||
<title>React App</title>
|
||||
<!-- 아래 뷰포트 설정이 있어야 크롬 개발자도구에서 디바이스별로 반응형 미리보기가 가능하다.: 2023.04.13(목) 김일국 추가 -->
|
||||
<meta name="viewport" content="width=device-width">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
import RootRoutes from './routes';
|
||||
import ThemeCustomization from 'themes';
|
||||
import ScrollTop from 'components/ScrollTop';
|
||||
import React, { useEffect } from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
import React from 'react';
|
||||
|
||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||
import './css/base.css';
|
||||
|
|
@ -12,35 +9,16 @@ import './css/page.css';
|
|||
import './css/response.css';
|
||||
import './css/Custom/customMain.css'
|
||||
|
||||
import URL from "constants/url";
|
||||
|
||||
function App() {
|
||||
|
||||
return (
|
||||
<ThemeCustomization>
|
||||
<ScrollTop>
|
||||
<ScrollControl />
|
||||
<RootRoutes />
|
||||
</ScrollTop>
|
||||
</ThemeCustomization>
|
||||
<div className="wrap">
|
||||
<RootRoutes />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const ScrollControl = () => {
|
||||
const location = useLocation();
|
||||
|
||||
useEffect(() => {
|
||||
const hideFooterPaths = [URL.STANDARD_CODE_VIEWER, URL.STANDARD_CODE_LIST];
|
||||
if (hideFooterPaths.some(path => location.pathname.includes(path))) {
|
||||
document.body.style.overflow = 'hidden';
|
||||
} else {
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
}, [location]);
|
||||
|
||||
return null;
|
||||
};
|
||||
console.log("process.env.NODE_ENV", process.env.NODE_ENV);
|
||||
console.log("process.env.REACT_APP_EGOV_CONTEXT_URL", "[" + process.env.REACT_APP_EGOV_CONTEXT_URL + "]");
|
||||
console.log("process.env.REACT_APP_EGOV_CONTEXT_URL", process.env.REACT_APP_EGOV_CONTEXT_URL);
|
||||
|
||||
export default App;
|
||||
|
|
|
|||
|
|
@ -10,16 +10,6 @@ export function getQueryString(params){
|
|||
return `?${Object.entries(params).map(e => e.join('=')).join('&') }`
|
||||
}
|
||||
|
||||
export function convParams(params){
|
||||
let str = "?"
|
||||
for(let key in params){
|
||||
if(params[key]){
|
||||
str = str+key+"="+params[key]+"&";
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
export function requestFetch(url, requestOptions, handler, errorHandler) {
|
||||
console.groupCollapsed("requestFetch");
|
||||
console.log("requestFetch [URL] : ", SERVER_URL + url);
|
||||
|
|
@ -29,71 +19,65 @@ export function requestFetch(url, requestOptions, handler, errorHandler) {
|
|||
const accessToken = getLocalItem('accessToken');
|
||||
const sessionUser = parseJwt(accessToken);
|
||||
const sessionUserId = sessionUser?.id || null;
|
||||
|
||||
if(accessToken && new Date(sessionUser.exp*1000) < new Date()){
|
||||
//만료된 토큰 재발급 절차 진행.
|
||||
accessTokenRefresh(url, requestOptions, handler, errorHandler);
|
||||
}else{
|
||||
if(sessionUserId != null){
|
||||
if( !requestOptions['headers'] ) requestOptions['headers']={}
|
||||
if( !requestOptions['headers']['Authorization'] ) requestOptions['headers']['Authorization']=null;
|
||||
requestOptions['headers']['Authorization'] = accessToken;
|
||||
}
|
||||
|
||||
//CORS ISSUE 로 인한 조치 - origin 및 credentials 추가
|
||||
// origin 추가
|
||||
if (!requestOptions['origin']) {
|
||||
requestOptions = { ...requestOptions, origin: SERVER_URL };
|
||||
}
|
||||
// credentials 추가
|
||||
if (!requestOptions['credentials']) {
|
||||
requestOptions = { ...requestOptions, credentials: 'include' };
|
||||
}
|
||||
|
||||
fetch(SERVER_URL + url, requestOptions)
|
||||
.then(response => {// response Stream. Not completion object
|
||||
return response.json();
|
||||
})
|
||||
.then((resp) => {
|
||||
if (Number(resp.resultCode) === Number(CODE.RCV_ERROR_AUTH)) {
|
||||
if(url === "/auth/login"){
|
||||
alert("로그인을 실패하였습니다.")
|
||||
}else{
|
||||
alert("로그인이 해제되었습니다.")
|
||||
window.location.href = "/login"
|
||||
}
|
||||
}else{
|
||||
return resp;
|
||||
}
|
||||
})
|
||||
.then((resp) => {
|
||||
console.groupCollapsed("requestFetch.then()");
|
||||
console.log("requestFetch [response] ", resp);
|
||||
if (typeof handler === 'function') {
|
||||
handler(resp);
|
||||
} else {
|
||||
console.log('egov fetch handler not assigned!');
|
||||
}
|
||||
console.groupEnd("requestFetch.then()");
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('There was an error!', error);
|
||||
if (error === 'TypeError: Failed to fetch') {
|
||||
alert("서버와의 연결이 원활하지 않습니다. 서버를 확인하세요.");
|
||||
}
|
||||
|
||||
if (typeof errorHandler === 'function') {
|
||||
errorHandler(error);
|
||||
} else {
|
||||
console.error('egov error handler not assigned!');
|
||||
alert("ERR : " + error.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
console.log("requestFetch finally end");
|
||||
console.groupEnd("requestFetch");
|
||||
});
|
||||
const refreshToken = getLocalItem('refreshToken');
|
||||
if(sessionUserId != null){
|
||||
if( !requestOptions['headers'] ) requestOptions['headers']={}
|
||||
if( !requestOptions['headers']['Authorization'] ) requestOptions['headers']['Authorization']=null;
|
||||
requestOptions['headers']['Authorization'] = accessToken;
|
||||
}
|
||||
|
||||
//CORS ISSUE 로 인한 조치 - origin 및 credentials 추가
|
||||
// origin 추가
|
||||
if (!requestOptions['origin']) {
|
||||
requestOptions = { ...requestOptions, origin: SERVER_URL };
|
||||
}
|
||||
// credentials 추가
|
||||
if (!requestOptions['credentials']) {
|
||||
requestOptions = { ...requestOptions, credentials: 'include' };
|
||||
}
|
||||
|
||||
fetch(SERVER_URL + url, requestOptions)
|
||||
.then(response => {// response Stream. Not completion object
|
||||
//console.log("requestFetch [Response Stream] ", response);
|
||||
return response.json();
|
||||
})
|
||||
.then((resp) => {
|
||||
if (Number(resp.resultCode) === Number(CODE.RCV_ERROR_AUTH)) {
|
||||
//accessToken 갱신 요청
|
||||
accessTokenRefresh(url, requestOptions, handler, errorHandler);
|
||||
return resp;
|
||||
} else {
|
||||
return resp;
|
||||
}
|
||||
})
|
||||
.then((resp) => {
|
||||
console.groupCollapsed("requestFetch.then()");
|
||||
console.log("requestFetch [response] ", resp);
|
||||
if (typeof handler === 'function') {
|
||||
handler(resp);
|
||||
} else {
|
||||
console.log('egov fetch handler not assigned!');
|
||||
}
|
||||
console.groupEnd("requestFetch.then()");
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('There was an error!', error);
|
||||
if (error === 'TypeError: Failed to fetch') {
|
||||
alert("서버와의 연결이 원활하지 않습니다. 서버를 확인하세요.");
|
||||
}
|
||||
|
||||
if (typeof errorHandler === 'function') {
|
||||
errorHandler(error);
|
||||
} else {
|
||||
console.error('egov error handler not assigned!');
|
||||
alert("ERR : " + error.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
console.log("requestFetch finally end");
|
||||
console.groupEnd("requestFetch");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function accessTokenRefresh(url, requestOptions, handler, errorHandler){
|
||||
|
|
|
|||
|
|
@ -1,68 +1,36 @@
|
|||
import React, { useState, useCallback } from 'react';
|
||||
import {Link, NavLink} from 'react-router-dom';
|
||||
import URL from "constants/url";
|
||||
|
||||
import Collapse from 'react-bootstrap/Collapse'
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
function EgovFooter() {
|
||||
const [toggle, setToggle] = useState(false);
|
||||
const toggleFunc = useCallback(() => setToggle(!toggle), [toggle]);
|
||||
const hideFooterPaths = [URL.STANDARD_CODE_VIEWER, URL.STANDARD_CODE_LIST];
|
||||
const currentPath = window.location.pathname;
|
||||
|
||||
if(hideFooterPaths.some(path => currentPath.includes(path))){
|
||||
if(window.location.pathname.includes("/standardCode/viewer")){
|
||||
return null;
|
||||
}else{
|
||||
return (
|
||||
<div className="footer">
|
||||
<div className="upper">
|
||||
<div className="row up">
|
||||
<div className="left"><Collapse in={toggle}><span id="collapseLeft">건설기준코드 <br />건설기준위원회 <br />정보제공 <br /></span></Collapse>센터소개</div>
|
||||
<div className="col-auto right">
|
||||
<Collapse in={toggle}>
|
||||
<span id="collapseRight">
|
||||
<NavLink to={URL.STANDARD_CODE_INFO}>건설기준코드 안내</NavLink>
|
||||
<NavLink to={URL.STANDARD_CODE_LIST}>건설기준코드 검색</NavLink>
|
||||
<NavLink to={URL.STANDARD_CODE_OLD}>(구)건설기준 검색</NavLink>
|
||||
<NavLink to={URL.SUPPORT_LIST_NOCODE+'/KCKC-INV'}>건설기준고시</NavLink>
|
||||
<NavLink to={URL.STANDARD_CODE_ENG}>영문건설기준</NavLink>
|
||||
<NavLink to={URL.STANDARD_CODE_TERM}>건설기준용어</NavLink><br />
|
||||
<NavLink to={URL.COMMITTEE_PROGRESS}>진행현황</NavLink>
|
||||
<NavLink to={URL.COMMITTEE_SCHEDULE}>위원회 일정</NavLink><br />
|
||||
<NavLink to={URL.SUPPORT_LIST_NOCODE+'/KCSC-NTC'}>공지사항</NavLink>
|
||||
<NavLink to={URL.SUPPORT_QNA}>Q&A</NavLink>
|
||||
<NavLink to={URL.SUPPORT_LIST_NOCODE+'/KCKC-INV'}>수요조사</NavLink>
|
||||
<NavLink to={URL.SUPPORT_LIST_NOCODE+'/KCSC-EVT'}>주요행사</NavLink>
|
||||
{/*<NavLink to={URL.SUPPORT_LIST_NOCODE+'/KCSC-EDU'}>건설교육안내</NavLink>*/}
|
||||
<NavLink to={URL.SUPPORT_LIST_NOCODE+'/KCSC-TEC'}>기술자료</NavLink>
|
||||
<NavLink to={URL.SUPPORT_LIST_NOCODE+'/KCSC-NWS'}>보도자료</NavLink>
|
||||
<NavLink to={URL.SUPPORT_RESEARCH}>건설기준 연구</NavLink>
|
||||
<NavLink to={URL.SUPPORT_SITE}>관련사이트</NavLink>
|
||||
<NavLink to={URL.SUPPORT_API}>API서비스</NavLink>
|
||||
<NavLink to={URL.SUPPORT_POLL}>설문조사</NavLink><br />
|
||||
</span>
|
||||
</Collapse>
|
||||
<NavLink to={URL.ABOUT_SITE}>인사말</NavLink>
|
||||
<NavLink to={URL.ABOUT_HISTORY}>연혁</NavLink>
|
||||
<NavLink to={URL.ABOUT_PROMOTE}>홍보자료</NavLink>
|
||||
<NavLink to={URL.ABOUT_ORGANIZATION}>주요업무</NavLink>
|
||||
<NavLink to={URL.ABOUT_LOCATION}>찾아오시는길</NavLink>
|
||||
<NavLink to={URL.ABOUT_SITEMAP}>SITEMAP</NavLink>
|
||||
</div>
|
||||
<div className="col open"><button type="button" className="btn" aria-expanded={toggle} aria-controls="collapseLeft collapseRight" onClick={toggleFunc}>{toggle ? '∨' : '∧'}</button></div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="inner row">
|
||||
<div className="col info">
|
||||
<div className="inner">
|
||||
<h1>
|
||||
<Link to="">
|
||||
국가건설 기준센터
|
||||
{/*<img className="w" src="/assets/images/logo_footer_w.png" alt="" />
|
||||
<img className="m" src="/assets/images/logo_footer_m.png" alt="" />*/}
|
||||
</Link>
|
||||
</h1>
|
||||
<div className="info">
|
||||
<p>
|
||||
상호명 : 한국건설기술연구원 <span className="m_hide">|</span> 대표자 : 김병석 | 대표메일 : kcsc@kict.re.kr<br />
|
||||
사업자등록번호 : 229-82-01135 | 주소 : 경기도 고양시 일산서구 고양대로 283(대화동)
|
||||
대표문의메일 : kcsc@kict.re.kr <span className="m_hide">|</span><br className="m_show" /> 대표전화 : 0000-0000 (000-0000-0000)<br />
|
||||
호환성확인 : 000-0000-0000 | 교육문의 : 0000-0000-0000
|
||||
</p>
|
||||
<p className="copy">Copyright © 2011 KOREA INSTITUTE of CIVIL ENGINEERING and BUILDING TECHNOLOGY. All Rights Reserved.</p>
|
||||
<p className="copy">Copyright © 2021 Ministry Of The Interior And Safety. All Rights Reserved.</p>
|
||||
</div>
|
||||
<div className="col-auto right_col">
|
||||
<NavLink to={URL.PRIVATE}>개인정보처리방침</NavLink>
|
||||
<NavLink to={URL.EMAIL}>이메일 무단수집거부</NavLink>
|
||||
<div className="right_col">
|
||||
<Link to="">
|
||||
<img className="w" src="/assets/images/banner_w_01.png" alt="" />
|
||||
<img className="m" src="/assets/images/banner_m_01.png" alt="" />
|
||||
</Link>
|
||||
<Link to="">
|
||||
<img className="w" src="/assets/images/banner_w_02.png" alt="" />
|
||||
<img className="m" src="/assets/images/banner_m_02.png" alt="" />
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React, {useEffect, useState} from 'react';
|
||||
import React from 'react';
|
||||
import { Link, NavLink, useNavigate } from 'react-router-dom';
|
||||
|
||||
import * as EgovNet from 'api/egovFetch';
|
||||
|
|
@ -8,27 +8,18 @@ import CODE from 'constants/code';
|
|||
import { getSessionItem, setSessionItem } from 'utils/storage';
|
||||
import { getLocalItem, setLocalItem } from 'utils/storage';
|
||||
import {parseJwt} from "../utils/parseJwt";
|
||||
import Col from "react-bootstrap/Col";
|
||||
import Row from "react-bootstrap/Row";
|
||||
|
||||
function EgovHeader({ loginUser, onChangeLogin }) {
|
||||
console.group("EgovHeader");
|
||||
console.log("[Start] EgovHeader ------------------------------");
|
||||
|
||||
const [menuDiv, setMenuDiv] = useState(false);
|
||||
const accessToken = getLocalItem('accessToken');
|
||||
const userInfo = parseJwt(accessToken);
|
||||
const sessionUserId = userInfo?.id;
|
||||
const sessionUserSe = userInfo?.userSe;
|
||||
const sessionUserRole = userInfo?.userRole;
|
||||
|
||||
const navigate = useNavigate();
|
||||
|
||||
const [showMore, setShowMore] = useState(false);
|
||||
const toggleShowMore = () => {
|
||||
setShowMore(!showMore);
|
||||
};
|
||||
|
||||
const logInHandler = () => { // 로그인 정보 없을 시
|
||||
navigate(URL.LOGIN);
|
||||
// PC와 Mobile 열린메뉴 닫기: 2023.04.13(목) 김일국 추가
|
||||
|
|
@ -65,277 +56,106 @@ function EgovHeader({ loginUser, onChangeLogin }) {
|
|||
);
|
||||
}
|
||||
|
||||
const myHandler = () => { // 로그인 정보 없을 시
|
||||
if (sessionUserId)
|
||||
navigate(URL.MY);
|
||||
else
|
||||
navigate(URL.JOIN);
|
||||
}
|
||||
|
||||
const SearchHandler = () => {
|
||||
navigate(URL.STANDARD_CODE_SEARCH);
|
||||
}
|
||||
|
||||
function allMenuControl(){
|
||||
setMenuDiv(!menuDiv);
|
||||
}
|
||||
|
||||
console.log("------------------------------EgovHeader [End]");
|
||||
console.groupEnd("EgovHeader");
|
||||
|
||||
useEffect(() => {
|
||||
setMenuDiv(false);
|
||||
}, [navigate]);
|
||||
|
||||
|
||||
return (
|
||||
// <!-- header -->
|
||||
<div className="header">
|
||||
<div className="inner">
|
||||
<Row className="logo pt-4">
|
||||
<Col xs={3}>
|
||||
<Link to={URL.MAIN} className="w"><img src="/assets/images/logo.png" alt="국가건설기준센터" /></Link>
|
||||
<Link to={URL.MAIN} className="m"><img src="/assets/images/logo_m.png" alt="국가건설기준센터" /></Link>
|
||||
</Col>
|
||||
<Col xs={6} className="text-center">
|
||||
{/*<img src="/assets/images/copy.png" alt="국가건설기준센터" className="align-self-end" />*/}
|
||||
<div className="search">
|
||||
<div className="search_input">
|
||||
<form className="row justify-content-between w-100 m-0">
|
||||
<div className="col-2">
|
||||
<select name="" className="form-select shadow-none">
|
||||
<option value="">코드명</option>
|
||||
<option value="">목차</option>
|
||||
<option value="">본문</option>
|
||||
</select>
|
||||
</div>
|
||||
<div className="col-10 d-flex justify-content-between">
|
||||
<div className="col-11"><input type="text" className="form-control shadow-none" placeholder="검색어를 입력하세요." lang="ko" /></div>
|
||||
<div className="col-1 text-center">
|
||||
<button type="button" className="topsearch" onClick={SearchHandler}></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
<Col xs={3}>
|
||||
<Row className="justify-content-end">
|
||||
<Col xs={"auto"} className="person mt-2" onClick={myHandler}></Col>
|
||||
<Col xs={"auto"} className="right_a mt-2" onClick={allMenuControl}>
|
||||
<button type="button" className="btn btnAllMenu" title="전체메뉴 닫힘">전체메뉴</button>
|
||||
<button type="button" className="btn mobile btnAllMenuM" title="전체메뉴 닫힘">전체메뉴</button>
|
||||
</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
{/*<div className="search">*/}
|
||||
{/* <div className="search_input">*/}
|
||||
{/* <form className="row justify-content-between w-100 m-0">*/}
|
||||
{/* <div className="col-2">*/}
|
||||
{/* <select name="" className="form-select shadow-none">*/}
|
||||
{/* <option value="">코드명</option>*/}
|
||||
{/* <option value="">목차</option>*/}
|
||||
{/* <option value="">본문</option>*/}
|
||||
{/* </select>*/}
|
||||
{/* </div>*/}
|
||||
{/* <div className="col-10 d-flex justify-content-between">*/}
|
||||
{/* <div className="col-11"><input type="text" className="form-control shadow-none" placeholder="검색어를 입력하세요." lang="ko" /></div>*/}
|
||||
{/* <div className="col-1 text-center">*/}
|
||||
{/* <button type="button" className="topsearch" onClick={SearchHandler}></button>*/}
|
||||
{/* </div>*/}
|
||||
{/* </div>*/}
|
||||
{/* </form>*/}
|
||||
{/* </div>*/}
|
||||
{/*</div>*/}
|
||||
{/*<div className="topcode d-flex justify-content-center w-100">*/}
|
||||
{/* <div className={showMore ? 'topcode_c justify-content-center' : 'topcode_n justify-content-center'}>*/}
|
||||
{/* <Row className="">*/}
|
||||
{/* <Col><a href="/standardCode/list/1010" title="공통코드" className={"topcodebnt"}>공통코드</a></Col>*/}
|
||||
{/* <Col><a href="/standardCode/list/101011" title="지반코드" className={"topcodebnt"}>지반코드</a></Col>*/}
|
||||
{/* <Col><a href="/standardCode/list/101014" title="구조코드" className={"topcodebnt"}>구조코드</a></Col>*/}
|
||||
{/* <Col><a href="/standardCode/list/101017" title="내진코드" className={"topcodebnt"}>내진코드</a></Col>*/}
|
||||
{/* <Col><a href="/standardCode/list/102021" title="가설코드" className={"topcodebnt"}>가설코드</a></Col>*/}
|
||||
{/* <Col><a href="/standardCode/list/102024" title="교량코드" className={"topcodebnt"}>교량코드</a></Col>*/}
|
||||
{/* <Col><a href="/standardCode/list/102027" title="터널코드" className={"topcodebnt"}>터널코드</a></Col>*/}
|
||||
{/* <Col><a href="/standardCode/list/102029" title="공동구코드" className={"topcodebnt"}>공동구코드</a></Col>*/}
|
||||
{/* <Col><a href="/standardCode/list/102031" title="설비코드" className={"topcodebnt"}>설비코드</a></Col>*/}
|
||||
{/* <Col><Link onClick={toggleShowMore} title="..." className={"topcodebnt"}>{showMore ? (<b> Ⅹ </b>) : (<b> · · · </b>)}</Link></Col>*/}
|
||||
{/* </Row>*/}
|
||||
{/* {showMore && (*/}
|
||||
{/* <Row className="">*/}
|
||||
{/* <Col><a href="/standardCode/list/102034" title="조경코드" className="topcodebnt">조경코드</a></Col>*/}
|
||||
{/* <Col><a href="/standardCode/list/102041" title="건축코드" className="topcodebnt">건축코드</a></Col>*/}
|
||||
{/* <Col><a href="/standardCode/list/102044" title="도로코드" className="topcodebnt">도로코드</a></Col>*/}
|
||||
{/* <Col><a href="/standardCode/list/102047" title="철도코드" className="topcodebnt">철도코드</a></Col>*/}
|
||||
{/* <Col><a href="/standardCode/list/102051" title="하천코드" className="topcodebnt">하천코드</a></Col>*/}
|
||||
{/* <Col><a href="/standardCode/list/102054" title="댐코드" className="topcodebnt">댐코드</a></Col>*/}
|
||||
{/* <Col><a href="/standardCode/list/102057" title="상수도코드" className="topcodebnt">상수도코드</a></Col>*/}
|
||||
{/* <Col><a href="/standardCode/list/102061" title="하수도코드" className="topcodebnt">하수도코드</a></Col>*/}
|
||||
{/* <Col><a href="/standardCode/list/102067" title="농업기반코드" className="topcodebnt">농업기반코드</a></Col>*/}
|
||||
{/* </Row>*/}
|
||||
{/* )}*/}
|
||||
{/* </div>*/}
|
||||
{/*</div>*/}
|
||||
<h1 className="logo">
|
||||
<Link to={URL.MAIN} className="w">국가건설기준센터</Link>{/*<img src="/assets/images/logo_w.png" alt="국가건설기준센터" />*/}
|
||||
<Link to={URL.MAIN} className="m">국가건설기준센터</Link>{/*<img src="/assets/images/logo_m.png" alt="국가건설기준센터" />*/}
|
||||
</h1>
|
||||
|
||||
{/*<h1 className="logo">*/}
|
||||
{/* <Link to={URL.MAIN} className="w">*/}
|
||||
{/* <div className="logotop"><img src="/assets/images/copy.png" alt="국가건설기준센터" /></div><img src="/assets/images/logo.png" alt="국가건설기준센터" /></Link>*/}
|
||||
{/* <Link to={URL.MAIN} className="m"><img src="/assets/images/logo_m.png" alt="국가건설기준센터" /></Link>/!*<img src="/assets/images/logo_m.png" alt="국가건설기준센터" />*!/*/}
|
||||
{/*</h1>*/}
|
||||
|
||||
{/*<div className="gnb">*/}
|
||||
{/* <h2 className="blind">주메뉴</h2>*/}
|
||||
{/* <ul>*/}
|
||||
{/*<div className="row ">*/}
|
||||
{/* <div className="w-100">*/}
|
||||
{/* <form className="form-inline">*/}
|
||||
{/* <div className="input-group w-75" style={{ border: "2px solid #1c488f", borderRadius: "20px", padding: "10px", width: "fit-content" }}>*/}
|
||||
{/* <input type="text" className="form-control border-0" placeholder="검색어를 입력하세요." />*/}
|
||||
{/* <div className="input-group-append">*/}
|
||||
{/* <button type="button" className="topsearch"></button>*/}
|
||||
{/* </div>*/}
|
||||
{/* </div>*/}
|
||||
{/* </form>*/}
|
||||
{/* </div>*/}
|
||||
{/*</div>*/}
|
||||
{/*<li><NavLink to={URL.STANDARD_CODE_INFO} className={({ isActive }) => (isActive ? "cur" : "")}>건설기준코드</NavLink></li>*/}
|
||||
{/*/!*<li><NavLink to={URL.ABOUT} className={({ isActive }) => (isActive ? "cur" : "")}>사이트소개</NavLink></li>*!/*/}
|
||||
{/*<li><NavLink to={URL.INTRO} className={({ isActive }) => (isActive ? "cur" : "")}>정보마당</NavLink></li>*/}
|
||||
{/*<li><NavLink to={URL.SUPPORT} className={({ isActive }) => (isActive ? "cur" : "")}>고객지원</NavLink></li>*/}
|
||||
{/*<li><NavLink to={URL.INFORM} className={({ isActive }) => (isActive ? "cur" : "")}>알림마당</NavLink></li>*/}
|
||||
{/*{sessionUserSe ==='ACC_TP01' &&*/}
|
||||
{/* <li><NavLink to={URL.ADMIN} className={({ isActive }) => (isActive ? "cur" : "")}>사이트관리</NavLink></li>*/}
|
||||
{/*}*/}
|
||||
{/* </ul>*/}
|
||||
{/*</div>*/}
|
||||
<div className="gnb">
|
||||
<h2 className="blind">주메뉴</h2>
|
||||
<ul>
|
||||
<li><NavLink to={URL.ABOUT} className={({ isActive }) => (isActive ? "cur" : "")}>사이트소개</NavLink></li>
|
||||
<li><NavLink to={URL.INTRO} className={({ isActive }) => (isActive ? "cur" : "")}>정보마당</NavLink></li>
|
||||
<li><NavLink to={URL.SUPPORT} className={({ isActive }) => (isActive ? "cur" : "")}>고객지원</NavLink></li>
|
||||
<li><NavLink to={URL.INFORM} className={({ isActive }) => (isActive ? "cur" : "")}>알림마당</NavLink></li>
|
||||
{sessionUserSe ==='ADM' &&
|
||||
<li><NavLink to={URL.ADMIN} className={({ isActive }) => (isActive ? "cur" : "")}>사이트관리</NavLink></li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{/* <!-- PC web에서 보여지는 영역 --> */}
|
||||
{/*<div className="user_info">*/}
|
||||
{/* /!* 로그아웃 : 로그인 정보 있을때 *!/*/}
|
||||
{/* {sessionUserId &&*/}
|
||||
{/* <>*/}
|
||||
{/* {sessionUserId} {sessionUserRole==='ROLE_001' && '[최고관리]'}{sessionUserRole==='ROLE_002' && '[관리자]'} */}
|
||||
{/* <span className="person"> </span>*/}
|
||||
{/* <button onClick={logOutHandler} className="btn">로그아웃</button>*/}
|
||||
{/* </>*/}
|
||||
{/* }*/}
|
||||
{/* /!* 로그인 : 로그인 정보 없을 때 *!/*/}
|
||||
{/* {!sessionUserId &&*/}
|
||||
{/* <button onClick={logInHandler} className="btn login">로그인</button>*/}
|
||||
{/* }*/}
|
||||
{/*</div>*/}
|
||||
<div className="user_info">
|
||||
{/* 로그아웃 : 로그인 정보 있을때 */}
|
||||
{sessionUserId &&
|
||||
<>
|
||||
<span className="person">{sessionUserId} </span> 님이, {sessionUserSe==='ADM'?'관리자':'사용자'}로 로그인하셨습니다.
|
||||
<button onClick={logOutHandler} className="btn">로그아웃</button>
|
||||
</>
|
||||
}
|
||||
{/* 로그인 : 로그인 정보 없을 때 */}
|
||||
{!sessionUserId &&
|
||||
<button onClick={logInHandler} className="btn login">로그인</button>
|
||||
}
|
||||
</div>
|
||||
{/* <!--// PC web에서 보여지는 영역 --> */}
|
||||
|
||||
{/* <!-- right area --> */}
|
||||
{/*<div className="right_a" onClick={allMenuControl}>*/}
|
||||
{/* <button type="button" className="btn btnAllMenu" title="전체메뉴 닫힘">전체메뉴</button>*/}
|
||||
{/* <button type="button" className="btn mobile btnAllMenuM" title="전체메뉴 닫힘">전체메뉴</button>*/}
|
||||
{/*</div>*/}
|
||||
<div className="right_a">
|
||||
<button type="button" className="btn btnAllMenu" title="전체메뉴 닫힘">전체메뉴</button>
|
||||
<button type="button" className="btn mobile btnAllMenuM" title="전체메뉴 닫힘">전체메뉴</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* <!-- All menu : web --> */}
|
||||
<div className={`all_menu WEB ${menuDiv?"open":"closed"}`}>
|
||||
<div className="all_menu WEB closed">
|
||||
<h2 className="blind">전체메뉴</h2>
|
||||
<div className="inner row">
|
||||
<div className="">
|
||||
<h3>건설기준코드</h3>
|
||||
<div className="inner">
|
||||
<div className="col">
|
||||
<h3>사이트소개</h3>
|
||||
<ul>
|
||||
<li><NavLink to={URL.STANDARD_CODE_INFO} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>건설기준코드 안내</NavLink></li>
|
||||
<li><NavLink to={URL.STANDARD_CODE_LIST} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>건설기준코드 검색</NavLink></li>
|
||||
<li><NavLink to={URL.STANDARD_CODE_OLD} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>(구)건설기준검색</NavLink></li>
|
||||
<li><NavLink to={URL.SUPPORT_LIST_NOCODE+'/KCSC-NOT'} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>건설기준고시</NavLink></li>
|
||||
<li><NavLink to={URL.STANDARD_CODE_ENG} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>영문건설기준</NavLink></li>
|
||||
<li><NavLink to={URL.STANDARD_CODE_TERM} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>건설기준용어</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_SITE} className={({ isActive }) => (isActive ? "cur" : "")}>소개</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_HISTORY} className={({ isActive }) => (isActive ? "cur" : "")}>연혁</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_ORGANIZATION} className={({ isActive }) => (isActive ? "cur" : "")}>조직소개</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_LOCATION} className={({ isActive }) => (isActive ? "cur" : "")}>찾아오시는 길</NavLink></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div className="">
|
||||
<h3>건설기준위원회</h3>
|
||||
<div className="col">
|
||||
<h3>정보마당</h3>
|
||||
<ul>
|
||||
<li><NavLink to={URL.COMMITTEE_PROGRESS} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>진행현황</NavLink></li>
|
||||
<li><NavLink to={URL.COMMITTEE_SCHEDULE} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>위원회일정</NavLink></li>
|
||||
<li><NavLink to={URL.INTRO_WORKS} className={({ isActive }) => (isActive ? "cur" : "")}>주요사업 소개</NavLink></li>
|
||||
<li><NavLink to={URL.INTRO_SERVICE} className={({ isActive }) => (isActive ? "cur" : "")}>대표서비스 소개</NavLink></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div className="">
|
||||
<h3>정보제공</h3>
|
||||
<div className="col">
|
||||
<h3>고객지원</h3>
|
||||
<ul>
|
||||
<li><NavLink to={URL.SUPPORT_LIST_NOCODE+'/KCSC-NTC'} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>공지사항</NavLink></li>
|
||||
<li><NavLink to={URL.SUPPORT_QNA} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>Q&A</NavLink></li>
|
||||
<li><NavLink to={URL.SUPPORT_LIST_NOCODE+'/KCKC-INV'} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>수요조사</NavLink></li>
|
||||
<li><NavLink to={URL.SUPPORT_LIST_NOCODE+'/KCSC-EVT'} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>주요행사</NavLink></li>
|
||||
{/*<li><NavLink to={URL.SUPPORT_LIST_NOCODE+'/KCSC-EDU'} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>건설교육안내</NavLink></li>*/}
|
||||
<li><NavLink to={URL.SUPPORT_LIST_NOCODE+'/KCSC-TEC'} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>기술자료</NavLink></li>
|
||||
<li><NavLink to={URL.SUPPORT_LIST_NOCODE+'/KCSC-NWS'} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>보도자료</NavLink></li>
|
||||
<li><NavLink to={URL.SUPPORT_RESEARCH} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>건설기준연구</NavLink></li>
|
||||
<li><NavLink to={URL.SUPPORT_SITE} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>관련사이트</NavLink></li>
|
||||
<li><NavLink to={URL.SUPPORT_API} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>API서비스</NavLink></li>
|
||||
<li><NavLink to={URL.SUPPORT_POLL} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>설문조사</NavLink></li>
|
||||
<li><NavLink to={URL.SUPPORT_DOWNLOAD} className={({ isActive }) => (isActive ? "cur" : "")}>자료실</NavLink></li>
|
||||
<li><NavLink to={URL.SUPPORT_QNA} className={({ isActive }) => (isActive ? "cur" : "")}>묻고 답하기</NavLink></li>
|
||||
<li><NavLink to={URL.SUPPORT_APPLY} className={({ isActive }) => (isActive ? "cur" : "")}>서비스 신청</NavLink></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div className="">
|
||||
<h3>센터소개</h3>
|
||||
<div className="col">
|
||||
<h3>알림마당</h3>
|
||||
<ul>
|
||||
<li><NavLink to={URL.ABOUT_SITE} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>인사말</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_HISTORY} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>연혁</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_PROMOTE} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>홍보자료</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_ORGANIZATION} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>주요업무</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_LOCATION} onClick={allMenuControl} className={({ isActive }) => (isActive ? "cur" : "")}>찾아오시는길</NavLink></li>
|
||||
<li><NavLink to={URL.INFORM_DAILY}>오늘의 행사</NavLink></li>
|
||||
<li><NavLink to={URL.INFORM_WEEKLY} className={({ isActive }) => (isActive ? "cur" : "")}>금주의 행사</NavLink></li>
|
||||
<li><NavLink to={URL.INFORM_NOTICE} className={({ isActive }) => (isActive ? "cur" : "")}>공지사항</NavLink></li>
|
||||
<li><NavLink to={URL.INFORM_GALLERY} className={({ isActive }) => (isActive ? "cur" : "")}>사이트 갤러리</NavLink></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{/*<div className="">*/}
|
||||
{/* <h3>정보마당</h3>*/}
|
||||
{/* <ul>*/}
|
||||
{/* <li><NavLink to={URL.INTRO_WORKS} className={({ isActive }) => (isActive ? "cur" : "")}>주요사업 소개</NavLink></li>*/}
|
||||
{/* <li><NavLink to={URL.INTRO_SERVICE} className={({ isActive }) => (isActive ? "cur" : "")}>대표서비스 소개</NavLink></li>*/}
|
||||
{/* </ul>*/}
|
||||
{/*</div>*/}
|
||||
{/*<div className="">*/}
|
||||
{/* <h3>고객지원</h3>*/}
|
||||
{/* <ul>*/}
|
||||
{/* <li><NavLink to={URL.SUPPORT_DOWNLOAD} className={({ isActive }) => (isActive ? "cur" : "")}>자료실</NavLink></li>*/}
|
||||
{/* <li><NavLink to={URL.SUPPORT_QNA} className={({ isActive }) => (isActive ? "cur" : "")}>묻고 답하기</NavLink></li>*/}
|
||||
{/* <li><NavLink to={URL.SUPPORT_APPLY} className={({ isActive }) => (isActive ? "cur" : "")}>서비스 신청</NavLink></li>*/}
|
||||
{/* </ul>*/}
|
||||
{/*</div>*/}
|
||||
{/*<div className="">*/}
|
||||
{/* <h3>알림마당</h3>*/}
|
||||
{/* <ul>*/}
|
||||
{/* <li><NavLink to={URL.INFORM_DAILY}>오늘의 행사</NavLink></li>*/}
|
||||
{/* <li><NavLink to={URL.INFORM_WEEKLY} className={({ isActive }) => (isActive ? "cur" : "")}>금주의 행사</NavLink></li>*/}
|
||||
{/* <li><NavLink to={URL.INFORM_NOTICE} className={({ isActive }) => (isActive ? "cur" : "")}>공지사항</NavLink></li>*/}
|
||||
{/* <li><NavLink to={URL.INFORM_GALLERY} className={({ isActive }) => (isActive ? "cur" : "")}>사이트 갤러리</NavLink></li>*/}
|
||||
{/* </ul>*/}
|
||||
{/*</div>*/}
|
||||
{sessionUserSe ==='ACC_TP01' &&
|
||||
<div className="">
|
||||
{sessionUserSe ==='ADM' &&
|
||||
<div className="col">
|
||||
<h3>사이트관리</h3>
|
||||
<ul>
|
||||
<li><NavLink to={URL.ADMIN_SCHEDULE} className={({ isActive }) => (isActive ? "cur" : "")}>Dashboard</NavLink></li>
|
||||
{/*<li><NavLink to={URL.ADMIN_BOARD} className={({ isActive }) => (isActive ? "cur" : "")}>게시판생성관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN_SCHEDULE} className={({ isActive }) => (isActive ? "cur" : "")}>일정관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN_BOARD} className={({ isActive }) => (isActive ? "cur" : "")}>게시판생성관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN_USAGE} className={({ isActive }) => (isActive ? "cur" : "")}>게시판사용관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN_NOTICE} className={({ isActive }) => (isActive ? "cur" : "")}>공지사항관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN_GALLERY} className={({ isActive }) => (isActive ? "cur" : "")}>사이트갤러리관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN_MANAGER} className={({ isActive }) => (isActive ? "cur" : "")}>사이트관리자 암호변경</NavLink></li>*/}
|
||||
<li><NavLink to={URL.ADMIN_MANAGER} className={({ isActive }) => (isActive ? "cur" : "")}>사이트관리자 암호변경</NavLink></li>
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
{sessionUserId &&
|
||||
<div>
|
||||
<button onClick={logOutHandler} className="btn btn-22498E w-100 rounded-5">로그아웃</button>
|
||||
</div>
|
||||
}
|
||||
{!sessionUserId &&
|
||||
<div>
|
||||
<button onClick={logInHandler} className="btn btn-22498E w-100 rounded-5">로그인</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
{/* <!-- All menu : mobile --> */}
|
||||
<div className="all_menu Mobile closed">
|
||||
<div className="user_info_m">
|
||||
|
|
@ -357,10 +177,9 @@ function EgovHeader({ loginUser, onChangeLogin }) {
|
|||
<h3><Link to={URL.ABOUT}>사이트소개</Link></h3>
|
||||
<div className="submenu closed">
|
||||
<ul>
|
||||
<li><NavLink to={URL.ABOUT_SITE} className={({ isActive }) => (isActive ? "cur" : "")}>인사말</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_SITE} className={({ isActive }) => (isActive ? "cur" : "")}>소개</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_HISTORY} className={({ isActive }) => (isActive ? "cur" : "")}>연혁</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_PROMOTE} className={({ isActive }) => (isActive ? "cur" : "")}>홍보자료</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_ORGANIZATION} className={({ isActive }) => (isActive ? "cur" : "")}>주요업무</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_ORGANIZATION} className={({ isActive }) => (isActive ? "cur" : "")}>조직소개</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_LOCATION} className={({ isActive }) => (isActive ? "cur" : "")}>찾아오시는 길</NavLink></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -388,10 +207,10 @@ function EgovHeader({ loginUser, onChangeLogin }) {
|
|||
<li><NavLink to={URL.INFORM_GALLERY} className={({ isActive }) => (isActive ? "cur" : "")}>사이트 갤러리</NavLink></li>
|
||||
</ul>
|
||||
</div>
|
||||
{sessionUserSe ==='ACC_TP01' &&
|
||||
{sessionUserSe ==='ADM' &&
|
||||
<>
|
||||
<h3><Link to={URL.ADMIN_SCHEDULE}>사이트관리</Link></h3>
|
||||
{/*<div className="submenu closed">
|
||||
<h3><Link to={URL.ADMIN}>사이트관리</Link></h3>
|
||||
<div className="submenu closed">
|
||||
<ul>
|
||||
<li><NavLink to={URL.ADMIN_SCHEDULE} className={({ isActive }) => (isActive ? "cur" : "")}>일정관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN_BOARD} className={({ isActive }) => (isActive ? "cur" : "")}>게시판생성관리</NavLink></li>
|
||||
|
|
@ -400,7 +219,7 @@ function EgovHeader({ loginUser, onChangeLogin }) {
|
|||
<li><NavLink to={URL.ADMIN_GALLERY} className={({ isActive }) => (isActive ? "cur" : "")}>사이트갤러리관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN_MANAGER} className={({ isActive }) => (isActive ? "cur" : "")}>사이트관리자 암호변경</NavLink></li>
|
||||
</ul>
|
||||
</div>*/}
|
||||
</div>
|
||||
</>
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,50 +1,65 @@
|
|||
import React from 'react';
|
||||
|
||||
function EgovPaging({pagination, moveToPage}) {
|
||||
function EgovPaging(props) {
|
||||
console.groupCollapsed("EgovPaging");
|
||||
console.log("EgovPaging [pagination] : ", pagination);
|
||||
console.log("EgovPaging [props] : ", props);
|
||||
|
||||
let paginationTag = [];
|
||||
|
||||
if (pagination === undefined) {
|
||||
if (props.pagination === undefined) {
|
||||
paginationTag = "-";
|
||||
} else {
|
||||
if(pagination.startNum>1){
|
||||
const currentPageNo = props.pagination.currentPageNo;
|
||||
const pageSize = props.pagination.pageSize;
|
||||
const totalRecordCount = props.pagination.totalRecordCount;
|
||||
const recordCountPerPage = props.pagination.recordCountPerPage;
|
||||
|
||||
const totalPageCount = Math.ceil(totalRecordCount / recordCountPerPage);
|
||||
const currentFirstPage = Math.floor((currentPageNo - 1) / pageSize) * pageSize + 1;
|
||||
let currentLastPage = currentFirstPage + pageSize - 1;
|
||||
currentLastPage = (currentLastPage > totalPageCount) ? totalPageCount : currentLastPage;
|
||||
|
||||
if (totalPageCount > pageSize) {
|
||||
// 첫 페이지 이동
|
||||
paginationTag.push(<li key="fp" className="btn">
|
||||
<button onClick={e => {moveToPage(1)}} className="first">처음</button>
|
||||
</li>);
|
||||
const firstPageTag = <li key="fp" className="btn">
|
||||
<button onClick={e => {props.moveToPage(1)}} className="first">처음</button></li>;
|
||||
paginationTag.push(firstPageTag);
|
||||
|
||||
// 이전 페이지 이동
|
||||
const prevPageIndex = pagination.pageIndex-10 < 0?1:(pagination.pageIndex-10)
|
||||
paginationTag.push(<li key="pp" className="btn">
|
||||
<button onClick={e => {moveToPage(prevPageIndex)}} className="prev">이전</button>
|
||||
</li>);
|
||||
const prevPageIndex = (currentPageNo - 1 > 0) ? currentPageNo - 1 : 1;
|
||||
const previousPageTag = <li key="pp" className="btn">
|
||||
<button onClick={e => {props.moveToPage(prevPageIndex)}} className="prev">이전</button></li>;
|
||||
paginationTag.push(previousPageTag);
|
||||
}
|
||||
for (let i = pagination.startNum; i <= pagination.endNum; i++) {
|
||||
if (i === pagination.pageIndex) {
|
||||
|
||||
for (let i = currentFirstPage; i <= currentLastPage; i++) {
|
||||
if (i === currentPageNo) {
|
||||
// 현재 페이지
|
||||
paginationTag.push(<li key={i}>
|
||||
const currentPage = <li key={i}>
|
||||
<button className="cur">{i}</button>
|
||||
</li>);
|
||||
</li>;
|
||||
paginationTag.push(currentPage);
|
||||
} else {
|
||||
// 다른 페이지
|
||||
paginationTag.push(<li key={i}>
|
||||
<button onClick={e => {moveToPage(i)}}>{i}</button>
|
||||
</li>);
|
||||
const otherPage = <li key={i}>
|
||||
<button onClick={e => {props.moveToPage(i)}}>{i}</button>
|
||||
</li>;
|
||||
console.log("@@@ otherpage : " + otherPage);
|
||||
paginationTag.push(otherPage);
|
||||
}
|
||||
}
|
||||
if(pagination.endNum!=pagination.maxNum){
|
||||
if (totalPageCount > pageSize) {
|
||||
// 다음 페이지 이동
|
||||
const nextPageIndex = pagination.pageIndex+10 > pagination.maxNum?pagination.maxNum:(pagination.pageIndex+10)
|
||||
paginationTag.push(<li key="np" className="btn">
|
||||
<button onClick={e => {moveToPage(nextPageIndex)}} className="next">다음</button>
|
||||
</li>);
|
||||
|
||||
const nextPageIndex = (currentLastPage + 1 < totalPageCount) ? currentLastPage + 1 : totalPageCount;
|
||||
const nextPageTag = <li key="np" className="btn">
|
||||
<button onClick={e => {props.moveToPage(nextPageIndex)}} className="next">다음</button>
|
||||
</li>;
|
||||
paginationTag.push(nextPageTag);
|
||||
|
||||
// 마지막 페이지 이동
|
||||
paginationTag.push(<li key="lp" className="btn">
|
||||
<button onClick={e => {moveToPage(pagination.maxNum)}} className="last"></button>
|
||||
</li>);
|
||||
const lastPageTag = <li key="lp" className="btn">
|
||||
<button onClick={e => {props.moveToPage(totalPageCount)}} className="last"></button></li>;
|
||||
paginationTag.push(lastPageTag);
|
||||
}
|
||||
}
|
||||
console.log("paginationTag", paginationTag);
|
||||
|
|
|
|||
|
|
@ -1,63 +0,0 @@
|
|||
import React from 'react';
|
||||
|
||||
function EgovPagingPaginationInfo({pagination, setPaginationInfo, moveToPage}) {
|
||||
console.groupCollapsed("EgovPagingPaginationInfo");
|
||||
console.log("EgovPagingPaginationInfo [pagination] : ", pagination);
|
||||
|
||||
|
||||
let paginationTag = [];
|
||||
|
||||
if (pagination === undefined) {
|
||||
paginationTag = "-";
|
||||
} else {
|
||||
if(pagination.firstPageNoOnPageList>1){
|
||||
// 첫 페이지 이동
|
||||
paginationTag.push(<li key="fp" className="btn">
|
||||
<button onClick={e => {moveToPage(1)}} className="first">처음</button>
|
||||
</li>);
|
||||
|
||||
// 이전 페이지 이동
|
||||
const prevPageIndex = pagination.currentPageNo-pagination.pageSize < 0?1:(pagination.currentPageNo-pagination.pageSize)
|
||||
paginationTag.push(<li key="pp" className="btn">
|
||||
<button onClick={e => {moveToPage(prevPageIndex)}} className="prev">이전</button>
|
||||
</li>);
|
||||
}
|
||||
for (let i = pagination.firstPageNoOnPageList; i <= pagination.lastPageNoOnPageList; i++) {
|
||||
if (i === pagination.currentPageNo) {
|
||||
// 현재 페이지
|
||||
paginationTag.push(<li key={i}>
|
||||
<button className="cur">{i}</button>
|
||||
</li>);
|
||||
} else {
|
||||
// 다른 페이지
|
||||
paginationTag.push(<li key={i}>
|
||||
<button onClick={e => {moveToPage(i)}}>{i}</button>
|
||||
</li>);
|
||||
}
|
||||
}
|
||||
if(pagination.lastPageNoOnPageList!=pagination.lastPageNo){
|
||||
// 다음 페이지 이동
|
||||
const nextPageIndex = pagination.currentPageNo+pagination.pageSize > pagination.lastPageNo?pagination.lastPageNo:(pagination.currentPageNo+pagination.pageSize)
|
||||
paginationTag.push(<li key="np" className="btn">
|
||||
<button onClick={e => {moveToPage(nextPageIndex)}} className="next">다음</button>
|
||||
</li>);
|
||||
|
||||
// 마지막 페이지 이동
|
||||
paginationTag.push(<li key="lp" className="btn">
|
||||
<button onClick={e => {moveToPage(pagination.lastPageNo)}} className="last"></button>
|
||||
</li>);
|
||||
}
|
||||
}
|
||||
console.log("paginationTag", paginationTag);
|
||||
console.groupEnd("EgovPagingPaginationInfo");
|
||||
|
||||
return (
|
||||
<div className="paging">
|
||||
<ul>
|
||||
{paginationTag}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default React.memo(EgovPagingPaginationInfo);
|
||||
|
|
@ -1,16 +1,10 @@
|
|||
import React, {useEffect, useState} from 'react';
|
||||
import React from 'react';
|
||||
import {Blocks} from "react-loader-spinner";
|
||||
import {LoadingDiv} from "./Loading.style";
|
||||
|
||||
function Loading ({loadingState}) {
|
||||
const [visible, setVisible] = useState(loadingState);
|
||||
|
||||
useEffect(() => {
|
||||
setVisible(loadingState)
|
||||
}, [loadingState]);
|
||||
|
||||
function Loading () {
|
||||
return (
|
||||
<LoadingDiv $visible={visible}>
|
||||
<LoadingDiv>
|
||||
<Blocks
|
||||
height="150"
|
||||
width="150"
|
||||
|
|
|
|||
|
|
@ -4,5 +4,4 @@ export const LoadingDiv = styled.div`
|
|||
min-height: 83vh;
|
||||
padding-top: calc(40vh - 150px);
|
||||
padding-left: calc(54vw - 150px);
|
||||
display: ${props=>props.$visible?"block":"none"};
|
||||
`
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import { useEffect } from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
// ==============================|| NAVIGATION - SCROLL TO TOP ||============================== //
|
||||
|
||||
const ScrollTop = ({ children }) => {
|
||||
const location = useLocation();
|
||||
const { pathname } = location;
|
||||
|
||||
useEffect(() => {
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
left: 0,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}, [pathname]);
|
||||
|
||||
return children || null;
|
||||
};
|
||||
|
||||
ScrollTop.propTypes = {
|
||||
children: PropTypes.node
|
||||
};
|
||||
|
||||
export default ScrollTop;
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
import React, { useEffect } from 'react';
|
||||
|
||||
import Button from '@mui/material/Button';
|
||||
import Dialog from '@mui/material/Dialog';
|
||||
import DialogActions from '@mui/material/DialogActions';
|
||||
import DialogContent from '@mui/material/DialogContent';
|
||||
import DialogContentText from '@mui/material/DialogContentText';
|
||||
import DialogTitle from '@mui/material/DialogTitle';
|
||||
import Slide from '@mui/material/Slide';
|
||||
|
||||
const Transition = React.forwardRef(function Transition(props, ref) {
|
||||
return <Slide direction="up" ref={ref} {...props} />;
|
||||
});
|
||||
|
||||
export default function AlertDialogSlide({confirm, setConfirm}) {
|
||||
|
||||
useEffect(function () {
|
||||
if( confirm ) {
|
||||
setConfirm({
|
||||
...confirm,
|
||||
//open: !confirm.open && false,
|
||||
//title: !confirm.title && "중요",
|
||||
///yes: !confirm.yes && "예",
|
||||
//no: !confirm.no && "아니요",
|
||||
});
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
|
||||
const handleClose = () => {
|
||||
setConfirm({...confirm, open: false});
|
||||
};
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
{confirm &&
|
||||
<Dialog
|
||||
open={ confirm.open }
|
||||
TransitionComponent={Transition}
|
||||
keepMounted
|
||||
onClose={handleClose}
|
||||
aria-describedby="alert-dialog-slide-description"
|
||||
>
|
||||
<DialogTitle>{confirm.title ? confirm.title : "알림"}</DialogTitle>
|
||||
<DialogContent>
|
||||
<DialogContentText id="alert-dialog-slide-description">{confirm.body}</DialogContentText>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={() => {handleClose(); confirm.yesCallback && confirm.yesCallback(confirm.yesCallbackParams);}}>{confirm.yes ? confirm.yes : "예"}</Button>
|
||||
<Button onClick={() => {handleClose(); confirm.noCallback && confirm.noCallback(confirm.noCallbackParams);}}>{confirm.no ? confirm.no : "아니요"}</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
}
|
||||
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
import * as React from 'react';
|
||||
import Button from '@mui/material/Button';
|
||||
|
||||
import Dialog from '@mui/material/Dialog';
|
||||
import DialogActions from '@mui/material/DialogActions';
|
||||
import DialogContent from '@mui/material/DialogContent';
|
||||
import DialogContentText from '@mui/material/DialogContentText';
|
||||
import DialogTitle from '@mui/material/DialogTitle';
|
||||
|
||||
export default function FormDialog( {open, setOpen, title, contentText, children, handleOk} ) {
|
||||
|
||||
const handleClickOpen = () => {
|
||||
setOpen(true);
|
||||
};
|
||||
|
||||
const handleClose = (event, reason) => {
|
||||
// background를 click해도 dialog가 사라지지 않도록 한다.
|
||||
if(reason !== 'backdropClick' && reason !== 'escapeKeyDown') {
|
||||
// Set 'open' to false, however you would do that with your particular code.
|
||||
setOpen(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Dialog
|
||||
open={open}
|
||||
onClose={handleClose}
|
||||
PaperProps={{
|
||||
component: 'form',
|
||||
onSubmit: (event) => {
|
||||
event.preventDefault();
|
||||
const formData = new FormData(event.currentTarget);
|
||||
const formJson = Object.fromEntries(formData.entries());
|
||||
const email = formJson.email;
|
||||
console.log(email);
|
||||
handleClose();
|
||||
},
|
||||
}}
|
||||
>
|
||||
<DialogTitle>{title}</DialogTitle>
|
||||
<DialogContent>
|
||||
<DialogContentText>
|
||||
{contentText}
|
||||
</DialogContentText>
|
||||
{children}
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={handleClose}>취소</Button>
|
||||
<Button type="button" onClick={handleOk}>저장</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
import PropTypes from 'prop-types';
|
||||
|
||||
// material-ui
|
||||
import { Box, Chip, Grid, Stack, Typography } from '@mui/material';
|
||||
|
||||
// project import
|
||||
import MainCard from 'components/cards/MainCard';
|
||||
|
||||
// assets
|
||||
import { RiseOutlined, FallOutlined } from '@ant-design/icons';
|
||||
|
||||
// ==============================|| STATISTICS - ECOMMERCE CARD ||============================== //
|
||||
|
||||
const AnalyticEcommerce = ({ color, title, count, percentage, isLoss, extra }) => (
|
||||
<MainCard contentSX={{ p: 2.25 }}>
|
||||
<Stack spacing={0.5}>
|
||||
<Typography variant="h6" color="textSecondary">
|
||||
{title}
|
||||
</Typography>
|
||||
<Grid container alignItems="center">
|
||||
<Grid item>
|
||||
<Typography variant="h4" color="inherit">
|
||||
{count}
|
||||
</Typography>
|
||||
</Grid>
|
||||
{percentage !== undefined && (
|
||||
<Grid item>
|
||||
<Chip
|
||||
variant="combined"
|
||||
color={color}
|
||||
icon={
|
||||
<>
|
||||
{!isLoss && <RiseOutlined style={{ fontSize: '0.75rem', color: 'inherit' }} />}
|
||||
{isLoss && <FallOutlined style={{ fontSize: '0.75rem', color: 'inherit' }} />}
|
||||
</>
|
||||
}
|
||||
label={`${percentage}%`}
|
||||
sx={{ ml: 1.25, pl: 1 }}
|
||||
size="small"
|
||||
/>
|
||||
</Grid>
|
||||
)}
|
||||
</Grid>
|
||||
</Stack>
|
||||
<Box sx={{ pt: 2.25 }}>
|
||||
<Typography variant="caption" color="textSecondary">
|
||||
지난달{' '}
|
||||
<Typography component="span" variant="caption" sx={{ color: `${color || 'primary'}.main` }}>
|
||||
{extra}
|
||||
</Typography>{' '}
|
||||
건이 기록되었습니다.
|
||||
</Typography>
|
||||
</Box>
|
||||
</MainCard>
|
||||
);
|
||||
|
||||
AnalyticEcommerce.propTypes = {
|
||||
color: PropTypes.string,
|
||||
title: PropTypes.string,
|
||||
count: PropTypes.string,
|
||||
percentage: PropTypes.number,
|
||||
isLoss: PropTypes.bool,
|
||||
extra: PropTypes.oneOfType([PropTypes.node, PropTypes.string])
|
||||
};
|
||||
|
||||
AnalyticEcommerce.defaultProps = {
|
||||
color: 'primary'
|
||||
};
|
||||
|
||||
export default AnalyticEcommerce;
|
||||
|
|
@ -1,103 +0,0 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import { forwardRef } from 'react';
|
||||
|
||||
// material-ui
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
import { Card, CardContent, CardHeader, Divider, Typography } from '@mui/material';
|
||||
|
||||
// project import
|
||||
import Highlighter from '../third-party/Highlighter';
|
||||
|
||||
// header style
|
||||
const headerSX = {
|
||||
p: 2.5,
|
||||
'& .MuiCardHeader-action': { m: '0px auto', alignSelf: 'center' }
|
||||
};
|
||||
|
||||
// ==============================|| CUSTOM - MAIN CARD ||============================== //
|
||||
|
||||
const MainCard = forwardRef(
|
||||
(
|
||||
{
|
||||
border = true,
|
||||
boxShadow,
|
||||
children,
|
||||
content = true,
|
||||
contentSX = {},
|
||||
darkTitle,
|
||||
elevation,
|
||||
secondary,
|
||||
shadow,
|
||||
sx = {},
|
||||
title,
|
||||
codeHighlight,
|
||||
...others
|
||||
},
|
||||
ref
|
||||
) => {
|
||||
const theme = useTheme();
|
||||
boxShadow = theme.palette.mode === 'dark' ? boxShadow || true : boxShadow;
|
||||
|
||||
return (
|
||||
<Card
|
||||
elevation={elevation || 0}
|
||||
ref={ref}
|
||||
{...others}
|
||||
sx={{
|
||||
border: border ? '1px solid' : 'none',
|
||||
borderRadius: 2,
|
||||
borderColor: theme.palette.mode === 'dark' ? theme.palette.divider : theme.palette.grey.A800,
|
||||
boxShadow: boxShadow && (!border || theme.palette.mode === 'dark') ? shadow || theme.customShadows.z1 : 'inherit',
|
||||
':hover': {
|
||||
boxShadow: boxShadow ? shadow || theme.customShadows.z1 : 'inherit'
|
||||
},
|
||||
'& pre': {
|
||||
m: 0,
|
||||
p: '16px !important',
|
||||
fontFamily: theme.typography.fontFamily,
|
||||
fontSize: '0.75rem'
|
||||
},
|
||||
...sx
|
||||
}}
|
||||
>
|
||||
{/* card header and action */}
|
||||
{!darkTitle && title && (
|
||||
<CardHeader sx={headerSX} titleTypographyProps={{ variant: 'subtitle1' }} title={title} action={secondary} />
|
||||
)}
|
||||
{darkTitle && title && <CardHeader sx={headerSX} title={<Typography variant="h3">{title}</Typography>} action={secondary} />}
|
||||
|
||||
{/* card content */}
|
||||
{content && <CardContent sx={contentSX}>{children}</CardContent>}
|
||||
{!content && children}
|
||||
|
||||
{/* card footer - clipboard & highlighter */}
|
||||
{codeHighlight && (
|
||||
<>
|
||||
<Divider sx={{ borderStyle: 'dashed' }} />
|
||||
<Highlighter codeHighlight={codeHighlight} main>
|
||||
{children}
|
||||
</Highlighter>
|
||||
</>
|
||||
)}
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
MainCard.propTypes = {
|
||||
border: PropTypes.bool,
|
||||
boxShadow: PropTypes.bool,
|
||||
contentSX: PropTypes.object,
|
||||
darkTitle: PropTypes.bool,
|
||||
divider: PropTypes.bool,
|
||||
elevation: PropTypes.number,
|
||||
secondary: PropTypes.node,
|
||||
shadow: PropTypes.string,
|
||||
sx: PropTypes.object,
|
||||
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
||||
codeHighlight: PropTypes.bool,
|
||||
content: PropTypes.bool,
|
||||
children: PropTypes.node
|
||||
};
|
||||
|
||||
export default MainCard;
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
import React, {useCallback, useEffect, useState} from "react";
|
||||
import Form from "react-bootstrap/Form";
|
||||
import * as EgovNet from "api/egovFetch";
|
||||
|
||||
function CheckBox({name, grpCd, selectedValue}){
|
||||
|
||||
const [checkBox, setCheckBox] = useState();
|
||||
|
||||
useEffect(() => {
|
||||
getCodeItemList()
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if(checkBox&&selectedValue){
|
||||
const itemCdAry = selectedValue.split(',');
|
||||
itemCdAry.forEach(function(itemCd){
|
||||
document.querySelector(`#chkBox_${itemCd}`).checked = true;
|
||||
})
|
||||
}
|
||||
}, [checkBox]);
|
||||
|
||||
function getCodeItemList() {
|
||||
EgovNet.requestFetch(
|
||||
'/commonCode/code-item?grpCd='+grpCd,
|
||||
{
|
||||
method: "GET"
|
||||
},
|
||||
(resp) => {
|
||||
let checkBoxTag = [];
|
||||
resp.result.codeList.forEach(function (item, index) {
|
||||
checkBoxTag.push(
|
||||
<Form.Check inline
|
||||
label={item.itemNm}
|
||||
id={`chkBox_${item.itemCd}`}
|
||||
key={`chkBox_${item.itemCd}_${index}`}
|
||||
name={name}
|
||||
value={item.itemCd}
|
||||
/>
|
||||
);
|
||||
});
|
||||
setCheckBox(checkBoxTag);
|
||||
},
|
||||
function (resp) {
|
||||
console.log("err response : ", resp);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div id={`${grpCd}_checkBoxDiv`} key={`checkBox_${grpCd}`}>
|
||||
{checkBox}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default CheckBox;
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
import React, {useEffect, useState} from "react";
|
||||
import Form from "react-bootstrap/Form";
|
||||
import * as EgovNet from "api/egovFetch";
|
||||
|
||||
function SelectOption({name, grpCd, selectedValue}){
|
||||
|
||||
const [options, setOptions] = useState();
|
||||
const [value, setValue] = useState(selectedValue)
|
||||
|
||||
useEffect(() => {
|
||||
getCodeItemList()
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setValue(selectedValue)
|
||||
}, [selectedValue]);
|
||||
|
||||
function getCodeItemList(){
|
||||
EgovNet.requestFetch(
|
||||
'/commonCode/code-item?grpCd='+grpCd,
|
||||
{
|
||||
method: "GET"
|
||||
},
|
||||
(resp) => {
|
||||
let optionTag = [];
|
||||
// 리스트 항목 구성
|
||||
resp.result.codeList.forEach(function (item, index) {
|
||||
optionTag.push(
|
||||
<option value={item.itemCd} key={`${grpCd}option${index}`}>{item.itemNm}</option>
|
||||
);
|
||||
});
|
||||
setOptions(optionTag);
|
||||
},
|
||||
function (resp) {
|
||||
console.log("err response : ", resp);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Form.Select name={name} value={value} onChange={(e)=>{setValue(e.target.value)}}>
|
||||
{options}
|
||||
</Form.Select>
|
||||
)
|
||||
}
|
||||
|
||||
export default SelectOption;
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
import React from "react";
|
||||
import ReactQuill from 'react-quill';
|
||||
import 'react-quill/dist/quill.snow.css';
|
||||
|
||||
// react-quill에 기반을 둔 텍스트 에디터 컴포넌트
|
||||
const RichTextEditor = ({item, setText}) => {
|
||||
const style = { height: "400px", paddingBottom: "69px"};
|
||||
|
||||
const onChangeEvent = (e) => {
|
||||
setText(e);
|
||||
}
|
||||
|
||||
// Quill Tool bar
|
||||
const modules = {
|
||||
toolbar: {
|
||||
container: [
|
||||
[{ header: '1' }, { header: '2' }, { font: [] }],
|
||||
[{ size: [] }],
|
||||
[{ color: [] }],
|
||||
["bold", "italic", "underline", "strike", "blockquote"],
|
||||
[
|
||||
{ list: "ordered" },
|
||||
{ list: "bullet" },
|
||||
{ indent: '-1' },
|
||||
{ indent: '+1' },
|
||||
{ align: [] }
|
||||
],
|
||||
["link", "image", "video"],
|
||||
["clean"]
|
||||
],
|
||||
// handlers: { image: this.imageHandler }
|
||||
},
|
||||
clipboard: { matchVisual: false }
|
||||
};
|
||||
|
||||
const formats = [
|
||||
"header",
|
||||
"bold",
|
||||
"italic",
|
||||
"underline",
|
||||
"strike",
|
||||
"blockquote",
|
||||
"size",
|
||||
"color",
|
||||
"list",
|
||||
"bullet",
|
||||
"indent",
|
||||
"link",
|
||||
"image",
|
||||
"video",
|
||||
"align"
|
||||
];
|
||||
|
||||
|
||||
return (
|
||||
<ReactQuill
|
||||
style={style}
|
||||
theme="snow"
|
||||
onChange={onChangeEvent}
|
||||
modules={modules}
|
||||
formats={formats}
|
||||
value={item}
|
||||
>
|
||||
</ReactQuill>
|
||||
)
|
||||
}
|
||||
|
||||
export default RichTextEditor;
|
||||
|
|
@ -1,256 +0,0 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
import Button from '@mui/material/Button';
|
||||
import AttachFileIcon from '@mui/icons-material/AttachFile';
|
||||
import IconButton from '@mui/material/IconButton';
|
||||
import DeleteIcon from '@mui/icons-material/Delete';
|
||||
import styled from "styled-components";
|
||||
import FileDragDrop from "./FileDragDrop";
|
||||
import * as File from "utils/file";
|
||||
|
||||
const StyledDiv = styled.div`
|
||||
label {
|
||||
//background: red;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border: 2px dashed #888;
|
||||
border-radius: 6px;
|
||||
& > div {
|
||||
height: 100%;
|
||||
line-height: auto;
|
||||
padding: 20px;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
function AttachFile(props) {
|
||||
|
||||
const multiple = props.multiple ? props.multiple : false;
|
||||
|
||||
// 삭제 버튼 눌렀을 때 파일선택 dialog가 뜨는 것을 방지
|
||||
let oldTagName;
|
||||
useEffect(function () {
|
||||
|
||||
const labelEle = document.querySelectorAll("label[for='preDataFile']")[0];
|
||||
// event
|
||||
const onClickLabel = (e) => {
|
||||
|
||||
const tagName = String(e.target.tagName).toLowerCase();
|
||||
|
||||
if( tagName !== 'input' ) {
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
oldTagName = tagName;
|
||||
e.preventDefault();
|
||||
return false;
|
||||
} else {
|
||||
|
||||
if(
|
||||
oldTagName === 'path' ||
|
||||
oldTagName === 'svg' ||
|
||||
oldTagName === 'button'
|
||||
) {
|
||||
oldTagName = undefined;
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// remove Event
|
||||
labelEle.removeEventListener("click", onClickLabel);
|
||||
labelEle.addEventListener("click", onClickLabel);
|
||||
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
|
||||
//기존 server에 upload된 file인 props.serverFiles file들을 렌더링 초기에 넣어 놓기
|
||||
useEffect(function () {
|
||||
|
||||
if( !props.serverFiles ) {
|
||||
return;
|
||||
}
|
||||
|
||||
let items = [];
|
||||
let nNewIndex = 0;
|
||||
for( let idx in props.serverFiles ) {
|
||||
props.serverFiles[idx].index=nNewIndex++;
|
||||
items.push( props.serverFiles[idx] );
|
||||
}
|
||||
setFileItem(items);
|
||||
props.setFiles(items);
|
||||
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [props.serverFiles]);
|
||||
|
||||
|
||||
|
||||
|
||||
const [disabled, setDisabled] = useState( props.disabled ? props.disabled : false );
|
||||
useEffect(function () {
|
||||
if( !props.disabled ) {
|
||||
return;
|
||||
}
|
||||
setDisabled(props.disabled);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [props.disabled]);
|
||||
|
||||
|
||||
const [maxSize, setMaxSize] = useState(props.maxSize ? props.maxSize : 100);
|
||||
useEffect(function () {
|
||||
if( !props.maxSize ) {
|
||||
return;
|
||||
}
|
||||
setMaxSize(props.maxSize);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [props.maxSize]);
|
||||
|
||||
|
||||
const [fileItem, setFileItem] = useState();
|
||||
|
||||
const onDrop = (e) => {
|
||||
//alert('ddd');
|
||||
};
|
||||
|
||||
|
||||
const handleChange = (files) => {
|
||||
|
||||
|
||||
if( !files ) {
|
||||
return;
|
||||
}
|
||||
|
||||
let items = [];
|
||||
let nNewIndex = 0;
|
||||
|
||||
//파일이 이미 첨부되어 있는 상태에서 추가로 첨부한 경우 기존 것을 먼저 추가 후 새로운 항목을 추가한다.
|
||||
for( let idx in fileItem ) {
|
||||
fileItem[idx].index=nNewIndex++;
|
||||
items.push( fileItem[idx] );
|
||||
}
|
||||
|
||||
Object.keys(files).forEach(function(key, index) {
|
||||
if( typeof files[key].name === 'undefined' ) {
|
||||
return;
|
||||
}
|
||||
files[key].index=nNewIndex++;
|
||||
items.push( files[key] );
|
||||
});
|
||||
setFileItem(items);
|
||||
props.setFiles(items);
|
||||
};
|
||||
|
||||
|
||||
const onClickDeleteItem = (e, targetEle) => {
|
||||
|
||||
|
||||
const dataIndex = Number(targetEle.getAttribute('data-index'));
|
||||
|
||||
let items = [];
|
||||
let nNewIndex = 0;
|
||||
Object.keys(fileItem).forEach(function(key, index) {
|
||||
if( dataIndex !== index ) {
|
||||
fileItem[key].index=nNewIndex++;
|
||||
items.push( fileItem[key] );
|
||||
}
|
||||
});
|
||||
|
||||
setFileItem(items);
|
||||
props.setFiles(items);
|
||||
};
|
||||
|
||||
const onClickFile = (e, item) => {
|
||||
e = e || window.event;
|
||||
const target = e.target || e.srcElement;
|
||||
const dataSeq = target.getAttribute('data-seq');
|
||||
if( dataSeq ) {
|
||||
// server로 부터 download 요청
|
||||
const fileSeq = Number(dataSeq);
|
||||
File.download(fileSeq);
|
||||
} else {
|
||||
//현재 첨부된 file 다운로드
|
||||
const file = item;
|
||||
let fr = new FileReader();
|
||||
fr.readAsDataURL(file);
|
||||
|
||||
var blob = new Blob([file], { type: "application/pdf" });
|
||||
|
||||
var objectURL = window.URL.createObjectURL(blob);
|
||||
|
||||
if (navigator.appVersion.toString().indexOf('.NET') > 0) {
|
||||
window.navigator.msSaveOrOpenBlob(blob, item.name);
|
||||
} else {
|
||||
var link = document.createElement('a');
|
||||
link.href = objectURL;
|
||||
link.download = item.name;
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
link.remove();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
return (
|
||||
<StyledDiv>
|
||||
<FileDragDrop
|
||||
className="file-drag-drop"
|
||||
multiple={multiple}
|
||||
name={props.name}
|
||||
fileTypes={props.fileTypes}
|
||||
onDrop={onDrop}
|
||||
handleChange={handleChange}
|
||||
dropMessageStyle={{backgroundColor: '#cfe2ff'}}
|
||||
maxSize={maxSize}
|
||||
disabled={disabled}
|
||||
>
|
||||
<div>
|
||||
|
||||
{fileItem && fileItem.length > 0
|
||||
?
|
||||
fileItem.map((item) => (
|
||||
<span key={item.index} data-index={item.index}>
|
||||
<IconButton aria-label="delete" size="small"
|
||||
sx={{color: '#094c72', padding: '2px 4px'}}
|
||||
onClick={(e)=> {
|
||||
e = e || window.event;
|
||||
const target = e.target || e.srcElement;
|
||||
|
||||
const tagName = String(target.tagName).toLowerCase();
|
||||
|
||||
// target 보정
|
||||
let targetEle = target.parentNode.parentNode.parentNode;
|
||||
if( tagName === 'svg' ) {
|
||||
targetEle = target.parentNode.parentNode;
|
||||
} else if( tagName === 'button' ) {
|
||||
targetEle = target.parentNode;
|
||||
}
|
||||
|
||||
onClickDeleteItem(e, targetEle);
|
||||
}}
|
||||
>
|
||||
<DeleteIcon fontSize="small" />
|
||||
</IconButton>
|
||||
<Button
|
||||
variant="text"
|
||||
sx={{textTransform: 'none', color: '#032b77', fontSize: '14px', padding: '2px 5px 4px 5px'}}
|
||||
onClick={(e)=> {
|
||||
onClickFile(e, item);
|
||||
}}
|
||||
key={item.index}
|
||||
data-seq={item.seq}
|
||||
>{item.name}</Button>
|
||||
<br />
|
||||
</span>
|
||||
))
|
||||
:
|
||||
<span>여기를 누르시거나 파일을 마우스로 끌어놓으세요.</span>
|
||||
}
|
||||
</div>
|
||||
</FileDragDrop>
|
||||
</StyledDiv>
|
||||
);
|
||||
|
||||
}
|
||||
export default AttachFile;
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
import React, { useState } from "react";
|
||||
import { FileUploader } from "react-drag-drop-files";
|
||||
|
||||
|
||||
/**
|
||||
* https://www.npmjs.com/package/react-drag-drop-files를 참고해주세요.
|
||||
* @param {fileTypes} const fileTypes = ["JPG", "PNG", "GIF"];
|
||||
* @returns
|
||||
*/
|
||||
function FileDragDrop({fileTypes, children, multiple, label, onDrop, handleChange, file, setFile, dropMessageStyle, name, maxSize, disabled}) {
|
||||
|
||||
return (
|
||||
<FileUploader
|
||||
hoverTitle=" "
|
||||
handleChange={handleChange}
|
||||
name={name}
|
||||
types={fileTypes ? fileTypes : "*"}
|
||||
multiple={multiple ? multiple : false}
|
||||
label={label}
|
||||
onDrop={onDrop}
|
||||
dropMessageStyle={dropMessageStyle}
|
||||
maxSize={maxSize}
|
||||
disabled={disabled}
|
||||
onSelect={(e)=> {
|
||||
e = e || window.event;
|
||||
}}
|
||||
>
|
||||
{children && children}
|
||||
</FileUploader>
|
||||
);
|
||||
}
|
||||
|
||||
export default FileDragDrop;
|
||||
|
|
@ -5,14 +5,13 @@ import URL from 'constants/url';
|
|||
|
||||
function EgovLeftNavAbout() {
|
||||
return (
|
||||
<div className="nav1">
|
||||
<div className="">
|
||||
<h2 className={"nav_title"}>센터 소개</h2>
|
||||
<ul className="menu10">
|
||||
<li><NavLink to={URL.ABOUT_SITE} className={({ isActive }) => (isActive ? "cur" : "")}>인사말</NavLink></li>
|
||||
<div className="nav">
|
||||
<div className="inner">
|
||||
<h2>사이트 소개</h2>
|
||||
<ul className="menu4">
|
||||
<li><NavLink to={URL.ABOUT_SITE} className={({ isActive }) => (isActive ? "cur" : "")}>소개</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_HISTORY} className={({ isActive }) => (isActive ? "cur" : "")}>연혁</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_PROMOTE} className={({ isActive }) => (isActive ? "cur" : "")}>홍보자료</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_ORGANIZATION} className={({ isActive }) => (isActive ? "cur" : "")}>주요업무</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_ORGANIZATION} className={({ isActive }) => (isActive ? "cur" : "")}>조직소개</NavLink></li>
|
||||
<li><NavLink to={URL.ABOUT_LOCATION} className={({ isActive }) => (isActive ? "cur" : "")}>찾아오시는 길</NavLink></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,61 +1,16 @@
|
|||
import React from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import URL from 'constants/url';
|
||||
import {Accordion} from "react-bootstrap";
|
||||
|
||||
function EgovLeftNavAdmin(props) {
|
||||
const location = useLocation();
|
||||
|
||||
const getMiddleFolder = (url) => { // 중간 폴더를 가져오는 로직 추가
|
||||
const parts = url.split('/').filter(Boolean); // '/'로 분할하고 빈 문자열을 필터링
|
||||
if (parts.length >= 2) {
|
||||
return parts[1]; // 중간 폴더 반환
|
||||
}
|
||||
return null;
|
||||
};
|
||||
const activeFolder = getMiddleFolder(location.pathname);
|
||||
|
||||
let activeKey;
|
||||
if (activeFolder === "config") {
|
||||
activeKey = 0;
|
||||
} else if (activeFolder === "users") {
|
||||
activeKey = 1;
|
||||
} else if (activeFolder === "boards") {
|
||||
activeKey = 2;
|
||||
} else if (activeFolder === "standards") {
|
||||
activeKey = 3;
|
||||
} else if (activeFolder === "contents") {
|
||||
activeKey = 4;
|
||||
} else if (activeFolder === "committee") {
|
||||
activeKey = 5;
|
||||
} else if (activeFolder === "logs") {
|
||||
activeKey = 6;
|
||||
}
|
||||
// else {
|
||||
// activeKey = "7";
|
||||
// }
|
||||
|
||||
function EgovLeftNavAdmin() {
|
||||
return (
|
||||
<div className="nav">
|
||||
<div className="inner">
|
||||
<h2 className={"nav_title"}>사이트관리
|
||||
<NavLink to={URL.ADMIN_SCHEDULE} className={({ isActive }) => (isActive ? "cur" : "")}><h6 className={"nav_subtitle"}>Dashboard</h6></NavLink></h2>
|
||||
<Accordion defaultActiveKey={activeKey}>
|
||||
{/*<Accordion.Item eventKey={"7"}>*/}
|
||||
{/* <Accordion.Header>사이트 관리</Accordion.Header>*/}
|
||||
{/* <Accordion.Body>*/}
|
||||
{/* <ul className="menu4">*/}
|
||||
{/* <li><NavLink to={URL.ADMIN_SCHEDULE} className={({ isActive }) => (isActive ? "cur" : "")}>Dashboard</NavLink></li>*/}
|
||||
{/* /!*<li><NavLink to={URL.ADMIN_BOARD} className={({ isActive }) => (isActive ? "cur" : "")}>게시판생성관리</NavLink></li>*/}
|
||||
{/* <li><NavLink to={URL.ADMIN_USAGE} className={({ isActive }) => (isActive ? "cur" : "")}>게시판사용관리</NavLink></li>*/}
|
||||
{/* <li><NavLink to={URL.ADMIN_NOTICE} className={({ isActive }) => (isActive ? "cur" : "")}>공지사항관리</NavLink></li>*/}
|
||||
{/* <li><NavLink to={URL.ADMIN_GALLERY} className={({ isActive }) => (isActive ? "cur" : "")}>사이트갤러리관리</NavLink></li>*/}
|
||||
{/* <li><NavLink to={URL.ADMIN_MANAGER} className={({ isActive }) => (isActive ? "cur" : "")}>사이트관리자 암호변경</NavLink></li>*!/*/}
|
||||
{/* </ul>*/}
|
||||
{/* </Accordion.Body>*/}
|
||||
{/*</Accordion.Item>*/}
|
||||
<Accordion.Item eventKey={0}>
|
||||
<h2 className={"nav_title"}>사이트관리</h2>
|
||||
<Accordion>
|
||||
<Accordion.Item eventKey={"0"}>
|
||||
<Accordion.Header>환경설정</Accordion.Header>
|
||||
<Accordion.Body>
|
||||
<ul className="menu4">
|
||||
|
|
@ -69,51 +24,51 @@ function EgovLeftNavAdmin(props) {
|
|||
</Accordion.Body>
|
||||
</Accordion.Item>
|
||||
|
||||
<Accordion.Item eventKey={1}>
|
||||
<Accordion.Header>사용자 관리</Accordion.Header>
|
||||
<Accordion.Item eventKey={"1"}>
|
||||
<Accordion.Header>사용자현황</Accordion.Header>
|
||||
<Accordion.Body>
|
||||
<ul className="menu4">
|
||||
<li><NavLink to={URL.ADMIN__USERS__LIST} className={({ isActive }) => (isActive ? "cur" : "")}>사용자 목록</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN__USERS__LIST} className={({ isActive }) => (isActive ? "cur" : "")}>사용자 현황</NavLink></li>
|
||||
</ul>
|
||||
</Accordion.Body>
|
||||
</Accordion.Item>
|
||||
|
||||
<Accordion.Item eventKey={2}>
|
||||
<Accordion.Item eventKey={"2"}>
|
||||
<Accordion.Header>게시판현황</Accordion.Header>
|
||||
<Accordion.Body>
|
||||
<ul className="menu4">
|
||||
<li><NavLink to={URL.ADMIN__BOARDS__LIST} className={({ isActive }) => (isActive ? "cur" : "")}>게시판 관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN__BOARDS__POSTS} className={({ isActive }) => (isActive ? "cur" : "")}>게시물 관리</NavLink></li>
|
||||
{/*<li><NavLink to={URL.ADMIN__BOARDS__KEYWORDS} className={({ isActive }) => (isActive ? "cur" : "")}>키워드 관리</NavLink></li>*/}
|
||||
<li><NavLink to={URL.ADMIN__BOARDS__KEYWORDS} className={({ isActive }) => (isActive ? "cur" : "")}>키워드 관리</NavLink></li>
|
||||
</ul>
|
||||
</Accordion.Body>
|
||||
</Accordion.Item>
|
||||
|
||||
<Accordion.Item eventKey={3}>
|
||||
<Accordion.Item eventKey={"3"}>
|
||||
<Accordion.Header>건설기준관리</Accordion.Header>
|
||||
<Accordion.Body>
|
||||
<ul className="menu4">
|
||||
{/*<li><NavLink to={URL.ADMIN__STANDARDS__REFERENCE_CODES} className={({ isActive }) => (isActive ? "cur" : "")}>참조코드 관리</NavLink></li>*/}
|
||||
<li><NavLink to={URL.ADMIN__STANDARDS__API_KEYS} className={({ isActive }) => (isActive ? "cur" : "")}>API KEY 관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN__STANDARDS__REFERENCE_CODES} className={({ isActive }) => (isActive ? "cur" : "")}>참조코드 관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN__STANDARDS__API_KYES} className={({ isActive }) => (isActive ? "cur" : "")}>API KEY 관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN__STANDARDS__SIMILARITY_CHECK} className={({ isActive }) => (isActive ? "cur" : "")}>유사성 검사</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN__STANDARDS__INFO_DISCLOSURE} className={({ isActive }) => (isActive ? "cur" : "")}>건설기준 내용 관리</NavLink></li>
|
||||
</ul>
|
||||
</Accordion.Body>
|
||||
</Accordion.Item>
|
||||
|
||||
<Accordion.Item eventKey={4}>
|
||||
<Accordion.Item eventKey={"4"}>
|
||||
<Accordion.Header>컨텐츠관리</Accordion.Header>
|
||||
<Accordion.Body>
|
||||
<ul className="menu4">
|
||||
<li><NavLink to={URL.ADMIN__CONTENTS__SURVEY} className={({ isActive }) => (isActive ? "cur" : "")}>설문 관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN__CONTENTS__POP_UP} className={({ isActive }) => (isActive ? "cur" : "")}>팝업 관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN__CONTENTS__STANDARDS_RESEARCH} className={({ isActive }) => (isActive ? "cur" : "")}>건설기준연구 관리</NavLink></li>
|
||||
{/*<li><NavLink to={URL.ADMIN__CONTENTS__TEXT_MESSAGES} className={({ isActive }) => (isActive ? "cur" : "")}>문자 발송</NavLink></li>*/}
|
||||
<li><NavLink to={URL.ADMIN__CONTENTS__TEXT_MESSAGES} className={({ isActive }) => (isActive ? "cur" : "")}>문자 발송</NavLink></li>
|
||||
</ul>
|
||||
</Accordion.Body>
|
||||
</Accordion.Item>
|
||||
|
||||
<Accordion.Item eventKey={5}>
|
||||
<Accordion.Item eventKey={"5"}>
|
||||
<Accordion.Header>위원회관리</Accordion.Header>
|
||||
<Accordion.Body>
|
||||
<ul className="menu4">
|
||||
|
|
@ -123,17 +78,30 @@ function EgovLeftNavAdmin(props) {
|
|||
</Accordion.Body>
|
||||
</Accordion.Item>
|
||||
|
||||
<Accordion.Item eventKey={6}>
|
||||
<Accordion.Item eventKey={"6"}>
|
||||
<Accordion.Header>로그현황</Accordion.Header>
|
||||
<Accordion.Body>
|
||||
<ul className="menu4">
|
||||
<li><NavLink to={URL.ADMIN__LOGS__MENU_ACCESS_INFO} className={({ isActive }) => (isActive ? "cur" : "")}>메뉴별 접속 현황</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN__LOGS__USER_CONNECTIONS} className={({ isActive }) => (isActive ? "cur" : "")}>사용자 접속 현황</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN__LOGS__PRIVACY_LOGS} className={({ isActive }) => (isActive ? "cur" : "")}>개인정보 로그 현황</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN__LOGS__PRIVACY_LOGS} className={({ isActive }) => (isActive ? "cur" : "")}>개인정보 로그</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN__LOGS__FILE_DOWNLOAD_STATUS} className={({ isActive }) => (isActive ? "cur" : "")}>파일 다운 현황</NavLink></li>
|
||||
</ul>
|
||||
</Accordion.Body>
|
||||
</Accordion.Item>
|
||||
<Accordion.Item eventKey={"7"}>
|
||||
<Accordion.Header>전자정부 기본 메뉴</Accordion.Header>
|
||||
<Accordion.Body>
|
||||
<ul className="menu4">
|
||||
<li><NavLink to={URL.ADMIN_SCHEDULE} className={({ isActive }) => (isActive ? "cur" : "")}>일정관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN_BOARD} className={({ isActive }) => (isActive ? "cur" : "")}>게시판생성관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN_USAGE} className={({ isActive }) => (isActive ? "cur" : "")}>게시판사용관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN_NOTICE} className={({ isActive }) => (isActive ? "cur" : "")}>공지사항관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN_GALLERY} className={({ isActive }) => (isActive ? "cur" : "")}>사이트갤러리관리</NavLink></li>
|
||||
<li><NavLink to={URL.ADMIN_MANAGER} className={({ isActive }) => (isActive ? "cur" : "")}>사이트관리자 암호변경</NavLink></li>
|
||||
</ul>
|
||||
</Accordion.Body>
|
||||
</Accordion.Item>
|
||||
</Accordion>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,22 +3,24 @@ import React from 'react';
|
|||
import { NavLink } from 'react-router-dom';
|
||||
import URL from 'constants/url';
|
||||
|
||||
|
||||
function EgovLeftNavInform() {
|
||||
|
||||
console.groupCollapsed("EgovLeftNavInform");
|
||||
console.log("[Start] EgovLeftNavInform ------------------------------");
|
||||
console.log("------------------------------EgovLeftNavInform [End]");
|
||||
console.groupEnd("EgovLeftNavInform");
|
||||
return (
|
||||
<div className="nav1">
|
||||
<div className="nav">
|
||||
<div className="inner">
|
||||
<h2 className={"nav_title"}>사이트 안내</h2>
|
||||
<ul className="menu10">
|
||||
<li><NavLink to={URL.ABOUT_SITEMAP} className={({ isActive }) => (isActive ? "cur" : "")}>사이트맵</NavLink></li>
|
||||
<li><NavLink to={URL.PRIVATE} className={({ isActive }) => (isActive ? "cur" : "")}>개인정보처리방침</NavLink></li>
|
||||
<li><NavLink to={URL.EMAIL} className={({ isActive }) => (isActive ? "cur" : "")}>이메일무단수집거부</NavLink></li>
|
||||
<h2>알림마당</h2>
|
||||
<ul className="menu4">
|
||||
<li><NavLink to={URL.INFORM_DAILY} className={({ isActive }) => (isActive ? "cur" : "")}>오늘의행사</NavLink></li>
|
||||
<li><NavLink to={URL.INFORM_WEEKLY} className={({ isActive }) => (isActive ? "cur" : "")}>금주의행사</NavLink></li>
|
||||
<li><NavLink to={URL.INFORM_NOTICE} className={({ isActive }) => (isActive ? "cur" : "")}>공지사항</NavLink></li>
|
||||
<li><NavLink to={URL.INFORM_GALLERY} className={({ isActive }) => (isActive ? "cur" : "")}>사이트갤러리</NavLink></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// export default React.memo(EgovLeftNavInform);
|
||||
export default EgovLeftNavInform;
|
||||
export default React.memo(EgovLeftNavInform);
|
||||