diff --git a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx index 7de556932..470a44e4c 100644 --- a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx @@ -77,7 +77,7 @@ export default function WaterQualityModal({ fcltyName = '', facilityCd = '', sea useEffect(() => { const filteredYearData = setFilterAfterData(facilityWaterQltyYearList); setCopyYearList(filteredYearData as FacilityWaterQltyProps[]); - setChongInWaterQltyYearList(filteredYearData as FacilityWaterQltyProps[]); + setChongInWaterQltyYearList(facilityWaterQltyYearList); }, [facilityWaterQltyYearList]); // 필터링 된 후 최대, 최소, 평균 값 계산 @@ -344,8 +344,7 @@ export default function WaterQualityModal({ fcltyName = '', facilityCd = '', sea const filterData = useCallback((returnType: ReturnType) => { const filteredData = setFilterAfterData(returnType.filteredList); - setCopyYearList(filteredData as FacilityWaterQltyProps[]); // 처리시설 수질현황 - setChongInWaterQltyYearList(filteredData as FacilityWaterQltyProps[]); // 총인설비 수질현황 + setCopyYearList(filteredData as FacilityWaterQltyProps[]); // 처리시설/총인설비 수질현황 }, []); const excelDownload = () => { @@ -386,10 +385,10 @@ export default function WaterQualityModal({ fcltyName = '', facilityCd = '', sea prevExcelListRef.current = excelDownList; } else { // 총인설비 수질현황 const excelDownList: modalChoinginExcelType[] = []; - if (chongInWaterQltyYearList.length > 0) { - chongInWaterQltyYearList.forEach((item) => { - // if (copyYearList.length > 0) { - // copyYearList.forEach((item) => { + // if (chongInWaterQltyYearList.length > 0) { + // chongInWaterQltyYearList.forEach((item) => { + if (copyYearList.length > 0) { + copyYearList.forEach((item) => { excelDownList.push({ 날짜: item.msrDt, "유입BOD(mg/L)": CommaToNumber(item.tpInflWqltBod), @@ -610,4 +609,4 @@ export default function WaterQualityModal({ fcltyName = '', facilityCd = '', sea ); -} \ No newline at end of file +}