+
수질 TMS
- {/*({msrmtDate?msrmtDate.substring(0,4)+'-'+msrmtDate.substring(4,6)+'-'+msrmtDate.substring(6,8):yesterDayStr})
*/}
+ ({msrmtDate ? msrmtDate.substring(0, 4) + '-' + msrmtDate.substring(4, 6) + '-' + msrmtDate.substring(6, 8) : yesterDayStr})
- {}}
- boldArray={[0,1,2]}
+ { }} boldArray={[0, 1, 2]}
>
- {msrmtDate != yesterDayStr?.replaceAll('-','') ? (
-
+ {msrmtDate != yesterDayStr?.replaceAll('-', '') ? (
+
) : null}
-
+ {/* 하절기 */}
searchList={facilityWaterQltyYearList}
- fcltyCd={facilityCd}
- fcltyName={fcltyName}
- tabName="tab_term_summer"
- searchYear={searchYear}
- ref={ref}
- queryClick={filterData}
+ fcltyCd={facilityCd} fcltyName={fcltyName} tabName="tab_term_summer"
+ searchYear={searchYear} ref={ref} queryClick={filterData}
/>
- { } }
- className="h-[500px]"
- boldArray={[0,1,2]}
+ headlist={Number(searchYear) < COD_YEAR ? upHeadListModalYearCod : upHeadListModalYear}
+ pageSize={0} total={0} cellClick={undefined}
+ onPageChange={() => { }} className="h-[500px]" boldArray={[0, 1, 2]}
>
-
+ {/* 동절기 */}
searchList={facilityWaterQltyYearList}
- fcltyCd={facilityCd}
- fcltyName={fcltyName}
- tabName="tab_term_winter"
- searchYear={searchYear}
- ref={ref}
- queryClick={filterData}
+ fcltyCd={facilityCd} fcltyName={fcltyName} tabName="tab_term_winter"
+ searchYear={searchYear} ref={ref} queryClick={filterData}
/>
- {}}
- className="h-[500px]"
- boldArray={[0,1,2]}
+ { }} className="h-[500px]" boldArray={[0, 1, 2]}
>
-
+ {/* 청천시 */}
searchList={facilityWaterQltyYearList}
- fcltyCd={facilityCd}
- fcltyName={fcltyName}
- tabName="tab_term_chuncheon"
- searchYear={searchYear}
- ref={ref}
- queryClick={filterData}
+ fcltyCd={facilityCd} fcltyName={fcltyName} tabName="tab_term_chuncheon"
+ searchYear={searchYear} ref={ref} queryClick={filterData}
/>
- {}}
- className="h-[500px]"
- boldArray={[0,1,2]}
+ { }} className="h-[500px]" boldArray={[0, 1, 2]}
>
-
+
-
+ {/* 강우시 */}
searchList={facilityWaterQltyYearList}
- fcltyCd={facilityCd}
- fcltyName={fcltyName}
- tabName="tab_term_rain"
- searchYear={searchYear}
- ref={ref}
- queryClick={filterData}
+ fcltyCd={facilityCd} fcltyName={fcltyName} tabName="tab_term_rain"
+ searchYear={searchYear} ref={ref} queryClick={filterData}
/>
- {}}
- className="h-[500px]"
- boldArray={[0,1,2]}
+ { }} className="h-[500px]" boldArray={[0, 1, 2]}
>
-
+
@@ -593,81 +549,57 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe
{/* 총인설비 수질현황 */}
-
+ {/* 연간 */}
searchList={chongInWaterQltyYearList}
- fcltyCd={facilityCd}
- fcltyName={fcltyName}
- tabName="tab_term_year"
- searchYear={searchYear}
- ref={ref}
- queryClick={filterData}
+ fcltyCd={facilityCd} fcltyName={fcltyName} tabName="tab_term_year"
+ searchYear={searchYear} ref={ref} queryClick={filterData}
/>
- {}}
- className="h-[500px]"
- boldArray={[0,1,2]}
- >
-
-
-
-
-
-
-
- searchList={chongInWaterQltyYearList}
- fcltyCd={facilityCd}
- fcltyName={fcltyName}
- tabName="tab_term_summer"
- searchYear={searchYear}
- ref={ref}
- queryClick={filterData}
- />
-
- {}}
- className="h-[500px]"
- boldArray={[0,1,2]}
- >
-
-
-
-
-
-
-
- searchList={chongInWaterQltyYearList}
- fcltyCd={facilityCd}
- fcltyName={fcltyName}
- tabName="tab_term_winter"
- searchYear={searchYear}
- ref={ref}
- queryClick={filterData}
- />
-
- {}}
- className="h-[500px]"
- boldArray={[0,1,2]}
+ pageSize={0} total={0} cellClick={undefined}
+ onPageChange={() => { }} className="h-[500px]" boldArray={[0, 1, 2]}
+ >
+
+
+
+
+
+ {/* 하절기 */}
+
+ searchList={chongInWaterQltyYearList}
+ fcltyCd={facilityCd} fcltyName={fcltyName} tabName="tab_term_summer"
+ searchYear={searchYear} ref={ref} queryClick={filterData}
+ />
+
+ { }} className="h-[500px]" boldArray={[0, 1, 2]}
+ >
+
+
+
+
+
+ {/* 동절기 */}
+
+ searchList={chongInWaterQltyYearList}
+ fcltyCd={facilityCd} fcltyName={fcltyName} tabName="tab_term_winter"
+ searchYear={searchYear} ref={ref} queryClick={filterData}
+ />
+
+
{ }} className="h-[500px]" boldArray={[0, 1, 2]}
>
diff --git a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/page.tsx b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/page.tsx
index 885ee2728..86a434d6b 100644
--- a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/page.tsx
+++ b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/page.tsx
@@ -23,7 +23,7 @@ export default function ProcessFacilitySearch() {
} = useFoStore((state) => state) || { FacilityWaterQltyList: { facilityWaterQltyList: [], facilityWaterQltyCount: 0 } };
const {
- isInit,
+ isInit,
selectUpdownData,
selectOperationData,
selectSidoData,
@@ -66,26 +66,26 @@ export default function ProcessFacilitySearch() {
const [fcltyCd, setFcltyCd] = useState
("");
const [modalYear, setModalYear] = useState("");
- const searchFcltyQltyList = useCallback(({ partValue, regionValue, unitWaterShedValue, middleRegionValue, envPartValue, sidoValue, sigunValue }: ReturnType, pageNo: number, pageCnt:number=20) => {
+ const searchFcltyQltyList = useCallback(({ partValue, regionValue, unitWaterShedValue, middleRegionValue, envPartValue, sidoValue, sigunValue }: ReturnType, pageNo: number, pageCnt: number = 20) => {
let nameCd, partStr;
switch (partValue) {
case 'R':
if (regionValue !== '0') {
- if(unitWaterShedValue==='0') nameCd = regionValue;
- else if (middleRegionValue==='0') nameCd = unitWaterShedValue;
+ if (unitWaterShedValue === '0') nameCd = regionValue;
+ else if (middleRegionValue === '0') nameCd = unitWaterShedValue;
else nameCd = middleRegionValue;
}
partStr = partValue
break;
default:
- if(sidoValue !== '0') nameCd = ref.current.sidoValue!="0"?ref.current.sidoValue:sidoValue;
- if(sigunValue !== '0') nameCd = sigunValue;
- partStr = envPartValue !== '0' ? envPartValue:partValue;
- break;
+ if (sidoValue !== '0') nameCd = ref.current.sidoValue != "0" ? ref.current.sidoValue : sidoValue;
+ if (sigunValue !== '0') nameCd = sigunValue;
+ partStr = envPartValue !== '0' ? envPartValue : partValue;
+ break;
}
- if(partStr ==='G'){
+ if (partStr === 'G') {
searchFacilityWaterQltyList(pageNo, pageCnt, searchYearValue);
- }else{
+ } else {
searchFacilityWaterQltyList(pageNo, pageCnt, searchYearValue, partStr, nameCd || '0', fcltCpct, operationValue, fcltyName.trim() !== "" || fcltyName.trim() !== null ? fcltyName : undefined);
}
}, [operationValue, fcltyName, searchFacilityWaterQltyList, searchYearValue, fcltCpct]);
@@ -138,34 +138,34 @@ export default function ProcessFacilitySearch() {
useEffect(() => {
if (!isInit) {
- if(!initTrigger){
+ if (!initTrigger) {
initializeCommonData();
searchFcltyQltyList(ref.current, 1, 10);
- setInitTrigger(true);
+ setInitTrigger(true);
}
}
}, [isInit, initializeCommonData, searchFacilityWaterQltyList, searchFcltyQltyList, initTrigger]);
useEffect(() => {
- if(!excelTrigger) return;
+ if (!excelTrigger) return;
if (excelList && excelList.length > 0) {
downloadExcelFormat(
{
- data: excelList as unknown as JSON[],
- fileName: '시설별 수질현황',
- sheetNameArray: ['시설별 수질현황'],
+ data: excelList as unknown as JSON[],
+ fileName: '시설별 수질현황',
+ sheetNameArray: ['시설별 수질현황'],
headerRange: 'A1:T1',
- decimalArray1:[10,11,12,15,16,17],
- decimalArray3:[13,14,18,19]
+ decimalArray1: [10, 11, 12, 15, 16, 17],
+ decimalArray3: [13, 14, 18, 19]
}
);
}
}, [excelList, excelTrigger]);
- const chkVal = useCallback((returntype:ReturnType) => {
+ const chkVal = useCallback((returntype: ReturnType) => {
// setWidthSize(returntype.partValue=='A' ?"w-[120%]":"w-[130%]")
- setUpheadList(returntype.partValue == 'R' ? upHeadList2 : returntype.partValue == 'G'?upHeadList3:upHeadList1);
+ setUpheadList(returntype.partValue == 'R' ? upHeadList2 : returntype.partValue == 'G' ? upHeadList3 : upHeadList1);
setResetPage(true);
}, [upHeadList1, upHeadList2, upHeadList3]);
@@ -173,7 +173,7 @@ export default function ProcessFacilitySearch() {
setExcelTrigger(true);
searchFcltyQltyList(ref.current, 1, 10000);
}, [searchFcltyQltyList]);
-
+
const handlePageChange = useCallback((page: number) => {
setResetPage(false);
searchFcltyQltyList(ref.current, page, 10);
@@ -202,7 +202,7 @@ export default function ProcessFacilitySearch() {
queryClick={chkVal}
excelClick={excelDownload}
initClick={resetVal}
- ref={ref} isAdmin={false} initSidoValue={"11"}/>
+ ref={ref} isAdmin={false} initSidoValue={"11"} />
@@ -215,7 +215,7 @@ export default function ProcessFacilitySearch() {
{selectedRow !== null && (
}
- bodyClass="sm:max-w-[90vw] w-[1300px] h-[920px]"
+ bodyClass="sm:max-w-[90vw] w-[1300px] h-[100dvh] max-h-[930px] overflow-y-auto"
open={selectedRow !== null}
onOpenChange={(open) => !open && closeModal()}
noHeaderYn="Y"
diff --git a/apps/fo/app/pages/(with-layout)/processArea/page.tsx b/apps/fo/app/pages/(with-layout)/processArea/page.tsx
index 009d72c9f..ba1e27767 100644
--- a/apps/fo/app/pages/(with-layout)/processArea/page.tsx
+++ b/apps/fo/app/pages/(with-layout)/processArea/page.tsx
@@ -167,7 +167,8 @@ export default function ProcessArea() {
- index !== undefined && cellClick(index)} headName={"처리구역정보"} tableData={mainList} headlist={upHeadList1} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} widthFixed={true} />
+ index !== undefined && cellClick(index)} headName={"처리구역정보"} tableData={mainList}
+ headlist={upHeadList1} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} widthFixed={true} />
diff --git a/apps/fo/app/store/facilityWaterQlty/index.tsx b/apps/fo/app/store/facilityWaterQlty/index.tsx
index 0eafcfcd0..db60c5b2d 100644
--- a/apps/fo/app/store/facilityWaterQlty/index.tsx
+++ b/apps/fo/app/store/facilityWaterQlty/index.tsx
@@ -2,7 +2,7 @@
import DataForm, { roundNumber } from "@/app/components/common/DataForm";
import type { TableUpperProps } from "../dashboard";
import CalcRainEffect from "@/app/components/common/CalcRainEffect";
-import { COD_YEAR } from "../common";
+import { COD_YEAR } from "../common"; // 2021년
import CommaToNumber from "@/app/components/common/CommaToNumber";
export type { TableUpperProps };
@@ -37,8 +37,8 @@ export interface FacilityWaterQltyProps {
inflAssctAftWqltBod: string | '',
inflAssctBfrWqltToc: string | '',
inflAssctAftWqltToc: string | '',
- inflAssctBfrWqltCod : string | '',
- inflAssctAftWqltCod : string | '',
+ inflAssctBfrWqltCod: string | '',
+ inflAssctAftWqltCod: string | '',
inflAssctBfrWqltSs: string | '',
inflAssctAftWqltSs: string | '',
inflAssctBfrWqltTn: string | '',
@@ -47,14 +47,14 @@ export interface FacilityWaterQltyProps {
inflAssctAftWqltTp: string | '',
efflWqltBod: string | '',
efflWqltToc: string | '',
- efflWqltCod : string | '',
+ efflWqltCod: string | '',
efflWqltSs: string | '',
efflWqltTn: string | '',
efflWqltTp: string | '',
- rgnNm:string|'',
- rvbsn:string|'',
- lgbsn:string|'',
- mdmbsn:string|'',
+ rgnNm: string | '',
+ rvbsn: string | '',
+ lgbsn: string | '',
+ mdmbsn: string | '',
inflAmnt: number | '',
lclgvrnmntNm: string,
infoRnDay: number | string | '',
@@ -68,14 +68,14 @@ export interface FacilityWaterQltyProps {
tpInflWqltTp: string | '',
tpInflWqltEclgyTox: string | '',
tpInflWqltClfgrpcnt: string | '',
- noProcessInflAmnt : string | number | '',
+ noProcessInflAmnt: string | number | '',
}
export interface ExcelType {
시설코드: string,
- 권역:string|'',
- 단위유역:string|'',
- 중권역:string|'',
- 환경청:string|'',
+ 권역: string | '',
+ 단위유역: string | '',
+ 중권역: string | '',
+ 환경청: string | '',
시도: string,
시군구: string,
시설이름: string,
@@ -146,74 +146,74 @@ const mainLabelArray: string[] = ['구분', '시도', '시군구', '용량별',
// 시설수질리스트 헤더(행정별)
const upHeadList1: TableUpperProps[] = [
- { id: "C", title: "행정명", colSpan: 2, row:0, widthPercent:10 },
- { id: "sidoNm", title: "시도", row: 1, widthPercent:5},
- { id: "sggNm", title: "시군구", row: 1, widthPercent:5 },
+ { id: "C", title: "행정명", colSpan: 2, row: 0, widthPercent: 10 },
+ { id: "sidoNm", title: "시도", row: 1, widthPercent: 5 },
+ { id: "sggNm", title: "시군구", row: 1, widthPercent: 5 },
{ id: "bscFctNm", title: "시설명", rowSpan: 2, row: 0, widthPercent: 10 },
{ id: "addr", title: "주소", rowSpan: 2, row: 0 },
- { id: "fctCpc", title: "시설용량(m³/일)", align: "right", rowSpan: 2, row: 0, widthPercent:10 },
- { id: "A", title: "유입", colSpan: 5, row: 0, widthPercent:25 },
- { id: "B", title: "방류", colSpan: 5, row: 0, widthPercent:25 },
- { id: "inflAssctBfrWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe3", upSequnce: 1, align: "right", row: 1, widthPercent:5 },
- { id: "inflAssctBfrWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row: 1, widthPercent:5 },
- { id: "inflAssctBfrWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1, widthPercent:5 },
- { id: "inflAssctBfrWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe3", upSequnce: 4, align: "right", row: 1, widthPercent:5 },
- { id: "inflAssctBfrWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1, widthPercent:5 },
- { id: "efflWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe4", upSequnce: 1, align: "right", row: 1, widthPercent:5 },
- { id: "efflWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row: 1, widthPercent:5 },
- { id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row: 1, widthPercent:5 },
- { id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe4", upSequnce: 4, align: "right", row: 1, widthPercent:5 },
- { id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row: 1, widthPercent:5 },
+ { id: "fctCpc", title: "시설용량(m³/일)", align: "right", rowSpan: 2, row: 0, widthPercent: 10 },
+ { id: "A", title: "유입", colSpan: 5, row: 0, widthPercent: 25 },
+ { id: "B", title: "방류", colSpan: 5, row: 0, widthPercent: 25 },
+ { id: "inflAssctBfrWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe3", upSequnce: 1, align: "right", row: 1, widthPercent: 5 },
+ { id: "inflAssctBfrWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row: 1, widthPercent: 5 },
+ { id: "inflAssctBfrWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1, widthPercent: 5 },
+ { id: "inflAssctBfrWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe3", upSequnce: 4, align: "right", row: 1, widthPercent: 5 },
+ { id: "inflAssctBfrWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1, widthPercent: 5 },
+ { id: "efflWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe4", upSequnce: 1, align: "right", row: 1, widthPercent: 5 },
+ { id: "efflWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row: 1, widthPercent: 5 },
+ { id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row: 1, widthPercent: 5 },
+ { id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe4", upSequnce: 4, align: "right", row: 1, widthPercent: 5 },
+ { id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row: 1, widthPercent: 5 },
];
// 시설수질리스트 헤더(권역별)
const upHeadList2: TableUpperProps[] = [
- { id: "C", title: "유역", colSpan: 3, row: 0, widthPercent:15 },
- { id: "rvbsn", title: "권역", upName: "upChangeRe1", upSequnce: 1, row:1, widthPercent:5 },
- { id: "lgbsn", title: "단위유역", upName: "upChangeRe1", upSequnce: 2, row:1, widthPercent:5 },
- { id: "mdmbsn", title: "중권역", upName: "upChangeRe1", upSequnce: 3, row:1, widthPercent:5 },
- { id: "bscFctNm", title: "시설명", row:0, rowSpan:2, widthPercent:10 },
- { id: "addr", title: "주소", row:0, rowSpan:2 },
- { id: "fctCpc", title: "시설용량(m³/L)", align: "right", row:0, rowSpan:2, widthPercent:8 },
- { id: "A", title: "유입", colSpan: 5, row: 0, widthPercent:25 },
- { id: "B", title: "방류", colSpan: 5, row: 0, widthPercent:25 },
- { id: "inflAssctBfrWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe3", upSequnce: 1, align: "right", row:1, widthPercent:5 },
- { id: "inflAssctBfrWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row:1, widthPercent:5 },
- { id: "inflAssctBfrWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row:1, widthPercent:5 },
- { id: "inflAssctBfrWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row:1, widthPercent:5 },
- { id: "inflAssctBfrWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row:1, widthPercent:5 },
- { id: "efflWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe4", upSequnce: 1, align: "right", row:1, widthPercent:5 },
- { id: "efflWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row:1, widthPercent:5 },
- { id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row:1, widthPercent:5 },
- { id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row:1, widthPercent:5 },
- { id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row:1, widthPercent:5 },
+ { id: "C", title: "유역", colSpan: 3, row: 0, widthPercent: 15 },
+ { id: "rvbsn", title: "권역", upName: "upChangeRe1", upSequnce: 1, row: 1, widthPercent: 5 },
+ { id: "lgbsn", title: "단위유역", upName: "upChangeRe1", upSequnce: 2, row: 1, widthPercent: 5 },
+ { id: "mdmbsn", title: "중권역", upName: "upChangeRe1", upSequnce: 3, row: 1, widthPercent: 5 },
+ { id: "bscFctNm", title: "시설명", row: 0, rowSpan: 2, widthPercent: 10 },
+ { id: "addr", title: "주소", row: 0, rowSpan: 2 },
+ { id: "fctCpc", title: "시설용량(m³/L)", align: "right", row: 0, rowSpan: 2, widthPercent: 8 },
+ { id: "A", title: "유입", colSpan: 5, row: 0, widthPercent: 25 },
+ { id: "B", title: "방류", colSpan: 5, row: 0, widthPercent: 25 },
+ { id: "inflAssctBfrWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe3", upSequnce: 1, align: "right", row: 1, widthPercent: 5 },
+ { id: "inflAssctBfrWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row: 1, widthPercent: 5 },
+ { id: "inflAssctBfrWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1, widthPercent: 5 },
+ { id: "inflAssctBfrWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row: 1, widthPercent: 5 },
+ { id: "inflAssctBfrWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1, widthPercent: 5 },
+ { id: "efflWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe4", upSequnce: 1, align: "right", row: 1, widthPercent: 5 },
+ { id: "efflWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row: 1, widthPercent: 5 },
+ { id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row: 1, widthPercent: 5 },
+ { id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row: 1, widthPercent: 5 },
+ { id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row: 1, widthPercent: 5 },
];
// 시설수질리스트 헤더(환경청별)
const upHeadList3: TableUpperProps[] = [
{ id: "C", title: "유역", colSpan: 3, row: 0, widthPercent: 15 },
- { id: "rvbsn", title: "권역", row:1, widthPercent: 5 },
- { id: "lgbsn", title: "단위유역", row:1, widthPercent: 5 },
- { id: "mdmbsn", title: "중권역", row:1, widthPercent: 5 },
- { id: "rgnNm", title: "환경청", row:0, rowSpan:2, widthPercent: 7 },
+ { id: "rvbsn", title: "권역", row: 1, widthPercent: 5 },
+ { id: "lgbsn", title: "단위유역", row: 1, widthPercent: 5 },
+ { id: "mdmbsn", title: "중권역", row: 1, widthPercent: 5 },
+ { id: "rgnNm", title: "환경청", row: 0, rowSpan: 2, widthPercent: 7 },
{ id: "D", title: "행정명", colSpan: 2, row: 0, widthPercent: 10 },
- { id: "sidoNm", title: "시도", upName: "upChangeRe2", row:1, widthPercent: 5 },
- { id: "sggNm", title: "시군구", upName: "upChangeRe2", row:1, widthPercent: 5 },
- { id: "bscFctNm", title: "시설명", row:0, rowSpan:2, widthPercent: 8 },
- { id: "addr", title: "주소", row:0, rowSpan:2 },
- { id: "fctCpc", title: "시설용량(m³/L)", align: "right", row:0, rowSpan:2, widthPercent: 5 },
+ { id: "sidoNm", title: "시도", upName: "upChangeRe2", row: 1, widthPercent: 5 },
+ { id: "sggNm", title: "시군구", upName: "upChangeRe2", row: 1, widthPercent: 5 },
+ { id: "bscFctNm", title: "시설명", row: 0, rowSpan: 2, widthPercent: 8 },
+ { id: "addr", title: "주소", row: 0, rowSpan: 2 },
+ { id: "fctCpc", title: "시설용량(m³/L)", align: "right", row: 0, rowSpan: 2, widthPercent: 5 },
{ id: "A", title: "유입", colSpan: 5, row: 0, widthPercent: 20 },
{ id: "B", title: "방류", colSpan: 5, row: 0, widthPercent: 20 },
- { id: "inflAssctBfrWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe3", upSequnce: 1, align: "right", row:1, widthPercent: 4 },
- { id: "inflAssctBfrWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row:1, widthPercent: 4 },
- { id: "inflAssctBfrWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row:1, widthPercent: 4 },
- { id: "inflAssctBfrWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row:1, widthPercent: 4 },
- { id: "inflAssctBfrWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row:1, widthPercent: 4 },
- { id: "efflWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe4", upSequnce: 1, align: "right", row:1, widthPercent: 4 },
- { id: "efflWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row:1, widthPercent: 4 },
- { id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row:1, widthPercent: 4 },
- { id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row:1, widthPercent: 4 },
- { id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row:1, widthPercent: 4 },
+ { id: "inflAssctBfrWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe3", upSequnce: 1, align: "right", row: 1, widthPercent: 4 },
+ { id: "inflAssctBfrWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row: 1, widthPercent: 4 },
+ { id: "inflAssctBfrWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1, widthPercent: 4 },
+ { id: "inflAssctBfrWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe3", upSequnce: 2, align: "right", row: 1, widthPercent: 4 },
+ { id: "inflAssctBfrWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe3", upSequnce: 3, align: "right", row: 1, widthPercent: 4 },
+ { id: "efflWqltBod", title: "BOD\n(mg/L)", upName: "upChangeRe4", upSequnce: 1, align: "right", row: 1, widthPercent: 4 },
+ { id: "efflWqltToc", title: "TOC\n(COD)\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row: 1, widthPercent: 4 },
+ { id: "efflWqltSs", title: "SS\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row: 1, widthPercent: 4 },
+ { id: "efflWqltTn", title: "T-N\n(mg/L)", upName: "upChangeRe4", upSequnce: 2, align: "right", row: 1, widthPercent: 4 },
+ { id: "efflWqltTp", title: "T-P\n(mg/L)", upName: "upChangeRe4", upSequnce: 3, align: "right", row: 1, widthPercent: 4 },
];
/**
@@ -282,9 +282,9 @@ const upHeadListModalChongIn: TableUpperProps[] = [
====================================*/
// 메인페이지
// 시설정보 수질 리스트 데이터 호출
-const fetchFacilityWaterQltyList = async (pageNo: number, pageSize: number, searchYear: string, partCd?: string|undefined, nameCd?: string|undefined, fcltCpct?: string|undefined, operationValue?: string|undefined, fcltyNm?: string | undefined): Promise<{ data: FacilityWaterQltyProps[], count: number }> => {
+const fetchFacilityWaterQltyList = async (pageNo: number, pageSize: number, searchYear: string, partCd?: string | undefined, nameCd?: string | undefined, fcltCpct?: string | undefined, operationValue?: string | undefined, fcltyNm?: string | undefined): Promise<{ data: FacilityWaterQltyProps[], count: number }> => {
try {
- const tailStr = partCd ? '/'+ partCd + '/' + nameCd + '/' + fcltCpct + '/' + operationValue + (fcltyNm && fcltyNm !== '' ? '/' + fcltyNm : '') : '';
+ const tailStr = partCd ? '/' + partCd + '/' + nameCd + '/' + fcltCpct + '/' + operationValue + (fcltyNm && fcltyNm !== '' ? '/' + fcltyNm : '') : '';
const url = '/fclt/qlty/' + pageNo + '/' + pageSize + '/' + searchYear + tailStr;
const res = await getFetch('fo', url);
return { data: res.data, count: res.count }
@@ -295,7 +295,7 @@ const fetchFacilityWaterQltyList = async (pageNo: number, pageSize: number, sear
}
// 시설정보 수질 리스트 데이터 호출(모달-수질TMS)
-const fetchFacilityWaterQltyTmsList = async (facilityCd: string|undefined) => {
+const fetchFacilityWaterQltyTmsList = async (facilityCd: string | undefined) => {
try {
const res = await getFetch('wr', '/il/getTms/' + facilityCd);
return { data: res.data, count: res.count };
@@ -306,7 +306,7 @@ const fetchFacilityWaterQltyTmsList = async (facilityCd: string|undefined) => {
};
// 시설정보 수질 리스트 데이터 호출(모달-이력)
-export const fetchFacilityWaterQltyListHist = async (searchYear: string|undefined, facilityCd: string|undefined): Promise => {
+export const fetchFacilityWaterQltyListHist = async (searchYear: string | undefined, facilityCd: string | undefined): Promise => {
try {//
const res = await getFetch('fo', '/fclt/qlty/hist/' + searchYear + '/' + facilityCd);
return res;
@@ -316,9 +316,9 @@ export const fetchFacilityWaterQltyListHist = async (searchYear: string|undefine
}
};
// 시설정보 RDII 상세 [{BOD - inflAssctBfrWqltBod, 유입유량 inflAmnt, 강우량 infoRnDay, 측정일 msrDt}]
-export const fetchFacilityRdiiDetailList = async (searchYear: string|undefined, swtrmtFcltCdList: string[]): Promise => {
+export const fetchFacilityRdiiDetailList = async (searchYear: string | undefined, swtrmtFcltCdList: string[]): Promise => {
try {
- const res = await postFetch('fo', '/rdii/detail/'+searchYear, swtrmtFcltCdList);
+ const res = await postFetch('fo', '/rdii/detail/' + searchYear, swtrmtFcltCdList);
return res;
} catch (error) {
console.error('시설정보 RDII 상세 데이터를 가져오는데 실패했습니다:', error);
@@ -345,7 +345,7 @@ export type FacilityWaterQltyType = {
FacilityWaterQltyModal: {
// 처리시설 수질현황
upHeadListModalYear: TableUpperProps[];
- upHeadListModalYearCod : TableUpperProps[];
+ upHeadListModalYearCod: TableUpperProps[];
facilityWaterQltyYearList: FacilityWaterQltyProps[];
upHeadListModalTms: TableUpperProps[];
facilityWaterQltyTmsList: FacilityWaterQltyTmsProps[];
@@ -432,7 +432,8 @@ const dataFormSetting = (item: FacilityWaterQltyProps) => {
export type FacilityWaterQltyStore = FacilityWaterQltyType & FacilityWaterQltyActions;
-export const facilityWaterQltyReducer = (set: (fn: (state: FacilityWaterQltyType) => FacilityWaterQltyType) => void): FacilityWaterQltyActions => {
+type SetFunc = (fn: (state: FacilityWaterQltyType) => FacilityWaterQltyType) => void;
+export const facilityWaterQltyReducer = (set: SetFunc): FacilityWaterQltyActions => {
return {
// 메인페이지
/**
@@ -446,7 +447,9 @@ export const facilityWaterQltyReducer = (set: (fn: (state: FacilityWaterQltyType
* @param operationValue : 운영상태코드
* @param fcltyNm : 시설명
*/
- searchFacilityWaterQltyList: async (pageNo: number, pageSize: number, searchYear: string, part?: string, nameCd?: string, fcltCpct?: string, operationValue?: string, fcltyNm?: string) => {
+ searchFacilityWaterQltyList: async (pageNo: number, pageSize: number, searchYear: string, part?: string
+ , nameCd?: string, fcltCpct?: string, operationValue?: string, fcltyNm?: string) => {
+
set((state: FacilityWaterQltyType) => ({
...state,
FacilityWaterQltyMain: {
@@ -457,53 +460,53 @@ export const facilityWaterQltyReducer = (set: (fn: (state: FacilityWaterQltyType
const res = await fetchFacilityWaterQltyList(pageNo, pageSize, searchYear, part, nameCd, fcltCpct, operationValue, fcltyNm);
const rtnData = res.data.map(item => {
dataFormSetting(item)
- if(item.inflAssctBfrWqltTn) {
- item.inflAssctBfrWqltTn = Number(Math.round(Number(item.inflAssctBfrWqltTn) * 1000)/1000).toFixed(3);
+ if (item.inflAssctBfrWqltTn) {
+ item.inflAssctBfrWqltTn = Number(Math.round(Number(item.inflAssctBfrWqltTn) * 1000) / 1000).toFixed(3);
}
- if(item.efflWqltTn){
- item.efflWqltTn = Number(Math.round(Number(item.efflWqltTn) * 1000)/1000).toFixed(3);
+ if (item.efflWqltTn) {
+ item.efflWqltTn = Number(Math.round(Number(item.efflWqltTn) * 1000) / 1000).toFixed(3);
}
- if(item.inflAssctBfrWqltTp){
- item.inflAssctBfrWqltTp = Number(Math.round(Number(item.inflAssctBfrWqltTp) * 1000)/1000).toFixed(3);
+ if (item.inflAssctBfrWqltTp) {
+ item.inflAssctBfrWqltTp = Number(Math.round(Number(item.inflAssctBfrWqltTp) * 1000) / 1000).toFixed(3);
}
- if(item.efflWqltTp){
- item.efflWqltTp = Number(Math.round(Number(item.efflWqltTp) * 1000)/1000).toFixed(3);
+ if (item.efflWqltTp) {
+ item.efflWqltTp = Number(Math.round(Number(item.efflWqltTp) * 1000) / 1000).toFixed(3);
}
- if(item.inflAssctBfrWqltToc){
- item.inflAssctBfrWqltToc = Number(Math.round(Number(item.inflAssctBfrWqltToc) * 10)/10).toFixed(1);
+ if (item.inflAssctBfrWqltToc) {
+ item.inflAssctBfrWqltToc = Number(Math.round(Number(item.inflAssctBfrWqltToc) * 10) / 10).toFixed(1);
}
- if(item.efflWqltToc){
- item.efflWqltToc = Number(Math.round(Number(item.efflWqltToc) * 10)/10).toFixed(1);
+ if (item.efflWqltToc) {
+ item.efflWqltToc = Number(Math.round(Number(item.efflWqltToc) * 10) / 10).toFixed(1);
}
- if(item.inflAssctBfrWqltBod){
- item.inflAssctBfrWqltBod = Number(Math.round(Number(item.inflAssctBfrWqltBod) * 10)/10).toFixed(1);
+ if (item.inflAssctBfrWqltBod) {
+ item.inflAssctBfrWqltBod = Number(Math.round(Number(item.inflAssctBfrWqltBod) * 10) / 10).toFixed(1);
}
- if(item.efflWqltBod){
- item.efflWqltBod = Number(Math.round(Number(item.efflWqltBod) * 10)/10).toFixed(1);
+ if (item.efflWqltBod) {
+ item.efflWqltBod = Number(Math.round(Number(item.efflWqltBod) * 10) / 10).toFixed(1);
}
- if(item.inflAssctBfrWqltSs){
- item.inflAssctBfrWqltSs = Number(Math.round(Number(item.inflAssctBfrWqltSs) * 10)/10).toFixed(1);
+ if (item.inflAssctBfrWqltSs) {
+ item.inflAssctBfrWqltSs = Number(Math.round(Number(item.inflAssctBfrWqltSs) * 10) / 10).toFixed(1);
}
- if(item.efflWqltSs){
- item.efflWqltSs = Number(Math.round(Number(item.efflWqltSs) * 10)/10).toFixed(1);
+ if (item.efflWqltSs) {
+ item.efflWqltSs = Number(Math.round(Number(item.efflWqltSs) * 10) / 10).toFixed(1);
}
- if(item.inflAssctBfrWqltToc){
- item.inflAssctBfrWqltToc = Number(Math.round(Number(item.inflAssctBfrWqltToc) * 10)/10).toFixed(1);
+ if (item.inflAssctBfrWqltToc) {
+ item.inflAssctBfrWqltToc = Number(Math.round(Number(item.inflAssctBfrWqltToc) * 10) / 10).toFixed(1);
}
- if(item.efflWqltToc){
- item.efflWqltToc = Number(Math.round(Number(item.efflWqltToc) * 10)/10).toFixed(1);
+ if (item.efflWqltToc) {
+ item.efflWqltToc = Number(Math.round(Number(item.efflWqltToc) * 10) / 10).toFixed(1);
}
return item;
});
const excelDownList: ExcelType[] = [];
- if(pageSize>5000){
+ if (pageSize > 5000) {
res.data.forEach(item => {
dataFormSetting(item)
item.fctCpc = parseFloat(item.fctCpc.toString().replace(/,/g, ''));
item.sidoNm = item.lclgvrnmntNm.split(' ')[0]?.toString() || '';
item.sggNm = item.lclgvrnmntNm.split(' ')[1]?.toString() || '';
- item.inflAssctBfrWqltToc = Number(searchYear) {
dataFormSetting(item)
item.fctCpc = parseFloat(item.fctCpc.toString().replace(/,/g, ''));
item.sidoNm = item.lclgvrnmntNm.split(' ')[0]?.toString() || '';
item.sggNm = item.lclgvrnmntNm.split(' ')[1]?.toString() || '';
- item.inflAssctBfrWqltToc = Number(searchYear) ({
...state,
- FacilityWaterQltyMain: pageSize<5000?{
+ FacilityWaterQltyMain: pageSize < 5000 ? {
...state.FacilityWaterQltyMain,
facilityWaterQltyList: rtnData,
facilityWaterQltyCount: res.count,
- isLoading : false,
- }:{
+ isLoading: false,
+ } : {
...state.FacilityWaterQltyMain,
excelList: excelDownList,
- isLoading : false,
+ isLoading: false,
},
}))
},
@@ -555,10 +558,10 @@ export const facilityWaterQltyReducer = (set: (fn: (state: FacilityWaterQltyType
searchFacilityWaterQltyListHist: async (searchYear: string, facilityCd: string) => {
const res = await fetchFacilityWaterQltyListHist(searchYear, facilityCd);
const res1 = await fetchFacilityWaterQltyTmsList(facilityCd);
-
+
let rtnMsrmtDate = '';
const rtnTmsList: FacilityWaterQltyTmsProps[] = [];
- if(res1.data){
+ if (res1.data) {
rtnTmsList.push({
part: '평균',
toc: res1.data.tocAvgVl,
@@ -566,7 +569,6 @@ export const facilityWaterQltyReducer = (set: (fn: (state: FacilityWaterQltyType
tn: res1.data.tnAvgVl,
tp: res1.data.tpAvgVl,
});
-
rtnTmsList.push({
part: '최대',
toc: res1.data.tocMaxVl,
@@ -574,7 +576,6 @@ export const facilityWaterQltyReducer = (set: (fn: (state: FacilityWaterQltyType
tn: res1.data.tnMaxVl,
tp: res1.data.tpMaxVl,
});
-
rtnTmsList.push({
part: '최소',
toc: res1.data.tocMinVl,
@@ -584,42 +585,21 @@ export const facilityWaterQltyReducer = (set: (fn: (state: FacilityWaterQltyType
});
rtnMsrmtDate = res1.data.msrmtDate;
- }else{
- rtnTmsList.push({
- part: '평균',
- toc: 0,
- ss: 0,
- tn: 0,
- tp: 0,
- });
-
- rtnTmsList.push({
- part: '최대',
- toc: 0,
- ss: 0,
- tn: 0,
- tp: 0,
- });
-
- rtnTmsList.push({
- part: '최소',
- toc: 0,
- ss: 0,
- tn: 0,
- tp: 0,
- });
-
+ } else {
+ rtnTmsList.push({ part: '평균', toc: 0, ss: 0, tn: 0, tp: 0, });
+ rtnTmsList.push({ part: '최대', toc: 0, ss: 0, tn: 0, tp: 0, });
+ rtnTmsList.push({ part: '최소', toc: 0, ss: 0, tn: 0, tp: 0, });
rtnMsrmtDate = '';
}
-
- if(Array.isArray(res) || !res || !('data' in res) || !res.data || !res.data.wqltObjs || res.data.wqltObjs.length === 0) {
+
+ if (Array.isArray(res) || !res || !('data' in res) || !res.data || !res.data.wqltObjs || res.data.wqltObjs.length === 0) {
set((state: FacilityWaterQltyType) => ({
...state,
FacilityWaterQltyModal: {
...state.FacilityWaterQltyModal,
facilityWaterQltyYearList: [],
- tmsList : rtnTmsList,
- msrmtDate : rtnMsrmtDate
+ tmsList: rtnTmsList,
+ msrmtDate: rtnMsrmtDate
}
}))
return;
@@ -627,19 +607,17 @@ export const facilityWaterQltyReducer = (set: (fn: (state: FacilityWaterQltyType
// facilityPrecipitation의 rainEffectDay 계산 로직을 적용
const data = CalcRainEffect(res.data.wqltObjs);
-
+
/**
* [(강우시 일별유입유량*강우시 일별유입BOD)-(청천시 연평균유입유량*청천시 연평균유입BOD)]
/강우시 일별유입BOD)
*/
- //let rainInflAmnt = 0;
let sunnyInflAmnt = 0;
let sunnyBod = 0;
- //let rainDay = 0;
let sunnyDay = 0;
data.forEach(item => {
- if(item.rainEffectDay == 1){
+ if (item.rainEffectDay == 1) {
//rainDay += 1;
//rainInflAmnt += Number(item.inflAmnt);
} else {
@@ -650,69 +628,69 @@ export const facilityWaterQltyReducer = (set: (fn: (state: FacilityWaterQltyType
});
//const yearRainAmnt = rainInflAmnt===0?0:rainInflAmnt / rainDay;
- const yearSunnyAmnt = sunnyInflAmnt===0?0:sunnyInflAmnt / sunnyDay;
- const yearSunnyBod = sunnyBod===0?0:sunnyBod / sunnyDay;
+ const yearSunnyAmnt = sunnyInflAmnt === 0 ? 0 : sunnyInflAmnt / sunnyDay;
+ const yearSunnyBod = sunnyBod === 0 ? 0 : sunnyBod / sunnyDay;
//
const rtnData = data.map((item: FacilityWaterQltyProps) => {
dataFormSetting(item)
- if(item.inflAssctBfrWqltTn) {
- item.inflAssctBfrWqltTn = Number(Math.round(Number(item.inflAssctBfrWqltTn) * 1000)/1000).toFixed(3);
+ if (item.inflAssctBfrWqltTn) {
+ item.inflAssctBfrWqltTn = Number(Math.round(Number(item.inflAssctBfrWqltTn) * 1000) / 1000).toFixed(3);
}
- if(item.efflWqltTn){
- item.efflWqltTn = Number(Math.round(Number(item.efflWqltTn) * 1000)/1000).toFixed(3);
+ if (item.efflWqltTn) {
+ item.efflWqltTn = Number(Math.round(Number(item.efflWqltTn) * 1000) / 1000).toFixed(3);
}
- if(item.inflAssctBfrWqltTp){
- item.inflAssctBfrWqltTp = Number(Math.round(Number(item.inflAssctBfrWqltTp) * 1000)/1000).toFixed(3);
+ if (item.inflAssctBfrWqltTp) {
+ item.inflAssctBfrWqltTp = Number(Math.round(Number(item.inflAssctBfrWqltTp) * 1000) / 1000).toFixed(3);
}
- if(item.efflWqltTp){
- item.efflWqltTp = Number(Math.round(Number(item.efflWqltTp) * 1000)/1000).toFixed(3);
+ if (item.efflWqltTp) {
+ item.efflWqltTp = Number(Math.round(Number(item.efflWqltTp) * 1000) / 1000).toFixed(3);
}
- if(item.inflAssctBfrWqltToc){
- item.inflAssctBfrWqltToc = Number(Math.round(Number(item.inflAssctBfrWqltToc) * 10)/10).toFixed(1);
+ if (item.inflAssctBfrWqltToc) {
+ item.inflAssctBfrWqltToc = Number(Math.round(Number(item.inflAssctBfrWqltToc) * 10) / 10).toFixed(1);
}
- if(item.efflWqltToc){
- item.efflWqltToc = Number(Math.round(Number(item.efflWqltToc) * 10)/10).toFixed(1);
+ if (item.efflWqltToc) {
+ item.efflWqltToc = Number(Math.round(Number(item.efflWqltToc) * 10) / 10).toFixed(1);
}
- if(item.inflAssctBfrWqltCod){
- item.inflAssctBfrWqltCod = "("+Number(Math.round(Number(item.inflAssctBfrWqltCod) * 10)/10).toFixed(1)+")";
+ if (item.inflAssctBfrWqltCod) {
+ item.inflAssctBfrWqltCod = "(" + Number(Math.round(Number(item.inflAssctBfrWqltCod) * 10) / 10).toFixed(1) + ")";
}
- if(item.efflWqltCod){
- item.efflWqltCod = "("+Number(Math.round(Number(item.efflWqltCod) * 10)/10).toFixed(1)+")";
+ if (item.efflWqltCod) {
+ item.efflWqltCod = "(" + Number(Math.round(Number(item.efflWqltCod) * 10) / 10).toFixed(1) + ")";
}
- if(item.inflAssctBfrWqltBod){
- item.inflAssctBfrWqltBod = Number(Math.round(Number(item.inflAssctBfrWqltBod) * 10)/10).toFixed(1);
+ if (item.inflAssctBfrWqltBod) {
+ item.inflAssctBfrWqltBod = Number(Math.round(Number(item.inflAssctBfrWqltBod) * 10) / 10).toFixed(1);
}
- if(item.efflWqltBod){
- item.efflWqltBod = Number(Math.round(Number(item.efflWqltBod) * 10)/10).toFixed(1);
+ if (item.efflWqltBod) {
+ item.efflWqltBod = Number(Math.round(Number(item.efflWqltBod) * 10) / 10).toFixed(1);
}
- if(item.inflAssctBfrWqltSs){
- item.inflAssctBfrWqltSs = Number(Math.round(Number(item.inflAssctBfrWqltSs) * 10)/10).toFixed(1);
+ if (item.inflAssctBfrWqltSs) {
+ item.inflAssctBfrWqltSs = Number(Math.round(Number(item.inflAssctBfrWqltSs) * 10) / 10).toFixed(1);
}
- if(item.efflWqltSs){
- item.efflWqltSs = Number(Math.round(Number(item.efflWqltSs) * 10)/10).toFixed(1);
+ if (item.efflWqltSs) {
+ item.efflWqltSs = Number(Math.round(Number(item.efflWqltSs) * 10) / 10).toFixed(1);
}
- if(item.inflAssctBfrWqltToc){
- item.inflAssctBfrWqltToc = Number(Math.round(Number(item.inflAssctBfrWqltToc) * 10)/10).toFixed(1);
+ if (item.inflAssctBfrWqltToc) {
+ item.inflAssctBfrWqltToc = Number(Math.round(Number(item.inflAssctBfrWqltToc) * 10) / 10).toFixed(1);
}
- if(item.efflWqltToc){
- item.efflWqltToc = Number(Math.round(Number(item.efflWqltToc) * 10)/10).toFixed(1);
+ if (item.efflWqltToc) {
+ item.efflWqltToc = Number(Math.round(Number(item.efflWqltToc) * 10) / 10).toFixed(1);
}
- if(item.tpInflWqltBod){
- item.tpInflWqltBod = item.tpInflWqltBod?Number(Math.round(Number(item.tpInflWqltBod) * 10)/10).toFixed(1):Number(item.tpInflWqltBod)===0?'0.0':'';
- }else{
+ if (item.tpInflWqltBod) { // 총인 유입수질 BOD(mg/L)
+ item.tpInflWqltBod = item.tpInflWqltBod ? Number(Math.round(Number(item.tpInflWqltBod) * 10) / 10).toFixed(1) : Number(item.tpInflWqltBod) === 0 ? '0.0' : '';
+ } else {
item.tpInflWqltBod = '';
}
- if(item.tpInflWqltTp){
- item.tpInflWqltTp = item.tpInflWqltTp?Number(Math.round(Number(item.tpInflWqltTp) * 1000)/1000).toFixed(3): Number(item.tpInflWqltTp)===0?'0.000':'';
- }else{
+ if (item.tpInflWqltTp) { // 총인 유입수질 TP(mg/L)
+ item.tpInflWqltTp = item.tpInflWqltTp ? Number(Math.round(Number(item.tpInflWqltTp) * 1000) / 1000).toFixed(3) : Number(item.tpInflWqltTp) === 0 ? '0.000' : '';
+ } else {
item.tpInflWqltTp = '';
}
const dayBod = Number(item.inflAssctBfrWqltBod);
const noProcessInflAmnt = roundNumber(((Number(item.inflAmnt) * dayBod) - (yearSunnyAmnt * yearSunnyBod)) / dayBod, 0)
- item.noProcessInflAmnt = noProcessInflAmnt && Number(noProcessInflAmnt.replaceAll(',','')) > 0 ? noProcessInflAmnt : '';
+ item.noProcessInflAmnt = noProcessInflAmnt && Number(noProcessInflAmnt.replaceAll(',', '')) > 0 ? noProcessInflAmnt : '';
return item;
})
@@ -721,8 +699,8 @@ export const facilityWaterQltyReducer = (set: (fn: (state: FacilityWaterQltyType
FacilityWaterQltyModal: {
...state.FacilityWaterQltyModal,
facilityWaterQltyYearList: rtnData,
- tmsList : rtnTmsList,
- msrmtDate : rtnMsrmtDate
+ tmsList: rtnTmsList,
+ msrmtDate: rtnMsrmtDate
}
}))
},
diff --git a/apps/fo/app/store/processArea/index.tsx b/apps/fo/app/store/processArea/index.tsx
index 959b83794..31da21bfc 100644
--- a/apps/fo/app/store/processArea/index.tsx
+++ b/apps/fo/app/store/processArea/index.tsx
@@ -12,52 +12,52 @@ export type { TableUpperProps };
*/
// 처리구역 리스트
export type ProcessAreaProps = {
- swtrmtFcltCd : string,
+ swtrmtFcltCd: string,
ctpvNm?: string,
sggNm?: string,
- swtrmtFcltNm : string,
- location : string,
- fctCpc : number | '',
- fcltCpctSum : number | '',
- ruse : boolean,
- planYrDt4 : string,
- planYr : string,
- planYrDc1 : string,
- planYrDc2 : string,
- planYrDc3 : string,
- planYrDc4 : string,
+ swtrmtFcltNm: string,
+ location: string,
+ fctCpc: number | '',
+ fcltCpctSum: number | '',
+ ruse: boolean,
+ planYrDt4: string,
+ planYr: string,
+ planYrDc1: string,
+ planYrDc2: string,
+ planYrDc3: string,
+ planYrDc4: string,
/**
* 증설계획
*/
// 기승인(당초4단계), 현재, 변경1~4
- planSwageQntSumDt4 : number | '',
- planSwageQntSum : number | '',
- planSwageQntSumDc1 : number | '',
- planSwageQntSumDc2 : number | '',
- planSwageQntSumDc3 : number | '',
- planSwageQntSumDc4 : number | '',
+ planSwageQntSumDt4: number | '',
+ planSwageQntSum: number | '',
+ planSwageQntSumDc1: number | '',
+ planSwageQntSumDc2: number | '',
+ planSwageQntSumDc3: number | '',
+ planSwageQntSumDc4: number | '',
/**
* 처리인구
*/
// 기승인(당초4단계), 변경1~4
- swtrmtPpltnCntDt4 : number | '',
- swtrmtPpltnCnt : number | '',
- swtrmtPpltnCntDc1 : number | '',
- swtrmtPpltnCntDc2 : number | '',
- swtrmtPpltnCntDc3 : number | '',
- swtrmtPpltnCntDc4 : number | '',
+ swtrmtPpltnCntDt4: number | '',
+ swtrmtPpltnCnt: number | '',
+ swtrmtPpltnCntDc1: number | '',
+ swtrmtPpltnCntDc2: number | '',
+ swtrmtPpltnCntDc3: number | '',
+ swtrmtPpltnCntDc4: number | '',
/**
* 처리구역면적
*/
// 기승인(당초4단계), 변경1~4
- swtrmtZoneAreaDt4 : number | '',
- swtrmtZoneArea : number | '',
- swtrmtZoneAreaDc1 : number | '',
- swtrmtZoneAreaDc2 : number | '',
- swtrmtZoneAreaDc3 : number | '',
- swtrmtZoneAreaDc4 : number | '',
+ swtrmtZoneAreaDt4: number | '',
+ swtrmtZoneArea: number | '',
+ swtrmtZoneAreaDc1: number | '',
+ swtrmtZoneAreaDc2: number | '',
+ swtrmtZoneAreaDc3: number | '',
+ swtrmtZoneAreaDc4: number | '',
// 처리구역
- trtDstr : string | '',
+ trtDstr: string | '',
}
export interface ExcelType {
@@ -89,32 +89,32 @@ export interface ExcelType {
// (2) 처리구역 팝업
// 시설증설 계획
export type FcltyImproveInfoProps = {
- planSwageQntSumDt4 : number | '',
- planSwageQntSum : number | '',
- planSwageQntSumDc1 : number | '',
- planSwageQntSumDc2 : number | '',
- planSwageQntSumDc3 : number | '',
- planSwageQntSumDc4 : number | '',
+ planSwageQntSumDt4: number | '',
+ planSwageQntSum: number | '',
+ planSwageQntSumDc1: number | '',
+ planSwageQntSumDc2: number | '',
+ planSwageQntSumDc3: number | '',
+ planSwageQntSumDc4: number | '',
}
// 처리인구 계획
export type ProcessPopulationProps = {
- swtrmtPpltnCntDt4 : number | '',
- swtrmtPpltnCnt : number | '',
- swtrmtPpltnCntDc1 : number | '',
- swtrmtPpltnCntDc2 : number | '',
- swtrmtPpltnCntDc3 : number | '',
- swtrmtPpltnCntDc4 : number | '',
+ swtrmtPpltnCntDt4: number | '',
+ swtrmtPpltnCnt: number | '',
+ swtrmtPpltnCntDc1: number | '',
+ swtrmtPpltnCntDc2: number | '',
+ swtrmtPpltnCntDc3: number | '',
+ swtrmtPpltnCntDc4: number | '',
}
// 처리구역 계획
export type ProcessAreaPlanProps = {
- swtrmtZoneAreaDt4 : number | '',
- swtrmtZoneArea : number | '',
- swtrmtZoneAreaDc1 : number | '',
- swtrmtZoneAreaDc2 : number | '',
- swtrmtZoneAreaDc3 : number | '',
- swtrmtZoneAreaDc4 : number | '',
- trtDstr : string,
+ swtrmtZoneAreaDt4: number | '',
+ swtrmtZoneArea: number | '',
+ swtrmtZoneAreaDc1: number | '',
+ swtrmtZoneAreaDc2: number | '',
+ swtrmtZoneAreaDc3: number | '',
+ swtrmtZoneAreaDc4: number | '',
+ trtDstr: string,
}
/**====================================
@@ -123,93 +123,93 @@ export type ProcessAreaPlanProps = {
/**
* (1) 메인페이지
- */
+ */
// 검색단
-const ProcessFacilityLabelArray:string[] = ['구분', '시도', '시군구','용량별', '시설명', '시설상태', '연도별', '권역', '단위유역', '중권역', '환경청별'];
+const ProcessFacilityLabelArray: string[] = ['구분', '시도', '시군구', '용량별', '시설명', '시설상태', '연도별', '권역', '단위유역', '중권역', '환경청별'];
// 리스트 헤더(행정별)
-const upHeadList1:TableUpperProps[] = [
- { id: "A", title: "행정구역", colSpan:2, rowSpan:2, row:0 },
- { id: "ctpvNm", title: "시도", upName:"upChangeRe", row:2, widthPercent:4 },
- { id: "sggNm", title: "시군구", upName:"upChangeRe", row:2, widthPercent:4 },
- { id: "swtrmtFcltNm", title: "시설명", rowSpan:3, row:0, widthPercent: 6 },
- { id: "location", title: "주소", rowSpan:3, row:0, widthPercent: 12 },
- { id: "fctCpc", title: "시설용량(m³/일)", align:"right", rowSpan:3, row:0, widthPercent: 5 },
- { id: "B", title: "시설계획", colSpan:19, row: 0 },
- { id: "C", title: "증설계획(m³/일)", colSpan:6, row: 1 },
- { id: "planSwageQntSumDt4", title: "기승인\n4단계", row:2, align:"right", widthPercent: 3.5 },
- { id: "planSwageQntSum", title: "현재", row:2, align:"right", widthPercent: 3.5 },
- { id: "planSwageQntSumDc1", title: "1단계", row:2, align:"right", widthPercent: 3.5 },
- { id: "planSwageQntSumDc2", title: "2단계", row:2, align:"right", widthPercent: 3.5 },
- { id: "planSwageQntSumDc3", title: "3단계", row:2, align:"right", widthPercent: 3.5 },
- { id: "planSwageQntSumDc4", title: "4단계", row:2, align:"right", widthPercent: 3.5 },
- { id: "D", title: "처리인구(인)", colSpan:6, row:1 },
- { id: "swtrmtPpltnCntDt4", title: "기승인\n4단계", row:2, align:"right", widthPercent: 3.5 },
- { id: "swtrmtPpltnCnt", title: "현재", row:2, align:"right", widthPercent: 3.5 },
- { id: "swtrmtPpltnCntDc1", title: "1단계", row:2, align:"right", widthPercent: 3.5 },
- { id: "swtrmtPpltnCntDc2", title: "2단계", row:2, align:"right", widthPercent: 3.5 },
- { id: "swtrmtPpltnCntDc3", title: "3단계", row:2, align:"right", widthPercent: 3.5 },
- { id: "swtrmtPpltnCntDc4", title: "4단계", row:2, align:"right", widthPercent: 3.5 },
- { id: "E", title: "처리구역(km²)", colSpan:7, row:1 },
- { id: "swtrmtZoneAreaDt4", title: "기승인\n4단계", row:2, align:"right", widthPercent: 3.5 },
- { id: "swtrmtZoneArea", title: "현재", row:2, align:"right", widthPercent: 3.5 },
- { id: "swtrmtZoneAreaDc1", title: "1단계", row:2, align:"right", widthPercent: 3.5 },
- { id: "swtrmtZoneAreaDc2", title: "2단계", row:2, align:"right", widthPercent: 3.5 },
- { id: "swtrmtZoneAreaDc3", title: "3단계", row:2, align:"right", widthPercent: 3.5 },
- { id: "swtrmtZoneAreaDc4", title: "4단계", row:2, align:"right", widthPercent: 3.5 },
- { id: "trtDstr", title: "처리구역", row:2}
+const upHeadList1: TableUpperProps[] = [
+ { id: "A", title: "행정구역", colSpan: 2, rowSpan: 2, row: 0 },
+ { id: "ctpvNm", title: "시도", upName: "upChangeRe", row: 2, widthPercent: 4 },
+ { id: "sggNm", title: "시군구", upName: "upChangeRe", row: 2, widthPercent: 4 },
+ { id: "swtrmtFcltNm", title: "시설명", rowSpan: 3, row: 0, widthPercent: 6 },
+ { id: "location", title: "주소", rowSpan: 3, row: 0, widthPercent: 12 },
+ { id: "fctCpc", title: "시설용량(m³/일)", align: "right", rowSpan: 3, row: 0, widthPercent: 5 },
+ { id: "B", title: "시설계획", colSpan: 18, row: 0 },
+ { id: "C", title: "증설계획(m³/일)", colSpan: 6, row: 1 },
+ { id: "planSwageQntSumDt4", title: "기승인\n4단계", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "planSwageQntSum", title: "현재", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "planSwageQntSumDc1", title: "1단계", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "planSwageQntSumDc2", title: "2단계", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "planSwageQntSumDc3", title: "3단계", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "planSwageQntSumDc4", title: "4단계", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "D", title: "처리인구(인)", colSpan: 6, row: 1 },
+ { id: "swtrmtPpltnCntDt4", title: "기승인\n4단계", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "swtrmtPpltnCnt", title: "현재", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "swtrmtPpltnCntDc1", title: "1단계", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "swtrmtPpltnCntDc2", title: "2단계", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "swtrmtPpltnCntDc3", title: "3단계", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "swtrmtPpltnCntDc4", title: "4단계", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "E", title: "처리구역(km²)", colSpan: 6, row: 1 },
+ { id: "swtrmtZoneAreaDt4", title: "기승인\n4단계", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "swtrmtZoneArea", title: "현재", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "swtrmtZoneAreaDc1", title: "1단계", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "swtrmtZoneAreaDc2", title: "2단계", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "swtrmtZoneAreaDc3", title: "3단계", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "swtrmtZoneAreaDc4", title: "4단계", row: 2, align: "right", widthPercent: 3.5 },
+ { id: "trtDstr", title: "처리구역", row: 0, rowSpan: 3 } // row - header에서 몇번째 행인지
];
-const processAreaList:ProcessAreaProps[] = [
+const processAreaList: ProcessAreaProps[] = [
]
/**
* 처리구역정보 상세팝업
- */
+ */
// 시설증설 계획 (헤더)
-const upHeadListFcltyImproveInfo:TableUpperProps[] = [
- { id: "planSwageQntSumDt4", title: "기승인\n4단계(m³/일)", rowSpan:2, row:0, align:"right"},
- { id: "A", title: "증설계획(m³/일)", colSpan:5, row:0},
- { id: "planSwageQntSum", title: "현재", row:1, align:"right"},
- { id: "planSwageQntSumDc1", title: "1단계", row:1, align:"right"},
- { id: "planSwageQntSumDc2", title: "2단계", row:1, align:"right"},
- { id: "planSwageQntSumDc3", title: "3단계", row:1, align:"right"},
- { id: "planSwageQntSumDc4", title: "4단계", row:1, align:"right"},
+const upHeadListFcltyImproveInfo: TableUpperProps[] = [
+ { id: "planSwageQntSumDt4", title: "기승인\n4단계(m³/일)", rowSpan: 2, row: 0, align: "right" },
+ { id: "A", title: "증설계획(m³/일)", colSpan: 5, row: 0 },
+ { id: "planSwageQntSum", title: "현재", row: 1, align: "right" },
+ { id: "planSwageQntSumDc1", title: "1단계", row: 1, align: "right" },
+ { id: "planSwageQntSumDc2", title: "2단계", row: 1, align: "right" },
+ { id: "planSwageQntSumDc3", title: "3단계", row: 1, align: "right" },
+ { id: "planSwageQntSumDc4", title: "4단계", row: 1, align: "right" },
];
// 시설증설 계획 (리스트)
-const gridListFcltyImproveInfo:FcltyImproveInfoProps[] = [
+const gridListFcltyImproveInfo: FcltyImproveInfoProps[] = [
];
// 처리인구 계획 (헤더)
-const upHeadListProcessPopulation:TableUpperProps[] = [
- { id: "swtrmtPpltnCntDt4", title: "기승인\n4단계(인)", rowSpan:2, row:0, align:"right"},
- { id: "A", title: "처리인구(인)", colSpan:5, row:0},
- { id: "swtrmtPpltnCnt", title: "현재", row:1, align:"right"},
- { id: "swtrmtPpltnCntDc1", title: "1단계", row:1, align:"right"},
- { id: "swtrmtPpltnCntDc2", title: "2단계", row:1, align:"right"},
- { id: "swtrmtPpltnCntDc3", title: "3단계", row:1, align:"right"},
- { id: "swtrmtPpltnCntDc4", title: "4단계", row:1, align:"right"},
+const upHeadListProcessPopulation: TableUpperProps[] = [
+ { id: "swtrmtPpltnCntDt4", title: "기승인\n4단계(인)", rowSpan: 2, row: 0, align: "right" },
+ { id: "A", title: "처리인구(인)", colSpan: 5, row: 0 },
+ { id: "swtrmtPpltnCnt", title: "현재", row: 1, align: "right" },
+ { id: "swtrmtPpltnCntDc1", title: "1단계", row: 1, align: "right" },
+ { id: "swtrmtPpltnCntDc2", title: "2단계", row: 1, align: "right" },
+ { id: "swtrmtPpltnCntDc3", title: "3단계", row: 1, align: "right" },
+ { id: "swtrmtPpltnCntDc4", title: "4단계", row: 1, align: "right" },
];
// 처리인구 계획 (리스트)
-const gridListProcessPopulation:ProcessPopulationProps[] = [
+const gridListProcessPopulation: ProcessPopulationProps[] = [
];
// 처리구역 계획 (헤더)
-const upHeadListProcessAreaPlan:TableUpperProps[] = [
- { id: "swtrmtZoneAreaDt4", title: "기승인\n4단계(km²)", rowSpan:2, row:0, align:"right"},
- { id: "A", title: "처리면적(km²)", colSpan:6, row:0, align:"right"},
- { id: "swtrmtZoneArea", title: "현재", row:1, align:"right"},
- { id: "swtrmtZoneAreaDc1", title: "1단계", row:1, align:"right"},
- { id: "swtrmtZoneAreaDc2", title: "2단계", row:1, align:"right"},
- { id: "swtrmtZoneAreaDc3", title: "3단계", row:1, align:"right"},
- { id: "swtrmtZoneAreaDc4", title: "4단계", row:1, align:"right"},
- { id: "trtDstr", title: "처리구역", row:1}
+const upHeadListProcessAreaPlan: TableUpperProps[] = [
+ { id: "swtrmtZoneAreaDt4", title: "기승인\n4단계(km²)", rowSpan: 2, row: 0, align: "right" },
+ { id: "A", title: "처리면적(km²)", colSpan: 5, row: 0, align: "right" },
+ { id: "swtrmtZoneArea", title: "현재", row: 1, align: "right" },
+ { id: "swtrmtZoneAreaDc1", title: "1단계", row: 1, align: "right" },
+ { id: "swtrmtZoneAreaDc2", title: "2단계", row: 1, align: "right" },
+ { id: "swtrmtZoneAreaDc3", title: "3단계", row: 1, align: "right" },
+ { id: "swtrmtZoneAreaDc4", title: "4단계", row: 1, align: "right" },
+ // { id: "trtDstr", title: "처리구역", row: 1 }
];
// 시설증설 계획 (리스트)
-const gridListProcessAreaPlan:ProcessAreaPlanProps[] = [
+const gridListProcessAreaPlan: ProcessAreaPlanProps[] = [
];
/**====================================
@@ -227,113 +227,115 @@ const gridListProcessAreaPlan:ProcessAreaPlanProps[] = [
}
}; */
-const fetchFacilityDetailInfo = async (pageNo:number, pageSize:number, swtrmtFcltCd: string[]) : Promise<{data:any[], count:number}> => {
- try {
- const res = await postFetch('fo', '/prcsFclt/ruseInfo/'+pageNo+'/'+pageSize, swtrmtFcltCd);
- return {data: res.data, count:res.count};
- } catch (error) {
- console.error('시설정보 데이터를 가져오는데 실패했습니다:', error);
- return {data:[], count:0};
- }
+const fetchFacilityDetailInfo = async (pageNo: number, pageSize: number, swtrmtFcltCd: string[]): Promise<{ data: any[], count: number }> => {
+ try {
+ const res = await postFetch('fo', '/prcsFclt/ruseInfo/' + pageNo + '/' + pageSize, swtrmtFcltCd);
+ return { data: res.data, count: res.count };
+ } catch (error) {
+ console.error('시설정보 데이터를 가져오는데 실패했습니다:', error);
+ return { data: [], count: 0 };
+ }
};
// 시설정보 리스트 데이터 호출(구분 선택 후 시설명 있을 경우)
-const fetchProcessAreaList = async (pageNo : number, pageSize : number, ctpvNm : string | undefined, sggNm : string | undefined, targetYear : string | undefined, set : (fn: (state: ProcessAreaType) => ProcessAreaType) => void): Promise<{data:any[], count:number}> => {
- try {
- const res = await fetchPlanInfo(targetYear, ctpvNm, sggNm, undefined);
- if(res && res.length > 0){
- const enrichedData = await Promise.all(
- res.map(async (item: ProcessAreaProps) => {
- upHeadList1.forEach((head:TableUpperProps) => {
- /* if (head.id === 'planSwageQntSum' || head.id === 'swtrmtPpltnCnt' || head.id === 'swtrmtZoneArea') {
- head.title = '현재\n(' + item.planYr + '년)';
- } else if(head.id === 'planSwageQntSumDc1' || head.id === 'swtrmtPpltnCntDc1' || head.id === 'swtrmtZoneAreaDc1') {
- head.title = '1단계\n(' + item.planYrDc1 + '년)';
- } else if(head.id === 'planSwageQntSumDc2' || head.id === 'swtrmtPpltnCntDc2' || head.id === 'swtrmtZoneAreaDc2') {
- head.title = '2단계\n(' + item.planYrDc2 + '년)';
- } else if(head.id === 'planSwageQntSumDc3' || head.id === 'swtrmtPpltnCntDc3' || head.id === 'swtrmtZoneAreaDc3') {
- head.title = '3단계\n(' + item.planYrDc3 + '년)';
- } else if(head.id === 'planSwageQntSumDc4' || head.id === 'swtrmtPpltnCntDc4' || head.id === 'swtrmtZoneAreaDc4') {
- head.title = '4단계\n(' + item.planYrDc4 + '년)';
- } else if(head.id === 'planSwageQntSumDt4' || head.id === 'swtrmtPpltnCntDt4' || head.id === 'swtrmtZoneAreaDt4') {
- head.title = '기승인\n4단계(' + item.planYrDt4 + '년)';
- } */
- if (head.id === 'planSwageQntSum' || head.id === 'swtrmtPpltnCnt' || head.id === 'swtrmtZoneArea') {
- head.title = '현재';
- } else if(head.id === 'planSwageQntSumDc1' || head.id === 'swtrmtPpltnCntDc1' || head.id === 'swtrmtZoneAreaDc1') {
- head.title = '1단계';
- } else if(head.id === 'planSwageQntSumDc2' || head.id === 'swtrmtPpltnCntDc2' || head.id === 'swtrmtZoneAreaDc2') {
- head.title = '2단계';
- } else if(head.id === 'planSwageQntSumDc3' || head.id === 'swtrmtPpltnCntDc3' || head.id === 'swtrmtZoneAreaDc3') {
- head.title = '3단계';
- } else if(head.id === 'planSwageQntSumDc4' || head.id === 'swtrmtPpltnCntDc4' || head.id === 'swtrmtZoneAreaDc4') {
- head.title = '4단계';
- } else if(head.id === 'planSwageQntSumDt4' || head.id === 'swtrmtPpltnCntDt4' || head.id === 'swtrmtZoneAreaDt4') {
- head.title = '기승인\n4단계';
- }
- });
- return item;
+const fetchProcessAreaList = async (pageNo: number, pageSize: number, ctpvNm: string | undefined, sggNm: string | undefined
+ , targetYear: string | undefined, set: (fn: (state: ProcessAreaType) => ProcessAreaType) => void): Promise<{ data: any[], count: number }> => {
+ try {
+ const res = await fetchPlanInfo(targetYear, ctpvNm, sggNm, undefined);
+ if (res && res.length > 0) {
+ const enrichedData = await Promise.all(
+ res.map(async (item: ProcessAreaProps) => {
+ upHeadList1.forEach((head: TableUpperProps) => {
+ /* if (head.id === 'planSwageQntSum' || head.id === 'swtrmtPpltnCnt' || head.id === 'swtrmtZoneArea') {
+ head.title = '현재\n(' + item.planYr + '년)';
+ } else if(head.id === 'planSwageQntSumDc1' || head.id === 'swtrmtPpltnCntDc1' || head.id === 'swtrmtZoneAreaDc1') {
+ head.title = '1단계\n(' + item.planYrDc1 + '년)';
+ } else if(head.id === 'planSwageQntSumDc2' || head.id === 'swtrmtPpltnCntDc2' || head.id === 'swtrmtZoneAreaDc2') {
+ head.title = '2단계\n(' + item.planYrDc2 + '년)';
+ } else if(head.id === 'planSwageQntSumDc3' || head.id === 'swtrmtPpltnCntDc3' || head.id === 'swtrmtZoneAreaDc3') {
+ head.title = '3단계\n(' + item.planYrDc3 + '년)';
+ } else if(head.id === 'planSwageQntSumDc4' || head.id === 'swtrmtPpltnCntDc4' || head.id === 'swtrmtZoneAreaDc4') {
+ head.title = '4단계\n(' + item.planYrDc4 + '년)';
+ } else if(head.id === 'planSwageQntSumDt4' || head.id === 'swtrmtPpltnCntDt4' || head.id === 'swtrmtZoneAreaDt4') {
+ head.title = '기승인\n4단계(' + item.planYrDt4 + '년)';
+ } */
+ if (head.id === 'planSwageQntSum' || head.id === 'swtrmtPpltnCnt' || head.id === 'swtrmtZoneArea') {
+ head.title = '현재';
+ } else if (head.id === 'planSwageQntSumDc1' || head.id === 'swtrmtPpltnCntDc1' || head.id === 'swtrmtZoneAreaDc1') {
+ head.title = '1단계';
+ } else if (head.id === 'planSwageQntSumDc2' || head.id === 'swtrmtPpltnCntDc2' || head.id === 'swtrmtZoneAreaDc2') {
+ head.title = '2단계';
+ } else if (head.id === 'planSwageQntSumDc3' || head.id === 'swtrmtPpltnCntDc3' || head.id === 'swtrmtZoneAreaDc3') {
+ head.title = '3단계';
+ } else if (head.id === 'planSwageQntSumDc4' || head.id === 'swtrmtPpltnCntDc4' || head.id === 'swtrmtZoneAreaDc4') {
+ head.title = '4단계';
+ } else if (head.id === 'planSwageQntSumDt4' || head.id === 'swtrmtPpltnCntDt4' || head.id === 'swtrmtZoneAreaDt4') {
+ head.title = '기승인\n4단계';
+ }
+ });
+ return item;
+ })
+ );
+
+ const startIndex = (pageNo - 1) * pageSize;
+ const endIndex = startIndex + pageSize;
+ const paginatedData = enrichedData.slice(startIndex, endIndex);
+
+ const fcltyCdList: string[] = [];
+ paginatedData.forEach(item => {
+ fcltyCdList.push(item.swtrmtFcltCd);
})
- );
- const startIndex = (pageNo - 1) * pageSize;
- const endIndex = startIndex + pageSize;
- const paginatedData = enrichedData.slice(startIndex, endIndex);
-
- const fcltyCdList : string[]= [];
- paginatedData.forEach(item => {
- fcltyCdList.push(item.swtrmtFcltCd);
- })
-
- const detailFcltylist = await fetchFacilityDetailInfo(1, pageSize, fcltyCdList);
- paginatedData.forEach(item => {
- const filterdData = detailFcltylist.data.filter(fItem=>fItem.bscFctCd === item.swtrmtFcltCd)[0] || null;
- item.fcltCpctSum = filterdData ? filterdData.fctCpc : '';
- item.location = filterdData ? filterdData.addr : '';
- item.ctpvNm = filterdData ? filterdData.sido : '';
- item.sggNm = filterdData ? filterdData.gugun : '';
- });
- return {data: paginatedData, count: enrichedData.length};
- }else{
- return {data: [], count: 0};
- }
- } catch (error) {
- console.error('시설계획정보를 가져오는데 실패했습니다:', error);
- set((state) => ({
- ...state,
- ProcessArea : {
- ...state.ProcessArea,
- isLoading : false
+ const detailFcltylist = await fetchFacilityDetailInfo(1, pageSize, fcltyCdList);
+ paginatedData.forEach(item => {
+ const filterdData = detailFcltylist.data.filter(fItem => fItem.bscFctCd === item.swtrmtFcltCd)[0] || null;
+ item.fcltCpctSum = filterdData ? filterdData.fctCpc : '';
+ item.location = filterdData ? filterdData.addr : '';
+ item.ctpvNm = filterdData ? filterdData.sido : '';
+ item.sggNm = filterdData ? filterdData.gugun : '';
+ item.trtDstr = filterdData ? filterdData.trtDstr : '';
+ });
+ return { data: paginatedData, count: enrichedData.length };
+ } else {
+ return { data: [], count: 0 };
}
- }));
- return {data: [], count: 0};
- }
+ } catch (error) {
+ console.error('시설계획정보를 가져오는데 실패했습니다:', error);
+ set((state) => ({
+ ...state,
+ ProcessArea: {
+ ...state.ProcessArea,
+ isLoading: false
+ }
+ }));
+ return { data: [], count: 0 };
+ }
};
/**====================================
* Store - expaort
=====================================*/
export type ProcessAreaActions = {
- searchProcessAreaList : (pageNo: number, pageSize: number, ctpvNm?:string, sggNm?:string, targetYear?:string) => void;
- initModalData : (swtrmtFcltCd:string) => void;
+ searchProcessAreaList: (pageNo: number, pageSize: number, ctpvNm?: string, sggNm?: string, targetYear?: string) => void;
+ initModalData: (swtrmtFcltCd: string) => void;
}
export type ProcessAreaType = {
ProcessAreaSearch: {
isInit: boolean;
- processFacilityLabelArray:string[];
+ processFacilityLabelArray: string[];
},
- ProcessArea : {
+ ProcessArea: {
isInit: boolean;
upHeadList1: TableUpperProps[];
processAreaList: ProcessAreaProps[];
processAreaCount: number;
excelList: ExcelType[];
isLoading: boolean;
- },
+ },
- ProcessAreaDetail : {
+ ProcessAreaDetail: {
isInit: boolean;
upHeadListFcltyImproveInfo: TableUpperProps[];
gridListFcltyImproveInfo: FcltyImproveInfoProps[]; // Changed from facilityAreaProps to ProcessAreaProps
@@ -350,23 +352,23 @@ export const processAreaInitState: ProcessAreaType = {
processFacilityLabelArray: ProcessFacilityLabelArray,
},
- ProcessArea : {
- isInit : false,
- upHeadList1 : upHeadList1,
- processAreaList : processAreaList,
- processAreaCount : 0,
- excelList : [],
- isLoading : true,
+ ProcessArea: {
+ isInit: false,
+ upHeadList1: upHeadList1,
+ processAreaList: processAreaList,
+ processAreaCount: 0,
+ excelList: [],
+ isLoading: true,
},
- ProcessAreaDetail : {
- isInit : false,
- upHeadListFcltyImproveInfo : upHeadListFcltyImproveInfo,
- gridListFcltyImproveInfo : gridListFcltyImproveInfo,
- upHeadListProcessPopulation : upHeadListProcessPopulation,
- gridListProcessPopulation : gridListProcessPopulation,
- upHeadListProcessAreaPlan : upHeadListProcessAreaPlan,
- gridListProcessAreaPlan : gridListProcessAreaPlan,
+ ProcessAreaDetail: {
+ isInit: false,
+ upHeadListFcltyImproveInfo: upHeadListFcltyImproveInfo,
+ gridListFcltyImproveInfo: gridListFcltyImproveInfo,
+ upHeadListProcessPopulation: upHeadListProcessPopulation,
+ gridListProcessPopulation: gridListProcessPopulation,
+ upHeadListProcessAreaPlan: upHeadListProcessAreaPlan,
+ gridListProcessAreaPlan: gridListProcessAreaPlan,
},
}
@@ -375,14 +377,14 @@ type SetStateFunction = (state: ProcessAreaType | ((state: ProcessAreaType) => P
export type ProcessAreaStore = ProcessAreaType & ProcessAreaActions;
-export const processAreaReducer:(set:SetStateFunction)=>ProcessAreaActions=(set: SetStateFunction) => {
+export const processAreaReducer: (set: SetStateFunction) => ProcessAreaActions = (set: SetStateFunction) => {
return {
/**
* 시설정보 리스트 데이터 호출
* @param pageNo : 페이지 번호
* @param pageSize : 페이지 크기
*/
- searchProcessAreaList: async ( pageNo:number, pageSize:number, ctpvNm?:string, sggNm?:string, targetYear?:string) => {
+ searchProcessAreaList: async (pageNo: number, pageSize: number, ctpvNm?: string, sggNm?: string, targetYear?: string) => {
set((state: ProcessAreaType) => ({
...state,
ProcessArea: {
@@ -391,12 +393,12 @@ export const processAreaReducer:(set:SetStateFunction)=>ProcessAreaActions=(set:
},
}));
const res = await fetchProcessAreaList(pageNo, pageSize, ctpvNm, sggNm, targetYear, set);
- res.data.forEach((item:ProcessAreaProps) => {
+ res.data.forEach((item: ProcessAreaProps) => {
item.fctCpc = item.fcltCpctSum;
- DataForm({ type: 'float1', column: 'fctCpc', item:item as unknown as Record});
+ DataForm({ type: 'float1', column: 'fctCpc', item: item as unknown as Record });
})
const excelDownList: ExcelType[] = [];
- if(pageSize>5000){
+ if (pageSize > 5000) {
res.data.forEach(item => {
item.fctCpc = item.fctCpc ? parseFloat(item.fctCpc.toString().replace(/,/g, '')) : '';
excelDownList.push({
@@ -425,78 +427,78 @@ export const processAreaReducer:(set:SetStateFunction)=>ProcessAreaActions=(set:
처리구역: item.trtDstr
});
});
- }else{
+ } else {
res.data.forEach(item => {
item.fctCpc = item.fctCpc ? parseFloat(item.fctCpc.toString().replace(/,/g, '')) : '';
})
}
- set((state:ProcessAreaType) => ({
+ set((state: ProcessAreaType) => ({
...state,
- ProcessArea: pageSize<5000?{
+ ProcessArea: pageSize < 5000 ? {
...state.ProcessArea,
processAreaList: res.data,
processAreaCount: res.count,
- isLoading : false,
- }:{
+ isLoading: false,
+ } : {
...state.ProcessArea,
excelList: excelDownList,
- isLoading : false,
+ isLoading: false,
},
}))
},
- initModalData: async (swtrmtFcltCd:string) => {
+ initModalData: async (swtrmtFcltCd: string) => {
set((state: ProcessAreaType) => {
const rtnData = state.ProcessArea.processAreaList.find((item: ProcessAreaProps) => item.swtrmtFcltCd === swtrmtFcltCd);
if (rtnData) {
- upHeadListFcltyImproveInfo.forEach((head:TableUpperProps) => {
- if(head.id === 'planSwageQntSum' || head.id === 'swtrmtPpltnCnt' || head.id === 'swtrmtZoneArea') {
- head.title = rtnData.planYr? '현재\n(' + rtnData.planYr + '년)':head.title = '현재';
- } else if(head.id === 'planSwageQntSumDc1' || head.id === 'swtrmtPpltnCntDc1' || head.id === 'swtrmtZoneAreaDc1') {
- head.title = rtnData.planYrDc1? '1단계\n(' + rtnData.planYrDc1 + '년)':head.title = '1단계';
- } else if(head.id === 'planSwageQntSumDc2' || head.id === 'swtrmtPpltnCntDc2' || head.id === 'swtrmtZoneAreaDc2') {
- head.title = rtnData.planYrDc2? '2단계\n(' + rtnData.planYrDc2 + '년)':head.title = '2단계';
- } else if(head.id === 'planSwageQntSumDc3' || head.id === 'swtrmtPpltnCntDc3' || head.id === 'swtrmtZoneAreaDc3') {
- head.title = rtnData.planYrDc3? '3단계\n(' + rtnData.planYrDc3 + '년)':head.title = '3단계';
- } else if(head.id === 'planSwageQntSumDc4' || head.id === 'swtrmtPpltnCntDc4' || head.id === 'swtrmtZoneAreaDc4') {
- head.title = rtnData.planYrDc4? '4단계\n(' + rtnData.planYrDc4 + '년)':head.title = '4단계';
- } else if(head.id === 'planSwageQntSumDt4' || head.id === 'swtrmtPpltnCntDt4' || head.id === 'swtrmtZoneAreaDt4') {
- head.title = rtnData.planYrDt4? '기승인\n4단계(' + rtnData.planYrDt4 + '년)':head.title = '기승인\n4단계';
+ upHeadListFcltyImproveInfo.forEach((head: TableUpperProps) => {
+ if (head.id === 'planSwageQntSum' || head.id === 'swtrmtPpltnCnt' || head.id === 'swtrmtZoneArea') {
+ head.title = rtnData.planYr ? '현재\n(' + rtnData.planYr + '년)' : head.title = '현재';
+ } else if (head.id === 'planSwageQntSumDc1' || head.id === 'swtrmtPpltnCntDc1' || head.id === 'swtrmtZoneAreaDc1') {
+ head.title = rtnData.planYrDc1 ? '1단계\n(' + rtnData.planYrDc1 + '년)' : head.title = '1단계';
+ } else if (head.id === 'planSwageQntSumDc2' || head.id === 'swtrmtPpltnCntDc2' || head.id === 'swtrmtZoneAreaDc2') {
+ head.title = rtnData.planYrDc2 ? '2단계\n(' + rtnData.planYrDc2 + '년)' : head.title = '2단계';
+ } else if (head.id === 'planSwageQntSumDc3' || head.id === 'swtrmtPpltnCntDc3' || head.id === 'swtrmtZoneAreaDc3') {
+ head.title = rtnData.planYrDc3 ? '3단계\n(' + rtnData.planYrDc3 + '년)' : head.title = '3단계';
+ } else if (head.id === 'planSwageQntSumDc4' || head.id === 'swtrmtPpltnCntDc4' || head.id === 'swtrmtZoneAreaDc4') {
+ head.title = rtnData.planYrDc4 ? '4단계\n(' + rtnData.planYrDc4 + '년)' : head.title = '4단계';
+ } else if (head.id === 'planSwageQntSumDt4' || head.id === 'swtrmtPpltnCntDt4' || head.id === 'swtrmtZoneAreaDt4') {
+ head.title = rtnData.planYrDt4 ? '기승인\n4단계(' + rtnData.planYrDt4 + '년)' : head.title = '기승인\n4단계';
}
});
- upHeadListProcessAreaPlan.forEach((head:TableUpperProps) => {
- if(head.id === 'planSwageQntSum' || head.id === 'swtrmtPpltnCnt' || head.id === 'swtrmtZoneArea') {
- head.title = rtnData.planYr? '현재\n(' + rtnData.planYr + '년)':head.title = '현재';
- } else if(head.id === 'planSwageQntSumDc1' || head.id === 'swtrmtPpltnCntDc1' || head.id === 'swtrmtZoneAreaDc1') {
- head.title = rtnData.planYrDc1?'1단계\n(' + rtnData.planYrDc1 + '년)':head.title = '1단계';
- } else if(head.id === 'planSwageQntSumDc2' || head.id === 'swtrmtPpltnCntDc2' || head.id === 'swtrmtZoneAreaDc2') {
- head.title = rtnData.planYrDc2?'2단계\n(' + rtnData.planYrDc2 + '년)':head.title = '2단계';
- } else if(head.id === 'planSwageQntSumDc3' || head.id === 'swtrmtPpltnCntDc3' || head.id === 'swtrmtZoneAreaDc3') {
- head.title = rtnData.planYrDc3? '3단계\n(' + rtnData.planYrDc3 + '년)':head.title = '3단계';
- } else if(head.id === 'planSwageQntSumDc4' || head.id === 'swtrmtPpltnCntDc4' || head.id === 'swtrmtZoneAreaDc4') {
- head.title = rtnData.planYrDc4?'4단계\n(' + rtnData.planYrDc4 + '년)':head.title = '4단계';
- } else if(head.id === 'planSwageQntSumDt4' || head.id === 'swtrmtPpltnCntDt4' || head.id === 'swtrmtZoneAreaDt4') {
- head.title = rtnData.planYrDt4?'기승인\n4단계(' + rtnData.planYrDt4 + '년)':head.title = '기승인\n4단계';
+ upHeadListProcessAreaPlan.forEach((head: TableUpperProps) => {
+ if (head.id === 'planSwageQntSum' || head.id === 'swtrmtPpltnCnt' || head.id === 'swtrmtZoneArea') {
+ head.title = rtnData.planYr ? '현재\n(' + rtnData.planYr + '년)' : head.title = '현재';
+ } else if (head.id === 'planSwageQntSumDc1' || head.id === 'swtrmtPpltnCntDc1' || head.id === 'swtrmtZoneAreaDc1') {
+ head.title = rtnData.planYrDc1 ? '1단계\n(' + rtnData.planYrDc1 + '년)' : head.title = '1단계';
+ } else if (head.id === 'planSwageQntSumDc2' || head.id === 'swtrmtPpltnCntDc2' || head.id === 'swtrmtZoneAreaDc2') {
+ head.title = rtnData.planYrDc2 ? '2단계\n(' + rtnData.planYrDc2 + '년)' : head.title = '2단계';
+ } else if (head.id === 'planSwageQntSumDc3' || head.id === 'swtrmtPpltnCntDc3' || head.id === 'swtrmtZoneAreaDc3') {
+ head.title = rtnData.planYrDc3 ? '3단계\n(' + rtnData.planYrDc3 + '년)' : head.title = '3단계';
+ } else if (head.id === 'planSwageQntSumDc4' || head.id === 'swtrmtPpltnCntDc4' || head.id === 'swtrmtZoneAreaDc4') {
+ head.title = rtnData.planYrDc4 ? '4단계\n(' + rtnData.planYrDc4 + '년)' : head.title = '4단계';
+ } else if (head.id === 'planSwageQntSumDt4' || head.id === 'swtrmtPpltnCntDt4' || head.id === 'swtrmtZoneAreaDt4') {
+ head.title = rtnData.planYrDt4 ? '기승인\n4단계(' + rtnData.planYrDt4 + '년)' : head.title = '기승인\n4단계';
}
});
- upHeadListProcessPopulation.forEach((head:TableUpperProps) => {
- if(head.id === 'planSwageQntSum' || head.id === 'swtrmtPpltnCnt' || head.id === 'swtrmtZoneArea') {
- head.title = rtnData.planYr?'현재\n(' + rtnData.planYr + '년)':head.title = '현재';
- } else if(head.id === 'planSwageQntSumDc1' || head.id === 'swtrmtPpltnCntDc1' || head.id === 'swtrmtZoneAreaDc1') {
- head.title = rtnData.planYrDc1?'1단계\n(' + rtnData.planYrDc1 + '년)':head.title = '1단계';
- } else if(head.id === 'planSwageQntSumDc2' || head.id === 'swtrmtPpltnCntDc2' || head.id === 'swtrmtZoneAreaDc2') {
- head.title = rtnData.planYrDc2?'2단계\n(' + rtnData.planYrDc2 + '년)':head.title = '2단계';
- } else if(head.id === 'planSwageQntSumDc3' || head.id === 'swtrmtPpltnCntDc3' || head.id === 'swtrmtZoneAreaDc3') {
- head.title = rtnData.planYrDc3?'3단계\n(' + rtnData.planYrDc3 + '년)':head.title = '3단계';
- } else if(head.id === 'planSwageQntSumDc4' || head.id === 'swtrmtPpltnCntDc4' || head.id === 'swtrmtZoneAreaDc4') {
- head.title = rtnData.planYrDc4?'4단계\n(' + rtnData.planYrDc4 + '년)':head.title = '4단계';
- } else if(head.id === 'planSwageQntSumDt4' || head.id === 'swtrmtPpltnCntDt4' || head.id === 'swtrmtZoneAreaDt4') {
- head.title = rtnData.planYrDt4?'기승인\n4단계(' + rtnData.planYrDt4 + '년)':head.title = '기승인\n4단계';
+ upHeadListProcessPopulation.forEach((head: TableUpperProps) => {
+ if (head.id === 'planSwageQntSum' || head.id === 'swtrmtPpltnCnt' || head.id === 'swtrmtZoneArea') {
+ head.title = rtnData.planYr ? '현재\n(' + rtnData.planYr + '년)' : head.title = '현재';
+ } else if (head.id === 'planSwageQntSumDc1' || head.id === 'swtrmtPpltnCntDc1' || head.id === 'swtrmtZoneAreaDc1') {
+ head.title = rtnData.planYrDc1 ? '1단계\n(' + rtnData.planYrDc1 + '년)' : head.title = '1단계';
+ } else if (head.id === 'planSwageQntSumDc2' || head.id === 'swtrmtPpltnCntDc2' || head.id === 'swtrmtZoneAreaDc2') {
+ head.title = rtnData.planYrDc2 ? '2단계\n(' + rtnData.planYrDc2 + '년)' : head.title = '2단계';
+ } else if (head.id === 'planSwageQntSumDc3' || head.id === 'swtrmtPpltnCntDc3' || head.id === 'swtrmtZoneAreaDc3') {
+ head.title = rtnData.planYrDc3 ? '3단계\n(' + rtnData.planYrDc3 + '년)' : head.title = '3단계';
+ } else if (head.id === 'planSwageQntSumDc4' || head.id === 'swtrmtPpltnCntDc4' || head.id === 'swtrmtZoneAreaDc4') {
+ head.title = rtnData.planYrDc4 ? '4단계\n(' + rtnData.planYrDc4 + '년)' : head.title = '4단계';
+ } else if (head.id === 'planSwageQntSumDt4' || head.id === 'swtrmtPpltnCntDt4' || head.id === 'swtrmtZoneAreaDt4') {
+ head.title = rtnData.planYrDt4 ? '기승인\n4단계(' + rtnData.planYrDt4 + '년)' : head.title = '기승인\n4단계';
}
});
-
+
// 시설증설 계획 데이터 생성
const fcltyImproveInfo: FcltyImproveInfoProps = {
planSwageQntSumDt4: rtnData.planSwageQntSumDt4,
diff --git a/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx b/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx
index 34cdb674b..0906ce0ca 100644
--- a/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx
+++ b/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx
@@ -125,91 +125,91 @@ const SearchModal: React.FC = () => {
{/* 📋 결과 리스트 */}
{/* 기본정보 탭 */}
{activeTab === 'basic' && (
-
-
-
-
{
- const label = BASIC_TYPES.find((type) => type.val === basicType)?.text
- return (<>{label} 조회 결과 ({tableCount.toLocaleString('ko-KR')})건>);
- })()
- }
- tableData={tableData}
- headlist={dynamicHeadlist}
- pageSize={10}
- total={tableCount}
- cellClick={handleBasicCellClick}
- onPageChange={setCurPage}
- resetPageNo={isResetPage}
- resetSelection={isResetSelection}
- curPage={curPage}
- headButton={
-
-
-
-
- }
- />
-
+
+ {/*
*/}
+
+
{
+ const label = BASIC_TYPES.find((type) => type.val === basicType)?.text
+ return (<>{label} 조회 결과 ({tableCount.toLocaleString('ko-KR')})건>);
+ })()
+ }
+ tableData={tableData}
+ headlist={dynamicHeadlist}
+ pageSize={10}
+ total={tableCount}
+ cellClick={handleBasicCellClick}
+ onPageChange={setCurPage}
+ resetPageNo={isResetPage}
+ resetSelection={isResetSelection}
+ curPage={curPage}
+ headButton={
+
+
+
+
+ }
+ />
+ {/* */}
)}
{/* 유지관리 정보 탭 */}
{activeTab === 'operation' && (
<>
-
-
-
- {
- const label = WORK_TYPES.find((type) => type.val === workType)?.text
- return (<>{label} 사업 현황 ({tableCount.toLocaleString('ko-KR')})건>);
- })()
- }
- tableData={tableData}
- headlist={dynamicHeadlist}
- pageSize={OPERATION_TABLE_SIZE}
- total={tableCount}
- cellClick={handleOperationCellClick}
- onPageChange={setCurPage}
- resetPageNo={isResetPage}
- resetSelection={isResetSelection}
- curPage={curPage}
- headButton={
-
- }
- />
-
+
+ {/*
*/}
+
+ {
+ const label = WORK_TYPES.find((type) => type.val === workType)?.text
+ return (<>{label} 사업 현황 ({tableCount.toLocaleString('ko-KR')})건>);
+ })()
+ }
+ tableData={tableData}
+ headlist={dynamicHeadlist}
+ pageSize={OPERATION_TABLE_SIZE}
+ total={tableCount}
+ cellClick={handleOperationCellClick}
+ onPageChange={setCurPage}
+ resetPageNo={isResetPage}
+ resetSelection={isResetSelection}
+ curPage={curPage}
+ headButton={
+
+ }
+ />
+ {/*
*/}
-
+
{/* 테이블2 영역 */}
-
-
-
{
- const label = WORK_TYPES.find((type) => type.val === workType)?.text
- return (<>{label} 결과표 ({detailTableCount.toLocaleString('ko-KR')})건>);
- })()
- }
- tableData={detailTableData}
- headlist={dynamicHeadlist2}
- pageSize={OPERATION_TABLE_SIZE}
- total={detailTableCount}
- cellClick={handleOperationResultCellClick}
- onPageChange={setDetailCurPage}
- resetPageNo={isResetDetailPage}
- resetSelection={isResetDetailSelection}
- curPage={detailCurPage}
- headButton={
-
-
-
-
- }
- />
-
+ {/*
*/}
+
+
{
+ const label = WORK_TYPES.find((type) => type.val === workType)?.text
+ return (<>{label} 결과표 ({detailTableCount.toLocaleString('ko-KR')})건>);
+ })()
+ }
+ tableData={detailTableData}
+ headlist={dynamicHeadlist2}
+ pageSize={OPERATION_TABLE_SIZE}
+ total={detailTableCount}
+ cellClick={handleOperationResultCellClick}
+ onPageChange={setDetailCurPage}
+ resetPageNo={isResetDetailPage}
+ resetSelection={isResetDetailSelection}
+ curPage={detailCurPage}
+ headButton={
+
+
+
+
+ }
+ />
+ {/* */}
>
)}
@@ -224,8 +224,8 @@ const SearchModal: React.FC = () => {
bodyClass={`
h-[100dvh]
w-[90dvw]
- max-w-[1200px]
- max-h-[100dvh]
+ max-w-[1220px]
+ max-h-[970px]
overflow-y-hidden
z-[101]
`}
diff --git a/apps/wr/app/(without-layout)/stats/hasuStat/page.tsx b/apps/wr/app/(without-layout)/stats/hasuStat/page.tsx
index 34ce031e1..d6e9ff601 100644
--- a/apps/wr/app/(without-layout)/stats/hasuStat/page.tsx
+++ b/apps/wr/app/(without-layout)/stats/hasuStat/page.tsx
@@ -20,20 +20,20 @@ export default function HasuStatPage() {
const data = await res.json();
const ip: string = data?.ip || "";
if (didCancel) return;
- //alert("Client IP:" + ip);
+ console.log("Client IP:" + ip);
const is10 = /^10\./.test(ip);
const is172 = /^172\./.test(ip);
- setStatus(is10||is172 ? "redirect-internal" : "redirect-root");
+ setStatus(is10 || is172 ? "redirect-internal" : "redirect-root");
// Use location.replace so user can't go back to this page
- if (is10||is172) {
+ if (is10 || is172) {
// redirect to internal IP
// alert(process.env.NEXT_PUBLIC_HASUDOINFO_IN +'/cms/lay1/WS10000014/program.do');
- window.open(process.env.NEXT_PUBLIC_HASUDOINFO_IN +'/cms/lay1/WS10000014/program.do', '_blank');
+ window.open(process.env.NEXT_PUBLIC_HASUDOINFO_IN + '/cms/lay1/WS10000014/program.do', '_blank');
} else {
// alert(process.env.NEXT_PUBLIC_HASUDOINFO +'/cms/lay1/WS10000014/program.do');
- window.open(process.env.NEXT_PUBLIC_HASUDOINFO +'/cms/lay1/WS10000014/program.do', '_blank');
+ window.open(process.env.NEXT_PUBLIC_HASUDOINFO + '/cms/lay1/WS10000014/program.do', '_blank');
}
window.history.back();
} catch {
@@ -53,13 +53,13 @@ export default function HasuStatPage() {
}, []);
return (
-
+
{status === "checking" &&
접속 IP 확인 중...
}
{status === "redirect-internal" &&
내부망으로 이동합니다...
}
{status === "redirect-root" &&
외부에서 접속하여 루트로 이동합니다...
}
{status === "error-fallback" && (
- 문제가 발생하여 루트로 이동합니다. 이동하지 않으면 여기를 클릭하세요.
+ 문제가 발생하여 루트로 이동합니다. 이동하지 않으면 여기를 클릭하세요.
)}