빌드에러 수정, 유량현황 엑셀다운로드 수정
This commit is contained in:
@@ -5,17 +5,17 @@
|
||||
*/
|
||||
|
||||
"use client"
|
||||
import CommaToNumber from "@/app/components/common/CommaToNumber";
|
||||
import { roundNumber } from "@/app/components/common/DataForm";
|
||||
import UnderComment from "@/app/components/common/UnderComment";
|
||||
import { useFoStore } from "@/app/store";
|
||||
import type { FacilityWaterQltyProps, modalExcelType } from "@/app/store/facilityWaterQlty";
|
||||
import { downloadExcel, downloadExcelFormat, UITab, UiTable } from "@common/business_components/ui";
|
||||
import { downloadExcelFormat, UITab, UiTable } from "@common/business_components/ui";
|
||||
import { Button, TabsContent } from "@common/components/ui";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import type { ReturnType } from "../../../../components/common/FacilityTermModalHeader";
|
||||
import FacilityTermModalHeader from "../../../../components/common/FacilityTermModalHeader";
|
||||
import { HeadMakeColSpan } from "../HeadMakeColSpan";
|
||||
import { roundNumber } from "@/app/components/common/DataForm";
|
||||
import UnderComment from "@/app/components/common/UnderComment";
|
||||
import CommaToNumber from "@/app/components/common/CommaToNumber";
|
||||
|
||||
const commentArrayChungchun = [
|
||||
"청천시 : 강우량이 3mm미만의 날"
|
||||
|
||||
@@ -15,6 +15,7 @@ import type { ReturnType } from "../../../../components/common/FacilityTermModal
|
||||
import { roundUp } from "@/app/store/common";
|
||||
import { roundNumber } from "@/app/components/common/DataForm";
|
||||
import UnderComment from "@/app/components/common/UnderComment";
|
||||
import CommaToNumber from "@/app/components/common/CommaToNumber";
|
||||
|
||||
const tabList = [
|
||||
{ value: 'tab_term_year', label: '연간' },
|
||||
@@ -186,11 +187,11 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st
|
||||
copyYearList.forEach((item) => {
|
||||
excelDownList.push({
|
||||
"날짜": item.msrDt,
|
||||
"총유입량(m³/일)": item.totInflAmnt,
|
||||
"하수유입량(m³/일)": item.inflAmnt,
|
||||
"연계처리량(m³/일)": item.sumFlow,
|
||||
"총인반류수량(m³/일)": item.returnAmnt,
|
||||
"방류량(m³/일)": item.efflAmnt,
|
||||
"총유입량(m³/일)": CommaToNumber(item.totInflAmnt),
|
||||
"하수유입량(m³/일)": CommaToNumber(item.inflAmnt),
|
||||
"연계처리량(m³/일)": CommaToNumber(item.sumFlow),
|
||||
"총인반류수량(m³/일)": CommaToNumber(item.returnAmnt),
|
||||
"방류량(m³/일)": CommaToNumber(item.efflAmnt),
|
||||
/* "강우량(mm/일)": item.infoRnDay, */
|
||||
});
|
||||
});
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
"use client"
|
||||
import { useFoStore } from "@/app/store";
|
||||
import type { TableUpperProps } from "@/app/store/common";
|
||||
import { ContentsDiv, downloadExcel, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiModal, UiTable, type ReturnType } from "@common/business_components";
|
||||
import type { ExcelType } from "@/app/store/flowRate";
|
||||
import { ContentsDiv, downloadExcelFormat, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiModal, UiTable, type ReturnType } from "@common/business_components";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import LoadingOverlay from "@common/business_components/ui/loadingBar";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import FlowRateModal from "./modal/page";
|
||||
import type { ExcelType } from "@/app/store/flowRate";
|
||||
import LoadingOverlay from "@common/business_components/ui/loadingBar";
|
||||
|
||||
export default function ProcessFacilitySearch() {
|
||||
const {Common
|
||||
@@ -140,7 +140,7 @@ export default function ProcessFacilitySearch() {
|
||||
|
||||
useEffect(() => {
|
||||
if (excelList && excelList.length > 0) {
|
||||
downloadExcel({ data: JSON.parse(JSON.stringify(excelList)), fileName: '시설별 유량현황', sheetNameArray: ['시설별 유량현황'], headerRange: 'A1:O1' });
|
||||
downloadExcelFormat({ data: JSON.parse(JSON.stringify(excelList)), fileName: '시설별 유량현황', sheetNameArray: ['시설별 유량현황'], headerRange: 'A1:O1', decimalArray0: [9,10,11,12,13,14] });
|
||||
} else if (prevExcelListRef.current && prevExcelListRef.current.length > 0) {
|
||||
alert('다운받을 데이터가 없습니다.');
|
||||
}
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
*/
|
||||
|
||||
"use client"
|
||||
import { roundNumber } from "@/app/components/common/DataForm";
|
||||
import { useFoStore } from "@/app/store";
|
||||
import type { TableUpperProps } from "@/app/store/dashboard";
|
||||
import { downloadExcel, downloadExcelFormat, filePickedBlobArray, UITab, UiTable } from "@common/business_components/ui";
|
||||
import { downloadExcelFormat, filePickedBlobArray, UITab, UiTable } from "@common/business_components/ui";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import {
|
||||
TabsContent
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { TableUpperProps } from "../dashboard";
|
||||
import DataForm, { roundNumber } from "@/app/components/common/DataForm";
|
||||
import CalcRainEffect from "@/app/components/common/CalcRainEffect";
|
||||
import { fetchFacilityWaterQltyListHist } from "../facilityWaterQlty";
|
||||
import CommaToNumber from "@/app/components/common/CommaToNumber";
|
||||
|
||||
/**====================================
|
||||
* Store - 타입
|
||||
@@ -300,11 +301,11 @@ export const flowRateSearchReducer:(set:(fn: (state: FlowRateSearchType) => Flow
|
||||
시설이름: item.bscFctNm,
|
||||
주소: item.daddr,
|
||||
"시설용량(m³/일)": item.fctCpc,
|
||||
"총유입량(m³/일)": item.totInflAmnt,
|
||||
"하수유입량(m³/일)": item.inflAmnt,
|
||||
"연계처리량(m³/일)": item.sumFlow,
|
||||
"총인반류수량(m³/일)": item.returnAmnt,
|
||||
"방류량(m³/일)": item.efflAmnt,
|
||||
"총유입량(m³/일)": CommaToNumber(item.totInflAmnt),
|
||||
"하수유입량(m³/일)": CommaToNumber(item.inflAmnt),
|
||||
"연계처리량(m³/일)": CommaToNumber(item.sumFlow),
|
||||
"총인반류수량(m³/일)": CommaToNumber(item.returnAmnt),
|
||||
"방류량(m³/일)": CommaToNumber(item.efflAmnt),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user