하수재이용 등록 현황 커밋

This commit is contained in:
leedj312
2025-04-15 15:12:17 +09:00
parent c054d635b1
commit 6cc600a8db
7 changed files with 293 additions and 34 deletions
+68 -26
View File
@@ -1,39 +1,81 @@
'use client'
"use client";
import Link from "next/link";
import { Button } from "@common/components/ui";
export default function Home() {
return (
<>
<div className="flex">
<div className="grid grid-cols-12 gap-4 ">
<Button className="col-span-3 place-self-auto">
<Link href="ruseFcltMng/fcltReg/pbnstReg"> 하수재이용 시설 등록</Link>
</Button>
<Button className="col-span-3 place-self-auto">
<Link href="ruseFcltMng/fcltReg/rainReg"> 빗물재이용 시설 등록</Link>
</Button>
<Button className="col-span-3 place-self-auto">
<Link href="ruseFcltMng/fcltReg/rswtReg"> 중수도시설 등록</Link>
</Button>
<Button className="col-span-3 place-self-auto">
<Link href="ruseFcltMng/fcltReg/htdflReg">온배수 등록</Link>
</Button>
<div className="flex flex-col gap-8 p-6">
{/* 시설 등록 */}
<div>
<h2 className="text-xl font-semibold mb-4">시설 등록</h2>
<div className="grid grid-cols-12 gap-4">
<div className="col-span-2">
<Button className="w-full">
<Link href="ruseFcltMng/fcltReg/pbnstReg">
하수재이용 시설 등록
</Link>
</Button>
</div>
<div className="col-span-2">
<Button className="w-full">
<Link href="ruseFcltMng/fcltReg/rainReg">
빗물재이용 시설 등록
</Link>
</Button>
</div>
<div className="col-span-2">
<Button className="w-full">
<Link href="ruseFcltMng/fcltReg/rswtReg">중수도시설 등록</Link>
</Button>
</div>
<div className="col-span-2">
<Button className="w-full">
<Link href="ruseFcltMng/fcltReg/htdflReg">온배수 등록</Link>
</Button>
</div>
</div>
</div>
{/* 지도점검 결과 */}
<div>
<h2 className="text-xl font-semibold mb-4">지도점검 결과</h2>
<div className="grid grid-cols-12 gap-4">
<div className="col-span-2">
<Button className="w-full">
<Link href="ruseFcltMng/prfmncReg/chkgdnReg">
지도점검 결과 등록
</Link>
</Button>
</div>
</div>
</div>
<div className="grid grid-cols-12 gap-4 ">
<Button className="col-span-3 place-self-auto">
<Link href="ruseFcltMng/prfmncReg/chkgdnReg"> 지도점검 결과 등록</Link>
</Button>
</div>
{/* 시설 현황 */}
<div>
<h2 className="text-xl font-semibold mb-4">시설 현황</h2>
<div className="grid grid-cols-12 gap-4">
<div className="col-span-2">
<Button className="w-full">
<Link href="ruseFcltMng/fcltSttn/pbnstSttn">
하수재이용시설현황
</Link>
</Button>
</div>
</div>
</div>
<div className="grid grid-cols-12 gap-4 ">
<Button className="col-span-3 place-self-auto">
<Link href="matMng/matDmd/coReg">수요처 등록</Link>
</Button>
</div>
{/* 수요처 관리 */}
<div>
<h2 className="text-xl font-semibold mb-4">수요처 관리</h2>
<div className="grid grid-cols-12 gap-4">
<div className="col-span-2">
<Button className="w-full">
<Link href="matMng/matDmd/coReg">수요처 등록</Link>
</Button>
</div>
</div>
</div>
</div>
</>
);
@@ -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 (
<>
<ContentsDiv>
<div className="grid grid-cols-4 gap-4 ">
<div className="col-span-4">
<Title title={"하수재이용 시설 현황"} />
<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>
</>
);
}
@@ -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>
@@ -128,6 +128,7 @@ export type TableUpperProps = {
upName?: string;
upSequnce?: number;
edit?:boolean;
visible?:boolean;
};
@@ -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 ) =>{
},
};
};
+9 -4
View File
@@ -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)
};
});
};