결함수정, 날짜2024초기화, 총인설비 tp 키값수정정
This commit is contained in:
@@ -5,6 +5,7 @@ import { ContentsDiv, UiModal, UiTable } from "@common/business_components";
|
||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@common/components";
|
||||
import { useEffect, useState } from "react";
|
||||
import DashBoardChartModal from "./modal/page";
|
||||
import LoadingOverlay from "@common/business_components/ui/loadingBar";
|
||||
|
||||
export type facilityInfoProps = {
|
||||
searchYear?: string;
|
||||
@@ -80,13 +81,15 @@ export default function ProcessFacilitySearch({searchYear = '', fcltyList = []}:
|
||||
planYearList,
|
||||
waterUsage1,
|
||||
waterUsage2,
|
||||
waterUsage3
|
||||
waterUsage3,
|
||||
isLoadingPlanFclty
|
||||
} = PlanFclty;
|
||||
|
||||
// 그리드 관련
|
||||
const {
|
||||
upHeadListOperationStatus,
|
||||
operationalStatusList
|
||||
operationalStatusList,
|
||||
isLoadingOperationStatus
|
||||
} = OperationStatus;
|
||||
|
||||
const closeModal = () => {
|
||||
@@ -201,6 +204,7 @@ export default function ProcessFacilitySearch({searchYear = '', fcltyList = []}:
|
||||
<>
|
||||
<UiTable headName={""} tableData={mappedTableData} headlist={upHeadListFclty} pageSize={0} total={0} cellClick={ undefined } onPageChange={() => { } } />
|
||||
<ContentsDiv>
|
||||
<LoadingOverlay isLoading={isLoadingPlanFclty} />
|
||||
<div className="grid grid-cols-12 gap-1">
|
||||
<div className="col-span-5">
|
||||
<Table variant="secondary">
|
||||
@@ -236,39 +240,40 @@ export default function ProcessFacilitySearch({searchYear = '', fcltyList = []}:
|
||||
</div>
|
||||
<div className="col-span-7 h-[600px] overflow-x-auto">
|
||||
<div className="w-[200%]">
|
||||
<Table variant="secondary">
|
||||
<TableHeader>
|
||||
{upChangeHeadListOperationStatus}
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
{operationalStatusList.map((el: { [key: string]: string | number | boolean },index) => (
|
||||
<TableRow key={index+"row"} >
|
||||
{upHeadListOperationStatus.map((head) => (
|
||||
(head.id === 'flowRate' && index === 0)?<TableCell rowSpan={5} className="text-center" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el[head.id]}</TableCell>:
|
||||
(head.id === 'flowRate' && index === 5)?<TableCell rowSpan={6} className="text-center" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el[head.id]}</TableCell>:
|
||||
(head.id === 'flowRate' && index === 11)?<TableCell rowSpan={2} className="text-center" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el[head.id]}</TableCell>:
|
||||
(head.id === 'groundWaterAvg'||head.id === 'groundWaterSummer'||head.id === 'groundWaterWinter')&&(index === 0)?<TableCell rowSpan={7} className="text-right" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el[head.id]}</TableCell>:
|
||||
(head.id === 'groundWaterAvg'||head.id === 'groundWaterSummer'||head.id === 'groundWaterWinter')&&(index === 7)?<TableCell rowSpan={6} className="text-right" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el[head.id]}</TableCell>:
|
||||
(head.id === 'rdi'&&index === 0)?<TableCell rowSpan={7} className="text-right" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el[head.id]}</TableCell>:
|
||||
(head.id === 'rdi'&&index === 7)?<TableCell rowSpan={6} className="text-right" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el[head.id]}</TableCell>:
|
||||
(head.id === 'rdiRain'&&index === 0)?<TableCell rowSpan={7} className="text-right" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el['rdiRain']}</TableCell>:
|
||||
(head.id === 'rdiRain'&&index === 7)?<TableCell rowSpan={6} className="text-right" style={{ whiteSpace: 'pre-line' }} key={head.id+index}></TableCell>:
|
||||
(head.id === 'waterQlty')?<TableCell className="text-center" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'yearAvg' || head.id === 'yearMax' || head.id === 'yearMin') && (index>=0 && index<=4))?<TableCell className="bg-yellow-50 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('flowRate', 'year', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'yearAvg' || head.id === 'yearMax' || head.id === 'yearMin') && (index>=5 && index<=10))?<TableCell className="bg-green-50 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('waterQlty', 'year', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'yearAvg' || head.id === 'yearMax' || head.id === 'yearMin') && (index>=11 && index<=12))?<TableCell className="bg-blue-50 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('chongin', 'year', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'summerAll' || head.id === 'summerThree' || head.id === 'summerRain') && (index>=0 && index<=4))?<TableCell className="bg-yellow-100 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('flowRate', 'summer', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'summerAll' || head.id === 'summerThree' || head.id === 'summerRain') && (index>=5 && index<=10))?<TableCell className="bg-green-100 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('waterQlty', 'summer', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'summerAll' || head.id === 'summerThree' || head.id === 'summerRain') && (index>=11 && index<=12))?<TableCell className="bg-blue-100 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('chongin', 'summer', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'winterAll' || head.id === 'winterSunnyAvg' || head.id === 'winterSunnyMax' || head.id === 'winterSunnyMin') && (index>=0 && index<=4))?<TableCell className="bg-yellow-200 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('flowRate', 'winter', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'winterAll' || head.id === 'winterSunnyAvg' || head.id === 'winterSunnyMax' || head.id === 'winterSunnyMin') && (index>=5 && index<=10))?<TableCell className="bg-green-200 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('waterQlty', 'winter', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'winterAll' || head.id === 'winterSunnyAvg' || head.id === 'winterSunnyMax' || head.id === 'winterSunnyMin') && (index>=11 && index<=12))?<TableCell className="bg-blue-200 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('chongin', 'winter', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
null
|
||||
))}
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
</Table>
|
||||
<LoadingOverlay isLoading={isLoadingOperationStatus} />
|
||||
<Table variant="secondary">
|
||||
<TableHeader>
|
||||
{upChangeHeadListOperationStatus}
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
{operationalStatusList.map((el: { [key: string]: string | number | boolean },index) => (
|
||||
<TableRow key={index+"row"} >
|
||||
{upHeadListOperationStatus.map((head) => (
|
||||
(head.id === 'flowRate' && index === 0)?<TableCell rowSpan={5} className="text-center" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el[head.id]}</TableCell>:
|
||||
(head.id === 'flowRate' && index === 5)?<TableCell rowSpan={6} className="text-center" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el[head.id]}</TableCell>:
|
||||
(head.id === 'flowRate' && index === 11)?<TableCell rowSpan={2} className="text-center" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el[head.id]}</TableCell>:
|
||||
(head.id === 'groundWaterAvg'||head.id === 'groundWaterSummer'||head.id === 'groundWaterWinter')&&(index === 0)?<TableCell rowSpan={7} className="text-right" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el[head.id]}</TableCell>:
|
||||
(head.id === 'groundWaterAvg'||head.id === 'groundWaterSummer'||head.id === 'groundWaterWinter')&&(index === 7)?<TableCell rowSpan={6} className="text-right" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el[head.id]}</TableCell>:
|
||||
(head.id === 'rdi'&&index === 0)?<TableCell rowSpan={7} className="text-right" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el[head.id]}</TableCell>:
|
||||
(head.id === 'rdi'&&index === 7)?<TableCell rowSpan={6} className="text-right" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el[head.id]}</TableCell>:
|
||||
(head.id === 'rdiRain'&&index === 0)?<TableCell rowSpan={7} className="text-right" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el['rdiRain']}</TableCell>:
|
||||
(head.id === 'rdiRain'&&index === 7)?<TableCell rowSpan={6} className="text-right" style={{ whiteSpace: 'pre-line' }} key={head.id+index}></TableCell>:
|
||||
(head.id === 'waterQlty')?<TableCell className="text-center" style={{ whiteSpace: 'pre-line' }} key={head.id+index}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'yearAvg' || head.id === 'yearMax' || head.id === 'yearMin') && (index>=0 && index<=4))?<TableCell className="bg-yellow-50 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('flowRate', 'year', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'yearAvg' || head.id === 'yearMax' || head.id === 'yearMin') && (index>=5 && index<=10))?<TableCell className="bg-green-50 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('waterQlty', 'year', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'yearAvg' || head.id === 'yearMax' || head.id === 'yearMin') && (index>=11 && index<=12))?<TableCell className="bg-blue-50 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('chongin', 'year', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'summerAll' || head.id === 'summerThree' || head.id === 'summerRain') && (index>=0 && index<=4))?<TableCell className="bg-yellow-100 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('flowRate', 'summer', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'summerAll' || head.id === 'summerThree' || head.id === 'summerRain') && (index>=5 && index<=10))?<TableCell className="bg-green-100 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('waterQlty', 'summer', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'summerAll' || head.id === 'summerThree' || head.id === 'summerRain') && (index>=11 && index<=12))?<TableCell className="bg-blue-100 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('chongin', 'summer', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'winterAll' || head.id === 'winterSunnyAvg' || head.id === 'winterSunnyMax' || head.id === 'winterSunnyMin') && (index>=0 && index<=4))?<TableCell className="bg-yellow-200 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('flowRate', 'winter', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'winterAll' || head.id === 'winterSunnyAvg' || head.id === 'winterSunnyMax' || head.id === 'winterSunnyMin') && (index>=5 && index<=10))?<TableCell className="bg-green-200 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('waterQlty', 'winter', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
((head.id === 'winterAll' || head.id === 'winterSunnyAvg' || head.id === 'winterSunnyMax' || head.id === 'winterSunnyMin') && (index>=11 && index<=12))?<TableCell className="bg-blue-200 text-right cursor-pointer" style={{ whiteSpace: 'pre-line' }} key={head.id+index} onClick={()=>{fncLoadModal('chongin', 'winter', el['waterQlty'] as string);}}>{el[head.id]}</TableCell>:
|
||||
null
|
||||
))}
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,6 +5,7 @@ import { CHART_FORM, type ChartConfig, ContentsDiv, MainChart } from "@common/bu
|
||||
import { Card, CardContent } from "@common/business_components/ui/chart/lib/card";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { useEffect, useState } from "react";
|
||||
import LoadingOverlay from "@common/business_components/ui/loadingBar";
|
||||
|
||||
type facilityInfoProps = {
|
||||
searchYear?: string;
|
||||
@@ -44,6 +45,7 @@ export default function DashBoardChart({searchYear = '', fcltyList = []}: facili
|
||||
chart_inflTn,
|
||||
chart_efflTn,
|
||||
chart_inflBod,
|
||||
isLoadingMainGraph,
|
||||
} = MainGraph;
|
||||
|
||||
/**
|
||||
@@ -179,6 +181,7 @@ export default function DashBoardChart({searchYear = '', fcltyList = []}: facili
|
||||
return (
|
||||
<>
|
||||
<ContentsDiv>
|
||||
<LoadingOverlay isLoading={isLoadingMainGraph} />
|
||||
<ListDiv className="h-[300px]">
|
||||
<Card className="h-full">
|
||||
<CardContent className="h-full">
|
||||
|
||||
@@ -57,8 +57,7 @@ export default function DashBoard() {
|
||||
|
||||
/******************선택된 데이터******************/
|
||||
// 연도
|
||||
//const [searchYear, setSearchYear] = useState<string>(selectSearchYear[0]?.val || '0');
|
||||
const [searchYear, setSearchYear] = useState<string>('2023');
|
||||
const [searchYear, setSearchYear] = useState<string>(selectSearchYear[0]?.val || '0');
|
||||
// 시설명
|
||||
const [fcltyList, setFcltyList] = useState<{bscFctCd: string, bscFctNm: string, fcltyCpc: number | '', trtFrfNm: string | '', efflWqltStndrdNm: string | ''}>({
|
||||
bscFctCd: '26260PB001R',
|
||||
@@ -280,7 +279,7 @@ export default function DashBoard() {
|
||||
trtFrfNm: '표준활성슬러지법, MLE, MBR',
|
||||
efflWqltStndrdNm: '500톤 이상(Ⅳ지역)'
|
||||
});
|
||||
setSearchYear('2023');
|
||||
setSearchYear(selectSearchYear[0]?.val || '0');
|
||||
searchFcltyList.bscFctNm = '수영';
|
||||
|
||||
setSidoValue('0');
|
||||
|
||||
@@ -5,6 +5,7 @@ import { ContentsDiv, downloadExcel, MainDiv, SearchBaseForm, SearchInput, Selec
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import PrecipitationModal from "./modal/page";
|
||||
import LoadingOverlay from "@common/business_components/ui/loadingBar";
|
||||
|
||||
export default function FacilityPrecipitation() {
|
||||
const {Common
|
||||
@@ -39,7 +40,8 @@ export default function FacilityPrecipitation() {
|
||||
upHeadList3,
|
||||
excelList,
|
||||
facilityPrecipitation,
|
||||
facilityPrecipitationCount
|
||||
facilityPrecipitationCount,
|
||||
isLoading,
|
||||
} = FacilityPrecipitation;
|
||||
|
||||
const {
|
||||
@@ -81,8 +83,7 @@ export default function FacilityPrecipitation() {
|
||||
// 시설상태
|
||||
const [operationValue, setOperationValue] = useState<string>("0");
|
||||
// 조회기간
|
||||
//const [searchYear, setSearchYear] = useState<string>(selectSearchYear[0]?.val || "0");
|
||||
const [searchYear, setSearchYear] = useState<string>("2023");
|
||||
const [searchYear, setSearchYear] = useState<string>(selectSearchYear[0]?.val || "0");
|
||||
|
||||
/**
|
||||
* 페이지 함수
|
||||
@@ -94,7 +95,7 @@ export default function FacilityPrecipitation() {
|
||||
// 상태값 설정
|
||||
setFcltCpct(selectUpdownData[0]?.val || "0");
|
||||
setOperationValue(selectOperationData[0]?.val || "0");
|
||||
setSearchYear("2023");
|
||||
setSearchYear(selectSearchYear[0]?.val || "0");
|
||||
// SearchInputSelect 초기화
|
||||
setFcltyName("");
|
||||
if (searchInputRef.current) {
|
||||
@@ -103,7 +104,7 @@ export default function FacilityPrecipitation() {
|
||||
input.value = "";
|
||||
}
|
||||
}
|
||||
searchFacilityPrecipitationList(1, 10, "2023");
|
||||
searchFacilityPrecipitationList(1, 10, selectSearchYear[0]?.val || "0");
|
||||
}
|
||||
|
||||
// 모달 닫기
|
||||
@@ -126,7 +127,7 @@ export default function FacilityPrecipitation() {
|
||||
useEffect(() => {
|
||||
if (!isInit) {
|
||||
initializeCommonData();
|
||||
searchFacilityPrecipitationList(1, 10, "2023");
|
||||
searchFacilityPrecipitationList(1, 10, selectSearchYear[0]?.val || "0");
|
||||
}
|
||||
}, [isInit, initializeCommonData, searchFacilityPrecipitationList]);
|
||||
|
||||
@@ -227,6 +228,7 @@ export default function FacilityPrecipitation() {
|
||||
initClick={resetVal}
|
||||
ref={ref} isAdmin={false} />
|
||||
<ListDiv>
|
||||
<LoadingOverlay isLoading={isLoading} />
|
||||
<div className="h-full w-full overflow-x-scroll">
|
||||
<div className={widthSize}>
|
||||
<UiTable cellClick={(index: number | undefined) => index !== undefined && cellClick(index)} headName={"시설별 강수현황"} tableData={mainList} headlist={upheadList} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} />
|
||||
|
||||
@@ -7,6 +7,7 @@ import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import WaterQualityModal from "./modal/page";
|
||||
import type { FacilityWaterQltyProps } from "@/app/store/facilityWaterQlty";
|
||||
import LoadingOverlay from "@common/business_components/ui/loadingBar";
|
||||
|
||||
export default function ProcessFacilitySearch() {
|
||||
const { Common
|
||||
@@ -36,7 +37,8 @@ export default function ProcessFacilitySearch() {
|
||||
upHeadList3,
|
||||
facilityWaterQltyList,
|
||||
facilityWaterQltyCount,
|
||||
excelList
|
||||
excelList,
|
||||
isLoading,
|
||||
} = FacilityWaterQltyMain;
|
||||
|
||||
const mainList: FacilityWaterQltyProps[] = facilityWaterQltyList || [];
|
||||
@@ -48,8 +50,7 @@ export default function ProcessFacilitySearch() {
|
||||
const [upheadList, setUpheadList] = useState<TableUpperProps[]>(upHeadList1);
|
||||
const [fcltyName, setFcltyName] = useState<string>("");
|
||||
const [operationValue, setOperationValue] = useState<string>("0");
|
||||
//const [searchYearValue, setSearchYearValue] = useState<string>(selectSearchYear[0]?.val || "0");
|
||||
const [searchYearValue, setSearchYearValue] = useState<string>("2023");
|
||||
const [searchYearValue, setSearchYearValue] = useState<string>(selectSearchYear[0]?.val || "0");
|
||||
const [fcltCpct, setFcltCpct] = useState<string>("0");
|
||||
|
||||
// 모달 상태 추가
|
||||
@@ -89,7 +90,7 @@ export default function ProcessFacilitySearch() {
|
||||
// 상태값 설정
|
||||
setFcltCpct(selectUpdownData[0]?.val || "0");
|
||||
setOperationValue(selectOperationData[0]?.val || "0");
|
||||
setSearchYearValue("2023");
|
||||
setSearchYearValue(selectSearchYear[0]?.val || "0");
|
||||
// SearchInputSelect 초기화
|
||||
setFcltyName("");
|
||||
if (searchInputRef.current) {
|
||||
@@ -98,7 +99,7 @@ export default function ProcessFacilitySearch() {
|
||||
input.value = "";
|
||||
}
|
||||
}
|
||||
searchFacilityWaterQltyList(1, 10, "2023");
|
||||
searchFacilityWaterQltyList(1, 10, selectSearchYear[0]?.val || "0");
|
||||
}
|
||||
|
||||
// 셀 클릭 시 모달 표시
|
||||
@@ -131,7 +132,7 @@ export default function ProcessFacilitySearch() {
|
||||
useEffect(() => {
|
||||
if (!isInit) {
|
||||
initializeCommonData();
|
||||
searchFacilityWaterQltyList(1, 10, "2023");
|
||||
searchFacilityWaterQltyList(1, 10, selectSearchYear[0]?.val || "0");
|
||||
}
|
||||
}, [isInit, initializeCommonData, searchFacilityWaterQltyList]);
|
||||
|
||||
@@ -187,6 +188,7 @@ export default function ProcessFacilitySearch() {
|
||||
initClick={resetVal}
|
||||
ref={ref} isAdmin={false} />
|
||||
<ListDiv>
|
||||
<LoadingOverlay isLoading={isLoading} />
|
||||
<div className="h-full w-full overflow-x-scroll">
|
||||
<div className={widthSize}>
|
||||
<UiTable cellClick={(index: number | undefined) => index !== undefined && cellClick(index)} headName={"시설별 수질현황"} tableData={mainList} headlist={upheadList} pageSize={10} total={total<10?facilityWaterQltyList.length:total} resetPageNo={resetPage} onPageChange={handlePageChange} />
|
||||
|
||||
@@ -6,6 +6,7 @@ import ListDiv from "@common/business_components/ui/list_div";
|
||||
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
|
||||
@@ -42,15 +43,15 @@ export default function ProcessFacilitySearch() {
|
||||
upHeadList3,
|
||||
flowRateList,
|
||||
flowRateCount,
|
||||
excelList
|
||||
excelList,
|
||||
isLoading,
|
||||
} = FlowRateList;
|
||||
|
||||
// 입력값 상태 관리
|
||||
const [fcltCpct, setFcltCpct] = useState<string>("0");
|
||||
const [fcltyName, setFcltyName] = useState<string>("");
|
||||
const [operationValue, setOperationValue] = useState<string>("0");
|
||||
//const [searchYearValue, setSearchYearValue] = useState<string>(selectSearchYear[0]?.val || "0");
|
||||
const [searchYearValue, setSearchYearValue] = useState<string>("2023");
|
||||
const [searchYearValue, setSearchYearValue] = useState<string>(selectSearchYear[0]?.val || "0");
|
||||
const [widthSize, setWidthSize] = useState<string>("w-[120%]");
|
||||
const [upheadList, setUpheadList] = useState<TableUpperProps[]>(upHeadList1);
|
||||
const [resetPage, setResetPage] = useState<boolean>(false);
|
||||
@@ -89,7 +90,7 @@ export default function ProcessFacilitySearch() {
|
||||
setWidthSize("w-[120%]");
|
||||
setUpheadList(upHeadList1)
|
||||
// 상태값 설정
|
||||
setSearchYearValue("2023");
|
||||
setSearchYearValue(selectSearchYear[0]?.val || "0");
|
||||
setFcltCpct(selectUpdownData[0]?.val || "0");
|
||||
setOperationValue(selectOperationData[0]?.val || "0");
|
||||
// SearchInputSelect 초기화
|
||||
@@ -100,7 +101,7 @@ export default function ProcessFacilitySearch() {
|
||||
input.value = "";
|
||||
}
|
||||
}
|
||||
searchFlowRateList(1, 10, "2023");
|
||||
searchFlowRateList(1, 10, selectSearchYear[0]?.val || "0");
|
||||
}
|
||||
|
||||
// 셀 클릭 시 모달 표시
|
||||
@@ -127,7 +128,7 @@ export default function ProcessFacilitySearch() {
|
||||
useEffect(() => {
|
||||
if(!isInit) {
|
||||
initializeCommonData();
|
||||
searchFlowRateList(1, 10, "2023");
|
||||
searchFlowRateList(1, 10, selectSearchYear[0]?.val || "0");
|
||||
}
|
||||
}, [isInit, initializeCommonData, searchFlowRateList]);
|
||||
|
||||
@@ -188,6 +189,7 @@ export default function ProcessFacilitySearch() {
|
||||
initClick={resetVal}
|
||||
ref={ref} isAdmin={false} />
|
||||
<ListDiv>
|
||||
<LoadingOverlay isLoading={isLoading} />
|
||||
<div className="h-full w-full overflow-x-scroll">
|
||||
<div className={widthSize}>
|
||||
<UiTable cellClick={(index: number | undefined) => index !== undefined && cellClick(index)} headName={"시설별 유량현황"} tableData={flowRateList} headlist={upheadList} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} />
|
||||
|
||||
@@ -4,6 +4,7 @@ import type { TableUpperProps } from "@/app/store/common";
|
||||
import { downloadExcel, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiTable, type ReturnType } from "@common/business_components";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import LoadingOverlay from "@common/business_components/ui/loadingBar";
|
||||
|
||||
export default function PlanSewage() {
|
||||
const {Common
|
||||
@@ -37,7 +38,8 @@ export default function PlanSewage() {
|
||||
upHeadList3,
|
||||
planSewageList,
|
||||
planSewageCount,
|
||||
excelList
|
||||
excelList,
|
||||
isLoading,
|
||||
} = PlanSewage;
|
||||
|
||||
const ref = useRef<ReturnType>({
|
||||
@@ -70,8 +72,7 @@ export default function PlanSewage() {
|
||||
// 시설상태
|
||||
const [operationValue, setOperationValue] = useState<string>("0");
|
||||
// 조회기간
|
||||
//const [searchYear, setSearchYear] = useState<string>(selectSearchYear[0]?.val || "0");
|
||||
const [searchYear, setSearchYear] = useState<string>("2023");
|
||||
const [searchYear, setSearchYear] = useState<string>(selectSearchYear[0]?.val || "0");
|
||||
|
||||
/**
|
||||
* 페이지 함수
|
||||
@@ -83,7 +84,7 @@ export default function PlanSewage() {
|
||||
// 상태값 설정
|
||||
setFcltCpct(selectUpdownData[0]?.val || "0");
|
||||
setOperationValue(selectOperationData[0]?.val || "0");
|
||||
setSearchYear("2023");
|
||||
setSearchYear(selectSearchYear[0]?.val || "0");
|
||||
// SearchInputSelect 초기화
|
||||
setFcltyName("");
|
||||
if (searchInputRef.current) {
|
||||
@@ -92,7 +93,7 @@ export default function PlanSewage() {
|
||||
input.value = "";
|
||||
}
|
||||
}
|
||||
searchPlanSewageList(1, 10, "2023", ref.current.partValue);
|
||||
searchPlanSewageList(1, 10, selectSearchYear[0]?.val || "0", ref.current.partValue);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -101,7 +102,7 @@ export default function PlanSewage() {
|
||||
useEffect(() => {
|
||||
if (!isInit) {
|
||||
initializeCommonData();
|
||||
searchPlanSewageList(1, 10, "2023", ref.current.partValue);
|
||||
searchPlanSewageList(1, 10, selectSearchYear[0]?.val || "0", ref.current.partValue);
|
||||
}
|
||||
}, [isInit, initializeCommonData, searchPlanSewageList]);
|
||||
|
||||
@@ -188,6 +189,7 @@ export default function PlanSewage() {
|
||||
initClick={resetVal}
|
||||
ref={ref} isAdmin={false}/>
|
||||
<ListDiv>
|
||||
<LoadingOverlay isLoading={isLoading} />
|
||||
<div className="h-full w-full overflow-x-scroll">
|
||||
<div className={widthSize}>
|
||||
<UiTable cellClick={ undefined } headName={"계획하수량 산정지표 현황"} tableData={mainList} headlist={upheadList} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} />
|
||||
|
||||
@@ -4,6 +4,7 @@ import { ContentsDiv, downloadExcel, MainDiv, SearchBaseForm, SelectBox, Title,
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import ProcessFacilityInfoModal from "./modal/page";
|
||||
import LoadingOverlay from "@common/business_components/ui/loadingBar";
|
||||
|
||||
export default function ProcessArea() {
|
||||
const {Common,
|
||||
@@ -39,7 +40,8 @@ export default function ProcessArea() {
|
||||
upHeadList1,
|
||||
processAreaList,
|
||||
processAreaCount,
|
||||
excelList
|
||||
excelList,
|
||||
isLoading,
|
||||
} = ProcessArea;
|
||||
|
||||
const mainList: Record<string, unknown>[] = processAreaList || [];
|
||||
@@ -52,8 +54,7 @@ export default function ProcessArea() {
|
||||
const [fcltyCd, setFcltyCd] = useState<string>("");
|
||||
|
||||
const [resetPage, setResetPage] = useState<boolean>(false);
|
||||
//const [searchYearValue, setSearchYearValue] = useState<string>(selectSearchYear[0]?.val || "0");
|
||||
const [searchYearValue, setSearchYearValue] = useState<string>("2023");
|
||||
const [searchYearValue, setSearchYearValue] = useState<string>(selectSearchYear[0]?.val || "0");
|
||||
|
||||
const ref = useRef<ReturnType>({
|
||||
partValue: '',
|
||||
@@ -84,8 +85,8 @@ export default function ProcessArea() {
|
||||
input.value = "";
|
||||
}
|
||||
}
|
||||
setSearchYearValue("2023");
|
||||
searchProcessAreaList(1, 10, '', '', "2023");
|
||||
setSearchYearValue(selectSearchYear[0]?.val || "0");
|
||||
searchProcessAreaList(1, 10, '', '', selectSearchYear[0]?.val || "0");
|
||||
}
|
||||
|
||||
// 셀 클릭 시 모달 표시
|
||||
@@ -105,7 +106,7 @@ export default function ProcessArea() {
|
||||
useEffect(() => {
|
||||
if (!isInit) {
|
||||
initializeCommonData();
|
||||
searchProcessAreaList(1, 10, '', '', "2023");
|
||||
searchProcessAreaList(1, 10, '', '', selectSearchYear[0]?.val || "0");
|
||||
}
|
||||
}, [isInit, initializeCommonData, searchProcessAreaList]);
|
||||
|
||||
@@ -153,6 +154,7 @@ export default function ProcessArea() {
|
||||
isAdmin={true}
|
||||
/>
|
||||
<ListDiv>
|
||||
<LoadingOverlay isLoading={isLoading} />
|
||||
<div className="h-full w-full overflow-x-scroll">
|
||||
<div className="w-[180%]">
|
||||
<UiTable cellClick={(index: number | undefined) => index !== undefined && cellClick(index)} headName={"처리구역정보"} tableData={mainList} headlist={upHeadList1} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} />
|
||||
|
||||
@@ -5,6 +5,7 @@ import { ContentsDiv, downloadExcel, MainDiv, SearchBaseForm, SearchInput, Selec
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import ProcessFacilityInfoModal from "./modal/page";
|
||||
import LoadingOverlay from "@common/business_components/ui/loadingBar";
|
||||
|
||||
export default function ProcessFacilitySearch() {
|
||||
const {Common
|
||||
@@ -63,7 +64,8 @@ export default function ProcessFacilitySearch() {
|
||||
upHeadList1,
|
||||
upHeadList2,
|
||||
upHeadList3,
|
||||
excelList
|
||||
excelList,
|
||||
isLoading,
|
||||
} = ProcessFacilityList;
|
||||
|
||||
const processFacilityList = ProcessFacilityList?.processFacilityList || [];
|
||||
@@ -262,6 +264,7 @@ export default function ProcessFacilitySearch() {
|
||||
initClick={resetVal}
|
||||
ref={ref} isAdmin={false} />
|
||||
<ListDiv>
|
||||
<LoadingOverlay isLoading={isLoading} />
|
||||
<div className="h-full w-full overflow-x-scroll">
|
||||
<div className={widthSize}>
|
||||
<UiTable
|
||||
|
||||
@@ -4,6 +4,7 @@ import type { TableUpperProps } from "@/app/store/common";
|
||||
import { ContentsDiv, downloadExcel, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiTable, type ReturnType } from "@common/business_components";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import LoadingOverlay from "@common/business_components/ui/loadingBar";
|
||||
|
||||
export default function Rdi() {
|
||||
const {Common
|
||||
@@ -38,6 +39,7 @@ export default function Rdi() {
|
||||
rdiList,
|
||||
rdiCount,
|
||||
excelList,
|
||||
isLoading,
|
||||
} = Rdi;
|
||||
|
||||
const ref = useRef<ReturnType>({
|
||||
@@ -68,7 +70,11 @@ export default function Rdi() {
|
||||
// 시설상태
|
||||
const [operationValue, setOperationValue] = useState<string>("0");
|
||||
// 조회기간
|
||||
const [searchYear, setSearchYear] = useState<string>("2023");
|
||||
const [searchYear, setSearchYear] = useState<string>(selectSearchYear[0]?.val || "0");
|
||||
|
||||
useEffect(() => {
|
||||
console.log(isLoading);
|
||||
}, [isLoading]);
|
||||
|
||||
/**
|
||||
* 페이지 함수
|
||||
@@ -81,7 +87,7 @@ export default function Rdi() {
|
||||
// 상태값 설정
|
||||
setFcltCpct(selectUpdownData[0]?.val || "0");
|
||||
setOperationValue(selectOperationData[0]?.val || "0");
|
||||
setSearchYear("2023");
|
||||
setSearchYear(selectSearchYear[0]?.val || "0");
|
||||
// SearchInputSelect 초기화
|
||||
setFcltyName("");
|
||||
if (searchInputRef.current) {
|
||||
@@ -90,8 +96,7 @@ export default function Rdi() {
|
||||
input.value = "";
|
||||
}
|
||||
}
|
||||
searchRdiList(1, 10, "2023");
|
||||
|
||||
searchRdiList(1, 10, selectSearchYear[0]?.val || "0");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,7 +105,7 @@ export default function Rdi() {
|
||||
useEffect(() => {
|
||||
if (!isInit) {
|
||||
initializeCommonData();
|
||||
searchRdiList(1, 10, "2023");
|
||||
searchRdiList(1, 10, selectSearchYear[0]?.val || "0");
|
||||
}
|
||||
}, [isInit, initializeCommonData, searchRdiList]);
|
||||
|
||||
@@ -187,6 +192,7 @@ export default function Rdi() {
|
||||
initClick={resetVal}
|
||||
ref={ref} isAdmin={false} />
|
||||
<ListDiv>
|
||||
<LoadingOverlay isLoading={isLoading} />
|
||||
<div className="h-full w-full overflow-x-scroll">
|
||||
<div className={widthSize}>
|
||||
<UiTable cellClick={ undefined } headName={"RDII추정"} tableData={mainList} headlist={upheadList} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} />
|
||||
|
||||
@@ -6,6 +6,7 @@ import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import SewageOccurModal from "./modal/page";
|
||||
import type { SewageOccurProps } from "@/app/store/sewageOccur";
|
||||
import LoadingOverlay from "@common/business_components/ui/loadingBar";
|
||||
|
||||
export default function PlanSewage() {
|
||||
const {Common
|
||||
@@ -46,7 +47,8 @@ export default function PlanSewage() {
|
||||
upHeadList3,
|
||||
sewageOccurList,
|
||||
sewageOccurCount,
|
||||
excelList
|
||||
excelList,
|
||||
isLoading,
|
||||
} = SewageOccur;
|
||||
|
||||
const ref = useRef<ReturnType>({
|
||||
@@ -84,8 +86,7 @@ export default function PlanSewage() {
|
||||
// 시설상태
|
||||
const [operationValue, setOperationValue] = useState<string>("0");
|
||||
// 조회기간
|
||||
// const [searchYear, setSearchYear] = useState<string>(selectSearchYear[0]?.val || "0");
|
||||
const [searchYear, setSearchYear] = useState<string>("2023");
|
||||
const [searchYear, setSearchYear] = useState<string>(selectSearchYear[0]?.val || "0");
|
||||
|
||||
/**
|
||||
* 페이지 함수
|
||||
@@ -97,7 +98,7 @@ export default function PlanSewage() {
|
||||
// 상태값 설정
|
||||
setFcltCpct(selectUpdownData[0]?.val || "0");
|
||||
setOperationValue(selectOperationData[0]?.val || "0");
|
||||
setSearchYear("2023");
|
||||
setSearchYear(selectSearchYear[0]?.val || "0");
|
||||
// SearchInputSelect 초기화
|
||||
setFcltyName("");
|
||||
if (searchInputRef.current) {
|
||||
@@ -106,7 +107,7 @@ export default function PlanSewage() {
|
||||
input.value = "";
|
||||
}
|
||||
}
|
||||
searchSewageOccurList(1, 10, "2023");
|
||||
searchSewageOccurList(1, 10, selectSearchYear[0]?.val || "0");
|
||||
}
|
||||
|
||||
// 모달 닫기
|
||||
@@ -129,7 +130,7 @@ export default function PlanSewage() {
|
||||
useEffect(() => {
|
||||
if (!isInit) {
|
||||
initializeCommonData();
|
||||
searchSewageOccurList(1, 10, "2023");
|
||||
searchSewageOccurList(1, 10, selectSearchYear[0]?.val || "0");
|
||||
}
|
||||
}, [isInit, initializeCommonData, searchSewageOccurList]);
|
||||
|
||||
@@ -218,6 +219,7 @@ export default function PlanSewage() {
|
||||
isAdmin={false}
|
||||
/>
|
||||
<ListDiv>
|
||||
<LoadingOverlay isLoading={isLoading} />
|
||||
<div className="h-full w-full overflow-x-scroll">
|
||||
<div className={widthSize}>
|
||||
<UiTable cellClick={(index: number | undefined) => index !== undefined && cellClick(index)} headName={"오수발생량 추정"} tableData={mainList} headlist={upheadList} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} />
|
||||
|
||||
@@ -6,6 +6,7 @@ import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import UnderWaterInputModal from "./modal/page";
|
||||
import type { UnderWaterProps } from "@/app/store/underWaterInput/types";
|
||||
import LoadingOverlay from "@common/business_components/ui/loadingBar";
|
||||
|
||||
export default function UnderWaterInput() {
|
||||
const {Common
|
||||
@@ -46,6 +47,7 @@ export default function UnderWaterInput() {
|
||||
underWaterList,
|
||||
underWaterCount,
|
||||
excelList,
|
||||
isLoading,
|
||||
} = UnderWater;
|
||||
|
||||
const ref = useRef<ReturnType>({
|
||||
@@ -82,8 +84,7 @@ export default function UnderWaterInput() {
|
||||
// 시설상태
|
||||
const [operationValue, setOperationValue] = useState<string>("0");
|
||||
// 조회기간
|
||||
//const [searchYear, setSearchYear] = useState<string>(selectSearchYear[0]?.val || "0");
|
||||
const [searchYear, setSearchYear] = useState<string>("2023");
|
||||
const [searchYear, setSearchYear] = useState<string>(selectSearchYear[0]?.val || "0");
|
||||
|
||||
/**
|
||||
* 페이지 함수
|
||||
@@ -95,7 +96,7 @@ export default function UnderWaterInput() {
|
||||
// 상태값 설정
|
||||
setFcltCpct(selectUpdownData[0]?.val || "0");
|
||||
setOperationValue(selectOperationData[0]?.val || "0");
|
||||
setSearchYear("2023");
|
||||
setSearchYear(selectSearchYear[0]?.val || "0");
|
||||
// SearchInputSelect 초기화
|
||||
setFcltyName("");
|
||||
if (searchInputRef.current) {
|
||||
@@ -104,7 +105,7 @@ export default function UnderWaterInput() {
|
||||
input.value = "";
|
||||
}
|
||||
}
|
||||
searchUnderWaterList(1, 10, "2023");
|
||||
searchUnderWaterList(1, 10, selectSearchYear[0]?.val || "0");
|
||||
}
|
||||
|
||||
// 모달 닫기
|
||||
@@ -126,7 +127,7 @@ export default function UnderWaterInput() {
|
||||
useEffect(() => {
|
||||
if (!isInit) {
|
||||
initializeCommonData();
|
||||
searchUnderWaterList(1, 10, "2023");
|
||||
searchUnderWaterList(1, 10, selectSearchYear[0]?.val || "0");
|
||||
}
|
||||
}, [isInit, initializeCommonData, searchUnderWaterList]);
|
||||
|
||||
@@ -215,6 +216,7 @@ export default function UnderWaterInput() {
|
||||
isAdmin={false}
|
||||
/>
|
||||
<ListDiv>
|
||||
<LoadingOverlay isLoading={isLoading} />
|
||||
<div className="h-full w-full overflow-x-scroll">
|
||||
<div className={widthSize}>
|
||||
<UiTable cellClick={(index: number | undefined) => index !== undefined && cellClick(index)} headName={"지하수유입량 추정"} tableData={mainList} headlist={upheadList} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} />
|
||||
|
||||
@@ -691,7 +691,7 @@ const drainageEquipmentList : DrainageEquipmentListProps[] = [
|
||||
/* 시설정보 및 운영현황 - 계획 */
|
||||
const fetchFacilityPlan = async (targetYear : string | undefined, fcltyCd : string | undefined) => {
|
||||
try {
|
||||
targetYear = targetYear ? targetYear : "2023";
|
||||
targetYear = targetYear ? targetYear : "2024";
|
||||
const baseUrl = 'https://apigateway.rsonesoft.com/dc-service/api/v1/nowDmgMtncGnsvy';
|
||||
const queryParams = new URLSearchParams();
|
||||
|
||||
@@ -782,12 +782,14 @@ export type DashBoardType = {
|
||||
waterUsage1 : number | '',
|
||||
waterUsage2 : number | '',
|
||||
waterUsage3 : number | '',
|
||||
isLoadingPlanFclty : boolean;
|
||||
},
|
||||
|
||||
OperationStatus : {
|
||||
isInit : boolean;
|
||||
upHeadListOperationStatus : TableUpperProps[];
|
||||
operationalStatusList : OperationalStatusListProps[];
|
||||
isLoadingOperationStatus : boolean;
|
||||
}
|
||||
|
||||
MainGraph : {
|
||||
@@ -801,6 +803,7 @@ export type DashBoardType = {
|
||||
chart_efflTn : lineChartDataProps[];
|
||||
chart_inflBod : lineChartDataProps[];
|
||||
chart_efflBod : lineChartDataProps[];
|
||||
isLoadingMainGraph : boolean;
|
||||
},
|
||||
|
||||
RainManage : {
|
||||
@@ -808,6 +811,7 @@ export type DashBoardType = {
|
||||
upHeadListRainManage : TableUpperProps[];
|
||||
rainManageList : RainManageListProps[];
|
||||
excelList : RainManageExcelType[];
|
||||
isLoadingRainManage : boolean;
|
||||
},
|
||||
|
||||
DrainageEquipment : {
|
||||
@@ -839,13 +843,15 @@ export const dashBoardInitState:DashBoardType = {
|
||||
planFcltyList : planFcltyList,
|
||||
waterUsage1 : 0,
|
||||
waterUsage2 : 0,
|
||||
waterUsage3 : 0
|
||||
waterUsage3 : 0,
|
||||
isLoadingPlanFclty : false,
|
||||
},
|
||||
|
||||
OperationStatus : {
|
||||
isInit : false,
|
||||
upHeadListOperationStatus : upHeadListOperationStatus,
|
||||
operationalStatusList : operationalStatusList
|
||||
operationalStatusList : operationalStatusList,
|
||||
isLoadingOperationStatus : false,
|
||||
},
|
||||
|
||||
MainGraph : {
|
||||
@@ -858,14 +864,16 @@ export const dashBoardInitState:DashBoardType = {
|
||||
chart_inflTn : chart_inflTn,
|
||||
chart_efflTn : chart_efflTn,
|
||||
chart_inflBod : chart_inflBod,
|
||||
chart_efflBod : chart_efflBod
|
||||
chart_efflBod : chart_efflBod,
|
||||
isLoadingMainGraph : false,
|
||||
},
|
||||
|
||||
RainManage : {
|
||||
isInit : false,
|
||||
upHeadListRainManage : upHeadListRainManage,
|
||||
rainManageList : rainManageList,
|
||||
excelList : []
|
||||
excelList : [],
|
||||
isLoadingRainManage : false,
|
||||
},
|
||||
|
||||
DrainageEquipment : {
|
||||
@@ -906,6 +914,7 @@ export const dataFormSetting=(item : OperationalStatusListProps)=> {
|
||||
};
|
||||
|
||||
const changeValue=(operationalStatus, data, keyTxt = 'INFL_AMNT')=>{
|
||||
console.log('changeValue data :', data);
|
||||
operationalStatus.yearAvg = data.yearData ? (keyTxt.includes('_TP') || keyTxt.includes("_TN"))? data.yearData?Number(Math.round(data.yearData['AVG_'+keyTxt] * 1000) / 1000).toFixed(3).toString():'': data.yearData['AVG_'+keyTxt] : '';
|
||||
operationalStatus.yearMax = data.yearData ? (keyTxt.includes('_TP') || keyTxt.includes("_TN"))? data.yearData?Number(Math.round(data.yearData['MAX_'+keyTxt] * 1000) / 1000).toFixed(3).toString():'': data.yearData['MAX_'+keyTxt] : '';
|
||||
operationalStatus.yearMin = data.yearData ? (keyTxt.includes('_TP') || keyTxt.includes("_TN"))? data.yearData?Number(Math.round(data.yearData['MIN_'+keyTxt] * 1000) / 1000).toFixed(3).toString():'': data.yearData['MIN_'+keyTxt] : '';
|
||||
@@ -934,18 +943,18 @@ const changeValue=(operationalStatus, data, keyTxt = 'INFL_AMNT')=>{
|
||||
|
||||
const calcValue = (operationalStatus, data, keyTxt='INFL_ASSCT_BFR_WQLT_TP') => {
|
||||
// 연간
|
||||
operationalStatus.yearAvg = data.yearData ? Number(Math.round(data.yearData['AVG_'+keyTxt] * 1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.yearMax = data.yearData ? Number(Math.round(data.yearData['MAX_'+keyTxt] * 1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.yearMin = data.yearData ? Number(Math.round(data.yearData['MIN_'+keyTxt] * 1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.yearAvg = data.yearData && data.yearData['AVG_'+keyTxt] ? Number(Math.round(data.yearData['AVG_'+keyTxt] * 1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.yearMax = data.yearData && data.yearData['MAX_'+keyTxt] ? Number(Math.round(data.yearData['MAX_'+keyTxt] * 1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.yearMin = data.yearData && data.yearData['MIN_'+keyTxt] ? Number(Math.round(data.yearData['MIN_'+keyTxt] * 1000) / 1000).toFixed(3).toString() : '';
|
||||
// 여름
|
||||
operationalStatus.summerAll = data.summer ? Number(Math.round(data.summer['AVG_'+keyTxt] * 0.8 * 1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.summerThree = data.summerRainy ? Number(Math.round(data.summerRainy['AVG_'+keyTxt] * 0.82 * 1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.summerRain = data.summerSunny ? Number(Math.round(data.summerSunny['AVG_'+keyTxt] * 0.74 * 1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.summerAll = data.summer && data.summer['AVG_'+keyTxt] ? Number(Math.round(data.summer['AVG_'+keyTxt] * 0.8 * 1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.summerThree = data.summerRainy && data.summerRainy['AVG_'+keyTxt] ? Number(Math.round(data.summerRainy['AVG_'+keyTxt] * 0.82 * 1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.summerRain = data.summerSunny && data.summerSunny['AVG_'+keyTxt] ? Number(Math.round(data.summerSunny['AVG_'+keyTxt] * 0.74 * 1000) / 1000).toFixed(3).toString() : '';
|
||||
// 겨울
|
||||
operationalStatus.winterAll = data.winter ? Number(Math.round(data.winter['AVG_'+keyTxt] * 1.16*1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.winterSunnyMin = data.winterSunny ? Number(Math.round(data.winterSunny['MIN_'+keyTxt] * 1.2 * 1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.winterSunnyAvg = data.winterSunny ? Number(Math.round(data.winterSunny['AVG_'+keyTxt] * 1.25 *1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.winterSunnyMax = data.winterSunny ? Number(Math.round(data.winterSunny['MAX_'+keyTxt] * 1.3 *1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.winterAll = data.winter && data.winter['AVG_'+keyTxt] ? Number(Math.round(data.winter['AVG_'+keyTxt] * 1.16*1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.winterSunnyMin = data.winterSunny && data.winterSunny['MIN_'+keyTxt] ? Number(Math.round(data.winterSunny['MIN_'+keyTxt] * 1.2 * 1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.winterSunnyAvg = data.winterSunny && data.winterSunny['AVG_'+keyTxt] ? Number(Math.round(data.winterSunny['AVG_'+keyTxt] * 1.25 *1000) / 1000).toFixed(3).toString() : '';
|
||||
operationalStatus.winterSunnyMax = data.winterSunny && data.winterSunny['MAX_'+keyTxt] ? Number(Math.round(data.winterSunny['MAX_'+keyTxt] * 1.3 *1000) / 1000).toFixed(3).toString() : '';
|
||||
}
|
||||
|
||||
type RtnFlowType = {
|
||||
@@ -1053,6 +1062,13 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType)
|
||||
|
||||
/** 시설정보 및 운영현황 - 계획정보 */
|
||||
searchPlanInfo : async (targetYear: string, fcltyCd: string) => {
|
||||
set((state: DashBoardType) => ({
|
||||
...state,
|
||||
PlanFclty: {
|
||||
...state.PlanFclty,
|
||||
isLoadingPlanFclty: true,
|
||||
},
|
||||
}));
|
||||
const res = await fetchFacilityPlan(targetYear, fcltyCd);
|
||||
let waterUsage = [0, 0, 0];
|
||||
let minDiff=9999999;
|
||||
@@ -1116,13 +1132,21 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType)
|
||||
planFcltyList : planFcltyList,
|
||||
waterUsage1 : waterUsage[0] || 0,
|
||||
waterUsage2 : waterUsage[1] || 0,
|
||||
waterUsage3 : waterUsage[2] || 0
|
||||
}
|
||||
waterUsage3 : waterUsage[2] || 0,
|
||||
isLoadingPlanFclty : false,
|
||||
},
|
||||
}));
|
||||
},
|
||||
|
||||
/** 시설정보 및 운영현황 - 운영실태 */
|
||||
searchOperationStatus: async (isExcel: boolean, searchYear: string, fcltyCd: string) => {
|
||||
set((state: DashBoardType) => ({
|
||||
...state,
|
||||
OperationStatus: {
|
||||
...state.OperationStatus,
|
||||
isLoadingOperationStatus: true,
|
||||
},
|
||||
}));
|
||||
const res = await fetchOperationStatus(searchYear, fcltyCd);
|
||||
const data = res.data;
|
||||
|
||||
@@ -1225,7 +1249,7 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType)
|
||||
operationalStatusList[7].groundWaterAvg = Math.round((Number(operationalStatusList[0].groundWaterAvg) / Number(data.yearData.AVG_INFL_AMNT) * 100) * 10) / 10+'%';
|
||||
operationalStatusList[7].groundWaterSummer = Math.round((Number(operationalStatusList[0].groundWaterSummer) / Number(data.summer.AVG_INFL_AMNT) * 100) * 10) / 10+'%';
|
||||
operationalStatusList[7].groundWaterWinter = Math.round((Number(operationalStatusList[0].groundWaterWinter) / Number(data.winter.AVG_INFL_AMNT) * 100) * 10) / 10+'%';
|
||||
operationalStatusList[7].rdi = Math.round((Number(operationalStatusList[0].rdi) / Number(data.summerBod.INFL_AMNT) * 100) * 10) / 10+'%';
|
||||
operationalStatusList[7].rdi = operationalStatusList[0].rdi===null?0:Math.round((Number(operationalStatusList[0].rdi) / (data.summerBod&&data.summerBod.INFL_AMNT&&data.summerBod.INFL_AMNT!='null'?Number(data.summerBod.INFL_AMNT):0) * 100) * 10) / 10+'%';
|
||||
/* operationalStatusList[7].groundWaterAvg = operationalStatusList[0].groundWaterAvg === null ? '' : Number(Number(operationalStatusList[0].groundWaterAvg) / Number(data.yearData.AVG_INFL_AMNT)) * 100;
|
||||
operationalStatusList[7].groundWaterSummer = operationalStatusList[0].groundWaterSummer === null ? '' : Number(Number(operationalStatusList[0].groundWaterSummer) / Number(data.summer.AVG_INFL_AMNT)) * 100;
|
||||
operationalStatusList[7].groundWaterWinter = operationalStatusList[0].groundWaterWinter === null ? '' : Number(Number(operationalStatusList[0].groundWaterWinter) / Number(data.winter.AVG_INFL_AMNT)) * 100;*/
|
||||
@@ -1233,7 +1257,7 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType)
|
||||
}
|
||||
|
||||
for(let i=1; i<operationalStatusList.length; i++){
|
||||
const txtArray = ['1', 'INFL_AMNT', 'SUM_FLOW', 'RETURN_AMNT', 'EFFL_AMNT', 'INFL_ASSCT_BFR_WQLT_BOD', 'EFFL_WQLT_BOD', 'INFL_ASSCT_BFR_WQLT_TN', 'EFFL_WQLT_TN', 'INFL_ASSCT_BFR_WQLT_TP', 'EFFL_WQLT_TP', 'INFL_ASSCT_BFR_WQLT_TP', 'EFFL_WQLT_TP'];
|
||||
const txtArray = ['1', 'INFL_AMNT', 'SUM_FLOW', 'RETURN_AMNT', 'EFFL_AMNT', 'INFL_ASSCT_BFR_WQLT_BOD', 'EFFL_WQLT_BOD', 'INFL_ASSCT_BFR_WQLT_TN', 'EFFL_WQLT_TN', 'INFL_ASSCT_BFR_WQLT_TP', 'EFFL_WQLT_TP', 'TP_INFL_WQLT_TP', 'EFFL_WQLT_TP'];
|
||||
if(operationalStatusList[i]){
|
||||
if(i < 7){
|
||||
changeValue(operationalStatusList[i], data, txtArray[i]);
|
||||
@@ -1280,12 +1304,20 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType)
|
||||
OperationStatus: {
|
||||
...state.OperationStatus,
|
||||
operationalStatusList: operationalStatusList,
|
||||
operationalStatusCount: res.count
|
||||
}
|
||||
operationalStatusCount: res.count,
|
||||
isLoadingOperationStatus : false,
|
||||
},
|
||||
}))
|
||||
},
|
||||
|
||||
searchMainGraph: async (searchYear: string, fcltyCd: string) => {
|
||||
set((state: DashBoardType) => ({
|
||||
...state,
|
||||
MainGraph: {
|
||||
...state.MainGraph,
|
||||
isLoadingMainGraph: true,
|
||||
},
|
||||
}));
|
||||
const res = await fetchMainGraph(searchYear, fcltyCd);
|
||||
if(res == null || res.data == null || res.data.length === 0) {
|
||||
set((state: DashBoardType) => ({
|
||||
@@ -1301,6 +1333,7 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType)
|
||||
chart_efflTn: [],
|
||||
chart_inflBod: [],
|
||||
chart_efflBod: [],
|
||||
isLoadingMainGraph : false,
|
||||
}
|
||||
}));
|
||||
return;
|
||||
@@ -1366,12 +1399,20 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType)
|
||||
chart_inflTn: chart_inflTn,
|
||||
chart_efflTn: chart_efflTn,
|
||||
chart_inflBod: chart_inflBod,
|
||||
chart_efflBod: chart_efflBod
|
||||
}
|
||||
chart_efflBod: chart_efflBod,
|
||||
isLoadingMainGraph : false,
|
||||
},
|
||||
}))
|
||||
},
|
||||
|
||||
searchRainManage: async (searchYear: string, fcltyCd: string, isExcel : boolean) => {
|
||||
set((state: DashBoardType) => ({
|
||||
...state,
|
||||
RainManage: {
|
||||
...state.RainManage,
|
||||
isLoadingRainManage: true,
|
||||
},
|
||||
}));
|
||||
const res = await fetchMainGraph(searchYear, fcltyCd);
|
||||
if(res == null || res.data.wqltObjs == null || res.data.wqltObjs.length === 0) {
|
||||
set((state: DashBoardType) => ({
|
||||
@@ -1379,6 +1420,7 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType)
|
||||
RainManage: {
|
||||
...state.RainManage,
|
||||
rainManageList: [],
|
||||
isLoadingRainManage : false,
|
||||
}
|
||||
}));
|
||||
return;
|
||||
@@ -1756,9 +1798,11 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType)
|
||||
...state.RainManage,
|
||||
rainManageList: filteredData as RainManageListProps[],
|
||||
excelList: excelList,
|
||||
isLoadingRainManage : false,
|
||||
} : {
|
||||
...state.RainManage,
|
||||
rainManageList: filteredData as RainManageListProps[],
|
||||
isLoadingRainManage : false,
|
||||
}
|
||||
}));
|
||||
},
|
||||
|
||||
@@ -217,6 +217,7 @@ export type FacilityPrecipitationType = {
|
||||
facilityPrecipitation: FacilityPrecipitationProps[];
|
||||
excelList: ExcelType[];
|
||||
facilityPrecipitationCount: number;
|
||||
isLoading: boolean;
|
||||
},
|
||||
|
||||
PrecipitationDetail : {
|
||||
@@ -239,7 +240,8 @@ export const facilityPrecipitationInitState: FacilityPrecipitationType = {
|
||||
upHeadList3 : upHeadList3,
|
||||
facilityPrecipitation : facilityPrecipitation,
|
||||
excelList : [],
|
||||
facilityPrecipitationCount : 0
|
||||
facilityPrecipitationCount : 0,
|
||||
isLoading : true,
|
||||
},
|
||||
|
||||
PrecipitationDetail : {
|
||||
@@ -254,6 +256,14 @@ export type FacilityPrecipitationStore = FacilityPrecipitationType & FacilityPre
|
||||
export const facilityPrecipitationReducer:(set:(fn: (state: FacilityPrecipitationType) => FacilityPrecipitationType) => void)=>FacilityPrecipitationActions=(set: (fn: (state: FacilityPrecipitationType) => FacilityPrecipitationType) => void) => {
|
||||
return {
|
||||
searchFacilityPrecipitationList: async (pageNo: number, pageSize: number, searchYear: string, part?: string, nameCd?: string, fcltCpct?: string, operationValue?: string, fcltyNm?: string) => {
|
||||
set((state: FacilityPrecipitationType) => ({
|
||||
...state,
|
||||
FacilityPrecipitation: {
|
||||
...state.FacilityPrecipitation,
|
||||
isLoading: true,
|
||||
},
|
||||
}));
|
||||
|
||||
const res = await fetchFacilityPrecipitationList(pageNo, pageSize, searchYear, part, nameCd, fcltCpct, operationValue, fcltyNm);
|
||||
const data = res.data;
|
||||
const excelDownList: ExcelType[] = [];
|
||||
@@ -293,13 +303,15 @@ export const facilityPrecipitationReducer:(set:(fn: (state: FacilityPrecipitatio
|
||||
...state.FacilityPrecipitation,
|
||||
facilityPrecipitation: res.data,
|
||||
facilityPrecipitationCount: res.count,
|
||||
isLoading : false,
|
||||
}:{
|
||||
...state.FacilityPrecipitation,
|
||||
excelList: excelDownList,
|
||||
isLoading : false,
|
||||
},
|
||||
PrecipitationDetail:{
|
||||
...state.PrecipitationDetail,
|
||||
gridListPrecipitationDetail: res.detailData
|
||||
gridListPrecipitationDetail: res.detailData,
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -292,6 +292,7 @@ export type FacilityWaterQltyType = {
|
||||
upHeadList1: TableUpperProps[];
|
||||
upHeadList2: TableUpperProps[];
|
||||
upHeadList3: TableUpperProps[];
|
||||
isLoading: boolean;
|
||||
},
|
||||
|
||||
FacilityWaterQltyModal: {
|
||||
@@ -315,6 +316,7 @@ export const facilityWaterQltyInitState: FacilityWaterQltyType = {
|
||||
facilityWaterQltyCount: 0,
|
||||
facilityWaterQltyList: [],
|
||||
excelList: [],
|
||||
isLoading: true,
|
||||
isInit: false,
|
||||
mainLabelArray: mainLabelArray,
|
||||
upHeadList1: upHeadList1,
|
||||
@@ -395,6 +397,13 @@ export const facilityWaterQltyReducer = (set: (fn: (state: FacilityWaterQltyType
|
||||
* @param fcltyNm : 시설명
|
||||
*/
|
||||
searchFacilityWaterQltyList: async (pageNo: number, pageSize: number, searchYear: string, part?: string, nameCd?: string, fcltCpct?: string, operationValue?: string, fcltyNm?: string) => {
|
||||
set((state: FacilityWaterQltyType) => ({
|
||||
...state,
|
||||
FacilityWaterQltyMain: {
|
||||
...state.FacilityWaterQltyMain,
|
||||
isLoading: true,
|
||||
},
|
||||
}));
|
||||
const res = await fetchFacilityWaterQltyList(pageNo, pageSize, searchYear, part, nameCd, fcltCpct, operationValue, fcltyNm);
|
||||
const rtnData = res.data.map(item => {
|
||||
dataFormSetting(item)
|
||||
@@ -480,10 +489,12 @@ export const facilityWaterQltyReducer = (set: (fn: (state: FacilityWaterQltyType
|
||||
...state.FacilityWaterQltyMain,
|
||||
facilityWaterQltyList: rtnData,
|
||||
facilityWaterQltyCount: res.count,
|
||||
isLoading : false,
|
||||
}:{
|
||||
...state.FacilityWaterQltyMain,
|
||||
excelList: excelDownList,
|
||||
}
|
||||
isLoading : false,
|
||||
},
|
||||
}))
|
||||
},
|
||||
|
||||
@@ -574,7 +585,7 @@ export const facilityWaterQltyReducer = (set: (fn: (state: FacilityWaterQltyType
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 이틀 전, 하루 전이 강우영향일(3 이상)인 경우 해당 날도 강우영향일로 설정
|
||||
for(let idx = 0; idx < data.length; idx++) {
|
||||
if(data[idx]) {
|
||||
|
||||
@@ -219,6 +219,7 @@ export type FlowRateSearchType = {
|
||||
flowRateList:flowRateListProps[];
|
||||
flowRateCount: number;
|
||||
excelList: ExcelType[];
|
||||
isLoading: boolean;
|
||||
},
|
||||
|
||||
FlowRateModal : {
|
||||
@@ -252,7 +253,8 @@ export const flowRateSearchInitState:FlowRateSearchType = {
|
||||
upHeadList3 : upHeadList3,
|
||||
flowRateList : flowRateList,
|
||||
flowRateCount : 0,
|
||||
excelList: []
|
||||
excelList: [],
|
||||
isLoading: true,
|
||||
},
|
||||
FlowRateModal : {
|
||||
isInit : false,
|
||||
@@ -264,6 +266,13 @@ export const flowRateSearchInitState:FlowRateSearchType = {
|
||||
export const flowRateSearchReducer:(set:(fn: (state: FlowRateSearchType) => FlowRateSearchType) => void)=>FlowRateSearchActions=(set: (fn: (state: FlowRateSearchType) => FlowRateSearchType) => void) => {
|
||||
return {
|
||||
searchFlowRateList: async (pageNo: number, pageSize: number, searchYear: string, partCd?: string, nameCd?: string, fcltCpct?: string, operationValue?: string, fcltyNm?: string) => {
|
||||
set((state: FlowRateSearchType) => ({
|
||||
...state,
|
||||
FlowRateList: {
|
||||
...state.FlowRateList,
|
||||
isLoading: true,
|
||||
},
|
||||
}));
|
||||
const res = await fetchFlowRateList(pageNo, pageSize, searchYear, partCd, nameCd, fcltCpct, operationValue, fcltyNm);
|
||||
const data = res.data;
|
||||
const excelDownList: ExcelType[] = [];
|
||||
@@ -302,10 +311,12 @@ export const flowRateSearchReducer:(set:(fn: (state: FlowRateSearchType) => Flow
|
||||
...state.FlowRateList,
|
||||
flowRateList: rtnData,
|
||||
flowRateCount: res.count,
|
||||
isLoading : false,
|
||||
}:{
|
||||
...state.FlowRateList,
|
||||
excelList: excelDownList,
|
||||
}
|
||||
isLoading : false,
|
||||
},
|
||||
}))
|
||||
},
|
||||
searchFlowRateModalList: async (bscFctCd: string, searchYear: string) => {
|
||||
|
||||
@@ -146,6 +146,7 @@ export type PlanSewageType = {
|
||||
planSewageList: PlanSewageProps[];
|
||||
planSewageCount: number;
|
||||
excelList: ExcelType[];
|
||||
isLoading: boolean;
|
||||
},
|
||||
}
|
||||
|
||||
@@ -162,7 +163,8 @@ export const planSewageInitState: PlanSewageType = {
|
||||
upHeadList3 : upHeadList3,
|
||||
planSewageList : planSewageList,
|
||||
planSewageCount : 0,
|
||||
excelList : []
|
||||
excelList : [],
|
||||
isLoading : true,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -171,6 +173,13 @@ export type PlanSewageStore = PlanSewageType & PlanSewageActions;
|
||||
export const planSewageReducer:(set:(fn: (state: PlanSewageType) => PlanSewageType) => void)=>PlanSewageActions=(set: (fn: (state: PlanSewageType) => PlanSewageType) => void) => {
|
||||
return {
|
||||
searchPlanSewageList: async (pageNo: number, pageSize: number, searchYear: string, partCd?: string, nameCd?: string, fcltCpct?: string, operationValue?: string, fcltyNm?: string) => {
|
||||
set((state: PlanSewageType) => ({
|
||||
...state,
|
||||
PlanSewage: {
|
||||
...state.PlanSewage,
|
||||
isLoading: true,
|
||||
},
|
||||
}));
|
||||
const res = await fetchPlanSewageList(pageNo, pageSize, searchYear, partCd, nameCd, fcltCpct, operationValue, fcltyNm);
|
||||
const excelDownList: ExcelType[] = [];
|
||||
const data = res.data
|
||||
@@ -237,10 +246,12 @@ export const planSewageReducer:(set:(fn: (state: PlanSewageType) => PlanSewageTy
|
||||
...state.PlanSewage,
|
||||
planSewageList: resultData,
|
||||
planSewageCount: res.count,
|
||||
isLoading : false,
|
||||
}:{
|
||||
...state.PlanSewage,
|
||||
excelList: excelDownList,
|
||||
}
|
||||
isLoading : false,
|
||||
},
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,6 +318,7 @@ export type ProcessAreaType = {
|
||||
processAreaList: ProcessAreaProps[];
|
||||
processAreaCount: number;
|
||||
excelList: ExcelType[];
|
||||
isLoading: boolean;
|
||||
},
|
||||
|
||||
ProcessAreaDetail : {
|
||||
@@ -342,7 +343,8 @@ export const processAreaInitState: ProcessAreaType = {
|
||||
upHeadList1 : upHeadList1,
|
||||
processAreaList : processAreaList,
|
||||
processAreaCount : 0,
|
||||
excelList : []
|
||||
excelList : [],
|
||||
isLoading : true,
|
||||
},
|
||||
|
||||
ProcessAreaDetail : {
|
||||
@@ -369,6 +371,13 @@ export const processAreaReducer:(set:SetStateFunction)=>ProcessAreaActions=(set:
|
||||
* @param pageSize : 페이지 크기
|
||||
*/
|
||||
searchProcessAreaList: async ( pageNo:number, pageSize:number, ctpvNm?:string, sggNm?:string, targetYear?:string) => {
|
||||
set((state: ProcessAreaType) => ({
|
||||
...state,
|
||||
ProcessArea: {
|
||||
...state.ProcessArea,
|
||||
isLoading: true,
|
||||
},
|
||||
}));
|
||||
const res = await fetchProcessAreaList(pageNo, pageSize, ctpvNm, sggNm, targetYear);
|
||||
res.data.forEach((item:ProcessAreaProps) => {
|
||||
DataForm({ type: 'float1', column: 'fctCpc', item:item as unknown as Record<string, unknown>});
|
||||
@@ -414,9 +423,11 @@ export const processAreaReducer:(set:SetStateFunction)=>ProcessAreaActions=(set:
|
||||
...state.ProcessArea,
|
||||
processAreaList: res.data,
|
||||
processAreaCount: res.count,
|
||||
isLoading : false,
|
||||
}:{
|
||||
...state.ProcessArea,
|
||||
excelList: excelDownList,
|
||||
isLoading : false,
|
||||
},
|
||||
}))
|
||||
},
|
||||
@@ -427,49 +438,49 @@ export const processAreaReducer:(set:SetStateFunction)=>ProcessAreaActions=(set:
|
||||
if (rtnData) {
|
||||
upHeadListFcltyImproveInfo.forEach((head:TableUpperProps) => {
|
||||
if(head.id === 'planSwageQntSum' || head.id === 'swtrmtPpltnCnt' || head.id === 'swtrmtZoneArea') {
|
||||
head.title = '현재\n(' + rtnData.yr + '년)';
|
||||
rtnData.yr?head.title = '현재\n(' + rtnData.yr + '년)':head.title = '현재';
|
||||
} else if(head.id === 'planSwageQntSumDc1' || head.id === 'swtrmtPpltnCntDc1' || head.id === 'swtrmtZoneAreaDc1') {
|
||||
head.title = '1단계\n(' + rtnData.yrDc1 + '년)';
|
||||
rtnData.yrDc1?head.title = '1단계\n(' + rtnData.yrDc1 + '년)':head.title = '1단계';
|
||||
} else if(head.id === 'planSwageQntSumDc2' || head.id === 'swtrmtPpltnCntDc2' || head.id === 'swtrmtZoneAreaDc2') {
|
||||
head.title = '2단계\n(' + rtnData.yrDc2 + '년)';
|
||||
rtnData.yrDc2?head.title = '2단계\n(' + rtnData.yrDc2 + '년)':head.title = '2단계';
|
||||
} else if(head.id === 'planSwageQntSumDc3' || head.id === 'swtrmtPpltnCntDc3' || head.id === 'swtrmtZoneAreaDc3') {
|
||||
head.title = '3단계\n(' + rtnData.yrDc3 + '년)';
|
||||
rtnData.yrDc3?head.title = '3단계\n(' + rtnData.yrDc3 + '년)':head.title = '3단계';
|
||||
} else if(head.id === 'planSwageQntSumDc4' || head.id === 'swtrmtPpltnCntDc4' || head.id === 'swtrmtZoneAreaDc4') {
|
||||
head.title = '4단계\n(' + rtnData.yrDc4 + '년)';
|
||||
rtnData.yrDc4?head.title = '4단계\n(' + rtnData.yrDc4 + '년)':head.title = '4단계';
|
||||
} else if(head.id === 'planSwageQntSumDt4' || head.id === 'swtrmtPpltnCntDt4' || head.id === 'swtrmtZoneAreaDt4') {
|
||||
head.title = '기승인\n4단계(' + rtnData.yrDt4 + '년)';
|
||||
rtnData.yrDt4?head.title = '기승인\n4단계(' + rtnData.yrDt4 + '년)':head.title = '기승인\n4단계';
|
||||
}
|
||||
});
|
||||
|
||||
upHeadListProcessAreaPlan.forEach((head:TableUpperProps) => {
|
||||
if(head.id === 'planSwageQntSum' || head.id === 'swtrmtPpltnCnt' || head.id === 'swtrmtZoneArea') {
|
||||
head.title = '현재\n(' + rtnData.yr + '년)';
|
||||
rtnData.yr?head.title = '현재\n(' + rtnData.yr + '년)':head.title = '현재';
|
||||
} else if(head.id === 'planSwageQntSumDc1' || head.id === 'swtrmtPpltnCntDc1' || head.id === 'swtrmtZoneAreaDc1') {
|
||||
head.title = '1단계\n(' + rtnData.yrDc1 + '년)';
|
||||
rtnData.yrDc1?head.title = '1단계\n(' + rtnData.yrDc1 + '년)':head.title = '1단계';
|
||||
} else if(head.id === 'planSwageQntSumDc2' || head.id === 'swtrmtPpltnCntDc2' || head.id === 'swtrmtZoneAreaDc2') {
|
||||
head.title = '2단계\n(' + rtnData.yrDc2 + '년)';
|
||||
rtnData.yrDc2?head.title = '2단계\n(' + rtnData.yrDc2 + '년)':head.title = '2단계';
|
||||
} else if(head.id === 'planSwageQntSumDc3' || head.id === 'swtrmtPpltnCntDc3' || head.id === 'swtrmtZoneAreaDc3') {
|
||||
head.title = '3단계\n(' + rtnData.yrDc3 + '년)';
|
||||
rtnData.yrDc3?head.title = '3단계\n(' + rtnData.yrDc3 + '년)':head.title = '3단계';
|
||||
} else if(head.id === 'planSwageQntSumDc4' || head.id === 'swtrmtPpltnCntDc4' || head.id === 'swtrmtZoneAreaDc4') {
|
||||
head.title = '4단계\n(' + rtnData.yrDc4 + '년)';
|
||||
rtnData.yrDc4?head.title = '4단계\n(' + rtnData.yrDc4 + '년)':head.title = '4단계';
|
||||
} else if(head.id === 'planSwageQntSumDt4' || head.id === 'swtrmtPpltnCntDt4' || head.id === 'swtrmtZoneAreaDt4') {
|
||||
head.title = '기승인\n4단계(' + rtnData.yrDt4 + '년)';
|
||||
rtnData.yrDt4?head.title = '기승인\n4단계(' + rtnData.yrDt4 + '년)':head.title = '기승인\n4단계';
|
||||
}
|
||||
});
|
||||
|
||||
upHeadListProcessPopulation.forEach((head:TableUpperProps) => {
|
||||
if(head.id === 'planSwageQntSum' || head.id === 'swtrmtPpltnCnt' || head.id === 'swtrmtZoneArea') {
|
||||
head.title = '현재\n(' + rtnData.yr + '년)';
|
||||
rtnData.yr?head.title = '현재\n(' + rtnData.yr + '년)':head.title = '현재';
|
||||
} else if(head.id === 'planSwageQntSumDc1' || head.id === 'swtrmtPpltnCntDc1' || head.id === 'swtrmtZoneAreaDc1') {
|
||||
head.title = '1단계\n(' + rtnData.yrDc1 + '년)';
|
||||
rtnData.yrDc1?head.title = '1단계\n(' + rtnData.yrDc1 + '년)':head.title = '1단계';
|
||||
} else if(head.id === 'planSwageQntSumDc2' || head.id === 'swtrmtPpltnCntDc2' || head.id === 'swtrmtZoneAreaDc2') {
|
||||
head.title = '2단계\n(' + rtnData.yrDc2 + '년)';
|
||||
rtnData.yrDc2?head.title = '2단계\n(' + rtnData.yrDc2 + '년)':head.title = '2단계';
|
||||
} else if(head.id === 'planSwageQntSumDc3' || head.id === 'swtrmtPpltnCntDc3' || head.id === 'swtrmtZoneAreaDc3') {
|
||||
head.title = '3단계\n(' + rtnData.yrDc3 + '년)';
|
||||
rtnData.yrDc3?head.title = '3단계\n(' + rtnData.yrDc3 + '년)':head.title = '3단계';
|
||||
} else if(head.id === 'planSwageQntSumDc4' || head.id === 'swtrmtPpltnCntDc4' || head.id === 'swtrmtZoneAreaDc4') {
|
||||
head.title = '4단계\n(' + rtnData.yrDc4 + '년)';
|
||||
rtnData.yrDc4?head.title = '4단계\n(' + rtnData.yrDc4 + '년)':head.title = '4단계';
|
||||
} else if(head.id === 'planSwageQntSumDt4' || head.id === 'swtrmtPpltnCntDt4' || head.id === 'swtrmtZoneAreaDt4') {
|
||||
head.title = '기승인\n4단계(' + rtnData.yrDt4 + '년)';
|
||||
rtnData.yrDt4?head.title = '기승인\n4단계(' + rtnData.yrDt4 + '년)':head.title = '기승인\n4단계';
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -517,6 +517,7 @@ export type ProcessFacilityType = {
|
||||
processFacilityList:facilityListProps[];
|
||||
processFacilityCount:number;
|
||||
excelList : ExcelType[];
|
||||
isLoading: boolean;
|
||||
},
|
||||
|
||||
ProcessFacilityDetail : {
|
||||
@@ -551,7 +552,8 @@ export const processFacilityInitState:ProcessFacilityType = {
|
||||
upHeadList3 : upHeadList3,
|
||||
processFacilityList : processFacilityList,
|
||||
processFacilityCount:1,
|
||||
excelList : []
|
||||
excelList : [],
|
||||
isLoading : true,
|
||||
},
|
||||
|
||||
ProcessFacilityDetail : {
|
||||
@@ -588,6 +590,13 @@ export const processFacilityReducer:(set:SetStateFunction)=>ProcessFacilityActio
|
||||
* @param pageSize : 페이지 크기
|
||||
*/
|
||||
searchProcessFacility: async (pageNo:number, pageSize:number, partValue?:string, nameCd?:string, fcltCpct?:string, oprtngSttsCd?:string, facilityPartValue?:string, facilityName?:string) => {
|
||||
set((state: ProcessFacilityType) => ({
|
||||
...state,
|
||||
ProcessFacilityList: {
|
||||
...state.ProcessFacilityList,
|
||||
isLoading: true,
|
||||
},
|
||||
}));
|
||||
const res = await fetchFacilityList(pageNo, pageSize, partValue, nameCd, fcltCpct, oprtngSttsCd, facilityPartValue, facilityName);
|
||||
res.data.forEach((item:facilityListProps) => {
|
||||
DataForm({ type: 'date', column: 'cmplDt', item:item as unknown as Record<string, unknown>});
|
||||
@@ -635,9 +644,11 @@ export const processFacilityReducer:(set:SetStateFunction)=>ProcessFacilityActio
|
||||
...state.ProcessFacilityList,
|
||||
processFacilityList: res.data,
|
||||
processFacilityCount: res.count,
|
||||
isLoading: false,
|
||||
}:{
|
||||
...state.ProcessFacilityList,
|
||||
excelList: excelDownList,
|
||||
isLoading: false,
|
||||
},
|
||||
}))
|
||||
},
|
||||
@@ -648,6 +659,13 @@ export const processFacilityReducer:(set:SetStateFunction)=>ProcessFacilityActio
|
||||
* @param pageSize : 페이지 크기
|
||||
*/
|
||||
searchProcessFacilitySearching: async (pageNo:number, pageSize:number, partValue?:string, nameCd?:string, fcltCpct?:string, oprtngSttsCd?:string, facilityPartValue?:string, facilityName?:string) => {
|
||||
set((state: ProcessFacilityType) => ({
|
||||
...state,
|
||||
ProcessFacilityList: {
|
||||
...state.ProcessFacilityList,
|
||||
isLoading: true,
|
||||
},
|
||||
}));
|
||||
const res = await fetchFacilityListSearching(pageNo, pageSize, partValue, nameCd, fcltCpct, oprtngSttsCd, facilityPartValue, facilityName);
|
||||
/* res.data.forEach((item:facilityListProps) => {
|
||||
DataForm({ type: 'date', column: 'cmplDt', item:item as unknown as Record<string, unknown>});
|
||||
@@ -665,6 +683,7 @@ export const processFacilityReducer:(set:SetStateFunction)=>ProcessFacilityActio
|
||||
...state.ProcessFacilityList,
|
||||
processFacilityList: res.data,
|
||||
processFacilityCount: res.count,
|
||||
isLoading: false,
|
||||
},
|
||||
}))
|
||||
},
|
||||
|
||||
@@ -183,6 +183,7 @@ export type RdiType = {
|
||||
rdiList: RdiProps[]; // Changed from facilityAreaProps to ProcessAreaProps
|
||||
rdiCount: number;
|
||||
excelList: ExcelType[];
|
||||
isLoading: boolean;
|
||||
},
|
||||
}
|
||||
|
||||
@@ -199,7 +200,8 @@ export const rdiInitState: RdiType = {
|
||||
upHeadList3 : upHeadList3,
|
||||
rdiList : rdiList,
|
||||
rdiCount : 2,
|
||||
excelList : []
|
||||
excelList : [],
|
||||
isLoading : true,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,6 +222,14 @@ export const rdiReducer:(set:SetStateFunction)=>RdiActions=(set: SetStateFunctio
|
||||
console.log("tableActionsExport");
|
||||
return {
|
||||
searchRdiList: async (pageNo: number, pageSize: number, searchYear: string, partCd?: string, nameCd?: string, fcltCpct?: string, operationValue?: string, fcltyNm?: string) => {
|
||||
set((state: RdiType) => ({
|
||||
...state,
|
||||
Rdi: {
|
||||
...state.Rdi,
|
||||
isLoading: true,
|
||||
},
|
||||
}));
|
||||
|
||||
const res = await fetchRdiList(pageNo, pageSize, searchYear, partCd, nameCd, fcltCpct, operationValue, fcltyNm);
|
||||
const data = res.data;
|
||||
const excelDownList: ExcelType[] = [];
|
||||
@@ -264,10 +274,12 @@ export const rdiReducer:(set:SetStateFunction)=>RdiActions=(set: SetStateFunctio
|
||||
...state.Rdi,
|
||||
rdiList: rtnData,
|
||||
rdiCount: res.count,
|
||||
isLoading : false,
|
||||
}:{
|
||||
...state.Rdi,
|
||||
excelList: excelDownList,
|
||||
}
|
||||
isLoading : false,
|
||||
},
|
||||
}))
|
||||
},
|
||||
}
|
||||
|
||||
@@ -161,6 +161,7 @@ export type SewageOccurType = {
|
||||
sewageOccurList: SewageOccurProps[]; // Changed from facilityAreaProps to ProcessAreaProps
|
||||
sewageOccurCount: number;
|
||||
excelList: ExcelType[];
|
||||
isLoading: boolean;
|
||||
},
|
||||
|
||||
SewageOccurDetail : {
|
||||
@@ -183,7 +184,8 @@ export const sewageOccurInitState: SewageOccurType = {
|
||||
upHeadList3 : upHeadList3,
|
||||
sewageOccurList : sewageOccurList,
|
||||
sewageOccurCount : 2,
|
||||
excelList : []
|
||||
excelList : [],
|
||||
isLoading : true,
|
||||
},
|
||||
|
||||
SewageOccurDetail : {
|
||||
@@ -212,9 +214,15 @@ export type FlowResponse = {
|
||||
export const sewageOccurReducer:(set:any)=>SewageOccurActions=(set: any) => {
|
||||
return {
|
||||
searchSewageOccurList: async (pageNo: number, pageSize: number, searchYear: string, part?: string, nameCd?: string, fcltCpct?: string, operationValue?: string, fcltyNm?: string) => {
|
||||
set((state: SewageOccurType) => ({
|
||||
...state,
|
||||
SewageOccur: {
|
||||
...state.SewageOccur,
|
||||
isLoading: true,
|
||||
},
|
||||
}));
|
||||
const res = await fetchSewageOccurList(pageNo, pageSize, searchYear, part, nameCd, fcltCpct, operationValue, fcltyNm);
|
||||
const data = res.data;
|
||||
console.log('first data : ', data);
|
||||
// Promise.all을 사용하여 모든 비동기 작업이 완료될 때까지 기다림
|
||||
const calData = await Promise.all(data.map(async (item: SewageOccurProps) => {
|
||||
item.sidoNm = item.lclgvrnmntNm.split(' ')[0]?.toString() || '';
|
||||
@@ -300,10 +308,12 @@ export const sewageOccurReducer:(set:any)=>SewageOccurActions=(set: any) => {
|
||||
...state.SewageOccur,
|
||||
sewageOccurList: calData,
|
||||
sewageOccurCount: res.count,
|
||||
isLoading : false,
|
||||
}:{
|
||||
...state.SewageOccur,
|
||||
excelList: [],
|
||||
}
|
||||
isLoading : false,
|
||||
},
|
||||
}))
|
||||
},
|
||||
|
||||
|
||||
@@ -218,6 +218,7 @@ export type UnderWaterType = {
|
||||
underWaterList: UnderWaterProps[]; // Changed from facilityAreaProps to ProcessAreaProps
|
||||
underWaterCount: number;
|
||||
excelList: ExcelType[];
|
||||
isLoading: boolean;
|
||||
},
|
||||
|
||||
UnderWaterDetail : {
|
||||
@@ -240,7 +241,8 @@ export const underWaterInitState: UnderWaterType = {
|
||||
upHeadList3 : upHeadList3,
|
||||
underWaterList : underWaterList,
|
||||
underWaterCount : 4,
|
||||
excelList : []
|
||||
excelList : [],
|
||||
isLoading : true,
|
||||
},
|
||||
|
||||
UnderWaterDetail : {
|
||||
@@ -315,6 +317,14 @@ export const calRainEffectDay = (data: FlowDataItem[], weather: string) => {
|
||||
export const underWaterReducer:(set:(fn: (state: UnderWaterType) => UnderWaterType) => void)=>UnderWaterActions=(set: (fn: (state: UnderWaterType) => UnderWaterType) => void) => {
|
||||
return {
|
||||
searchUnderWaterList: async (pageNo: number, pageSize: number, searchYear: string, part?: string, nameCd?: string, fcltCpct?: string, operationValue?: string, fcltyNm?: string) => {
|
||||
set((state: UnderWaterType) => ({
|
||||
...state,
|
||||
UnderWater: {
|
||||
...state.UnderWater,
|
||||
isLoading: true,
|
||||
},
|
||||
}));
|
||||
|
||||
const res = await fetchUnderWaterList(pageNo, pageSize, searchYear, part, nameCd, fcltCpct, operationValue, fcltyNm);
|
||||
const data = res.data;
|
||||
const calData = await Promise.all(data.map(async (item: UnderWaterProps) => {
|
||||
@@ -394,10 +404,12 @@ export const underWaterReducer:(set:(fn: (state: UnderWaterType) => UnderWaterTy
|
||||
...state.UnderWater,
|
||||
underWaterList: calData,
|
||||
underWaterCount: res.count,
|
||||
isLoading : false,
|
||||
}:{
|
||||
...state.UnderWater,
|
||||
excelList: excelDownList,
|
||||
}
|
||||
isLoading : false,
|
||||
excelList: excelDownList
|
||||
},
|
||||
}))
|
||||
},
|
||||
unserWaterModal:async (bscFctCd, searchYear)=>{
|
||||
|
||||
Reference in New Issue
Block a user