import React, { useState, useEffect } from 'react'; import { Link, useLocation, useNavigate } from 'react-router-dom'; import LinearProgress from '@mui/material/LinearProgress'; import * as EgovNet from 'api/egovFetch'; import URL from 'constants/url'; import CODE from 'constants/code'; import Col from "react-bootstrap/Col"; import Row from "react-bootstrap/Row"; import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin'; import EgovPagingPaginationInfo from 'components/EgovPagingPaginationInfo'; import styled from "styled-components"; const StyledDiv = styled.div` .BRD008 { .head { span:nth-child(3) { width: 200px; } span:nth-child(4) { width: 200px; } } .result .list_item { & > div { &:nth-child(3) { width: 200px; } &:nth-child(4) { width: 200px; } } .title { color: #001574; } } } .board-bot { margin-top: 20px; display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: stretch; justify-content: center; & > *:nth-child(1) { width: 16%; justify-content: left; } & > *:nth-child(2) { width: 68%; justify-content: center; } & > *:nth-child(3) { width: 16%; justify-content: right; } } `; const label = { inputProps: { 'aria-label': '사용여부' } }; function StandardResearch(props) { const location = useLocation(); const navigate = useNavigate(); const [list, setList] = useState(); const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || { pageIndex: 1, searchCnd: '0', searchWrd: '' }); const [paginationInfo, setPaginationInfo] = useState({}); useEffect(function () { getList(searchCondition); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); const requestOptions = { method: "GET", headers: { 'Content-type': 'application/json' } } const getList = (searchCondition) => { EgovNet.requestFetch(`/contents/standard-research/list?page=${searchCondition.pageIndex-1}&size=10&sort=rsSeq,desc`, requestOptions, function (resp) { console.log('%o', resp); setList(resp.result.list); setPaginationInfo({...resp.result.paginationInfo}); } ); } const onChangeActivationSwitch = (e, rsId) => { const checked = e.target.checked; const requestURL = `/contents/api/popup-manage/activation-switch/${rsId}?checked=${checked}`; const requestOptions = { method: "PUT", headers: { 'Content-type': 'application/json', } } EgovNet.requestFetch(requestURL, requestOptions, (resp) => { console.log("====>>> Schdule delete= ", resp); if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) { navigate(URL.ADMIN__CONTENTS__POP_UP ,{ replace: true }); } else { navigate({pathname: URL.ERROR}, {state: {msg : resp.resultMessage}}); } } ); } const Location = React.memo(function Location() { return (
) }); return (
{/* */} {/* */}
{/* */} {/* */}
{/* */}

건설기준연구 관리

{/* */}
번호 연구명 연구기간 연구책임자
{/* */} {typeof list === 'undefined' &&

} {list && list.length === 0 &&

검색된 결과가 없습니다.

} {list && list.map((it)=>(
{it.number}
{it.title}
{it.researchStartDate} ~ {it.researchEndDate}
{it.director}
))}
{/* */} {/* */} { getList({ ...searchCondition, pageIndex: passedPage }) }} /> 등록 {/* */}
{/* */}
); } export default StandardResearch;