현황 헤더리스트 까지

This commit is contained in:
leedj312
2025-05-13 10:40:24 +09:00
parent a2ec312929
commit 4e50e41080
5 changed files with 410 additions and 7 deletions
@@ -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<ReturnType>({} as ReturnType);
@@ -29,6 +31,11 @@ const ref = useRef<ReturnType>({} as ReturnType);
// if (codeData) rainSttnSearch(1, "10000", codeData);
}, []);
const cellClick=(index:number|undefined, headId: string)=>{
}
return(
<>
<ContentsDiv>
@@ -70,6 +77,24 @@ const ref = useRef<ReturnType>({} as ReturnType);
/>
</div>
</div>
<div className="grid grid-cols-6 gap-4 ">
<div className="col-span-6">
<ListDiv>
<UiTable
headName={[]}
tableData={bdstTable || []}
children={
<HeadMakeColSpan upHeadList={htdflSttn.htdflSttNodeList} />
}
headlist={htdflSttn.htdflSttHeadList}
pageSize={20}
total={100000}
cellClick={(index: number | undefined,headId:string)=>{cellClick(index ?? undefined,headId)} }
onPageChange={setPageNation}
></UiTable>
</ListDiv>
</div>
</div>
</ContentsDiv>
</>
)
@@ -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<typeof sttnHeadListType> = [
{
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,
},
];
@@ -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<typeof sttnHeadListType>;
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 {
}
}
@@ -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,
+9 -4
View File
@@ -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<WrStore>()((set) => {
@@ -95,7 +99,8 @@ export const StoreZus = (
...rainChkgdnActionsExport(set),
...rswtChkgdnActionsExport(set),
...rainSttnActionsExport(set),
...rswtSttnActionsExport(set)
...rswtSttnActionsExport(set),
...htdflSttnActionsExport(set)
};
});
};