fix: 그리드 폭 조정

소스 정리
main
minuk926 3 years ago
parent fd94b75dc1
commit 58d7eb3fad

@ -31,8 +31,12 @@ const XitCmm = {
return false; return false;
}, },
formatDate(dateStr, fmt) { formatDate(date, fmt) {
return format(dateStr, fmt); return format(date, fmt);
},
formatDateStr(dateStr, delimiter) {
return dateStr.substring(0, 4) + delimiter + dateStr.substring(4, 2) + delimiter + dateStr.substring(6);
}, },
/** /**

@ -29,18 +29,19 @@ const PublicBoard = () => {
const [title, setTitle] = useState(); const [title, setTitle] = useState();
const columns = [ const columns = [
{ headerName: 'No.', headerAlign: 'center', field: 'rowId', align: 'center', width: 70 }, { headerName: 'No.', headerAlign: 'center', field: 'rowId', align: 'center', width: 80 },
{ {
headerName: '업무구분', headerName: '업무구분',
headerAlign: 'center', headerAlign: 'center',
field: 'inDept', field: 'inDept',
align: 'center' align: 'center',
width: 120
}, },
{ {
headerName: '제목', headerName: '제목',
headerAlign: 'center', headerAlign: 'center',
field: 'inTitle', field: 'inTitle',
minWidth: 200, width: 400,
renderCell: (params) => ( renderCell: (params) => (
<Link underline="hover" href="#"> <Link underline="hover" href="#">
{params.value} {params.value}
@ -52,13 +53,14 @@ const PublicBoard = () => {
headerAlign: 'center', headerAlign: 'center',
field: 'inFile', field: 'inFile',
align: 'center', align: 'center',
width: 100,
renderCell: (params) => ( renderCell: (params) => (
// console.log(params.row.inFilename); // console.log(params.row.inFilename);
<>{params.row.inFilename ? <IconFileText stroke={1.5} size="1rem" /> : ''}</> <>{params.row.inFilename ? <IconFileText stroke={1.5} size="1rem" /> : ''}</>
) )
}, },
{ headerName: '작성일자', headerAlign: 'center', field: 'inNalja', align: 'center' }, { headerName: '작성일자', headerAlign: 'center', field: 'inNalja', align: 'center', width: 130 },
{ headerName: '조회수', headerAlign: 'center', field: 'inHit', align: 'right' } { headerName: '조회수', headerAlign: 'center', field: 'inHit', align: 'right', width: 100 }
]; ];
const search = useCallback(() => { const search = useCallback(() => {

@ -12,6 +12,7 @@ import { findJudge, findJudgeDatas, saveJudgeData } from 'apis/judge';
import NewJudgeDataForm from 'views/biz/judge/NewJudgeDataForm'; import NewJudgeDataForm from 'views/biz/judge/NewJudgeDataForm';
import ModifyJudgeDataForm from 'views/biz/judge/ModifyJudgeDataForm'; import ModifyJudgeDataForm from 'views/biz/judge/ModifyJudgeDataForm';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import xitCmm from '../../../commons/XitCmm';
const JudgeDataReview = ({ scDatagb, menuName }) => { const JudgeDataReview = ({ scDatagb, menuName }) => {
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
@ -35,24 +36,31 @@ const JudgeDataReview = ({ scDatagb, menuName }) => {
headerName: '접수번호', headerName: '접수번호',
headerAlign: 'center', headerAlign: 'center',
field: 'scSeq', field: 'scSeq',
align: 'center',
width: 120,
renderCell: (params) => ( renderCell: (params) => (
<Link underline="hover" href="#"> <Link underline="hover" href="#">
{params.value} {params.value}
</Link> </Link>
) )
}, },
{ headerName: '동명', headerAlign: 'center', field: 'scDong' }, { headerName: '동명', headerAlign: 'center', field: 'scDong', align: 'center', width: 120 },
{ headerName: '차량번호', headerAlign: 'center', field: 'scCarnum' }, { headerName: '차량번호', headerAlign: 'center', field: 'scCarnum', align: 'center', width: 150 },
{ headerName: '성명', headerAlign: 'center', field: 'scName' }, { headerName: '성명', headerAlign: 'center', field: 'scName', align: 'center', width: 100 },
{ headerName: '진술유형', headerAlign: 'center', field: 'scContDocNm' }, { headerName: '진술유형', headerAlign: 'center', field: 'scContDocNm', align: 'center', width: 150 },
{ {
headerName: '접수일자', headerName: '접수일자',
headerAlign: 'center', headerAlign: 'center',
field: 'scCdate' field: 'scCdate',
// type: 'date', align: 'center',
// valueGetter: ({ value }) => value && new Date(value) width: 120,
valueFormatter: (params) => {
if (params.value == null || params.value.length < 8) return params.value;
return xitCmm.formatDateStr(params.value, '-');
}
}, },
{ headerName: '접수방법', headerAlign: 'center', field: 'scIngbNm' } { headerName: '접수방법', headerAlign: 'center', field: 'scIngbNm', align: 'center' },
{ headerName: '자료상태', headerAlign: 'center', field: 'scStateNm', align: 'center' }
]; ];
const search = useCallback(() => { const search = useCallback(() => {
@ -63,7 +71,6 @@ const JudgeDataReview = ({ scDatagb, menuName }) => {
}; };
findJudgeDatas(params).then((response) => { findJudgeDatas(params).then((response) => {
console.log(response);
if (response && response.data) { if (response && response.data) {
setTotalCount(response.count); setTotalCount(response.count);
setRowsState((prevState) => ({ ...prevState, rows: response.data })); setRowsState((prevState) => ({ ...prevState, rows: response.data }));

@ -36,20 +36,23 @@ const JudgeRegistReview = ({ scDatagb, menuName }) => {
const [title, setTitle] = useState(); const [title, setTitle] = useState();
const columns = [ const columns = [
{ headerName: 'No', headerAlign: 'center', field: 'rowId', align: 'center', width: 70 }, { headerName: 'No', headerAlign: 'center', field: 'rowId', align: 'center', width: 80 },
{ headerName: '접수번호', headerAlign: 'center', field: 'scSeq', align: 'center' }, { headerName: '접수번호', headerAlign: 'center', field: 'scSeq', align: 'center', width: 130 },
{ headerName: '차량번호', headerAlign: 'center', field: 'scCarnum', align: 'center', minWidth: 110 }, { headerName: '차량번호', headerAlign: 'center', field: 'scCarnum', align: 'center', minWidth: 150 },
{ headerName: '성명', headerAlign: 'center', field: 'scName', minWidth: 150 }, { headerName: '성명', headerAlign: 'center', field: 'scName', align: 'center', minWidth: 150 },
{ headerName: '진술유형', headerAlign: 'center', field: 'scContDocNm', minWidth: 130 }, { headerName: '진술유형', headerAlign: 'center', field: 'scContDocNm', align: 'center', minWidth: 150 },
{ {
headerName: '접수일자', headerName: '접수일자',
headerAlign: 'center', headerAlign: 'center',
field: 'scCdate', field: 'scCdate',
align: 'center', align: 'center',
format: '####-##-##' width: 150,
// valueGetter: (params) => `${params.row.msSdate} ~ ${params.row.msEdate}` valueFormatter: (params) => {
if (params.value == null || params.value.length < 8) return params.value;
return xitCmm.formatDateStr(params.value, '-');
}
}, },
{ headerName: '접수방법', headerAlign: 'center', field: 'scIngbNm', align: 'center' } { headerName: '접수방법', headerAlign: 'center', field: 'scIngbNm', align: 'center', width: 120 }
]; ];
const search = useCallback(() => { const search = useCallback(() => {

@ -60,14 +60,15 @@ const JudgeReview = ({ msDatagb, menuName }) => {
const columns = [ const columns = [
// { headerName: 'rowId', field: 'rowId' }, // { headerName: 'rowId', field: 'rowId' },
{ headerName: '심의차수', headerAlign: 'center', field: 'msChasu', align: 'center' }, { headerName: '심의 차수', headerAlign: 'center', field: 'msChasu', align: 'center', width: 100 },
{ headerName: '심사건수', headerAlign: 'center', field: 'cnt', align: 'center' }, { headerName: '심사 건수', headerAlign: 'center', field: 'cnt', align: 'center', width: 100 },
{ {
headerName: '심사기간', headerName: '심사 기간',
headerAlign: 'center', headerAlign: 'center',
field: 'msDate', field: 'msDate',
minWidth: 180, minWidth: 200,
description: '심사기간', width: 250,
description: '심사 기간',
valueGetter: (params) => `${params.row.msSdate} ~ ${params.row.msEdate}`, valueGetter: (params) => `${params.row.msSdate} ~ ${params.row.msEdate}`,
renderCell: (params) => ( renderCell: (params) => (
<Link underline="hover" href="#"> <Link underline="hover" href="#">
@ -77,11 +78,12 @@ const JudgeReview = ({ msDatagb, menuName }) => {
align: 'center' align: 'center'
}, },
{ {
headerName: '심사마감일시', headerName: '심사 마감 일시',
headerAlign: 'center', headerAlign: 'center',
field: 'msCdate', field: 'msCdate',
type: 'dateTime', type: 'dateTime',
minWidth: 125, minWidth: 150,
width: 200,
valueGetter: (params) => `${params.row.msCdate} ${params.row.msClosesi}`, valueGetter: (params) => `${params.row.msCdate} ${params.row.msClosesi}`,
align: 'center' align: 'center'
}, },
@ -89,6 +91,7 @@ const JudgeReview = ({ msDatagb, menuName }) => {
headerName: '상태', headerName: '상태',
headerAlign: 'center', headerAlign: 'center',
field: 'msResult', field: 'msResult',
width: 150,
renderCell: (params) => <>{params.row.msResult === '1' ? '진행중' : '심사완료'}</>, renderCell: (params) => <>{params.row.msResult === '1' ? '진행중' : '심사완료'}</>,
align: 'center' align: 'center'
}, },

Loading…
Cancel
Save