dm: 물재이용현황 시도 수정
This commit is contained in:
@@ -85,22 +85,20 @@ export const DmStatusReducer = (set: any): DmStatusActions => {
|
|||||||
|
|
||||||
const boardData: DmStatusBoardType[] = data.data.map(
|
const boardData: DmStatusBoardType[] = data.data.map(
|
||||||
(item: DmStatusDataType) => {
|
(item: DmStatusDataType) => {
|
||||||
const regionText = cityCd.find((city) => item.region === city.val);
|
const regionText = item.sidoNm; //cityCd.find((city) => item.region === city.val);
|
||||||
const sewage = item.sewage;
|
const sewage = item.sewage;
|
||||||
const rainwater = item.rainwater;
|
const rainwater = item.rainwater;
|
||||||
const reclaimed = item.reclaimed;
|
const reclaimed = item.reclaimed;
|
||||||
const sewageCnt = item.sewageCnt;
|
const sewageCnt = item.sewageCnt;
|
||||||
const rainwaterCnt = item.rainwaterCnt;
|
const rainwaterCnt = item.rainwaterCnt;
|
||||||
const reclaimedCnt = item.reclaimedCnt;
|
const reclaimedCnt = item.reclaimedCnt;
|
||||||
if (!regionText) console.log("item.region ", item.region);
|
|
||||||
if (regionText && regionText.text) {
|
|
||||||
return {
|
return {
|
||||||
region: regionText ? regionText.text : item.region,
|
region: regionText ? regionText : item.region,
|
||||||
sewage: sewageCnt + "(" + sewage + ")",
|
sewage: sewageCnt + "(" + sewage.toLocaleString() + ")",
|
||||||
rainwater: rainwaterCnt + "(" + rainwater + ")",
|
rainwater: rainwaterCnt + "(" + rainwater.toLocaleString() + ")",
|
||||||
reclaimed: reclaimedCnt + "(" + reclaimed + ")",
|
reclaimed: reclaimedCnt + "(" + reclaimed.toLocaleString() + ")",
|
||||||
};
|
};
|
||||||
}
|
|
||||||
}
|
}
|
||||||
).filter((item): item is DmStatusBoardType => item !== undefined);
|
).filter((item): item is DmStatusBoardType => item !== undefined);
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
export type DmStatusDataType = {
|
export type DmStatusDataType = {
|
||||||
region: string;
|
sidoNm: string; // 시도명
|
||||||
|
region: string; // 시도코드
|
||||||
sewage: string;
|
sewage: string;
|
||||||
rainwater: string;
|
rainwater: string;
|
||||||
reclaimed: string;
|
reclaimed: string;
|
||||||
sewageCnt:string
|
sewageCnt:string;
|
||||||
rainwaterCnt:string
|
rainwaterCnt:string;
|
||||||
reclaimedCnt:string
|
reclaimedCnt:string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type DmStatusBoardType = {
|
export type DmStatusBoardType = {
|
||||||
|
sidoNm: string; // 시도명
|
||||||
region: string;
|
region: string;
|
||||||
sewage: string;
|
sewage: string;
|
||||||
rainwater: string;
|
rainwater: string;
|
||||||
|
|||||||
@@ -209,10 +209,13 @@ export default function FacilityPrecipitation() {
|
|||||||
<ContentsDiv>
|
<ContentsDiv>
|
||||||
<SearchBaseForm
|
<SearchBaseForm
|
||||||
leftChildren={<>
|
leftChildren={<>
|
||||||
<SelectBox className="col-span-3" label={labelArray[3] as string} selectArray={selectUpdownData} onSelectValue={(val) => setFcltCpct(val.toString())} value={fcltCpct} selectClass={undefined} />
|
<SelectBox className="col-span-3" label={labelArray[3] as string} selectArray={selectUpdownData}
|
||||||
|
onSelectValue={(val) => setFcltCpct(val.toString())} value={fcltCpct} selectClass={undefined} />
|
||||||
<SearchInput className={"col-span-3"} label={labelArray[4] as string} textValue={fcltyName} setText={setFcltyName} />
|
<SearchInput className={"col-span-3"} label={labelArray[4] as string} textValue={fcltyName} setText={setFcltyName} />
|
||||||
<SelectBox className="col-span-3" label={labelArray[6] as string} selectArray={selectSearchYear} onSelectValue={(val) => setSearchYear(val.toString())} value={searchYear} selectClass={undefined} />
|
<SelectBox className="col-span-3" label={labelArray[6] as string} selectArray={selectSearchYear}
|
||||||
<SelectBox className="col-span-3" label={labelArray[5] as string} selectArray={selectOperationData} onSelectValue={(val) => setOperationValue(val.toString())} value={operationValue} selectClass={undefined} />
|
onSelectValue={(val) => setSearchYear(val.toString())} value={searchYear} selectClass={undefined} />
|
||||||
|
<SelectBox className="col-span-3" label={labelArray[5] as string} selectArray={selectOperationData}
|
||||||
|
onSelectValue={(val) => setOperationValue(val.toString())} value={operationValue} selectClass={undefined} />
|
||||||
</>}
|
</>}
|
||||||
rightChildren={undefined}
|
rightChildren={undefined}
|
||||||
selectSidoData={selectSidoData}
|
selectSidoData={selectSidoData}
|
||||||
@@ -226,16 +229,19 @@ export default function FacilityPrecipitation() {
|
|||||||
excelClick={excelDownload}
|
excelClick={excelDownload}
|
||||||
initClick={resetVal}
|
initClick={resetVal}
|
||||||
ref={ref} isAdmin={false}/>
|
ref={ref} isAdmin={false}/>
|
||||||
<ListDiv>
|
<ListDiv>
|
||||||
<LoadingOverlay isLoading={isLoading} />
|
<LoadingOverlay isLoading={isLoading} />
|
||||||
<div className="h-full w-full overflow-x-scroll min-[1200px]:overflow-x-hidden">
|
<div className="h-full w-full overflow-x-scroll min-[1200px]:overflow-x-hidden">
|
||||||
<div className="w-[120%] min-[1200px]:w-[100%]">
|
<div className="w-[120%] min-[1200px]:w-[100%]">
|
||||||
<UiTable cellClick={(index: number | undefined) => index !== undefined && cellClick(index)} headName={"시설별 강수현황"} tableData={mainList} headlist={upheadList} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} widthFixed={true} />
|
<UiTable cellClick={(index: number | undefined) => index !== undefined && cellClick(index)}
|
||||||
|
headName={"시설별 강수현황"}
|
||||||
|
tableData={mainList} headlist={upheadList} pageSize={10} total={total}
|
||||||
|
resetPageNo={resetPage} onPageChange={handlePageChange} widthFixed={true} />
|
||||||
|
</div>
|
||||||
|
<UnderComment divHeight={"3"} commentArray={["강우일은 3mm 이상만 해당 / 강우영향일은 강우일 및 강우일 후 연속 2일간으로 정의"]} />
|
||||||
</div>
|
</div>
|
||||||
<UnderComment divHeight={"3"} commentArray={["강우일은 3mm 이상만 해당 / 강우영향일은 강우일 및 강우일 후 연속 2일간으로 정의"]} />
|
</ListDiv>
|
||||||
</div>
|
</ContentsDiv>
|
||||||
</ListDiv>
|
|
||||||
</ContentsDiv>
|
|
||||||
{selectedRow !== null && (
|
{selectedRow !== null && (
|
||||||
<UiModal
|
<UiModal
|
||||||
body={<PrecipitationModal searchYear={searchYear} fcltyName={fcltyNm} facilityCd={fcltyCd} detailList={gridListPrecipitationDetail}></PrecipitationModal>}
|
body={<PrecipitationModal searchYear={searchYear} fcltyName={fcltyNm} facilityCd={fcltyCd} detailList={gridListPrecipitationDetail}></PrecipitationModal>}
|
||||||
|
|||||||
@@ -153,7 +153,9 @@ export const fetchFacilityRainDetailList = async (searchYear: string|undefined,
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchFacilityPrecipitationList = async (pageNo: number, pageSize: number, searchYear: string, part?: string, nameCd?: string, fcltCpct?: string, operationValue?: string, fcltyNm?: string) => {
|
const fetchFacilityPrecipitationList = async (pageNo: number, pageSize: number, searchYear: string, part?: string
|
||||||
|
, nameCd?: string, fcltCpct?: string, operationValue?: string, fcltyNm?: string) => {
|
||||||
|
|
||||||
const tailStr = '/'+pageNo + '/' + pageSize + '/' + searchYear + (part?'/' + part:'' ) + (nameCd?'/' + nameCd:'' ) + (fcltCpct?'/' + fcltCpct:'' ) + (operationValue?'/' + operationValue:'' ) + (fcltyNm && fcltyNm !== '' ? '/' + fcltyNm : '') ;
|
const tailStr = '/'+pageNo + '/' + pageSize + '/' + searchYear + (part?'/' + part:'' ) + (nameCd?'/' + nameCd:'' ) + (fcltCpct?'/' + fcltCpct:'' ) + (operationValue?'/' + operationValue:'' ) + (fcltyNm && fcltyNm !== '' ? '/' + fcltyNm : '') ;
|
||||||
const url = '/fclt/rain' + tailStr;
|
const url = '/fclt/rain' + tailStr;
|
||||||
const res = await getFetch('fo', url);
|
const res = await getFetch('fo', url);
|
||||||
|
|||||||
Reference in New Issue
Block a user