From 3271297d88713fd8e90643b9794624bd78991d83 Mon Sep 17 00:00:00 2001 From: sanguu516 Date: Wed, 8 May 2024 10:46:35 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=20=ED=95=98?= =?UTF-8?q?=EB=93=9C=EC=BD=94=EB=94=A9=20table=20css=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/custom.css | 3 +- src/components/crud/grid/GridDatatable.js | 19 ++-- src/components/flight/FlightApprovalsTable.js | 106 ++++++++++++++++-- 3 files changed, 111 insertions(+), 17 deletions(-) diff --git a/src/assets/css/custom.css b/src/assets/css/custom.css index 9b9c733e..08697c9d 100644 --- a/src/assets/css/custom.css +++ b/src/assets/css/custom.css @@ -1175,4 +1175,5 @@ caption {overflow: hidden; line-height: 0;text-indent: -2000px;} .invoice-list-dataTable.flight-approval .react-dataTable .rdt_TableHead .rdt_TableHeadRow .rdt_TableCol{padding:0;text-align:center;} .invoice-list-dataTable.flight-approval .react-dataTable .rdt_TableBody .rdt_TableRow .rdt_TableCell{padding:0;min-height:60px;} .invoice-list-dataTable.flight-approval .react-dataTable .rdt_TableBody .rdt_TableRow .rdt_TableCell:hover{cursor: pointer;} -.invoice-list-dataTable.flight-approval .pal-dateTable a{color:rgba(0,0,0,0.87);} \ No newline at end of file +.invoice-list-dataTable.flight-approval .pal-dateTable a{color:rgba(0,0,0,0.87);} +#expandableRows {order: 1!important;} \ No newline at end of file diff --git a/src/components/crud/grid/GridDatatable.js b/src/components/crud/grid/GridDatatable.js index 69363483..279b6f48 100644 --- a/src/components/crud/grid/GridDatatable.js +++ b/src/components/crud/grid/GridDatatable.js @@ -1,18 +1,19 @@ import DataTable from 'react-data-table-component'; -import { - MoreVertical, - Edit, - Trash, - Search, - File, - ChevronDown -} from 'react-feather'; -import { selectableRowsComponent } from './selectableRowsComponent'; +import { ChevronDown } from 'react-feather'; +import { useEffect } from 'react'; import { EMPTY_MESSAGE } from '@src/configs/msgConst'; // DataTable lib 참고 // https://react-data-table-component.netlify.app/?path=/docs/api-props--page export const GridDatabase = props => { + useEffect(() => { + const el = document.querySelectorAll('.sc-AxhCb.sc-AxmLO.XMhZc'); + for (let i = 0; i < el.length; i++) { + console.log(el); + el[i].id = 'expandableRows'; + } + }, []); + return props[`${props.handlerPageChange ? 'total' : 'count'}`] <= 0 ? (

{EMPTY_MESSAGE}

diff --git a/src/components/flight/FlightApprovalsTable.js b/src/components/flight/FlightApprovalsTable.js index b688018c..3b1fec76 100644 --- a/src/components/flight/FlightApprovalsTable.js +++ b/src/components/flight/FlightApprovalsTable.js @@ -11,11 +11,14 @@ export default function FlightApprovalsTable(props) { const [results, setSearchResults] = useState([]); + const { laancAprvList } = useSelector(state => state.laancState); + useEffect(() => { if (props.data) { setSearchResults(props.data); } }, []); + console.log('>>', laancAprvList); useEffect(() => { if (props.filter) { @@ -76,20 +79,20 @@ export default function FlightApprovalsTable(props) { classNames: ['flight-approval-row'] }, { - when: row => row.planSno === props.selected, - classNames: ['flight-approval-row-click'] + when: row => row.planSno === props.selected + // classNames: ['flight-approval-row-click'] } ]; const columns = [ { name: '신청번호', - selector: row => row.planSno, + selector: row => row.applyNo, center: true, minWidth: '10px', cell: row => { - return row.planSno; + return row.applyNo; } }, { @@ -103,7 +106,6 @@ export default function FlightApprovalsTable(props) { return dayjs(row.cntrlStDt).format('YYYY-MM-DD'); } }, - { name: '자세히 보기', // selector: row => row.altitude, @@ -176,6 +178,96 @@ export default function FlightApprovalsTable(props) {
+
{ + // props.handlerDetail(item.cntrlId); + // }} + key={Math.random()} + > +
+
+
중심좌표(위/경도)
+
36.45467/126.73687
+
+
+
반경(m)
+
+ 100 {/* {dayjs(item.cntrlStDt).format('YYYY년 MM월 DD일')} */} +
+
+
+
고도(m)
+
180
+
+
+
검토결과
+
+ 승인 + {/* {dayjs(item.cntrlStDt).format('HH:mm')} + + {dayjs(item.cntrlEndDt).format('HH:mm')} */} +
+
+
+
사유보기
+
+ 사유보기 + {/* {dayjs(item.cntrlStDt).format('HH:mm')} + + {dayjs(item.cntrlEndDt).format('HH:mm')} */} +
+
+
+
+
{ + // props.handlerDetail(item.cntrlId); + // }} + key={Math.random()} + > +
+
+
중심좌표(위/경도)
+
39.45467/126.73687
+
+
+
반경(m)
+
+ 140 {/* {dayjs(item.cntrlStDt).format('YYYY년 MM월 DD일')} */} +
+
+
+
고도(m)
+
120
+
+
+
검토결과
+
+ 승인 + {/* {dayjs(item.cntrlStDt).format('HH:mm')} + + {dayjs(item.cntrlEndDt).format('HH:mm')} */} +
+
+
+
사유보기
+
+ 사유보기{' '} + {/* {dayjs(item.cntrlStDt).format('HH:mm')} + + {dayjs(item.cntrlEndDt).format('HH:mm')} */} +
+
+
+
); }; @@ -212,10 +304,10 @@ export default function FlightApprovalsTable(props) { className='invoice-list-dataTable flight-approval' style={{ width: '100%' }} > - {results?.length > 0 ? ( + {laancAprvList?.length > 0 ? (