Browse Source

select option value 변경

pull/2/head
hhjk00 11 months ago
parent
commit
2305f608af
  1. 19
      src/containers/statistics/AbnormalSituationContainer.js
  2. 12
      src/containers/statistics/FlightContainer.js

19
src/containers/statistics/AbnormalSituationContainer.js

@ -23,7 +23,7 @@ export default function AbnormalSituationContainer({
labelColor
}) {
const [searchType, setSearchType] = useState({
abnormalType: 'offCourse',
abnormalType: '비행경로이탈',
dateType: 'year',
year: new Date().getFullYear(),
month: new Date().getMonth() + 1,
@ -34,7 +34,7 @@ export default function AbnormalSituationContainer({
day: []
});
const titleName = '비 통계';
const titleName = '비정상상황 통계';
useEffect(() => {
const { year, month } = searchType;
@ -49,7 +49,8 @@ export default function AbnormalSituationContainer({
(type, val) => {
setSearchType({
...searchType,
[type]: type === 'dateType' || type === 'flightType' ? val : Number(val)
[type]:
type === 'dateType' || type === 'abnormalType' ? val : Number(val)
});
},
[searchType]
@ -330,15 +331,13 @@ export default function AbnormalSituationContainer({
)
}
>
<option value={'offCourse'}>
<option value={'비행경로이탈'}>
비행경로이탈
</option>
<option value={'altitude'}>
<option value={'비정상고도'}>
비정상고도
</option>
<option value={'collision'}>
충돌위험
</option>
<option value={'충돌위험'}>충돌위험</option>
</CustomInput>
</Col>
</Row>
@ -358,7 +357,7 @@ export default function AbnormalSituationContainer({
<Col md='8' className='chart-wrap'>
<Card>
<CardHeader className='d-flex justify-content-between align-items-sm-center align-items-start flex-sm-row flex-column'>
<CardTitle tag='h4'>비행 시간 통계</CardTitle>
<CardTitle tag='h4'>{searchType.abnormalType} 통계</CardTitle>
<div className='select-date-wrap'>
<Row>
<div className='select-date'>
@ -464,7 +463,7 @@ export default function AbnormalSituationContainer({
<Col md='4' className='chart-wrap'>
<Card>
<CardHeader className='d-flex justify-content-between align-items-sm-center align-items-start flex-sm-row flex-column'>
<CardTitle tag='h4'>비행시간 TOP5</CardTitle>
<CardTitle tag='h4'>{searchType.abnormalType} TOP5</CardTitle>
</CardHeader>
<CardBody>
<div style={{ height: '275px' }}>

12
src/containers/statistics/FlightContainer.js

@ -23,7 +23,7 @@ export default function FlightContainer({
labelColor
}) {
const [searchType, setSearchType] = useState({
flightType: 'time',
flightType: '비행시간',
dateType: 'year',
year: new Date().getFullYear(),
month: new Date().getMonth() + 1,
@ -330,9 +330,9 @@ export default function FlightContainer({
)
}
>
<option value={'time'}>비행시간</option>
<option value={'distance'}>비행거리</option>
<option value={'count'}>비행횟수</option>
<option value={'비행시간'}>비행시간</option>
<option value={'비행거리'}>비행거리</option>
<option value={'비행횟수'}>비행횟수</option>
</CustomInput>
</Col>
</Row>
@ -352,7 +352,7 @@ export default function FlightContainer({
<Col md='8' className='chart-wrap'>
<Card>
<CardHeader className='d-flex justify-content-between align-items-sm-center align-items-start flex-sm-row flex-column'>
<CardTitle tag='h4'>비행 시간 통계</CardTitle>
<CardTitle tag='h4'>{searchType.flightType} 통계</CardTitle>
<div className='select-date-wrap'>
<Row>
<div className='select-date'>
@ -458,7 +458,7 @@ export default function FlightContainer({
<Col md='4' className='chart-wrap'>
<Card>
<CardHeader className='d-flex justify-content-between align-items-sm-center align-items-start flex-sm-row flex-column'>
<CardTitle tag='h4'>비행시간 TOP5</CardTitle>
<CardTitle tag='h4'>{searchType.flightType} TOP5</CardTitle>
</CardHeader>
<CardBody>
<div style={{ height: '275px' }}>

Loading…
Cancel
Save