dm: 물재이용현황 시도 수정
This commit is contained in:
@@ -85,22 +85,20 @@ export const DmStatusReducer = (set: any): DmStatusActions => {
|
||||
|
||||
const boardData: DmStatusBoardType[] = data.data.map(
|
||||
(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 rainwater = item.rainwater;
|
||||
const reclaimed = item.reclaimed;
|
||||
const sewageCnt = item.sewageCnt;
|
||||
const rainwaterCnt = item.rainwaterCnt;
|
||||
const reclaimedCnt = item.reclaimedCnt;
|
||||
if (!regionText) console.log("item.region ", item.region);
|
||||
if (regionText && regionText.text) {
|
||||
|
||||
return {
|
||||
region: regionText ? regionText.text : item.region,
|
||||
sewage: sewageCnt + "(" + sewage + ")",
|
||||
rainwater: rainwaterCnt + "(" + rainwater + ")",
|
||||
reclaimed: reclaimedCnt + "(" + reclaimed + ")",
|
||||
region: regionText ? regionText : item.region,
|
||||
sewage: sewageCnt + "(" + sewage.toLocaleString() + ")",
|
||||
rainwater: rainwaterCnt + "(" + rainwater.toLocaleString() + ")",
|
||||
reclaimed: reclaimedCnt + "(" + reclaimed.toLocaleString() + ")",
|
||||
};
|
||||
}
|
||||
}
|
||||
).filter((item): item is DmStatusBoardType => item !== undefined);
|
||||
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
export type DmStatusDataType = {
|
||||
region: string;
|
||||
sidoNm: string; // 시도명
|
||||
region: string; // 시도코드
|
||||
sewage: string;
|
||||
rainwater: string;
|
||||
reclaimed: string;
|
||||
sewageCnt:string
|
||||
rainwaterCnt:string
|
||||
reclaimedCnt:string
|
||||
sewageCnt:string;
|
||||
rainwaterCnt:string;
|
||||
reclaimedCnt:string;
|
||||
};
|
||||
|
||||
export type DmStatusBoardType = {
|
||||
sidoNm: string; // 시도명
|
||||
region: string;
|
||||
sewage: string;
|
||||
rainwater: string;
|
||||
|
||||
@@ -209,10 +209,13 @@ export default function FacilityPrecipitation() {
|
||||
<ContentsDiv>
|
||||
<SearchBaseForm
|
||||
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} />
|
||||
<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[5] as string} selectArray={selectOperationData} onSelectValue={(val) => setOperationValue(val.toString())} value={operationValue} selectClass={undefined} />
|
||||
<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[5] as string} selectArray={selectOperationData}
|
||||
onSelectValue={(val) => setOperationValue(val.toString())} value={operationValue} selectClass={undefined} />
|
||||
</>}
|
||||
rightChildren={undefined}
|
||||
selectSidoData={selectSidoData}
|
||||
@@ -226,16 +229,19 @@ export default function FacilityPrecipitation() {
|
||||
excelClick={excelDownload}
|
||||
initClick={resetVal}
|
||||
ref={ref} isAdmin={false}/>
|
||||
<ListDiv>
|
||||
<LoadingOverlay isLoading={isLoading} />
|
||||
<div className="h-full w-full overflow-x-scroll min-[1200px]:overflow-x-hidden">
|
||||
<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} />
|
||||
<ListDiv>
|
||||
<LoadingOverlay isLoading={isLoading} />
|
||||
<div className="h-full w-full overflow-x-scroll min-[1200px]:overflow-x-hidden">
|
||||
<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} />
|
||||
</div>
|
||||
<UnderComment divHeight={"3"} commentArray={["강우일은 3mm 이상만 해당 / 강우영향일은 강우일 및 강우일 후 연속 2일간으로 정의"]} />
|
||||
</div>
|
||||
<UnderComment divHeight={"3"} commentArray={["강우일은 3mm 이상만 해당 / 강우영향일은 강우일 및 강우일 후 연속 2일간으로 정의"]} />
|
||||
</div>
|
||||
</ListDiv>
|
||||
</ContentsDiv>
|
||||
</ListDiv>
|
||||
</ContentsDiv>
|
||||
{selectedRow !== null && (
|
||||
<UiModal
|
||||
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 url = '/fclt/rain' + tailStr;
|
||||
const res = await getFetch('fo', url);
|
||||
|
||||
Reference in New Issue
Block a user