parent
64e4b07953
commit
a476f3e00c
|
|
@ -46,6 +46,14 @@
|
||||||
.code_list .result .List_Codes >div:nth-child(7){
|
.code_list .result .List_Codes >div:nth-child(7){
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
.standard_code_result{
|
||||||
|
max-height: 520px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
.download_list{
|
||||||
|
max-height: 550px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
.codeListContent{
|
.codeListContent{
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
import React, {useEffect, useState} from "react";
|
||||||
|
import {Button, Modal, Nav} from "react-bootstrap";
|
||||||
|
import Col from "react-bootstrap/Col";
|
||||||
|
import Row from "react-bootstrap/Row";
|
||||||
|
import * as EgovNet from "api/egovFetch";
|
||||||
|
|
||||||
|
|
||||||
|
function DownloadModal({size, show, onHide,}){
|
||||||
|
const [tab, setTab] = useState(10);
|
||||||
|
const [subTabsVisible, setSubTabsVisible] = useState(false);
|
||||||
|
const [listData, setListData] = useState([]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
EgovNet.requestFetch('/standardCode/standard-code-download-list?listCode='+tab,
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
'Content-type': 'application/json',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
(resp) => {
|
||||||
|
setListData(resp.result.resultList);
|
||||||
|
},
|
||||||
|
function (resp) {
|
||||||
|
console.log("err response : ", resp);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}, [tab]);
|
||||||
|
|
||||||
|
return(
|
||||||
|
<Modal size={size} show={show} onHide={onHide}>
|
||||||
|
<Modal.Header closeButton>
|
||||||
|
<Modal.Title id="example-modal-sizes-title-lg">통합다운로드</Modal.Title>
|
||||||
|
</Modal.Header>
|
||||||
|
<Modal.Body>
|
||||||
|
<Row className={"justify-content-start py-1 mx-1"}>
|
||||||
|
<Col xs={"auto px-1"}>
|
||||||
|
<div className={`tab ${tab === 10 ? 'active' : ''}`}
|
||||||
|
onClick={() => {setTab(10); setSubTabsVisible(false)}}>설계기준</div>
|
||||||
|
</Col>
|
||||||
|
<Col xs={"auto px-1"}>
|
||||||
|
<div className={`tab ${tab === 20 ? 'active' : ''}`}
|
||||||
|
onClick={() => {setTab(20); setSubTabsVisible(false)}}>표준시방서</div>
|
||||||
|
</Col>
|
||||||
|
<Col xs={"auto px-1"}>
|
||||||
|
<div className={`tab ${[40, 50, 60, 70, 80, 90].includes(tab) ? 'active' : ''}`}
|
||||||
|
onClick={() => {setTab(40); setSubTabsVisible(true)}}>전문시방서</div>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
{subTabsVisible && (
|
||||||
|
<Nav className={"tabs"} variant={"tabs"} >
|
||||||
|
<Nav.Item><Nav.Link className={`${tab === 40 ? 'active' : ''}`} onClick={() => {setTab(40)}}>서울특별시</Nav.Link></Nav.Item>
|
||||||
|
<Nav.Item><Nav.Link className={`${tab === 50 ? 'active' : ''}`} onClick={() => {setTab(50)}}>고속도로공사</Nav.Link></Nav.Item>
|
||||||
|
<Nav.Item><Nav.Link className={`${tab === 60 ? 'active' : ''}`} onClick={() => {setTab(60)}}>한국농어촌공사</Nav.Link></Nav.Item>
|
||||||
|
<Nav.Item><Nav.Link className={`${tab === 70 ? 'active' : ''}`} onClick={() => {setTab(70)}}>철도건설공사</Nav.Link></Nav.Item>
|
||||||
|
<Nav.Item><Nav.Link className={`${tab === 80 ? 'active' : ''}`} onClick={() => {setTab(80)}}>LH한국토지주택공사</Nav.Link></Nav.Item>
|
||||||
|
<Nav.Item><Nav.Link className={`${tab === 90 ? 'active' : ''}`} onClick={() => {setTab(90)}}>K-Water</Nav.Link></Nav.Item>
|
||||||
|
</Nav>
|
||||||
|
)}
|
||||||
|
<div className="board_list code_list">
|
||||||
|
<div className="head">
|
||||||
|
<span>구분</span>
|
||||||
|
<span>코드</span>
|
||||||
|
<span>다운로드</span>
|
||||||
|
</div>
|
||||||
|
<div className={"result download_list"}>
|
||||||
|
{listData.filter(item => {
|
||||||
|
return item;
|
||||||
|
}).map(item => {
|
||||||
|
return (
|
||||||
|
<div className="list_item List_Codes">
|
||||||
|
<div className="mainCategory">{item.groupNm}</div>
|
||||||
|
<div className="middleCategory">{item.groupCurCd}</div>
|
||||||
|
<div className="kcscCd">
|
||||||
|
<Button size={"sm"} variant={"outline-secondary"}>다운로드</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Modal.Body>
|
||||||
|
<Modal.Footer><Button onClick={onHide}>닫기</Button></Modal.Footer>
|
||||||
|
</Modal>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default DownloadModal;
|
||||||
|
|
@ -2,11 +2,12 @@ import React from 'react';
|
||||||
import Col from "react-bootstrap/Col";
|
import Col from "react-bootstrap/Col";
|
||||||
import Row from "react-bootstrap/Row";
|
import Row from "react-bootstrap/Row";
|
||||||
import FavoriteIcon from "./FavoriteIcon";
|
import FavoriteIcon from "./FavoriteIcon";
|
||||||
|
import Button from "react-bootstrap/Button";
|
||||||
|
|
||||||
function StandardCodeList({listData, filterData}) {
|
function StandardCodeList({listData, filterData}) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={"result"}>
|
<div className={"result standard_code_result"}>
|
||||||
{listData.filter(item => {
|
{listData.filter(item => {
|
||||||
if (item.groupNm.includes(filterData)) {
|
if (item.groupNm.includes(filterData)) {
|
||||||
return item
|
return item
|
||||||
|
|
@ -20,32 +21,7 @@ function StandardCodeList({listData, filterData}) {
|
||||||
<div className="kcscCd">{item.kcscCd}</div>
|
<div className="kcscCd">{item.kcscCd}</div>
|
||||||
<div className="groupNm">{item.groupNm}<br/><span className={"text-danger"}>{item.rvsnRemark}</span></div>
|
<div className="groupNm">{item.groupNm}<br/><span className={"text-danger"}>{item.rvsnRemark}</span></div>
|
||||||
<div className="Revisionhistory">
|
<div className="Revisionhistory">
|
||||||
<Row className={"justify-content-start"}>
|
<Button size={"sm"} variant={"outline-secondary"}>개정 이력</Button>
|
||||||
{item.historyList.filter(history => {
|
|
||||||
return history;
|
|
||||||
}).map(history => {
|
|
||||||
let buttonClass = "btn btn-sm docInfoBtn docInfoActive "
|
|
||||||
let pClass = "yearInfo yearInfoActive";
|
|
||||||
if(history.docEr === 'E'){
|
|
||||||
buttonClass += "btn-success "
|
|
||||||
}else{
|
|
||||||
buttonClass += "btn-primary "
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<Col xs={"auto"} className={"px-1"}>
|
|
||||||
<input type="button"
|
|
||||||
className={buttonClass}
|
|
||||||
value={history.docEr==='E'?'제':'개'}
|
|
||||||
onClick={()=>{
|
|
||||||
/*window.open("/standardCode/viewer/"+history.kcscCd+":"+history.rvsnYmd.split('T')[0]);*/
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<br/>
|
|
||||||
<p className={pClass}>{history.docYr}</p>
|
|
||||||
</Col>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</Row>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="fille">
|
<div className="fille">
|
||||||
<Row className={"justify-content-start"}>
|
<Row className={"justify-content-start"}>
|
||||||
|
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
import {Button, Modal, ModalBody, ModalFooter, ModalHeader, ModalTitle} from "react-bootstrap";
|
|
||||||
|
|
||||||
|
|
||||||
function StandardCodeListModal({show,content,onClose,title,size}){
|
|
||||||
return(
|
|
||||||
<Modal size={size} show={show} aria-labelledby="example-modal-sizes-title-lg">
|
|
||||||
<ModalHeader>
|
|
||||||
<ModalTitle id="example-modal-sizes-title-lg">{title}</ModalTitle>
|
|
||||||
</ModalHeader>
|
|
||||||
<ModalBody>
|
|
||||||
{content}
|
|
||||||
</ModalBody>
|
|
||||||
<ModalFooter><Button onClick={onClose}>닫기</Button></ModalFooter>
|
|
||||||
</Modal>)
|
|
||||||
}
|
|
||||||
|
|
||||||
function StandardCodeListModalTable({head,content}){
|
|
||||||
return(
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
{head}
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{content}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export {StandardCodeListModal,StandardCodeListModalTable};
|
|
||||||
|
|
@ -2,12 +2,11 @@ import React, {useState, useCallback} from 'react';
|
||||||
import {Link, useParams} from 'react-router-dom';
|
import {Link, useParams} from 'react-router-dom';
|
||||||
|
|
||||||
import * as EgovNet from 'api/egovFetch';
|
import * as EgovNet from 'api/egovFetch';
|
||||||
import {StandardCodeListModal, StandardCodeListModalTable} from './StandardCodeListModal'
|
import DownloadModal from './DownloadModal'
|
||||||
import {AiFillFileMarkdown} from "react-icons/ai";
|
|
||||||
import StandardCodeSearchForm from "./StandardCodeSearchForm";
|
import StandardCodeSearchForm from "./StandardCodeSearchForm";
|
||||||
import Loading from "../../../components/Loading";
|
import Loading from "components/Loading";
|
||||||
import StandardCodeList from "./StandardCodeList";
|
import StandardCodeList from "./StandardCodeList";
|
||||||
import URL from "../../../constants/url";
|
import URL from "constants/url";
|
||||||
|
|
||||||
function StandardCodePage({}) {
|
function StandardCodePage({}) {
|
||||||
const {listCode} = useParams();
|
const {listCode} = useParams();
|
||||||
|
|
@ -16,56 +15,11 @@ function StandardCodePage({}) {
|
||||||
const [filterData, setFilterData] = useState('');
|
const [filterData, setFilterData] = useState('');
|
||||||
const [resultCnt, setResultCnt] = useState(0);
|
const [resultCnt, setResultCnt] = useState(0);
|
||||||
const [remarkCnt, setRemarkCnt] = useState(0);
|
const [remarkCnt, setRemarkCnt] = useState(0);
|
||||||
const [groupSeq, setGroupSeq] = useState();
|
|
||||||
|
|
||||||
const [show, setShow] = useState(false);
|
const [show, setShow] = useState(false);
|
||||||
function close() {
|
function close() {
|
||||||
setShow(false);
|
setShow(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function showHandling(e) {
|
|
||||||
const param = e.currentTarget.dataset;
|
|
||||||
const groupSeq = param.groupSeq;
|
|
||||||
console.log(groupSeq);
|
|
||||||
EgovNet.requestFetch(
|
|
||||||
'/standardCode/codeListModal.do',
|
|
||||||
{
|
|
||||||
method: "POST",
|
|
||||||
headers: {
|
|
||||||
'Content-type': 'application/json'
|
|
||||||
},
|
|
||||||
body: JSON.stringify(
|
|
||||||
groupSeq
|
|
||||||
)
|
|
||||||
}, (resp) => {
|
|
||||||
console.log(resp + "------------------------resp")
|
|
||||||
const body = [];
|
|
||||||
const head = [];
|
|
||||||
if (resp.length > 0) {
|
|
||||||
resp.forEach(function (item, index) {
|
|
||||||
const formattedDate = item.aplcnBgngYmd.match(/\d{4}-\d{2}-\d{2}/)[0];
|
|
||||||
const url = "https://www.kcsc.re.kr/file/DownloadGrp/" + item.docFileGrpId;
|
|
||||||
body.push(
|
|
||||||
<tr>
|
|
||||||
<td>{formattedDate}</td>
|
|
||||||
<td><a href={url}><AiFillFileMarkdown/></a></td>
|
|
||||||
<td></td>
|
|
||||||
</tr>)
|
|
||||||
})
|
|
||||||
head.push(
|
|
||||||
<tr>
|
|
||||||
<td>년도</td>
|
|
||||||
<td>기준코드</td>
|
|
||||||
<td>신구건설기준비교</td>
|
|
||||||
</tr>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
setGroupSeq(<StandardCodeListModalTable head={head} content={body}/>);
|
|
||||||
}
|
|
||||||
)
|
|
||||||
setShow(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
const retrieveList = useCallback((searchCondition) => {
|
const retrieveList = useCallback((searchCondition) => {
|
||||||
setListLoading(true)
|
setListLoading(true)
|
||||||
|
|
@ -89,40 +43,38 @@ function StandardCodePage({}) {
|
||||||
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
function downloadModal(){
|
||||||
|
setShow(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="">
|
<div className="">
|
||||||
<div className="c_wrap">
|
<div className="c_wrap">
|
||||||
{/* <!-- Location --> */}
|
{/*<div className="location">
|
||||||
<div className="location">
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><Link to={URL.MAIN} className="home">Home</Link></li>
|
<li><Link to={URL.MAIN} className="home">Home</Link></li>
|
||||||
<li>건설기준코드</li>
|
<li>건설기준코드</li>
|
||||||
<li><Link to={URL.STANDARD_CODE_LIST} >건설기준코드 검색</Link></li>
|
<li><Link to={URL.STANDARD_CODE_LIST} >건설기준코드 검색</Link></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>*/}
|
||||||
{/* <!--// Location --> */}
|
|
||||||
|
|
||||||
<div className="layout">
|
<div className="layout">
|
||||||
|
|
||||||
<div className="contents NOTICE_LIST" id="contents">
|
<div className="contents NOTICE_LIST" id="contents">
|
||||||
{/* <!-- 본문 --> */}
|
{/*<div className="top_tit">
|
||||||
|
|
||||||
<div className="top_tit">
|
|
||||||
<h1 className="tit_1">건설기준코드 검색</h1>
|
<h1 className="tit_1">건설기준코드 검색</h1>
|
||||||
</div>
|
</div>*/}
|
||||||
<div className="StandardCodeList container">
|
<div className="StandardCodeList container">
|
||||||
<div className="c_wrap codeListContent">
|
<div className="c_wrap codeListContent">
|
||||||
<div className="layout">
|
<div className="layout">
|
||||||
<div className="contents NOTICE_LIST listTableDiv">
|
<div className="contents NOTICE_LIST listTableDiv">
|
||||||
<StandardCodeSearchForm param={listCode?listCode:'10'} reloadFunction={retrieveList} resultCnt={resultCnt} remarkCnt={remarkCnt}/>
|
<StandardCodeSearchForm param={listCode?listCode:'10'} reloadFunction={retrieveList} resultCnt={resultCnt} remarkCnt={remarkCnt} downloadModal={downloadModal}/>
|
||||||
<div className="board_list code_list">
|
<div className="board_list code_list">
|
||||||
<div className="head">
|
<div className="head">
|
||||||
<span>대분류</span>
|
<span>대분류</span>
|
||||||
<span>중분류</span>
|
<span>중분류</span>
|
||||||
<span>코드번호</span>
|
<span>코드번호</span>
|
||||||
<span>코드명</span>
|
<span>코드명</span>
|
||||||
<span className={"text-start"}>개정이력</span>
|
<span>개정이력</span>
|
||||||
<span className={"text-start"}>보기</span>
|
<span className={"text-start"}>보기</span>
|
||||||
<span>즐겨찾기</span>
|
<span>즐겨찾기</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -132,7 +84,7 @@ function StandardCodePage({}) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<StandardCodeListModal size={"lg"} show={show} content={groupSeq} onClose={close} title={"개정이력"}/>
|
<DownloadModal size={"lg"} show={show} onHide={close}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import {Link} from "react-router-dom";
|
||||||
import Button from "react-bootstrap/Button";
|
import Button from "react-bootstrap/Button";
|
||||||
import * as EgovNet from "../../../api/egovFetch";
|
import * as EgovNet from "../../../api/egovFetch";
|
||||||
|
|
||||||
function StandardCodeSearchForm({param, reloadFunction, resultCnt, remarkCnt}){
|
function StandardCodeSearchForm({param, reloadFunction, resultCnt, remarkCnt, downloadModal}){
|
||||||
|
|
||||||
const [searchCondition, setSearchCondition] = useState({
|
const [searchCondition, setSearchCondition] = useState({
|
||||||
tab: Number(param?.substring(0, 2)),
|
tab: Number(param?.substring(0, 2)),
|
||||||
|
|
@ -136,7 +136,7 @@ function StandardCodeSearchForm({param, reloadFunction, resultCnt, remarkCnt}){
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li className="third_1 L">
|
<li className="third_1 L">
|
||||||
<div className={`tab`}>통합 다운로드</div>
|
<div className={`tab`} onClick={downloadModal}>통합 다운로드</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,34 @@ public class StandardCodeController extends BaseController {
|
||||||
return resultVO;
|
return resultVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "건설기준코드 다운로드 리스트 조회",
|
||||||
|
description = "건설기준코드 다운로드 리스트 조회",
|
||||||
|
tags = {"StandardCodeController"}
|
||||||
|
)
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||||
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||||
|
})
|
||||||
|
@GetMapping(value = "/standard-code-download-list")
|
||||||
|
public ResultVO selectStandardCodeDownloadList(TnDocumentInfo tnDocumentInfo, @AuthenticationPrincipal LoginVO user)
|
||||||
|
throws Exception {
|
||||||
|
ResultVO resultVO = new ResultVO();
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
String listCode = tnDocumentInfo.getListCode();
|
||||||
|
if(listCode.equals("60")){
|
||||||
|
listCode += "______";
|
||||||
|
}else{
|
||||||
|
listCode += "____";
|
||||||
|
}
|
||||||
|
resultMap.put("resultList", standardCodeService.selectTnDocumentGroupToGroupFullCdLike(listCode));
|
||||||
|
|
||||||
|
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||||
|
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
|
||||||
|
resultVO.setResult(resultMap);
|
||||||
|
return resultVO;
|
||||||
|
}
|
||||||
|
|
||||||
@Operation(
|
@Operation(
|
||||||
summary = "건설기준코드 검색조건 옵션 조회",
|
summary = "건설기준코드 검색조건 옵션 조회",
|
||||||
description = "건설기준코드 검색조건 옵션 조회",
|
description = "건설기준코드 검색조건 옵션 조회",
|
||||||
|
|
@ -177,7 +205,7 @@ public class StandardCodeController extends BaseController {
|
||||||
ResultVO resultVO = new ResultVO();
|
ResultVO resultVO = new ResultVO();
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
|
||||||
resultMap.put("groupList", standardCodeService.selectTnDocumentGroupToGroupFullCdLike(tnDocumentInfo.getListCode()));
|
resultMap.put("groupList", standardCodeService.selectTnDocumentGroupToGroupFullCdLike(tnDocumentInfo.getListCode()+"__"));
|
||||||
|
|
||||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||||
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
|
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ public class StandardCodeService extends EgovAbstractServiceImpl {
|
||||||
|
|
||||||
|
|
||||||
public List<TnDocumentGroup> selectTnDocumentGroupToGroupFullCdLike(String groupFullCd) {
|
public List<TnDocumentGroup> selectTnDocumentGroupToGroupFullCdLike(String groupFullCd) {
|
||||||
return tnDocumentGroupRepository.findByGroupFullCdLike(groupFullCd+"__");
|
return tnDocumentGroupRepository.findByGroupFullCdLike(groupFullCd);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveFavorites(Integer userSeq, Integer groupSeq){
|
public void saveFavorites(Integer userSeq, Integer groupSeq){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue