From 4e50e41080134e0cca1da5bb4157fcd33f7fdc9c Mon Sep 17 00:00:00 2001 From: leedj312 Date: Tue, 13 May 2025 10:40:24 +0900 Subject: [PATCH] =?UTF-8?q?=ED=98=84=ED=99=A9=20=ED=97=A4=EB=8D=94?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=EA=B9=8C=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruseFcltMng/fcltSttn/htdflSttn/page.tsx | 29 +- .../fcltSttn/htdflSttn/headList.tsx | 340 ++++++++++++++++++ .../ruseFcltMng/fcltSttn/htdflSttn/index.tsx | 33 ++ .../ruseFcltMng/fcltSttn/rainSttn/index.tsx | 2 +- apps/wr/app/store/store.tsx | 13 +- 5 files changed, 410 insertions(+), 7 deletions(-) create mode 100644 apps/wr/app/store/ruseFcltMng/fcltSttn/htdflSttn/headList.tsx create mode 100644 apps/wr/app/store/ruseFcltMng/fcltSttn/htdflSttn/index.tsx diff --git a/apps/wr/app/ruseFcltMng/fcltSttn/htdflSttn/page.tsx b/apps/wr/app/ruseFcltMng/fcltSttn/htdflSttn/page.tsx index 960edd227..64163b5fd 100644 --- a/apps/wr/app/ruseFcltMng/fcltSttn/htdflSttn/page.tsx +++ b/apps/wr/app/ruseFcltMng/fcltSttn/htdflSttn/page.tsx @@ -4,12 +4,14 @@ import { useWrStore } from "@/app/store"; import { btnClass } from "@/app/store/common/code"; import type { chgBuilding, customRainBdst } from "@/app/store/ruseFcltMng/fcltReg/rainReg"; import { getCityOrSgg } from "@/components/lib/func/commom"; -import { ContentsDiv, SearchBaseForm, Title ,type ReturnType, } from "@common/business_components/ui" +import { ContentsDiv, SearchBaseForm, Title ,UiTable,type ReturnType, } from "@common/business_components/ui" +import ListDiv from "@common/business_components/ui/list_div"; +import { HeadMakeColSpan } from "@common/business_components/ui/table/HeadMakeColSpan"; import { Button } from "@common/components/ui"; import { useCallback, useRef, useState } from "react"; export default function HtdflSttn(){ -const { code } = useWrStore( +const { code,htdflSttn } = useWrStore( (state) => state ); const ref = useRef({} as ReturnType); @@ -29,6 +31,11 @@ const ref = useRef({} as ReturnType); // if (codeData) rainSttnSearch(1, "10000", codeData); }, []); + const cellClick=(index:number|undefined, headId: string)=>{ + + + + } return( <> @@ -70,6 +77,24 @@ const ref = useRef({} as ReturnType); /> +
+
+ + + } + headlist={htdflSttn.htdflSttHeadList} + pageSize={20} + total={100000} + cellClick={(index: number | undefined,headId:string)=>{cellClick(index ?? undefined,headId)} } + onPageChange={setPageNation} + > + +
+
) diff --git a/apps/wr/app/store/ruseFcltMng/fcltSttn/htdflSttn/headList.tsx b/apps/wr/app/store/ruseFcltMng/fcltSttn/htdflSttn/headList.tsx new file mode 100644 index 000000000..6caddd40a --- /dev/null +++ b/apps/wr/app/store/ruseFcltMng/fcltSttn/htdflSttn/headList.tsx @@ -0,0 +1,340 @@ +import type { z } from "zod"; +import type { sttnHeadListType } from "../rainSttn/headList"; +import type { CommonTableProps } from "@/app/store/common/type/headder"; + +export const htdflSttHeadListExport: z.infer = [ + { + id: "cityText", + title: "시도", + visible: true, + }, + { + id: "sggText", + title: "시군구", + visible: true, + }, + { + id: "bdstNm", + title: "발전소명", + visible: true, + }, + { + id: "daddr", + title: "주소", + visible: true, + }, + { + id: "frstArchPrmsnDt", + title: "준공년월", + visible: true, + }, + { + id: "etgtType", + title: "발전유형", + visible: true, + }, + { + id: "fclCpct", + title: "설비용량(KW)", + visible: true, + }, + { + id: "plwtYn", + title: "담수화여부", + visible: true, + }, + { + id: "orgwtWtritSpt", + title: "원수취수지점", + visible: true, + }, + { + id: "wtritEntrcTp", + title: "취수구온도(℃)", + visible: true, + }, + + { + id: "orgwtOcrnProcs", + title: "원수발생공정", + visible: true, + }, + + { + id: "amtgnr", + title: "발생량", + visible: true, + }, + { + id: "prcsProcsYn", + title: "처리공정여부", + visible: true, + }, + { + id: "prcsProcstest", + title: "처리공정여부??", + visible: true, + }, + + + { + id: "prcsFcltCpct", + title: "처리시설용량(m³)", + visible: true, + }, + { + id: "fmYn", + title: "유량계여부", + visible: true, + }, + { + id: "utztnCpct", + title: "이용량(m³)", + visible: true, + }, + { + id: "utztnUsg", + title: "이용용도", + visible: true, + }, + + { + id: "emsnExitTp", + title: "배출구온도(℃)", + visible: true, + }, + +]; + + + +// id는 다확인해야함 +export const htdflSttNodeListExport: CommonTableProps[] = [ + { + id: "bdnstInfo", + title: "1.건축물정보", + visible: true, + row: 1, + rowSpan: 1, + colSpan: 5, + }, + { + id: "htdflFcltInfo", + title: "2.온배수 시설현황", + visible: true, + row: 1, + rowSpan: 1, + colSpan: 3, + }, + { + id: "htdflMngInfo", + title: "3.온배수운영현황", + visible: true, + row: 1, + rowSpan: 1, + colSpan: 11, + }, + + { + id: "adminDiv", + title: "행정구역", + visible: true, + row: 2, + upName: "bdnstInfo", + rowSpan: 1, + colSpan: 2, + }, + + // 3번째줄 시작 + { + id: "cityText", + title: "시도", + visible: true, + upName: "adminDiv", + row: 3, + rowSpan: 1, + colSpan: 1, + }, + { + id: "sggText", + title: "시군구", + visible: true, + upName: "adminDiv", + row: 3, + rowSpan: 1, + colSpan: 1, + }, + + // 2번째 줄 + // 1번째 줄 건축물정보 아래의 행으로 만들 헤더 + { + id: "bdstNm", + title: "발전소명", + visible: true, + upName: "bdnstInfo", + row: 2, + rowSpan: 2, + colSpan: 1, + }, + { + id: "daddr", + title: "주소", + visible: true, + upName: "bdnstInfo", + row: 2, + rowSpan: 2, + colSpan: 1, + }, + { + id: "frstArchPrmsnDt", + title: "준공년월", + upName: "bdnstInfo", + visible: true, + row: 2, + rowSpan: 2, + colSpan: 1, + }, + { + id: "etgtType", + title: "발전유형", + upName: "htdflFcltInfo", + visible: true, + row: 2, + rowSpan: 2, + colSpan: 1, + }, + { + id: "fclCpct", + title: "설비용량(KW)", + upName: "htdflFcltInfo", + visible: true, + row: 2, + rowSpan: 2, + colSpan: 1, + }, + { + id: "plwtYn", + title: "담수화여부", + upName: "htdflFcltInfo", + visible: true, + row: 2, + rowSpan: 2, + colSpan: 1, + }, + { + id: "orgwtWtritSpt", + title: "원수취수지점", + upName: "htdflMngInfo", + visible: true, + row: 2, + rowSpan: 2, + colSpan: 1, + }, + { + id: "wtritEntrcTp", + title: "취수구온도(℃)", + upName: "htdflMngInfo", + visible: true, + row: 2, + rowSpan: 2, + colSpan: 1, + }, + + { + id: "orgwtOcrnProcs", + title: "원수발생공정", + upName: "htdflMngInfo", + visible: true, + row: 2, + rowSpan: 2, + colSpan: 1, + }, + + { + id: "amtgnr", + title: "발생량", + upName: "htdflMngInfo", + visible: true, + row: 2, + rowSpan: 2, + colSpan: 1, + }, + { + id: "prcsProcs", + title: "처리공정", + upName: "htdflMngInfo", + visible: true, + row: 2, + rowSpan: 1, + colSpan: 2, + }, + { + id: "prcsProcsYn", + title: "처리공정여부", + upName: "prcsProcs", + visible: true, + row: 3, + rowSpan: 1, + colSpan: 1, + }, + + { + id: "prcsProcstest", + title: "처리공정여부??", + upName: "prcsProcs", + visible: true, + row: 3, + rowSpan: 1, + colSpan: 1, + }, + + + { + id: "prcsFcltCpct", + title: "처리시설용량(m³)", + upName: "htdflMngInfo", + visible: true, + row: 2, + rowSpan: 2, + colSpan: 1, + }, + { + id: "fmYn", + title: "유량계여부", + upName: "htdflMngInfo", + visible: true, + row: 2, + rowSpan: 2, + colSpan: 1, + }, + { + id: "utztnCpct", + title: "이용량(m³)", + upName: "htdflMngInfo", + visible: true, + row: 2, + rowSpan: 2, + colSpan: 1, + }, + { + id: "utztnUsg", + title: "이용용도", + upName: "htdflMngInfo", + visible: true, + row: 2, + rowSpan: 2, + colSpan: 1, + }, + + { + id: "emsnExitTp", + title: "배출구온도(℃)", + visible: true, + upName: "htdflMngInfo", + row: 2, + rowSpan: 2, + colSpan: 1, + }, + +]; + diff --git a/apps/wr/app/store/ruseFcltMng/fcltSttn/htdflSttn/index.tsx b/apps/wr/app/store/ruseFcltMng/fcltSttn/htdflSttn/index.tsx new file mode 100644 index 000000000..a5275f137 --- /dev/null +++ b/apps/wr/app/store/ruseFcltMng/fcltSttn/htdflSttn/index.tsx @@ -0,0 +1,33 @@ +import type { CommonTableProps } from "@/app/store/common/type/headder"; +import { htdflSttHeadListExport, htdflSttNodeListExport } from "./headList"; +import type { sttnHeadListType } from "../rainSttn/headList"; +import type { z } from "zod"; + +const htdflSttHeadList = htdflSttHeadListExport; +const htdflSttNodeList = htdflSttNodeListExport; + +export type htdflSttnState = { + htdflSttn: { + isInit: boolean; + htdflSttHeadList: z.infer; + htdflSttNodeList: CommonTableProps[]; + }; +}; +type htdflSttnActions = {}; + +export type htdflSttnType = htdflSttnState & htdflSttnActions; + +export const htdflSttnStateExport: htdflSttnState = { + htdflSttn: { + htdflSttHeadList: htdflSttHeadList, + htdflSttNodeList: htdflSttNodeList, + isInit: false, + }, +}; + +export const htdflSttnActionsExport: (set: any) => htdflSttnActions = ( + set: any +) => { + return { + } +} \ No newline at end of file diff --git a/apps/wr/app/store/ruseFcltMng/fcltSttn/rainSttn/index.tsx b/apps/wr/app/store/ruseFcltMng/fcltSttn/rainSttn/index.tsx index afc64ba40..53c4fe36e 100644 --- a/apps/wr/app/store/ruseFcltMng/fcltSttn/rainSttn/index.tsx +++ b/apps/wr/app/store/ruseFcltMng/fcltSttn/rainSttn/index.tsx @@ -1,4 +1,4 @@ -import type { chHeadType, rainChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn"; +import type { rainChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn"; import { fetchType, getFetch } from "@/components/lib/api"; import { type customRainBdst, diff --git a/apps/wr/app/store/store.tsx b/apps/wr/app/store/store.tsx index ee124de68..69813547b 100644 --- a/apps/wr/app/store/store.tsx +++ b/apps/wr/app/store/store.tsx @@ -35,6 +35,7 @@ import { } from "./ruseFcltMng/fcltReg/rswtReg"; import { rainSttnActionsExport, rainSttnStateExport, type rainSttnState, type rainSttnType } from "./ruseFcltMng/fcltSttn/rainSttn"; import { rswtSttnActionsExport, rswtSttnStateExport, type rswtSttnState, type rswtSttnType } from "./ruseFcltMng/fcltSttn/rswtSttn"; +import { htdflSttnActionsExport, htdflSttnStateExport, type htdflSttnState, type htdflSttnType } from "./ruseFcltMng/fcltSttn/htdflSttn"; export type WrStore = comCodeType& pubFacType & @@ -46,7 +47,8 @@ export type WrStore = comCodeType& rainChkgdnType& rswtChkgdnType& rainSttnType& - rswtSttnType + rswtSttnType& + htdflSttnType ; export const StoreZus = ( @@ -60,7 +62,8 @@ export const StoreZus = ( rainChkgdnState& rswtChkgdnState& rainSttnState& - rswtSttnState + rswtSttnState& + htdflSttnState = { ...comCodeStateExport, @@ -73,7 +76,8 @@ export const StoreZus = ( ...rainChkgdnStateExport, ...rswtChkgdnStateExport, ...rainSttnStateExport, - ...rswtSttnStateExport + ...rswtSttnStateExport, + ...htdflSttnStateExport } ) => { return createStore()((set) => { @@ -95,7 +99,8 @@ export const StoreZus = ( ...rainChkgdnActionsExport(set), ...rswtChkgdnActionsExport(set), ...rainSttnActionsExport(set), - ...rswtSttnActionsExport(set) + ...rswtSttnActionsExport(set), + ...htdflSttnActionsExport(set) }; }); };