diff --git a/apps/wr/app/page.tsx b/apps/wr/app/page.tsx index c2be341cf..d1a9fc387 100644 --- a/apps/wr/app/page.tsx +++ b/apps/wr/app/page.tsx @@ -146,11 +146,6 @@ export default function Home() { 중수도시설통계 -
- -
diff --git a/apps/wr/app/ruseFcltMng/prfmncSttn/pbnstPrfmncSttn/page.tsx b/apps/wr/app/ruseFcltMng/prfmncSttn/pbnstPrfmncSttn/page.tsx index b1fe27005..ff327b4d0 100644 --- a/apps/wr/app/ruseFcltMng/prfmncSttn/pbnstPrfmncSttn/page.tsx +++ b/apps/wr/app/ruseFcltMng/prfmncSttn/pbnstPrfmncSttn/page.tsx @@ -5,13 +5,15 @@ import { btnClass } from "@/app/store/common/code"; import { initValInUsage, initValOutUsage, subTotalObj, totalObj, type FcPrfType, type PrfType } from "@/app/store/prfmncReg/pbnstPrfmncReg/type"; import { excelPrfmncSttnParsing } from "@/app/store/prfmncSttn/pbnstPrfmncSttn/excel"; import { excelDownload, yearOptions } from "@/components/lib/func/commom"; +import { InputTableBody } from "@/components/lib/func/TableData"; import SearchInputText from "@/components/ui/searchInput/searchInput"; -import { CHART_FORM, ContentsDiv, MainChart, SearchBaseForm, SelectBox, Title, UiTable, type ChartConfig, type ReturnType } from "@common/business_components"; +import { CHART_FORM, ContentsDiv, MainChart, ScrollArea, SearchBaseForm, SelectBox, Title, UiTable, type ChartConfig, type ReturnType } from "@common/business_components"; import ListDiv from "@common/business_components/ui/list_div"; -import { Label } from "@common/components/ui"; +import { Label, Table, TableBody, TableHeader } from "@common/components/ui"; import { useCallback, useEffect, useRef, useState } from "react"; import toast, { Toaster } from "react-hot-toast"; import { useTranslation } from "react-i18next"; +import { headMakeprfmnc } from "../../prfmncReg/chkgdnReg/TableHead"; export default function PbnstPrfmncSttn() { const { @@ -88,11 +90,11 @@ export default function PbnstPrfmncSttn() { const prfTableData = (prfList: PrfType[], year: string) => { const inUsageData = structuredClone(initValInUsage).map(row => ({ ...row - // 구분: "장내용수", + // 구분: "장내용수", })); const outUsageData = structuredClone(initValOutUsage).map(row => ({ ...row - // 구분: "장외용수", + // 구분: "장외용수", })); const inSubtotal = { ...structuredClone(subTotalObj), 구분: "장내용수" }; const outSubtotal = { ...structuredClone(subTotalObj), 구분: "장외용수" }; @@ -505,7 +507,7 @@ export default function PbnstPrfmncSttn() { useEffect(() => { if (pbnRuseNm.length > 1) - pbnNmSearch("1", "23", ref.current, pbnRuseNm, searchYear,[]); + pbnNmSearch("1", "23", ref.current, pbnRuseNm, searchYear, []); }, [pbnRuseNm]); const cellClick = (index: number | undefined, headId: string) => { @@ -554,7 +556,7 @@ export default function PbnstPrfmncSttn() { setPbnRuseNm(searchNm || ""); }} setRtnData={/*function (rtnData: any[]): void {setbdstTable(rtnData);}*/ - ()=>{} + () => { } } searchList={pbnstSttn.pbnstSearchData || []} > @@ -643,15 +645,15 @@ export default function PbnstPrfmncSttn() {

하수재이용실적 현황 (단위: m³)

- - {/* */} - {/*
+ {/* */} + {/* */} + {/*

- {"하수처리수재이용 실적(m3) 등록결과"} + {"하수처리수재이용 실적(m³) 등록결과"}

*/} - {}}> - + */} - {/* - -
+ + 0 ? "h-[60vh]" : ""}> + {/*

- {"하수처리수재이용 실적(m3) 등록결과"} + {"하수재이용실적 현황 (단위: m³)"}

-
+
*/} - - - {headMakeprfmnc(monthHeadList, [])} - - - {InputTableBody(prfData ?? [], monthHeadList, setPrfData)} - -
-
-
*/} - {/*
*/} + + + {headMakeprfmnc(monthHeadList, [])} + + + {/* {InputTableBody(prfData ?? [], monthHeadList, setPrfData)} */} + {InputTableBody(prfData ?? [], monthHeadList, setPrfData, false)} + +
+
- + {/* */} + + {/* */}
diff --git a/apps/wr/app/store/matDmd/drgtSttn/index.tsx b/apps/wr/app/store/matDmd/drgtSttn/index.tsx index ba71f8a7d..fa1d3f894 100644 --- a/apps/wr/app/store/matDmd/drgtSttn/index.tsx +++ b/apps/wr/app/store/matDmd/drgtSttn/index.tsx @@ -35,13 +35,12 @@ export const drgtStateExport: drgtState = { } } -const initFetch = async (fromDate: string, toDate: string, sido:string[]) => { -console.log("sido",sido) +const initFetch = async (fromDate: string, toDate: string, sido: string[]) => { const drgtData = await postFectch( - `/il/getDataCount/${fromDate}/${toDate}`, - sido, - fetchType.WR - ); + `/il/getDataCount/${fromDate}/${toDate}`, + sido, + fetchType.WR + ); //주의, 관심, 정상 추출 const statusData = Array.from( @@ -99,10 +98,10 @@ export const drgtActionsExport: (set: any) => drgtActions = ( const year = today.getFullYear(); const month = String(today.getMonth() + 1).padStart(2, '0'); const formatted = `${year}${month}`; + const fromDate = formatted; const toDate = formatted; - //FIXME: 페이지 처음 로딩될때 데이터 보려고 6월로 박아놓음 이거 fromDate로 고치기 - const drgtRes = await initFetch("202506", toDate, []); + const drgtRes = await initFetch(fromDate, toDate, []); set((state: drgtState) => { return { ...state, diff --git a/apps/wr/components/lib/func/TableData.tsx b/apps/wr/components/lib/func/TableData.tsx index 739ceaa4d..c6ee9f49c 100644 --- a/apps/wr/components/lib/func/TableData.tsx +++ b/apps/wr/components/lib/func/TableData.tsx @@ -235,7 +235,8 @@ const handleChange = ( export const InputTableBody = ( chgRes: any[] | [], headList: TableUpperProps[], - setInputData: (data: any[]) => void + setInputData: (data: any[]) => void, + isEditable: boolean = true ) => { // mergeCell 처리용 const getRowSpan = (data: any[], key: string, rowIndex: number) => { @@ -301,7 +302,8 @@ export const InputTableBody = ( ); } // 기본 셀 - return head.edit === true && data.edit !== false ? ( + // return head.edit === true && data.edit !== false ? ( + return isEditable && head.edit === true && data.edit !== false ? ( ); })} + {chgRes.length === 0 && ( + + + 조회된 결과가 없습니다. + + + )} ); }; \ No newline at end of file diff --git a/apps/wr/components/ui/form/fcltReg/bdstReg/bdstAdd.tsx b/apps/wr/components/ui/form/fcltReg/bdstReg/bdstAdd.tsx index dd2dddeab..9647c2731 100644 --- a/apps/wr/components/ui/form/fcltReg/bdstReg/bdstAdd.tsx +++ b/apps/wr/components/ui/form/fcltReg/bdstReg/bdstAdd.tsx @@ -1,6 +1,7 @@ "use client"; import { useWrStore } from "@/app/store"; +import { numSize } from "@/app/store/common/code/basicCode"; import { selectClass } from "@/app/store/ruseFcltMng/fcltReg/rainReg"; import { formH1Class } from "@/components/lib/class/comClass"; import { safeDate } from "@/components/lib/func/commom"; @@ -94,6 +95,7 @@ export default function BdstAdd({ form, readonly }: { form: any; readonly?: bool value={f.value ?? code.chBuCd[0]?.val} className={""} label={""} + readOnly={readonly} /> )} @@ -113,6 +115,7 @@ export default function BdstAdd({ form, readonly }: { form: any; readonly?: bool onChange: (date) => f.onChange(date), }} selectClass="w-full" + readOnly={readonly} /> )} @@ -130,6 +133,8 @@ export default function BdstAdd({ form, readonly }: { form: any; readonly?: bool onChange={(e) => f.onChange(e.target.value)} value={f.value || ''} className={selectClass} + readOnly={readonly} + maxLength={numSize} /> )} diff --git a/apps/wr/components/ui/form/fcltReg/bdstReg/bdstReg.tsx b/apps/wr/components/ui/form/fcltReg/bdstReg/bdstReg.tsx index 726f4e689..e19cf61ef 100644 --- a/apps/wr/components/ui/form/fcltReg/bdstReg/bdstReg.tsx +++ b/apps/wr/components/ui/form/fcltReg/bdstReg/bdstReg.tsx @@ -1,6 +1,8 @@ import { useWrStore } from "@/app/store"; +import { numSize, txtSize } from "@/app/store/common/code/basicCode"; import { selectClass } from "@/app/store/ruseFcltMng/fcltReg/rainReg"; import { formH1Class } from "@/components/lib/class/comClass"; +import { handleCommaNumberChange } from "@/components/lib/func/commom"; import { FormField, FormUi, @@ -134,6 +136,7 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) { field.onChange(e.target.value) }} value={field.value||''} + maxLength={txtSize} /> )} @@ -153,6 +156,7 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) { field.onChange(e.target.value) }} value={field.value||''} + maxLength={50} /> )} @@ -217,9 +221,10 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) { placeholder="면적을 입력하세요" type="text" onChange={(e) => { - field.onChange(e.target.value) + handleCommaNumberChange(e, field.onChange); }} value={field.value||''} + maxLength={numSize} /> )} diff --git a/apps/wr/components/ui/modal/coMat/drgtDetailModal.tsx b/apps/wr/components/ui/modal/coMat/drgtDetailModal.tsx index 500a0cf40..e36ce5589 100644 --- a/apps/wr/components/ui/modal/coMat/drgtDetailModal.tsx +++ b/apps/wr/components/ui/modal/coMat/drgtDetailModal.tsx @@ -14,12 +14,12 @@ export default function DrgtDetailModal({ data: customDrgt[]; }) { - // const [isSggNm, setIsSggNm] = useState('') - const [excelData, setExcelData] = useState(); + // const [isSggNm, setIsSggNm] = useState('') + const [excelData, setExcelData] = useState(); const excelClick = () => { downloadExcel({ data: excelData ?? [], - fileName: "우리동네가뭄 상세현황", + fileName: `우리동네가뭄 상세현황 - ${data[0]?.sggNm}`, sheetNameArray: ["Sheet1"], headerRange: "A1:C1" }) @@ -36,10 +36,10 @@ export default function DrgtDetailModal({ } }) : []; setExcelData(exData) - // if(data&&data[0].sggNm){ - ////TODO: data.sggNm [0[인지 data.sggNm 인지 사용하는지 확인필요 - // setIsSggNm(data[0].sggNm) - // } + // if(data&&data[0].sggNm){ + ////TODO: data.sggNm [0[인지 data.sggNm 인지 사용하는지 확인필요 + // setIsSggNm(data[0].sggNm) + // } }, [data]) return ( @@ -47,7 +47,7 @@ export default function DrgtDetailModal({
- + <Title title={`우리동네가뭄 상세내용 - ${data[0] && data[0].sggNm ? data[0].sggNm : ''}`} /> <div className="flex flex-row space-x-2"> <Button size={"sm"} @@ -65,15 +65,11 @@ export default function DrgtDetailModal({ <ScrollArea className="h-[63vh]"> <UiTable headName={undefined} - tableData={data } + tableData={data} headlist={drgtDetailHeadListExport} - pageSize={10} - total={10000} - cellClick={(index: number | undefined, headId: string) => { - console.log(' indx ' , index) - console.log(' headId ' , headId) - - }} + pageSize={0} + total={0} + cellClick={undefined} onPageChange={() => { }} ></UiTable> </ScrollArea> diff --git a/apps/wr/components/ui/modal/sttn/pbnstSttnModal/pbnstSttnModal.tsx b/apps/wr/components/ui/modal/sttn/pbnstSttnModal/pbnstSttnModal.tsx index 1e87590b8..20a13dc31 100644 --- a/apps/wr/components/ui/modal/sttn/pbnstSttnModal/pbnstSttnModal.tsx +++ b/apps/wr/components/ui/modal/sttn/pbnstSttnModal/pbnstSttnModal.tsx @@ -326,7 +326,7 @@ export function PbnstSttnModal({ data, titleVisible }: { data: customPbnst; titl <ScrollArea className="h-[60vh]"> <div className="card-header"> <h3 className="text-2xl font-medium text-label"> - {"하수처리수재이용 실적(m3) 등록결과"} + {"하수처리수재이용 실적(m³) 등록결과"} </h3> </div> <Table variant="secondary">