지도점검 결과등록 페이지 퍼블리싱

This commit is contained in:
leedj312
2025-04-10 18:13:40 +09:00
parent f68f164f64
commit f25686da46
9 changed files with 423 additions and 12 deletions
+20 -8
View File
@@ -6,22 +6,34 @@ export default function Home() {
return (
<>
<div className="flex">
<Button className="place-self-auto">
<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="place-self-auto">
<Button className="col-span-3 place-self-auto">
<Link href="ruseFcltMng/fcltReg/rainReg"> 빗물재이용 시설 등록</Link>
</Button>
<Button className="place-self-auto">
<Button className="col-span-3 place-self-auto">
<Link href="ruseFcltMng/fcltReg/rswtReg"> 중수도시설 등록</Link>
</Button>
<Button className="place-self-auto">
<Link href="matMng/matDmd/coReg">수요처 등록</Link>
</Button>
<Button className="place-self-auto">
<Button className="col-span-3 place-self-auto">
<Link href="ruseFcltMng/fcltReg/htdflReg">온배수 등록</Link>
</Button>
</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 className="grid grid-cols-12 gap-4 ">
<Button className="col-span-3 place-self-auto">
<Link href="matMng/matDmd/coReg">수요처 등록</Link>
</Button>
</div>
</div>
</>
);
@@ -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 (
<>
<TableRow>
{upHeadList.map((head: TableUpperProps) =>
!head.upSequnce ? (
<TableHead rowSpan={2} key={head.id}>
{head.title}
</TableHead>
) : head.upSequnce === 1 ? (
<TableHead key={head.id} rowSpan={1} colSpan={makeHeadNm.find((ch)=> ch.headNm ===head.upName)?.length}>
{makeHeadNm.find((ch)=> ch.headNm ===head.upName)?.text}
</TableHead>
) : null
)}
</TableRow>
<TableRow>
{upHeadList.map((head: TableUpperProps) =>
makeHeadNm.find((ch)=> ch.headNm ===head.upName) ? (
<TableHead key={head.id}>{head.title}</TableHead>
) : null
)}
</TableRow>
</>
);
};
//-----------------------
export default function Page() {
const [selFcltDiv, setSelFcltDiv] = useState("RST");
return (
<ContentsDiv>
<div className="grid grid-cols-4 gap-4 ">
<div className="col-span-4">
<Title title={"지도점검 결과 등록 "} />
<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>
);
}
@@ -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 ) =>{
},
};
};
@@ -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) => {
},
};
};
@@ -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(""),
+16 -3
View File
@@ -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)
};
});
};
@@ -0,0 +1,15 @@
export default function ChkgdModal(){
return(
<>
</>
)
}
@@ -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>
</>
)
}
@@ -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>
</>
)
}