통계 퍼블리싱 완료

This commit is contained in:
leedj312
2025-06-10 15:57:23 +09:00
parent 0507a8e66a
commit 515441a9f4
12 changed files with 594 additions and 5 deletions
+21
View File
@@ -148,6 +148,27 @@ export default function Home() {
</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="stats/rainStat">빗물재이용시설통계</Link>
</Button>
</div>
<div className="col-span-2">
<Button className="w-full">
<Link href="stats/rswtStat">중수도시설통계</Link>
</Button>
</div>
<div className="col-span-2">
<Button className="w-full">
<Link href="stats/matStat">물재이용사례 관리</Link>
</Button>
</div>
</div>
</div>
</div>
</>
);
+74
View File
@@ -0,0 +1,74 @@
'use client'
import { useWrStore } from "@/app/store";
import { yearOptions } from "@/components/lib/func/commom";
import { ContentsDiv, Title, SearchDiv, SearchFormLeft, SelectBox, UiTable } from "@common/business_components/ui";
import ListDiv from "@common/business_components/ui/list_div";
import { Button } from "@common/components/ui";
import { useState } from "react";
export default function MatStat(){
const { code, matStat } = useWrStore((state) => {
return state;
});
const [pageNation, setPageNation] = useState(1);
const [searchYear, setSearchYear] = useState<string>(
String(new Date().getFullYear())
);
return(
<>
<ContentsDiv>
<div className="grid grid-cols-4 gap-4">
<div className="col-span-4">
<Title title={"재이용 통계"} />
<SearchDiv>
<SearchFormLeft>
<SelectBox
className="w-full h-full text-2xl"
label="통계년도"
selectClass={""}
selectArray={yearOptions}
value={searchYear}
onSelectValue={(val: string | number) =>
setSearchYear(String(val))
}
/>
<div className="flex flex-row space-x-2 items-center">
<Button className="" size={"sm"} onClick={(e) => {}}>
조회
</Button>
<Button className="" size={"sm"} onClick={(e) => {}}>
다운로드
</Button>
<Button className="" size={"sm"} onClick={(e) => {}}>
전체통계다운로드
</Button>
</div>
</SearchFormLeft>
{/* <SearchFormRight>
</SearchFormRight> */}
</SearchDiv>
</div>
</div>
<div className="grid grid-cols-6 gap-4">
<div className="col-span-6 h-full min-h-0">
<ListDiv className="min-h-0">
{/* <ScrollArea className="h-[60vh]"> */}
<UiTable
tableData={[]}
headlist={matStat.matStatHeadList}
pageSize={20}
total={10000}
headName={"건축물 목록"}
cellClick={(val, headId) => {}}
onPageChange={setPageNation}
></UiTable>
{/* </ScrollArea> */}
</ListDiv>
</div>
</div>
</ContentsDiv>
</>
)
}
+81
View File
@@ -0,0 +1,81 @@
"use client";
import { useWrStore } from "@/app/store";
import { yearOptions } from "@/components/lib/func/commom";
import {
ContentsDiv,
SearchDiv,
SearchFormLeft,
SelectBox,
Title,
UiTable,
} from "@common/business_components/ui";
import ListDiv from "@common/business_components/ui/list_div";
import { Button } from "@common/components/ui";
import { useState } from "react";
export default function rainStat() {
const { code, rainStat } = useWrStore((state) => {
return state;
});
const [pageNation, setPageNation] = useState(1);
const [searchYear, setSearchYear] = useState<string>(
String(new Date().getFullYear())
);
return (
<>
<ContentsDiv>
<div className="grid grid-cols-4 gap-4">
<div className="col-span-4">
<Title title={"재이용 통계"} />
<SearchDiv>
<SearchFormLeft>
<SelectBox
className="w-full h-full text-2xl"
label="통계년도"
selectClass={""}
selectArray={yearOptions}
value={searchYear}
onSelectValue={(val: string | number) =>
setSearchYear(String(val))
}
/>
<div className="flex flex-row space-x-2 items-center">
<Button className="" size={"sm"} onClick={(e) => {}}>
조회
</Button>
<Button className="" size={"sm"} onClick={(e) => {}}>
다운로드
</Button>
<Button className="" size={"sm"} onClick={(e) => {}}>
전체통계다운로드
</Button>
</div>
</SearchFormLeft>
{/* <SearchFormRight>
</SearchFormRight> */}
</SearchDiv>
</div>
</div>
<div className="grid grid-cols-6 gap-4">
<div className="col-span-6 h-full min-h-0">
<ListDiv className="min-h-0">
{/* <ScrollArea className="h-[60vh]"> */}
<UiTable
tableData={[]}
headlist={rainStat.rainStatHeadList}
pageSize={20}
total={10000}
headName={"건축물 목록"}
cellClick={(val, headId) => {}}
onPageChange={setPageNation}
></UiTable>
{/* </ScrollArea> */}
</ListDiv>
</div>
</div>
</ContentsDiv>
</>
);
}
+75
View File
@@ -0,0 +1,75 @@
'use client'
import { useWrStore } from "@/app/store";
import { yearOptions } from "@/components/lib/func/commom";
import { ContentsDiv, SearchDiv, SearchFormLeft, SelectBox, Title, UiTable } from "@common/business_components/ui";
import ListDiv from "@common/business_components/ui/list_div";
import { Button } from "@common/components/ui";
import { useState } from "react";
export default function RswtStat() {
const { code, rswtStat } = useWrStore((state) => {
return state;
});
const [pageNation, setPageNation] = useState(1);
const [searchYear, setSearchYear] = useState<string>(
String(new Date().getFullYear())
);
return(
<>
<ContentsDiv>
<div className="grid grid-cols-4 gap-4">
<div className="col-span-4">
<Title title={"재이용 통계"} />
<SearchDiv>
<SearchFormLeft>
<SelectBox
className="w-full h-full text-2xl"
label="통계년도"
selectClass={""}
selectArray={yearOptions}
value={searchYear}
onSelectValue={(val: string | number) =>
setSearchYear(String(val))
}
/>
<div className="flex flex-row space-x-2 items-center">
<Button className="" size={"sm"} onClick={(e) => {}}>
조회
</Button>
<Button className="" size={"sm"} onClick={(e) => {}}>
다운로드
</Button>
<Button className="" size={"sm"} onClick={(e) => {}}>
전체통계다운로드
</Button>
</div>
</SearchFormLeft>
{/* <SearchFormRight>
</SearchFormRight> */}
</SearchDiv>
</div>
</div>
<div className="grid grid-cols-6 gap-4">
<div className="col-span-6 h-full min-h-0">
<ListDiv className="min-h-0">
{/* <ScrollArea className="h-[60vh]"> */}
<UiTable
tableData={[]}
headlist={rswtStat.rswtStatHeadList}
pageSize={20}
total={10000}
headName={"건축물 목록"}
cellClick={(val, headId) => {}}
onPageChange={setPageNation}
></UiTable>
{/* </ScrollArea> */}
</ListDiv>
</div>
</div>
</ContentsDiv>
</>
)
}
@@ -210,7 +210,7 @@ export const ruseCaseHeadListExport: TableUpperProps[] = [
},
{
id: "h4",
title: "건축",
title: "건축",
visible: true,
row: 1,
},
@@ -0,0 +1,68 @@
import type { TableUpperProps } from "../../common/type/header";
export const matStatHeadListExport :TableUpperProps[]=[
{
id: "시도",
title: "시도",
row:0,
rowSpan:2
},
{
id: "개소",
title: "개소",
row:0,
rowSpan:2
},
{
id: "요구수량",
title: "요구수량",
row:0,
rowSpan:2
},
{
id: "용도",
title: "용도",
row:0,
colSpan:6
},
{
id: "조경용수",
title: "조경용수",
row:1,
},
{
id: "청소화장실용수",
title: "청소화장실용수",
row:1,
},
{
id: "농업용수",
title: "농업용수",
row:1,
},
{
id: "공업용수",
title: "공업용수",
row:1,
},
{
id: "친수용수",
title: "친수용수",
row:1,
},
{
id: "기타",
title: "기타",
row:1,
},
{
id: "사업비",
title: "사업비(천원)",
row:0,
rowSpan:2
},
]
+28
View File
@@ -0,0 +1,28 @@
import type { TableUpperProps } from "../../common/type/header";
import { matStatHeadListExport } from "./headList";
type matStatActions = {
}
export type matStatState = {
matStat: {
matStatHeadList:TableUpperProps[]
}
}
export type matStatType = matStatState & matStatActions;
export const matStatExport: matStatState = {
matStat: {
matStatHeadList:matStatHeadListExport
}
}
export const matStatActionsExport: (set: any) => matStatActions = (
set: any
) => {
return {
}
}
@@ -0,0 +1,70 @@
import type { TableUpperProps } from "../../common/type/header";
export const rainStatHeadListExport: TableUpperProps[] = [
{
id: "시도",
title: "시도",
row:0,
rowSpan:2
},
{
id: "개소",
title: "개소",
row:0,
rowSpan:2
},
{
id: "설치비",
title: "설치비(백만원)",
row:0,
rowSpan:2
},
{
id: "저류조용량",
title: "저류조용량(m³/년)",
row:0,
rowSpan:2
},
{
id: "이용용도",
title: "이용용도",
row:0,
colSpan:6
},
{
id: "조경용수",
title: "조경용수",
row:1,
},
{
id: "청소화장실용수",
title: "청소화장실용수",
row:1,
},
{
id: "농업용수",
title: "농업용수",
row:1,
},
{
id: "공업용수",
title: "공업용수",
row:1,
},
{
id: "친수용수",
title: "친수용수",
row:1,
},
{
id: "기타",
title: "기타",
row:1,
},
{
id: "연간운영비",
title: "연간운영비(백만원/년)",
row:0,
rowSpan:2
},
];
@@ -0,0 +1,28 @@
import type { TableUpperProps } from "../../common/type/header";
import { rainStatHeadListExport } from "./headList";
type rainStatActions = {
}
export type rainStatState = {
rainStat: {
rainStatHeadList:TableUpperProps[]
}
}
export type rainStatType = rainStatState & rainStatActions;
export const rainStatExport: rainStatState = {
rainStat: {
rainStatHeadList:rainStatHeadListExport
}
}
export const rainStatActionsExport: (set: any) => rainStatActions = (
set: any
) => {
return {
}
}
@@ -0,0 +1,101 @@
import type { TableUpperProps } from "../../common/type/header";
export const rswtStatHeadListExport :TableUpperProps[]=[
{
id: "시도",
title: "시도",
row:0,
rowSpan:2
},
{
id: "개소",
title: "개소",
row:0,
rowSpan:2
},
{
id: "시설현황",
title: "시설현황",
row:0,
colSpan:2
},
{
id: "건축연면적(m³)",
title: "건축연면적(m³)",
row:1,
},
{
id: "처리용량",
title: "처리용량(m³)",
row:1,
},
{
id: "물사용량",
title: "물사용량(m³/년)",
row:0,
rowSpan:2
},
{
id: "청소화장실용수",
title: "중수도+대체수이용량(m³/년)",
row:0,
rowSpan:2
},
{
id: "중수도이용량",
title: "중수도이용량(m³/년)",
row:0,
rowSpan:2
},
{
id: "대체수이용량",
title: "대체수이용량(m³/년)",
row:0,
rowSpan:2
},
{
id: "용도",
title: "용도",
row:0,
colSpan:6
},
{
id: "조경용수",
title: "조경용수",
row:1,
},
{
id: "청소화장실용수",
title: "청소화장실용수",
row:1,
},
{
id: "농업용수",
title: "농업용수",
row:1,
},
{
id: "공업용수",
title: "공업용수",
row:1,
},
{
id: "친수용수",
title: "친수용수",
row:1,
},
{
id: "기타",
title: "기타",
row:1,
},
{
id: "연간운영비",
title: "연간운영비(백만원/년)",
row:0,
rowSpan:2
},
]
@@ -0,0 +1,28 @@
import type { TableUpperProps } from "../../common/type/header";
import { rswtStatHeadListExport } from "./headList";
type rswtStatActions = {
}
export type rswtStatState = {
rswtStat: {
rswtStatHeadList:TableUpperProps[]
}
}
export type rswtStatType = rswtStatState & rswtStatActions;
export const rswtStatExport: rswtStatState = {
rswtStat: {
rswtStatHeadList:rswtStatHeadListExport
}
}
export const rswtStatActionsExport: (set: any) => rswtStatActions = (
set: any
) => {
return {
}
}
+19 -4
View File
@@ -93,6 +93,9 @@ import { coRvwActionsExport, coRvwStateExport, type coRvwState, type coRvwType }
import { ruseHstryActionsExport, ruseHstryStateExport, type ruseHstryState, type ruseHstryType } from "./matDmd/ruseRvwHstry";
import { pbnstPrfmncSttnActionsExport, pbnstPrfmncSttnExport, type pbnstPrfmncSttnState, type pbnstPrfmncSttnType } from "./prfmncSttn/pbnstPrfmncSttn";
import { ruseCaseActionsExport, ruseCaseStateExport, type ruseCaseType, type ruseCaseState } from "./matDmd/ruseCaseMng";
import { rainStatActionsExport, rainStatExport, type rainStatState, type rainStatType } from "./stats/rainStat";
import { type rswtStatType, type rswtStatState, rswtStatExport, rswtStatActionsExport } from "./stats/rswtStat";
import { matStatActionsExport, matStatExport, type matStatState, type matStatType } from "./stats/matStat";
export type WrStore = comCodeType &
pubFacType &
@@ -116,7 +119,10 @@ export type WrStore = comCodeType &
coRvwType&
ruseHstryType&
pbnstPrfmncSttnType&
ruseCaseType
ruseCaseType&
rainStatType&
rswtStatType&
matStatType
;
export const StoreZus = (
@@ -141,7 +147,10 @@ export const StoreZus = (
coRvwState&
ruseHstryState&
pbnstPrfmncSttnState&
ruseCaseState
ruseCaseState&
rainStatState&
rswtStatState&
matStatState
= {
...comCodeStateExport,
...pubFacStateExport,
@@ -164,7 +173,10 @@ export const StoreZus = (
...coRvwStateExport,
...ruseHstryStateExport,
...pbnstPrfmncSttnExport,
...ruseCaseStateExport
...ruseCaseStateExport,
...rainStatExport,
...rswtStatExport,
...matStatExport
}
) => {
return createStore<WrStore>()((set) => {
@@ -198,7 +210,10 @@ export const StoreZus = (
...coRvwActionsExport(set),
...ruseHstryActionsExport(set),
...pbnstPrfmncSttnActionsExport(set),
...ruseCaseActionsExport(set)
...ruseCaseActionsExport(set),
...rainStatActionsExport(set),
...rswtStatActionsExport(set),
...matStatActionsExport(set)
};
});
};