From 6cc600a8db85c07887cce74bac34b448be3b4510 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Tue, 15 Apr 2025 15:12:17 +0900 Subject: [PATCH] =?UTF-8?q?=ED=95=98=EC=88=98=EC=9E=AC=EC=9D=B4=EC=9A=A9?= =?UTF-8?q?=20=EB=93=B1=EB=A1=9D=20=ED=98=84=ED=99=A9=20=EC=BB=A4=EB=B0=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/page.tsx | 94 +++++++++++---- .../ruseFcltMng/fcltSttn/pbnstSttn/page.tsx | 114 ++++++++++++++++++ .../ruseFcltMng/prfmncReg/chkgdnReg/page.tsx | 17 ++- apps/wr/app/store/common/searchCode/index.ts | 0 .../ruseFcltMng/fcltReg/rainReg/index.tsx | 1 + .../ruseFcltMng/fcltSttn/pbnstSttn/index.tsx | 88 ++++++++++++++ apps/wr/app/store/store.tsx | 13 +- 7 files changed, 293 insertions(+), 34 deletions(-) create mode 100644 apps/wr/app/ruseFcltMng/fcltSttn/pbnstSttn/page.tsx create mode 100644 apps/wr/app/store/common/searchCode/index.ts create mode 100644 apps/wr/app/store/ruseFcltMng/fcltSttn/pbnstSttn/index.tsx diff --git a/apps/wr/app/page.tsx b/apps/wr/app/page.tsx index d9a01bd36..2140a7eb6 100644 --- a/apps/wr/app/page.tsx +++ b/apps/wr/app/page.tsx @@ -1,39 +1,81 @@ -'use client' +"use client"; import Link from "next/link"; import { Button } from "@common/components/ui"; export default function Home() { return ( <> -
- -
- - - - +
+ {/* 시설 등록 */} +
+

시설 등록

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ {/* 지도점검 결과 */} +
+

지도점검 결과

+
+
+ +
+
+
-
- -
+ {/* 시설 현황 */} +
+

시설 현황

+
+
+ +
+
+
-
- -
+ {/* 수요처 관리 */} +
+

수요처 관리

+
+
+ +
+
+
); diff --git a/apps/wr/app/ruseFcltMng/fcltSttn/pbnstSttn/page.tsx b/apps/wr/app/ruseFcltMng/fcltSttn/pbnstSttn/page.tsx new file mode 100644 index 000000000..b0ce1a124 --- /dev/null +++ b/apps/wr/app/ruseFcltMng/fcltSttn/pbnstSttn/page.tsx @@ -0,0 +1,114 @@ +"use client"; +import { useWrStore } from "@/app/store"; +import { + ContentsDiv, + SearchDiv, + SearchFormLeft, + SearchFormRight, + SelectBox, + Title, + UiTable, +} from "@common/business_components/ui"; +import ListDiv from "@common/business_components/ui/list_div"; +import { Button } from "@common/components/ui"; +import { headMakeprfmnc } from "../../prfmncReg/chkgdnReg/page"; + +export default function PbnstSttn() { + const { code,pbnStt } = useWrStore((state) => state); + + const nodeList = headMakeprfmnc(pbnStt.pbnSttHeadList, pbnStt.pbnSttHeadNm); + + return ( + <> + +
+
+ + <SearchDiv> + <SearchFormLeft> + <SelectBox + className={"col-span-2 w-full h-full text-2xl"} + label={"권역"} + selectClass={""} + selectArray={code.yn} + onSelectValue={() => {}} + value={""} + /> + <SelectBox + className={"col-span-2 w-full h-full text-2xl"} + label={"단위유역"} + selectClass={""} + selectArray={code.yn} + onSelectValue={() => {}} + value={""} + /> + <SelectBox + className={"col-span-2 w-full h-full text-2xl"} + label={"중권역"} + selectClass={""} + selectArray={code.yn} + onSelectValue={() => {}} + value={""} + /> + <SelectBox + className={"col-span-2 w-full h-full text-2xl"} + label={"환경청"} + selectClass={""} + selectArray={code.yn} + onSelectValue={() => {}} + value={""} + /> + <SelectBox + className={"col-span-2 w-full h-full text-2xl"} + label={"시도"} + selectClass={""} + selectArray={code.yn} + onSelectValue={() => {}} + value={""} + /> + <SelectBox + className={"col-span-2 w-full h-full text-2xl"} + label={"시군구"} + selectClass={""} + selectArray={code.yn} + onSelectValue={() => {}} + value={""} + /> + </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> + </SearchFormRight> + </SearchDiv> + </div> + </div> + <div className="grid grid-cols-6 gap-4 "> + <div className="col-span-6"> + <ListDiv> + <UiTable + headName={undefined} + tableData={[]} + headlist={pbnStt.pbnSttHeadList} + pageSize={0} + total={0} + cellClick={undefined} + onPageChange={function (page: number): void { + throw new Error("Function not implemented."); + }} + > + {nodeList} + </UiTable> + </ListDiv> + </div> + </div> + </ContentsDiv> + </> + ); +} diff --git a/apps/wr/app/ruseFcltMng/prfmncReg/chkgdnReg/page.tsx b/apps/wr/app/ruseFcltMng/prfmncReg/chkgdnReg/page.tsx index 843a4682b..81fc5b88a 100644 --- a/apps/wr/app/ruseFcltMng/prfmncReg/chkgdnReg/page.tsx +++ b/apps/wr/app/ruseFcltMng/prfmncReg/chkgdnReg/page.tsx @@ -34,13 +34,18 @@ export const headMakeprfmnc = ( return ( <> <TableRow> - {upHeadList.map((head: TableUpperProps) => + {upHeadList + .filter((data) => data.visible !=false) + .map((head: TableUpperProps) => !head.upSequnce ? ( - <TableHead rowSpan={2} key={head.id}> + <TableHead + className={ `border border-gray-600 px-2 py-1 `} + rowSpan={2} key={head.id}> {head.title} </TableHead> ) : head.upSequnce === 1 ? ( <TableHead + className={ `border border-gray-600 px-2 py-1 `} key={head.id} rowSpan={1} colSpan={ @@ -53,9 +58,13 @@ export const headMakeprfmnc = ( )} </TableRow> <TableRow> - {upHeadList.map((head: TableUpperProps) => + {upHeadList + .filter((data) => data.visible !=false) + .map((head: TableUpperProps) => makeHeadNm.find((ch) => ch.headNm === head.upName) ? ( - <TableHead key={head.id}>{head.title}</TableHead> + <TableHead + className={ `border border-gray-600 px-2 py-1 `} + key={head.id}>{head.title}</TableHead> ) : null )} </TableRow> diff --git a/apps/wr/app/store/common/searchCode/index.ts b/apps/wr/app/store/common/searchCode/index.ts new file mode 100644 index 000000000..e69de29bb diff --git a/apps/wr/app/store/ruseFcltMng/fcltReg/rainReg/index.tsx b/apps/wr/app/store/ruseFcltMng/fcltReg/rainReg/index.tsx index c978b36d9..a74870bd1 100644 --- a/apps/wr/app/store/ruseFcltMng/fcltReg/rainReg/index.tsx +++ b/apps/wr/app/store/ruseFcltMng/fcltReg/rainReg/index.tsx @@ -128,6 +128,7 @@ export type TableUpperProps = { upName?: string; upSequnce?: number; edit?:boolean; + visible?:boolean; }; diff --git a/apps/wr/app/store/ruseFcltMng/fcltSttn/pbnstSttn/index.tsx b/apps/wr/app/store/ruseFcltMng/fcltSttn/pbnstSttn/index.tsx new file mode 100644 index 000000000..2a9c00b05 --- /dev/null +++ b/apps/wr/app/store/ruseFcltMng/fcltSttn/pbnstSttn/index.tsx @@ -0,0 +1,88 @@ +import type { chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn"; +import type { TableUpperProps } from "../../fcltReg/rainReg"; +import { z } from "zod"; + +export const pbnSttHeadNm:chHeadType[] = [ + {headNm:"catchment", text:"유역" , length: 3}, + {headNm:"adminDiv", text:"행정구역" , length: 2}, + {headNm:"rusSup", text:"재이용수공급가능량" , length: 3}, + {headNm:"yearResult", text:"연간실적정보(m³)" , length: 3}, + {headNm:"mngInfo", text:"운영정보" , length: 4} +] + +// id는 다확인해야함 +export const pbnSttHeadList:TableUpperProps[] = [ + { id: "a", title: "권역" ,upName:"catchment" ,upSequnce:1,visible:false}, + { id: "aaa", title: "단위유역" ,upName:"catchment" ,upSequnce:2 ,visible:false}, + { id: "aaaa", title: "중권역" ,upName:"catchment" ,upSequnce:3,visible:false}, + { id: "operMngCd", title: "환경청" ,visible:false }, + { id: "cityText", title: "시도" ,upName:"adminDiv" ,upSequnce:1,visible:false}, + { id: "sggText", title: "시군구" ,upName:"adminDiv" ,upSequnce:2,visible:false}, + { id: "bdnstNm", title: "시설명" ,visible:false }, + { id: "locDiv", title: "지역구분" ,visible:false }, + { id: "phone" , title: "전화번호" ,visible:false }, + + { id: "fcltQuantity", title: "시설용량(톤/일)" ,visible:false}, + { id: "rusNm", title: "재이용시설명" ,visible:false}, + + + { id: "fcltCpct", title: "시설용량(m³/일)", upName: "rusSup", upSequnce: 1 ,visible:false}, + { id: "trbt", title: "하수처리량(m³/일)", upName: "rusSup", upSequnce: 2 ,visible:false}, + { id: "ruseCpct", title: "재이용량(m³/일)", upName: "rusSup", upSequnce: 3 ,visible:false}, + + { id: "total", title: "합계", upName: "yearResult", upSequnce: 1 ,visible:false}, + { id: "ithlWtr", title: "장내용수", upName: "yearResult", upSequnce: 2 ,visible:false}, + { id: "othlWtr", title: "장외용수", upName: "yearResult", upSequnce: 3 ,visible:false}, + + { id: "mngMeth", title: "운영방식", upName: "mngInfo", upSequnce: 1 ,visible:false}, + { id: "rprtvBzenty", title: "대행업체", upName: "mngInfo", upSequnce: 2 ,visible:false}, + { id: "firstDay", title: "시작일", upName: "mngInfo", upSequnce: 3 ,visible:false }, + { id: "LastDay", title: "종료일", upName: "mngInfo", upSequnce: 4 ,visible:false}, + + ]; + + + export const headVisibleSchema = z.array( + z.object( + Object.fromEntries( + pbnSttHeadList.map(col => [col.id, z.boolean()]) + )) + ); + + + + + +export type pbnstSttnState = { + pbnStt: { + pbnSttHeadList:TableUpperProps[], + pbnSttHeadNm:chHeadType[] + + }; +}; +type pbnSttActions = { +}; + +export type pbnSttType = pbnstSttnState & pbnSttActions; + +export const pbnSttStateExport: pbnstSttnState = { + pbnStt: { + pbnSttHeadList:pbnSttHeadList, + pbnSttHeadNm:pbnSttHeadNm + }, +}; + + + +export const pbnSttActionsExport: (set: any) => pbnSttActions = ( + set: any +) => { + return { + + pbnSttnInit: async(sggCd:string, searchTxt:string ,flg:string ) =>{ + + }, + + }; +}; + diff --git a/apps/wr/app/store/store.tsx b/apps/wr/app/store/store.tsx index 07bc74685..4e49f412a 100644 --- a/apps/wr/app/store/store.tsx +++ b/apps/wr/app/store/store.tsx @@ -33,6 +33,7 @@ import { codeActionExport, comCodeStateExport, getCityCd, getSggCd, type comCode 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"; +import { pbnSttActionsExport, pbnSttStateExport, type pbnstSttnState, type pbnSttType } from "./ruseFcltMng/fcltSttn/pbnstSttn"; export type WrStore = comCodeType& pubFacType & @@ -42,7 +43,8 @@ export type WrStore = comCodeType& htdflFacType& bdstFulType& rainChkgdnType& - rswtChkgdnType + rswtChkgdnType& + pbnSttType ; export const StoreZus = ( @@ -54,7 +56,8 @@ export const StoreZus = ( htdflFacState & bdstState & rainChkgdnState& - rswtChkgdnState + rswtChkgdnState& + pbnstSttnState = { ...comCodeStateExport, ...pubFacStateExport, @@ -64,7 +67,8 @@ export const StoreZus = ( ...htdflFacStateExport, ...bdstStateExport, ...rainChkgdnStateExport, - ...rswtChkgdnStateExport + ...rswtChkgdnStateExport, + ...pbnSttStateExport } ) => { return createStore<WrStore>()((set) => { @@ -80,7 +84,8 @@ export const StoreZus = ( ...codeActionExport(set), ...bdstActionsExport(set), ...rainChkgdnActionsExport(set), - ...rswtChkgdnActionsExport(set) + ...rswtChkgdnActionsExport(set), + ...pbnSttActionsExport(set) }; }); };