From 4182b06cb77dfe48bccbc653fc9b57d35c4036e4 Mon Sep 17 00:00:00 2001 From: Lim Jonguk Date: Thu, 10 Mar 2022 16:50:58 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=A3=BC=EC=A0=95=EC=B0=A8=20=EC=9D=98?= =?UTF-8?q?=EA=B2=AC=20=EC=A7=84=EC=88=A0=20=ED=99=94=EB=A9=B4=20=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/biz/parking/Regist.jsx | 123 ++++++++++++++++++++++++++++++- src/views/biz/parking/Review.jsx | 51 ++++++------- 2 files changed, 143 insertions(+), 31 deletions(-) diff --git a/src/views/biz/parking/Regist.jsx b/src/views/biz/parking/Regist.jsx index c6758fb..2c572a2 100644 --- a/src/views/biz/parking/Regist.jsx +++ b/src/views/biz/parking/Regist.jsx @@ -1,5 +1,124 @@ -import React from 'react'; +import { useEffect, useState } from 'react'; -const ParkingRegister = () =>
주정차 의견진술 심의 등록
; +import _ from 'lodash'; +// material-ui +import { + Button, + Divider, + FormControl, + FormControlLabel, + Grid, + InputAdornment, + MenuItem, + OutlinedInput, + Radio, + RadioGroup, + Select +} from '@mui/material'; +import MuiTooltip from '@mui/material/Tooltip'; + +// assets +import { IconSearch } from '@tabler/icons'; + +// berry ui +import MainCard from 'ui-component/cards/MainCard'; + +// project imports +import MuiGridList from 'ui-component/MuiGridList'; +import { useTheme } from '@mui/material/styles'; +import AnimateButton from '../../../ui-component/extended/AnimateButton'; + +const ParkingRegister = () => { + const theme = useTheme(); + + const [category, setCategory] = useState('N'); + const [searchTxt, setSearchTxt] = useState(''); + + const [totalCount, setTotalCount] = useState(0); + const [rowsState, setRowsState] = useState({ + page: 0, + pageSize: 10, + rows: [] + // loading: false + }); + + const columns = [ + { headerName: '심의차수', field: 'ciCode' }, + { headerName: '심사건수', field: 'ciContentno' }, + { headerName: '심사기간', field: 'ciTitle', editable: true }, + { headerName: '심사마감일시', field: 'ciId' }, + { headerName: '상태', field: 'ciPwd' }, + { + headerName: '삭제하기', + field: 'ciEmail', + renderCell: (params) => ( + <> + {params.value} + + + ) + } + ]; + const handleSearch = async (event) => {}; + + useEffect(() => { + const params = { + page: rowsState.page + 1, + size: rowsState.pageSize + }; + }, [rowsState.page, rowsState.pageSize]); // rowsState.page, rowsState.pageSize, rowsState.rows]); + + return ( + + + + + + + setCategory(e.target.value)} + > + } label="미등록" /> + } label="등록" /> + + + + + +  -  + + {/* */} + + + + + + + + + + + + + + + + + + ); +}; export default ParkingRegister; diff --git a/src/views/biz/parking/Review.jsx b/src/views/biz/parking/Review.jsx index bae7809..57083ac 100644 --- a/src/views/biz/parking/Review.jsx +++ b/src/views/biz/parking/Review.jsx @@ -16,8 +16,10 @@ import MainCard from 'ui-component/cards/MainCard'; import MuiGridList from 'ui-component/MuiGridList'; import boardService from 'apis/BoardService'; import moment from 'moment'; +import { useTheme } from '@mui/material/styles'; const ParkingReview = () => { + const theme = useTheme(); const toYear = Number(moment().format('YYYY')); const years = _.range(toYear, toYear - 14, -1); @@ -33,35 +35,27 @@ const ParkingReview = () => { }); const columns = [ - { headerName: '게시판코드', field: 'ciCode' }, - { headerName: '글번호', field: 'ciContentno' }, - { headerName: '제목', field: 'ciTitle', editable: true }, - { headerName: '사용자ID', field: 'ciId' }, - { headerName: '사용자 비번', field: 'ciPwd' }, - { headerName: '사용자 이름', field: 'ciName' }, - { headerName: '등록일', field: 'ciNalja' }, - { headerName: '등록시간', field: 'ciTime' }, - { headerName: '조회수', field: 'ciHit' }, - { headerName: 'ref', field: 'ciRef' }, - { headerName: 'step', field: 'ciStep' }, - { headerName: 'level', field: 'ciRevel' }, - { headerName: '비번', field: 'ciPass' }, + { headerName: '심의차수', field: 'ciCode' }, + { headerName: '심사건수', field: 'ciContentno' }, + { headerName: '심사기간', field: 'ciTitle', editable: true }, + { headerName: '심사마감일시', field: 'ciId' }, + { headerName: '상태', field: 'ciPwd' }, { - headerName: 'email', + headerName: '삭제하기', field: 'ciEmail', renderCell: (params) => ( {params.value} - ) - }, - { headerName: '내용', field: 'ciContents' }, - { - headerName: 'IP', - field: `ciIp` } ]; const handleSearch = async (event) => { @@ -76,7 +70,6 @@ const ParkingReview = () => { page: rowsState.page + 1, size: rowsState.pageSize }; - console.log(selectedYear); if (searchTxt) { params = { ...params, @@ -84,13 +77,13 @@ const ParkingReview = () => { }; } - // boardService.getBoardList(params).then((response) => { - // console.log(response); - // if (response && response.data) { - // setTotalCount(response.count); - // setRowsState((prevState) => ({ ...prevState, rows: response.data })); - // } - // }); + boardService.getBoardList(params).then((response) => { + console.log(response); + if (response && response.data) { + setTotalCount(response.count); + setRowsState((prevState) => ({ ...prevState, rows: response.data })); + } + }); }, [rowsState.page, rowsState.pageSize, searchTxt]); // rowsState.page, rowsState.pageSize, rowsState.rows]); return (