From 2e085f84812cfecc7e1bec4154699a7512b55650 Mon Sep 17 00:00:00 2001 From: hhjk00 Date: Wed, 22 Nov 2023 18:31:06 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B7=B8=EB=A3=B9=20=EB=AA=A9=EB=A1=9D=20?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/statistics/StatisticsSearch.js | 53 +++++++++++++++++-- .../statistics/AbnormalSituationContainer.js | 14 ++--- src/containers/statistics/FlightContainer.js | 14 ++--- .../statistics/FlightResultContainer.js | 14 ++--- 4 files changed, 69 insertions(+), 26 deletions(-) diff --git a/src/components/statistics/StatisticsSearch.js b/src/components/statistics/StatisticsSearch.js index eefd66ea..32fe9472 100644 --- a/src/components/statistics/StatisticsSearch.js +++ b/src/components/statistics/StatisticsSearch.js @@ -11,6 +11,49 @@ import { Search } from 'react-feather'; import { Bar, Doughnut } from 'react-chartjs-2'; import { useEffect, useState } from 'react'; +const competentAgency = [ + { + text: '서울지방항공청(항공운항과)', + value: 'F0001' + }, + { + text: '김포항공관리사무소(안전운항과)', + value: 'F0002' + }, + { + text: '양양공항출장소', + value: 'F0003' + }, + { + text: '원주공항출장소', + value: 'F0004' + }, + { + text: '청주공항출장소', + value: 'F0005' + }, + { + text: '군산공항출장소', + value: 'F0006' + }, + { + text: '부산지방항공청(항공운항과)', + value: 'F0007' + }, + { + text: '제주지방항공청(안전운항과)', + value: 'F0008' + }, + { + text: '정석비행장', + value: 'F0009' + }, + { + text: '울진공항출장소', + value: 'F0010' + } +]; + export default function StatisticsSearch({ tooltipShadow, gridLineColor, @@ -23,8 +66,8 @@ export default function StatisticsSearch({ handlerChartTitle, handleChangeSearchType, formatSeconds, - user, - entireGroupList + user + // entireGroupList }) { const [total, setTotal] = useState([]); const [top, setTop] = useState([]); @@ -294,9 +337,9 @@ export default function StatisticsSearch({ ) } > - {entireGroupList?.map(i => ( - ))} diff --git a/src/containers/statistics/AbnormalSituationContainer.js b/src/containers/statistics/AbnormalSituationContainer.js index ec649954..6d349411 100644 --- a/src/containers/statistics/AbnormalSituationContainer.js +++ b/src/containers/statistics/AbnormalSituationContainer.js @@ -13,12 +13,12 @@ export default function AbnormalSituationContainer() { state => state.statisticsState ); const { user } = useSelector(state => state.authState); - const { entireGroupList } = useSelector(state => state.groupState); + // const { entireGroupList } = useSelector(state => state.groupState); const [searchType, setSearchType] = useState({ category: 'PLAN', dateType: 'year', - serviceType: 'KAC', + serviceType: 'F0002', year: new Date().getFullYear(), month: new Date().getMonth() + 1, day: new Date().getDate() @@ -37,10 +37,10 @@ export default function AbnormalSituationContainer() { }; // 사용자가 SUPER 권한일 경우 전체 그룹 조회 - useEffect(() => { - user?.authId === 'SUPER' && - dispatch(GroupActions.ENTIRE_GROUP_LIST.request()); - }, []); + // useEffect(() => { + // user?.authId === 'SUPER' && + // dispatch(GroupActions.ENTIRE_GROUP_LIST.request()); + // }, []); // 사용자가 SUPER 권한일 경우 serviceType 파라미터 추가 - 상단 통계 데이터 useEffect(() => { @@ -140,7 +140,7 @@ export default function AbnormalSituationContainer() { searchData={abnormalSearch} searchType={searchType} user={user} - entireGroupList={entireGroupList} + // entireGroupList={entireGroupList} categoryTypeOptions={categoryTypeOptions} dateLists={dateLists} handlerBarTicks={handlerBarTicks} diff --git a/src/containers/statistics/FlightContainer.js b/src/containers/statistics/FlightContainer.js index faf5054f..434f6253 100644 --- a/src/containers/statistics/FlightContainer.js +++ b/src/containers/statistics/FlightContainer.js @@ -11,12 +11,12 @@ export default function FlightContainer() { const { flight, flightSearch } = useSelector(state => state.statisticsState); const { user } = useSelector(state => state.authState); - const { entireGroupList } = useSelector(state => state.groupState); + // const { entireGroupList } = useSelector(state => state.groupState); const [searchType, setSearchType] = useState({ category: 'TIME', dateType: 'year', - serviceType: 'KAC', + serviceType: 'F0002', year: new Date().getFullYear(), month: new Date().getMonth() + 1, day: new Date().getDate() @@ -35,10 +35,10 @@ export default function FlightContainer() { }; // 사용자가 SUPER 권한일 경우 전체 그룹 조회 - useEffect(() => { - user?.authId === 'SUPER' && - dispatch(GroupActions.ENTIRE_GROUP_LIST.request()); - }, [user]); + // useEffect(() => { + // user?.authId === 'SUPER' && + // dispatch(GroupActions.ENTIRE_GROUP_LIST.request()); + // }, [user]); // 사용자가 SUPER 권한일 경우 serviceType 파라미터 추가 - 상단 통계 데이터 useEffect(() => { @@ -200,7 +200,7 @@ export default function FlightContainer() { searchData={flightSearch} searchType={searchType} user={user} - entireGroupList={entireGroupList} + // entireGroupList={entireGroupList} categoryTypeOptions={categoryTypeOptions} dateLists={dateLists} formatSeconds={formatSeconds} diff --git a/src/containers/statistics/FlightResultContainer.js b/src/containers/statistics/FlightResultContainer.js index 7d395734..dda34615 100644 --- a/src/containers/statistics/FlightResultContainer.js +++ b/src/containers/statistics/FlightResultContainer.js @@ -11,12 +11,12 @@ export default function ResultContainer() { const { result, resultSearch } = useSelector(state => state.statisticsState); const { user } = useSelector(state => state.authState); - const { entireGroupList } = useSelector(state => state.groupState); + // const { entireGroupList } = useSelector(state => state.groupState); const [searchType, setSearchType] = useState({ category: 'FLT_RESULT', dateType: 'year', - serviceType: 'KAC', + serviceType: 'F0002', year: new Date().getFullYear(), month: new Date().getMonth() + 1, day: new Date().getDate() @@ -35,10 +35,10 @@ export default function ResultContainer() { }; // 사용자가 SUPER 권한일 경우 전체 그룹 조회 - useEffect(() => { - user?.authId === 'SUPER' && - dispatch(GroupActions.ENTIRE_GROUP_LIST.request()); - }, [user]); + // useEffect(() => { + // user?.authId === 'SUPER' && + // dispatch(GroupActions.ENTIRE_GROUP_LIST.request()); + // }, [user]); // 사용자가 SUPER 권한일 경우 serviceType 파라미터 추가 - 상단 통계 데이터 useEffect(() => { @@ -138,7 +138,7 @@ export default function ResultContainer() { searchData={resultSearch} searchType={searchType} user={user} - entireGroupList={entireGroupList} + // entireGroupList={entireGroupList} categoryTypeOptions={categoryTypeOptions} dateLists={dateLists} handlerBarTicks={handlerBarTicks}