From f25686da46a0d9b88fa711710dd38a386db6a6ef Mon Sep 17 00:00:00 2001 From: leedj312 Date: Thu, 10 Apr 2025 18:13:40 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A7=80=EB=8F=84=EC=A0=90=EA=B2=80=20?= =?UTF-8?q?=EA=B2=B0=EA=B3=BC=EB=93=B1=EB=A1=9D=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=ED=8D=BC=EB=B8=94=EB=A6=AC=EC=8B=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/page.tsx | 28 ++-- .../ruseFcltMng/prfmncReg/chkgdnReg/page.tsx | 114 ++++++++++++++++ .../prfmncReg/chkgdnReg/rainChkgdn/index.tsx | 125 ++++++++++++++++++ .../prfmncReg/chkgdnReg/rswrtChkgdn/index.tsx | 72 ++++++++++ .../ruseFcltMng/fcltReg/htdflReg/index.tsx | 2 +- apps/wr/app/store/store.tsx | 19 ++- .../ui/modal/chkgdModal/chkgdModal.tsx | 15 +++ .../ui/table/rainChkgd/rainChkgdTable.tsx | 30 +++++ .../ui/table/rswtChkgd/rswtChkgdTable.tsx | 30 +++++ 9 files changed, 423 insertions(+), 12 deletions(-) create mode 100644 apps/wr/app/ruseFcltMng/prfmncReg/chkgdnReg/page.tsx create mode 100644 apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/index.tsx create mode 100644 apps/wr/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/index.tsx create mode 100644 apps/wr/components/ui/modal/chkgdModal/chkgdModal.tsx create mode 100644 apps/wr/components/ui/table/rainChkgd/rainChkgdTable.tsx create mode 100644 apps/wr/components/ui/table/rswtChkgd/rswtChkgdTable.tsx diff --git a/apps/wr/app/page.tsx b/apps/wr/app/page.tsx index b18914cdc..d9a01bd36 100644 --- a/apps/wr/app/page.tsx +++ b/apps/wr/app/page.tsx @@ -6,22 +6,34 @@ export default function Home() { return ( <>
- - - - - - +
+ + +
+ +
+ +
+ +
); diff --git a/apps/wr/app/ruseFcltMng/prfmncReg/chkgdnReg/page.tsx b/apps/wr/app/ruseFcltMng/prfmncReg/chkgdnReg/page.tsx new file mode 100644 index 000000000..52bd270e1 --- /dev/null +++ b/apps/wr/app/ruseFcltMng/prfmncReg/chkgdnReg/page.tsx @@ -0,0 +1,114 @@ +"use client"; + +import { useWrStore } from "@/app/store"; +import { chHeadNm, fcltDiv, type chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn"; +import { + ContentsDiv, + SearchDiv, + SearchFormLeft, + SearchFormRight, + SearchInput, + SelectBox, + Title, + UiTable, +} from "@common/business_components/ui"; +import ListDiv from "@common/business_components/ui/list_div"; +import { Button, Input } from "@common/components/ui"; +import { useState } from "react"; +import { headMakeColSpan } from "../../fcltReg/rainReg/page"; +import { TableRow, TableHead } from "@common/components"; +import React from "react"; +import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg"; +import RainChkgdTable from "@/components/ui/table/rainChkgd/rainChkgdTable"; +import RswtChkgdTable from "@/components/ui/table/rswtChkgd/rswtChkgdTable"; + + +export const headMakeprfmnc = (upHeadList: TableUpperProps[] ,makeHeadNm:chHeadType[] ) => { + return ( + <> + + {upHeadList.map((head: TableUpperProps) => + !head.upSequnce ? ( + + {head.title} + + ) : head.upSequnce === 1 ? ( + ch.headNm ===head.upName)?.length}> + {makeHeadNm.find((ch)=> ch.headNm ===head.upName)?.text} + + ) : null + )} + + + {upHeadList.map((head: TableUpperProps) => + makeHeadNm.find((ch)=> ch.headNm ===head.upName) ? ( + {head.title} + ) : null + )} + + + ); +}; +//----------------------- +export default function Page() { + + + + const [selFcltDiv, setSelFcltDiv] = useState("RST"); + + return ( + +
+
+ + <SearchDiv> + <SearchFormLeft> + <SearchInput + className="col-span-3 my-7" + label=" 지도점검년도" + textValue={""} + setText={(e) => {}} + /> + <SelectBox + className={ "col-span-3 w-full h-full text-2xl"} + label={"시설구분"} + selectClass={""} + selectArray={fcltDiv} + onSelectValue={setSelFcltDiv} + value={selFcltDiv??fcltDiv[0]?.val} + /> + </SearchFormLeft> + <SearchFormRight> + <Button className="mr-4 rounded-lg" onClick={(e) => {}}> + 조회 + </Button> + <Button className="mr-4 rounded-lg" onClick={() => {}}> + 삭제 + </Button> + <Button className="mr-4 rounded-lg" onClick={() => {}}> + 저장 + </Button> + <Button className="mr-4 rounded-lg" onClick={() => {}}> + 결과등록 + </Button> + <Button className="mr-4 rounded-lg" onClick={() => {}}> + 양식받기 + </Button> + </SearchFormRight> + </SearchDiv> + </div> + </div> + <div className="grid grid-cols-6 gap-4 "> + <div className="col-span-6"> + <ListDiv> + {selFcltDiv === "RNB" ? ( + <RainChkgdTable /> + ) : ( + <RswtChkgdTable /> + )} + </ListDiv> + </div> + </div> + </ContentsDiv> + ); +} diff --git a/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/index.tsx b/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/index.tsx new file mode 100644 index 000000000..1bc9a624f --- /dev/null +++ b/apps/wr/app/store/prfmncReg/chkgdnReg/rainChkgdn/index.tsx @@ -0,0 +1,125 @@ +import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg"; +import type { text } from "stream/consumers"; + + + +export const fcltDiv=[ + {val:'RST', text:'중수도시설'}, + {val:'RNB', text:'빗물이용시설'}, +] + + +export type chHeadType={ + headNm: string; + text: string; + length: number; +} + +export const rainHeadNm:chHeadType[] = [ + {headNm:"useQuilty", text:"이용수질(필요시)" , length: 4}, + {headNm:"feeHist", text:"과태료 부과내역" , length: 3}, +] + +export const rainChkgdnHeadList:TableUpperProps[] = [ + { id: "cityText", title: "시도" }, + { id: "sggText", title: "시군구" }, + { id: "bdstNm", title: "시설명" }, + { id: "operMngCd", title: "운영관리형태" }, + { id: "flowCheck", title: "유량측정방법" }, + { id: "yearFee", title: "연간운영비(원/년)" }, + { id: "rainDtnbaOpct", title: "빗물저류조용량(m³)" }, + { id: "checkDay", title: "점검일" }, + { id: "utztnUsg", title: "이용용도" }, + + { id: "splyUswtrUtztnQnt", title: "연간보급수이용량(m³)" }, + { id: "rainUsg", title: "연간빗물이용량(m³)" }, + { id: "ph", title: "PH", upName: "useQuilty", upSequnce: 1 }, + { id: "trbt", title: "탁도", upName: "useQuilty", upSequnce: 2 }, + { id: "grssClfg", title: "총대장균군수", upName: "useQuilty", upSequnce: 3 }, + { id: "etc", title: "기타", upName: "useQuilty", upSequnce: 4 }, + { id: "dayFee", title: "부과일(위반일)", upName: "feeHist", upSequnce: 1 }, + { id: "guilty", title: "위반사항", upName: "feeHist", upSequnce: 2 }, + { id: "fee", title: "부과금액(천원)", upName: "feeHist", upSequnce: 3 }, + ]; + + +// export const rainChkgdnHeadList:TableUpperProps[] = [ +// { id: "cityText", title: "시도" }, +// { id: "sggText", title: "시군구" }, +// { id: "bdstNm", title: "시설명" }, +// { id: "operMngCd", title: "운영관리형태" }, +// { id: "flowCheck", title: "유량측정방법" }, +// { id: "yearFee", title: "연간운영비(원/년)" }, +// { id: "rainDtnbaOpct", title: "빗물저류조용량(m³)" }, +// { id: "checkDay", title: "점검일" }, +// { id: "utztnUsg", title: "이용용도" }, +// { id: "sub1", title: "1월" , upName: "yearSubWater", upSequnce: 1 }, +// { id: "sub2", title: "2월", upName: "yearSubWater", upSequnce: 2 }, +// { id: "sub3", title: "3월", upName: "yearSubWater", upSequnce: 3 }, +// { id: "sub4", title: "4월", upName: "yearSubWater", upSequnce: 4 }, +// { id: "sub5", title: "5월", upName: "yearSubWater", upSequnce: 5 }, +// { id: "sub6", title: "6월", upName: "yearSubWater", upSequnce: 6 }, +// { id: "sub7", title: "7월", upName: "yearSubWater", upSequnce: 7 }, +// { id: "sub8", title: "8월", upName: "yearSubWater", upSequnce: 8 }, +// { id: "sub9", title: "9월", upName: "yearSubWater", upSequnce: 9 }, +// { id: "sub10", title: "10월", upName: "yearSubWater", upSequnce: 10 }, +// { id: "sub11", title: "11월", upName: "yearSubWater", upSequnce: 11 }, +// { id: "sub12", title: "12월", upName: "yearSubWater", upSequnce: 12 }, + +// { id: "rain1", title: "1월", upName: "yearRainWater", upSequnce: 1 }, +// { id: "rain2", title: "2월", upName: "yearRainWater", upSequnce: 2 }, +// { id: "rain3", title: "3월", upName: "yearRainWater", upSequnce: 3 }, +// { id: "rain4", title: "4월", upName: "yearRainWater", upSequnce: 4 }, +// { id: "rain5", title: "5월", upName: "yearRainWater", upSequnce: 5 }, +// { id: "rain6", title: "6월", upName: "yearRainWater", upSequnce: 6 }, +// { id: "rain7", title: "7월", upName: "yearRainWater", upSequnce: 7 }, +// { id: "rain8", title: "8월", upName: "yearRainWater", upSequnce: 8 }, +// { id: "rain9", title: "9월", upName: "yearRainWater", upSequnce: 9 }, +// { id: "rain10", title: "10월", upName: "yearRainWater", upSequnce: 10 }, +// { id: "rain11", title: "11월", upName: "yearRainWater", upSequnce: 11 }, +// { id: "rain12", title: "12월", upName: "yearRainWater", upSequnce: 12 }, + +// { id: "ph", title: "PH", upName: "useQuilty", upSequnce: 1 }, +// { id: "trbt", title: "탁도", upName: "useQuilty", upSequnce: 2 }, +// { id: "grssClfg", title: "총대장균군수", upName: "useQuilty", upSequnce: 3 }, +// { id: "etc", title: "기타", upName: "useQuilty", upSequnce: 4 }, + +// { id: "dayFee", title: "부과일(위반일)", upName: "feeHist", upSequnce: 1 }, +// { id: "guilty", title: "위반사항", upName: "feeHist", upSequnce: 2 }, +// { id: "fee", title: "부과금액(천원)", upName: "feeHist", upSequnce: 3 }, +// ]; + + +export type rainChkgdnState = { + rainChkgdn: { + rainChkgdnHeadList:TableUpperProps[] + rainHeadNm:chHeadType[] + }; +}; + +type rainChkgdnActions = { + rainChkgdnInit: (sggCd:string, searchTxt:string, flag:string) => void ; + }; + + +export type rainChkgdnType = rainChkgdnState & rainChkgdnActions; + + +export const rainChkgdnStateExport: rainChkgdnState = { + rainChkgdn: { + rainChkgdnHeadList:rainChkgdnHeadList, + rainHeadNm:rainHeadNm + }, +}; + +export const rainChkgdnActionsExport: (set: any) => rainChkgdnActions = ( + set: any +) => { + return { + + rainChkgdnInit: async(sggCd:string, searchTxt:string ,flg:string ) =>{ + + }, + + }; +}; diff --git a/apps/wr/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/index.tsx b/apps/wr/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/index.tsx new file mode 100644 index 000000000..7cfc37c65 --- /dev/null +++ b/apps/wr/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/index.tsx @@ -0,0 +1,72 @@ +import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg"; +import type { chHeadType } from "../rainChkgdn"; + + + +export const rswtHeadNm:chHeadType[] = [ + {headNm:"useQuilty", text:"연간 평균 이용수질" , length: 10}, + {headNm:"feeHist", text:"과태료 부과내역" , length: 3}, +] +export const rswtChkgdnHeadList: TableUpperProps[] = [ + { id: "cityText", title: "시도" }, + { id: "sggText", title: "시군구" }, + { id: "bdstNm", title: "시설명" }, + { id: "operMngCd", title: "운영관리형태" }, + { id: "yearFee", title: "연간운영비(원/년)" }, + { id: "rainDtnbaOpct", title: "처리용량(m³)" }, + { id: "checkDay", title: "점검일" }, + {id: "checkPoint", title: "채수지점"}, + { id: "utztnUsg", title: "이용용도" }, + { id: "splyUswtrUtztnQnt", title: "연간보급수이용량(m³)" }, + { id: "rswtUsg", title: "연간중수도이용량(m³)" }, + + + { id: "grssClfgUswtr", title: "총대장균군수", upName: "useQuilty", upSequnce: 1 }, + { id: "combResdch", title: "결합잔류염소", upName: "useQuilty", upSequnce: 2 }, + { id: "trbt", title: "탁도", upName: "useQuilty", upSequnce: 3 }, + { id: "bod", title: "BOD", upName: "useQuilty", upSequnce: 4 }, + { id: "smll", title: "냄새", upName: "useQuilty", upSequnce: 5 }, + { id: "crmty", title: "색도", upName: "useQuilty", upSequnce: 6 }, + { id: "tn", title: "T-N", upName: "useQuilty", upSequnce: 7 }, + { id: "tph", title: "T-P", upName: "useQuilty", upSequnce: 8 }, + { id: "ph", title: "PH", upName: "useQuilty", upSequnce: 9 }, + { id: "clIonQnt", title: "염화물", upName: "useQuilty", upSequnce: 10 }, + + + + { id: "dayFee", title: "부과일(위반일)", upName: "feeHist", upSequnce: 1 }, + { id: "guilty", title: "위반사항", upName: "feeHist", upSequnce: 2 }, + { id: "fee", title: "부과금액(천원)", upName: "feeHist", upSequnce: 3 }, + + +]; + +export type rswtChkgdnState = { + rswtChkgdn: { + rswtChkgdnHeadList: TableUpperProps[]; + rswtHeadNm:chHeadType[]; + }; +}; + +type rswtChkgdnActions = { + rswtChkgdnInit: (sggCd: string, searchTxt: string, flag: string) => void; +}; + +export type rswtChkgdnType = rswtChkgdnState & rswtChkgdnActions; + +export const rswtChkgdnStateExport: rswtChkgdnState = { + rswtChkgdn: { + rswtChkgdnHeadList: rswtChkgdnHeadList, + rswtHeadNm:rswtHeadNm + }, +}; + +export const rswtChkgdnActionsExport: (set: any) => rswtChkgdnActions = ( + set: any +) => { + return { + rswtChkgdnInit: async (sggCd: string, searchTxt: string, flg: string) => { + + }, + }; +}; diff --git a/apps/wr/app/store/ruseFcltMng/fcltReg/htdflReg/index.tsx b/apps/wr/app/store/ruseFcltMng/fcltReg/htdflReg/index.tsx index 1116cdd19..9df44962f 100644 --- a/apps/wr/app/store/ruseFcltMng/fcltReg/htdflReg/index.tsx +++ b/apps/wr/app/store/ruseFcltMng/fcltReg/htdflReg/index.tsx @@ -75,7 +75,7 @@ export const hdtflZod = z.object({ chgBuilding: z .array( z.object({ - bdstInfoFk: z.number().nullable(), + bdstInfoFk: z.number().nullish(), archChgPrmsnDt: z.coerce.date() , archChgArea: z.number().default(0), bdstChgNm: z.string().default(""), diff --git a/apps/wr/app/store/store.tsx b/apps/wr/app/store/store.tsx index 91f795ea4..07bc74685 100644 --- a/apps/wr/app/store/store.tsx +++ b/apps/wr/app/store/store.tsx @@ -31,6 +31,8 @@ import { } from "./ruseFcltMng/fcltReg/htdflReg"; import { codeActionExport, comCodeStateExport, getCityCd, getSggCd, type comCodeState, type comCodeType } from "./common/code"; import { bdstActionsExport, bdstStateExport, type bdstFulType, type bdstState } from "./ruseFcltMng/fcltReg/bdstReg"; +import { rainChkgdnActionsExport, rainChkgdnStateExport, type rainChkgdnState, type rainChkgdnType } from "./prfmncReg/chkgdnReg/rainChkgdn"; +import { rswtChkgdnActionsExport, rswtChkgdnStateExport, type rswtChkgdnState, type rswtChkgdnType } from "./prfmncReg/chkgdnReg/rswrtChkgdn"; export type WrStore = comCodeType& pubFacType & @@ -38,7 +40,11 @@ export type WrStore = comCodeType& rswtFacType & matDmdType & htdflFacType& - bdstFulType; + bdstFulType& + rainChkgdnType& + rswtChkgdnType + ; + export const StoreZus = ( initState: comCodeState& rainFacState & @@ -46,7 +52,10 @@ export const StoreZus = ( rswtFacState & matDmdState & htdflFacState & - bdstState= { + bdstState & + rainChkgdnState& + rswtChkgdnState + = { ...comCodeStateExport, ...pubFacStateExport, ...rainFacStateExport, @@ -54,6 +63,8 @@ export const StoreZus = ( ...matDmdStateExport, ...htdflFacStateExport, ...bdstStateExport, + ...rainChkgdnStateExport, + ...rswtChkgdnStateExport } ) => { return createStore<WrStore>()((set) => { @@ -67,7 +78,9 @@ export const StoreZus = ( ...matDmdActionsExport(set), ...htdflFacActionsExport(set), ...codeActionExport(set), - ...bdstActionsExport(set) + ...bdstActionsExport(set), + ...rainChkgdnActionsExport(set), + ...rswtChkgdnActionsExport(set) }; }); }; diff --git a/apps/wr/components/ui/modal/chkgdModal/chkgdModal.tsx b/apps/wr/components/ui/modal/chkgdModal/chkgdModal.tsx new file mode 100644 index 000000000..e3c85465b --- /dev/null +++ b/apps/wr/components/ui/modal/chkgdModal/chkgdModal.tsx @@ -0,0 +1,15 @@ +export default function ChkgdModal(){ + + + + + + return( + <> + </> + + + + ) + +} \ No newline at end of file diff --git a/apps/wr/components/ui/table/rainChkgd/rainChkgdTable.tsx b/apps/wr/components/ui/table/rainChkgd/rainChkgdTable.tsx new file mode 100644 index 000000000..9cdcd8152 --- /dev/null +++ b/apps/wr/components/ui/table/rainChkgd/rainChkgdTable.tsx @@ -0,0 +1,30 @@ +'use client' + +import { headMakeprfmnc } from "@/app/ruseFcltMng/prfmncReg/chkgdnReg/page"; +import { useWrStore } from "@/app/store"; +import { rainHeadNm } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn"; +import { rswtHeadNm } from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn"; +import { UiTable } from "@common/business_components/ui"; + +export default function RainChkgdTable() { + + const { code, rainChkgdn} = useWrStore((state) => state); + const nodeList = headMakeprfmnc(rainChkgdn?.rainChkgdnHeadList,rainChkgdn?.rainHeadNm ) ; + + + return( + + <> + <UiTable + tableData={[]} + headlist={rainChkgdn.rainChkgdnHeadList} + pageSize={100} + total={10} + headName={"지도점검 결과등록"} + cellClick={()=>{} } > + {nodeList} + </UiTable> + </> + ) + +} \ No newline at end of file diff --git a/apps/wr/components/ui/table/rswtChkgd/rswtChkgdTable.tsx b/apps/wr/components/ui/table/rswtChkgd/rswtChkgdTable.tsx new file mode 100644 index 000000000..376ab7a95 --- /dev/null +++ b/apps/wr/components/ui/table/rswtChkgd/rswtChkgdTable.tsx @@ -0,0 +1,30 @@ +'use client' + +import { headMakeprfmnc } from "@/app/ruseFcltMng/prfmncReg/chkgdnReg/page"; +import { useWrStore } from "@/app/store"; +import { UiTable } from "@common/business_components/ui"; + +export default function RswtChkgdTable() { + + const { rswtChkgdn} = useWrStore((state) => state); + const nodeList = headMakeprfmnc(rswtChkgdn?.rswtChkgdnHeadList , rswtChkgdn?.rswtHeadNm ); + + + return( + + <> + <UiTable + tableData={[]} + headlist={rswtChkgdn.rswtChkgdnHeadList} + pageSize={100} + total={10} + headName={"지도점검 결과등록"} + cellClick={() => { } } onPageChange={function (page: number): void { + throw new Error("Function not implemented."); + } } > + {nodeList} + </UiTable> + </> + ) + +} \ No newline at end of file