Merge commit 'a92f567e5c624486d80984c5e4427543aafdfdde' into iipbs/wr/dev

This commit is contained in:
leedj312
2025-07-15 20:27:30 +09:00
23 changed files with 182 additions and 142 deletions
-5
View File
@@ -146,11 +146,6 @@ export default function Home() {
중수도시설통계
</Button>
</div>
<div className="col-span-2">
<Button className="w-full" onClick={() => {router.push('/stats/matStat')}}>
물재이용사례 관리
</Button>
</div>
</div>
</div>
@@ -316,8 +316,8 @@ export default function PublicReuseFaciltyInsert() {
</div>
</div>
<div className="grid grid-cols-6 gap-4 h-full">
<div className="col-span-4 h-full min-h-0">
<div className="grid grid-cols-8 gap-4 h-full">
<div className="col-span-5 h-full min-h-0">
<ListDiv className="min-h-0">
<ScrollArea className="h-[60vh]">
{" "}
@@ -335,7 +335,7 @@ export default function PublicReuseFaciltyInsert() {
</ScrollArea>
</ListDiv>
</div>
<ListDiv className="col-span-2 pr-6 ">
<ListDiv className="col-span-3 pr-6 ">
{formWatch && formWatch[0]?.pbnstRuseFcltId ? (
<Tabs defaultValue="mng" onValueChange={handleTabChange}>
<TabsList className="">
@@ -313,7 +313,7 @@ export default function PrfmncPrfmncReg() {
<ScrollArea className="h-[60vh]">
<div className="card-header">
<h3 className="text-2xl font-medium text-label">
{"하수처리수재이용 실적(m3) 등록결과"}
{"하수처리수재이용 실적(m³) 등록결과"}
</h3>
</div>
<Table variant="secondary">
@@ -5,13 +5,15 @@ import { btnClass } from "@/app/store/common/code";
import { initValInUsage, initValOutUsage, subTotalObj, totalObj, type FcPrfType, type PrfType } from "@/app/store/prfmncReg/pbnstPrfmncReg/type";
import { excelPrfmncSttnParsing } from "@/app/store/prfmncSttn/pbnstPrfmncSttn/excel";
import { excelDownload, yearOptions } from "@/components/lib/func/commom";
import { InputTableBody } from "@/components/lib/func/TableData";
import SearchInputText from "@/components/ui/searchInput/searchInput";
import { CHART_FORM, ContentsDiv, MainChart, SearchBaseForm, SelectBox, Title, UiTable, type ChartConfig, type ReturnType } from "@common/business_components";
import { CHART_FORM, ContentsDiv, MainChart, ScrollArea, SearchBaseForm, SelectBox, Title, UiTable, type ChartConfig, type ReturnType } from "@common/business_components";
import ListDiv from "@common/business_components/ui/list_div";
import { Label } from "@common/components/ui";
import { Label, Table, TableBody, TableHeader } from "@common/components/ui";
import { useCallback, useEffect, useRef, useState } from "react";
import toast, { Toaster } from "react-hot-toast";
import { useTranslation } from "react-i18next";
import { headMakeprfmnc } from "../../prfmncReg/chkgdnReg/TableHead";
export default function PbnstPrfmncSttn() {
const {
@@ -88,11 +90,11 @@ export default function PbnstPrfmncSttn() {
const prfTableData = (prfList: PrfType[], year: string) => {
const inUsageData = structuredClone(initValInUsage).map(row => ({
...row
// 구분: "장내용수",
// 구분: "장내용수",
}));
const outUsageData = structuredClone(initValOutUsage).map(row => ({
...row
// 구분: "장외용수",
// 구분: "장외용수",
}));
const inSubtotal = { ...structuredClone(subTotalObj), 구분: "장내용수" };
const outSubtotal = { ...structuredClone(subTotalObj), 구분: "장외용수" };
@@ -505,7 +507,7 @@ export default function PbnstPrfmncSttn() {
useEffect(() => {
if (pbnRuseNm.length > 1)
pbnNmSearch("1", "23", ref.current, pbnRuseNm, searchYear,[]);
pbnNmSearch("1", "23", ref.current, pbnRuseNm, searchYear, []);
}, [pbnRuseNm]);
const cellClick = (index: number | undefined, headId: string) => {
@@ -554,7 +556,7 @@ export default function PbnstPrfmncSttn() {
setPbnRuseNm(searchNm || "");
}}
setRtnData={/*function (rtnData: any[]): void {setbdstTable(rtnData);}*/
()=>{}
() => { }
}
searchList={pbnstSttn.pbnstSearchData || []}
></SearchInputText>
@@ -575,7 +577,7 @@ export default function PbnstPrfmncSttn() {
if (fromNum > toNum) {
toast.error("시작년도가 종료년도 이후로 설정할 수 없습니다.");
} else {
if (toNum - fromNum > 5) {
if (toNum - fromNum > 4) {
toast.error("최대 5년까지 선택 가능합니다.");
} else {
tableHeadMaker(fromNum, toNum);
@@ -594,7 +596,7 @@ export default function PbnstPrfmncSttn() {
<div className="col-span-6">
<ListDiv>
<UiTable
headName={[]}
headName={undefined}
tableData={bdstTable || []}
headlist={pbnstPrfHeadList}
pageSize={20}
@@ -611,47 +613,47 @@ export default function PbnstPrfmncSttn() {
<h3 className="mt-4 ml-2 text-2xl font-medium text-label">하수재이용실적 상세현황</h3>
<SelectBox
className="h-full w-1/12 text-2xl"
className="h-full w-1/12 text-2xl mt-2"
label=""
selectClass={""}
selectArray={selectYearList}
value={year}
onSelectValue={(val: string | number) => setYear(String(val))} />
<h1 className="">장내·외 용도별 하수재이용실적 현황(계)</h1>
<h1 className="my-2">장내·외 용도별 하수재이용실적 현황(계)</h1>
<div className="flex">
<div className="w-1/3">
<MainChart chartConfig={chartConfig} chartData={chartData} chartTitle={"장내·외 용수 총 실적"} chartForm={CHART_FORM.DN} />
<MainChart chartConfig={chartConfig} chartData={chartData} chartTitle={"장내·외 용수 총 실적(m³)"} chartForm={CHART_FORM.DN} />
</div>
<div className="w-1/3">
<MainChart chartConfig={dnInChartConfig} chartData={dnInUsage} chartTitle={"장내용수 실적"} chartForm={CHART_FORM.DN} />
<MainChart chartConfig={dnInChartConfig} chartData={dnInUsage} chartTitle={"장내용수 실적(m³)"} chartForm={CHART_FORM.DN} />
</div>
<div className="w-1/3">
<MainChart chartConfig={dnOutChartConfig} chartData={dnOutUsage} chartTitle={"장외용수 실적"} chartForm={CHART_FORM.DN} />
<MainChart chartConfig={dnOutChartConfig} chartData={dnOutUsage} chartTitle={"장외용수 실적(m³)"} chartForm={CHART_FORM.DN} />
</div>
</div>
<h1 className="">장내·외 월별 하수재이용실적 현황</h1>
<div className="flex">
<div className="w-1/3">
<MainChart chartConfig={barChartConfig} chartData={barData} chartTitle={"월별 장내·외 용수 총 실적"} chartForm={CHART_FORM.DOUBLEBAR} showLegend={true} />
<MainChart chartConfig={barChartConfig} chartData={barData} chartTitle={"월별 장내·외 용수 총 실적(m³)"} chartForm={CHART_FORM.DOUBLEBAR} showLegend={true} />
</div>
<div className="w-1/3">
<MainChart chartConfig={lnInChartConfig} chartData={inLineData} chartTitle={"월별 장내 용수 실적"} chartForm={CHART_FORM.LINE} />
<MainChart chartConfig={lnInChartConfig} chartData={inLineData} chartTitle={"월별 장내 용수 실적(m³)"} chartForm={CHART_FORM.LINE} />
</div>
<div className="w-1/3">
<MainChart chartConfig={lnOutChartConfig} chartData={outLineData} chartTitle={"월별 장외 용수 총 실적"} chartForm={CHART_FORM.LINE} />
<MainChart chartConfig={lnOutChartConfig} chartData={outLineData} chartTitle={"월별 장외 용수 총 실적(m³)"} chartForm={CHART_FORM.LINE} />
</div>
</div>
<h1 className="">하수재이용실적 현황</h1>
<ListDiv className="col-span-8 pr-6 ">
{/* <ScrollArea className="h-[60vh]"> */}
{/* <div className="card-header">
<h1 className="">하수재이용실적 현황 (단위: m³)</h1>
{/* <ListDiv className="col-span-8 pr-6 "> */}
{/* <ScrollArea className="h-[60vh]"> */}
{/* <div className="card-header">
<h3 className="text-2xl font-medium text-label">
{"하수처리수재이용 실적(m3) 등록결과"}
{"하수처리수재이용 실적(m³) 등록결과"}
</h3>
</div> */}
<UiTable
{/* <UiTable
headName={undefined}
tableData={prfData || []}
headlist={monthHeadList}
@@ -659,30 +661,31 @@ export default function PbnstPrfmncSttn() {
total={0}
cellClick={undefined}
onPageChange={()=>{}}>
</UiTable>
</UiTable> */}
{/* <ListDiv className="col-span-8 pr-6 ">
<ScrollArea className="h-[60vh]">
<div className="card-header">
<ListDiv className="col-span-8 pr-6 ">
<ScrollArea className={prfData && prfData.length > 0 ? "h-[60vh]" : ""}>
{/* <div className="card-header">
<h3 className="text-2xl font-medium text-label">
{"하수처리수재이용 실적(m3) 등록결과"}
{"하수재이용실적 현황 (단위: m³)"}
</h3>
</div>
</div> */}
<Table variant="secondary">
<TableHeader className="font-bold">
{headMakeprfmnc(monthHeadList, [])}
</TableHeader>
<TableBody>
{InputTableBody(prfData ?? [], monthHeadList, setPrfData)}
</TableBody>
</Table>
</ScrollArea>
</ListDiv> */}
{/* </ScrollArea> */}
<Table variant="secondary">
<TableHeader className="font-bold">
{headMakeprfmnc(monthHeadList, [])}
</TableHeader>
<TableBody>
{/* {InputTableBody(prfData ?? [], monthHeadList, setPrfData)} */}
{InputTableBody(prfData ?? [], monthHeadList, setPrfData, false)}
</TableBody>
</Table>
</ScrollArea>
</ListDiv>
{/* </ScrollArea> */}
</ListDiv>
{/* </ListDiv> */}
</div>
</div>
</ContentsDiv>
+7 -8
View File
@@ -35,13 +35,12 @@ export const drgtStateExport: drgtState = {
}
}
const initFetch = async (fromDate: string, toDate: string, sido:string[]) => {
console.log("sido",sido)
const initFetch = async (fromDate: string, toDate: string, sido: string[]) => {
const drgtData = await postFectch(
`/il/getDataCount/${fromDate}/${toDate}`,
sido,
fetchType.WR
);
`/il/getDataCount/${fromDate}/${toDate}`,
sido,
fetchType.WR
);
//주의, 관심, 정상 추출
const statusData = Array.from(
@@ -99,10 +98,10 @@ export const drgtActionsExport: (set: any) => drgtActions = (
const year = today.getFullYear();
const month = String(today.getMonth() + 1).padStart(2, '0');
const formatted = `${year}${month}`;
const fromDate = formatted;
const toDate = formatted;
//FIXME: 페이지 처음 로딩될때 데이터 보려고 6월로 박아놓음 이거 fromDate로 고치기
const drgtRes = await initFetch("202506", toDate, []);
const drgtRes = await initFetch(fromDate, toDate, []);
set((state: drgtState) => {
return {
...state,
@@ -150,7 +150,7 @@ export const rainChkgdnHeadListExport: TableUpperProps[] = [
{ id: "totalRuseFcltUtztnQnt", title: "연간빗물이용량(m³)" },
{
id: "ph",
title: "PH",
title: "수소이온농도(PH)",
upName: "useQuilty",
upSequnce: 1,
type: "number",
@@ -158,7 +158,7 @@ export const rainChkgdnHeadListExport: TableUpperProps[] = [
},
{
id: "trbt",
title: "탁도",
title: "탁도(NTU)",
upName: "useQuilty",
upSequnce: 2,
type: "number",
@@ -166,7 +166,7 @@ export const rainChkgdnHeadListExport: TableUpperProps[] = [
},
{
id: "grssClfg",
title: "총대장균군수",
title: "총대장균군수(개/mg)",
upName: "useQuilty",
upSequnce: 3,
type: "number",
@@ -149,26 +149,26 @@ export const rswtChkHeadListExport: TableUpperProps[] = [
{
id: "grssClfgUswtr",
title: "총대장균군수",
title: "총대장균군수(개/mg)",
upName: "useQuilty",
upSequnce: 1,
type: "number"
},
{
id: "combResdch",
title: "결합잔류염소",
title: "결합잔류염소(mh/L)",
upName: "useQuilty",
upSequnce: 2,
type: "number"
},
{ id: "trbt", title: "탁도", upName: "useQuilty", upSequnce: 3 ,type: "number"},
{ id: "bod", title: "BOD", upName: "useQuilty", upSequnce: 4 ,type: "number"},
{ id: "trbt", title: "탁도(NTU)", upName: "useQuilty", upSequnce: 3 ,type: "number"},
{ id: "bod", title: "BOD(mg/L)", upName: "useQuilty", upSequnce: 4 ,type: "number"},
{ id: "smll", title: "냄새", upName: "useQuilty", upSequnce: 5 ,type: "number"},
{ id: "crmty", title: "색도", upName: "useQuilty", upSequnce: 6 ,type: "number"},
{ id: "tn", title: "T-N", upName: "useQuilty", upSequnce: 7 ,type: "number"},
{ id: "tph", title: "T-P", upName: "useQuilty", upSequnce: 8 ,type: "number"},
{ id: "ph", title: "PH", upName: "useQuilty", upSequnce: 9,type: "number" },
{ id: "clIonQnt", title: "염화물", upName: "useQuilty", upSequnce: 10 ,type: "number"},
{ id: "crmty", title: "색도(도)", upName: "useQuilty", upSequnce: 6 ,type: "number"},
{ id: "tn", title: "총질소(T-N)(mg/L)", upName: "useQuilty", upSequnce: 7 ,type: "number"},
{ id: "tph", title: "총인(T-P)(mg/L)", upName: "useQuilty", upSequnce: 8 ,type: "number"},
{ id: "ph", title: "수소이온농도(PH)", upName: "useQuilty", upSequnce: 9,type: "number" },
{ id: "clIonQnt", title: "염화물(mg/L)", upName: "useQuilty", upSequnce: 10 ,type: "number"},
{
id: "vltnDt",
@@ -15,21 +15,21 @@ export const rainChkgdnHeadSttnExport: TableUpperProps[] = [
{ id: "totalRuseFcltUtztnQnt", title: "연간빗물이용량(m³)" },
{
id: "ph",
title: "PH",
title: "수소이온농도(PH)",
upName: "useQuilty",
upSequnce: 1,
type: "number",
},
{
id: "trbt",
title: "탁도",
title: "탁도(NTU)",
upName: "useQuilty",
upSequnce: 2,
type: "number",
},
{
id: "grssClfg",
title: "총대장균군수",
title: "총대장균군수(개/mg)",
upName: "useQuilty",
upSequnce: 3,
type: "number",
@@ -16,28 +16,28 @@ export const rswtChkSttnHeadListExport: TableUpperProps[] = [
{
id: "grssClfgUswtr",
title: "총대장균군수",
title: "총대장균군수(개/mg)",
upName: "useQuilty",
upSequnce: 1,
type: "number",
},
{
id: "combResdch",
title: "결합잔류염소",
title: "결합잔류염소(mh/L)",
upName: "useQuilty",
upSequnce: 2,
type: "number",
},
{
id: "trbt",
title: "탁도",
title: "탁도(NTU)",
upName: "useQuilty",
upSequnce: 3,
type: "number",
},
{
id: "bod",
title: "BOD",
title: "BOD(mg/L)",
upName: "useQuilty",
upSequnce: 4,
type: "number",
@@ -51,23 +51,23 @@ export const rswtChkSttnHeadListExport: TableUpperProps[] = [
},
{
id: "crmty",
title: "색도",
title: "색도(도)",
upName: "useQuilty",
upSequnce: 6,
type: "number",
},
{ id: "tn", title: "T-N", upName: "useQuilty", upSequnce: 7, type: "number" },
{ id: "tn", title: "총질소(T-N)(mg/L)", upName: "useQuilty", upSequnce: 7, type: "number" },
{
id: "tph",
title: "T-P",
title: "총인(T-P)(mg/L)",
upName: "useQuilty",
upSequnce: 8,
type: "number",
},
{ id: "ph", title: "PH", upName: "useQuilty", upSequnce: 9, type: "number" },
{ id: "ph", title: "수소이온농도(PH)", upName: "useQuilty", upSequnce: 9, type: "number" },
{
id: "clIonQnt",
title: "염화물",
title: "염화물(mg/L)",
upName: "useQuilty",
upSequnce: 10,
type: "number",
@@ -43,17 +43,17 @@ export const pbnstYearHeadListExport: TableUpperProps[] = [
},
{
id: "total",
title: "계",
title: "계(m³)",
row: 1
},
{
id: "inUsage",
title: "장내용수",
title: "장내용수(m³)",
row: 1
},
{
id: "outUsage",
title: "장외용수",
title: "장외용수(m³)",
row: 1
},
]
@@ -79,6 +79,7 @@ export const pbnstPrfmncSttnActionsExport: (set: any) => pbnstPrfmncSttnActions
if (yearHead) {
yearHead.forEach((item: { id?: string; }) => {
if (item.id) {
if(item.id === "year") {item.id = ""; return;}
item.id = i + item.id;
}
})
@@ -202,7 +203,6 @@ export const pbnstPrfmncSttnActionsExport: (set: any) => pbnstPrfmncSttnActions
resData.push({ ...acc, ...data })
}
})
console.log("resData", resData)
return set((state: pbnstPrfmncSttnState) => ({
...state,
pbnstPrfmncSttn: {
@@ -11,14 +11,14 @@ import type { TableUpperProps } from "@/app/store/common/type/header";
{ id: "bdstNm", title: "시설명" },
{ id: "daddr", title: "위치" },
{ id: "frstArchPrmsnDt", title: "최초건축허가일" },
{ id: "archArea", title: "건축면적", },
{ id: "archArea", title: "건축면적(㎡)", },
];
const bdstChgHeadList: TableUpperProps[] = [
{ id: "bdstChgNm", title: "구분" },
{ id: "archChgPrmsnDt", title: "허가일" },
{ id: "archChgArea", title: "변경면적" },
{ id: "archChgArea", title: "변경면적(㎡)" },
];
@@ -6,5 +6,5 @@ export const htdTableHeadList: TableUpperProps[] = [
{ id: "bdstNm", title: "시설명" },
{ id: "daddr", title: "위치" },
{ id: "frstArchPrmsnDt", title: "준공년도" },
{ id: "archArea", title: "건축면적" },
{ id: "archArea", title: "건축면적(㎡)" },
];
@@ -109,6 +109,7 @@ export const concentratedWaterInfo: formDetailType[] = [
];
export const ruseFcltinfo: formDetailType[] = [
<<<<<<< HEAD
{ id: "rprcsFcltCpct", lable: "시설용량(m³/일)", type: "number", maxLenght:numSize },
{ id: "majorPrcsMsrcCd", lable: "주처리공법", maxLenght:txtSize },
{ id: "addr", lable: "위치(주소)", maxLenght:txtSize},
@@ -126,6 +127,14 @@ export const ruseFcltinfo: formDetailType[] = [
selectData: "yn",
}, // 머가 내? 외?,
{ id: "mainSplyPumpCpct", lable: "메인공급펌프 용량", type: "number" , maxLenght:numSize},
=======
{ id: "rprcsFcltCpct", lable: "시설용량(m³/일)", type: "number" },
{ id: "majorPrcsMsrcCd", lable: "주처리공법" },
{ id: "addr", lable: "위치(주소)" },
{ id: "rprcsMthdCd", lable: "재처리방식", type: "select", selectData: "rusePrcsMthdCd" },
{ id: "inoutYn", lable: "위치(처리장 내외)" ,type: "select" , selectData: "yn"}, // 머가 내? 외?,
{ id: "mainSplyPumpCpct", lable: "메인공급펌프 용량(m³/일)", type: "number" },
>>>>>>> a92f567e5c624486d80984c5e4427543aafdfdde
];
export const businessMoneyInfo: formDetailType[] = [
@@ -150,6 +159,7 @@ export const businessSttnInfo: formDetailType[] = [
export const ruseWaterQulityList: formDetailType[] = [
<<<<<<< HEAD
{ id: "bod", lable: "BOD(mg/L)", type: "text", maxLenght:numSize },
{ id: "grssClfg", lable: "총대장균군수(개/mg)", type: "text" , maxLenght:numSize},
{ id: "combResdch", lable: "결합잔류염소(mh/L)", type: "text" , maxLenght:numSize},
@@ -161,4 +171,17 @@ export const ruseWaterQulityList: formDetailType[] = [
{ id: "ph", lable: "수소이온농도", type: "text", maxLenght:numSize},
{ id: "clIonQnt", lable: "염화물(mg/L)", type: "text", maxLenght:numSize },
{ id: "cdtnv", lable: "전기전도도(μs/cm)​", type: "text", maxLenght:numSize },
=======
{ id: "bod", lable: "BOD(mg/L)", type: "text" },
{ id: "grssClfg", lable: "총대장균군수(개/mg)", type: "text" },
{ id: "combResdch", lable: "결합잔류염소(mh/L)", type: "text" },
{ id: "trbt", lable: "탁도(NTU)", type: "text" },
{ id: "smll", lable: "냄새", type: "text" },
{ id: "crmty", lable: "색도(도)", type: "text" },
{ id: "tn", lable: "총질소(T-N)(mg/L)", type: "text" },
{ id: "tph", lable: "총인(T-P)(mg/L)", type: "text" },
{ id: "ph", lable: "수소이온농도(PH)", type: "text" },
{ id: "clIonQnt", lable: "염화물(mg/L)", type: "text" },
{ id: "cdtnv", lable: "전기전도도(μs/cm)​", type: "text" },
>>>>>>> a92f567e5c624486d80984c5e4427543aafdfdde
];
@@ -59,7 +59,7 @@ export const upHeadList: TableUpperProps[] = [
{ id: "daddr", title: "위치" },
{ id: "bdsgUsgText", title: "건축물용도" },
{ id: "frstArchPrmsnDt", title: "최초건축허가일" },
{ id: "archArea", title: "건축면적" },
{ id: "archArea", title: "건축면적(㎡)" },
{ id: "lawTrgtYn", title: "법적의무대상여부" },
{ id: "bdstChgYn", title: "건축물변경여부" },
];
+21 -7
View File
@@ -235,7 +235,8 @@ const handleChange = (
export const InputTableBody = (
chgRes: any[] | [],
headList: TableUpperProps[],
setInputData: (data: any[]) => void
setInputData: (data: any[]) => void,
isEditable: boolean = true
) => {
// mergeCell 처리용
const getRowSpan = (data: any[], key: string, rowIndex: number) => {
@@ -265,6 +266,9 @@ export const InputTableBody = (
return (
<TableRow key={dataIndex + "row"}>
{headList.map((head, headIndex) => {
const isTextColumn = head.id === '구분' || head.id === '용수명';
const textAlignClass = isTextColumn ? 'text-center' : 'text-right';
// 총합계 행이면 "구분"에서 colSpan=2로 병합
if (
data["구분"] === 0 &&
@@ -298,10 +302,12 @@ export const InputTableBody = (
);
}
// 기본 셀
return head.edit === true && data.edit !== false ? (
// return head.edit === true && data.edit !== false ? (
return isEditable && head.edit === true && data.edit !== false ? (
<TableCell key={head.id + headIndex} className={`w-36 ${bgClass}`}>
<Input
className={`${head.id !== "utztnUsgCd" ? "text-right" : "text-center"} !text-xl h-10 w-full`}
// className={`${head.id !== "utztnUsgCd" ? "text-right" : "text-center"} !text-xl h-10 w-full`}
className={`${textAlignClass} !text-xl h-10 w-full`}
onChange={(e) =>
handleChange(dataIndex, head.id, e.target.value, setInputData)
}
@@ -312,10 +318,11 @@ export const InputTableBody = (
) : (
<TableCell key={head.id + headIndex} className={`w-36 ${bgClass}`}>
<div
className={`
${head.id !== "utztnUsgCd" ? "text-right" : "text-center"}
!text-xl w-full h-10
`}
// className={`
// ${head.id !== "utztnUsgCd" ? "text-right" : "text-center"}
// !text-xl w-full h-10
// `}
className={`${textAlignClass} !text-xl w-full h-10`}
>
{data[head.id as keyof any] ?? ""}
</div>
@@ -325,6 +332,13 @@ export const InputTableBody = (
</TableRow>
);
})}
{chgRes.length === 0 && (
<TableRow>
<TableCell colSpan={headList.length} className="h-24 text-center text-gray-500">
조회된 결과가 없습니다.
</TableCell>
</TableRow>
)}
</>
);
};
@@ -1,6 +1,7 @@
"use client";
import { useWrStore } from "@/app/store";
import { numSize } from "@/app/store/common/code/basicCode";
import { selectClass } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import { formH1Class } from "@/components/lib/class/comClass";
import { safeDate } from "@/components/lib/func/commom";
@@ -94,6 +95,7 @@ export default function BdstAdd({ form, readonly }: { form: any; readonly?: bool
value={f.value ?? code.chBuCd[0]?.val}
className={""}
label={""}
readOnly={readonly}
/>
</FormUi>
)}
@@ -113,6 +115,7 @@ export default function BdstAdd({ form, readonly }: { form: any; readonly?: bool
onChange: (date) => f.onChange(date),
}}
selectClass="w-full"
readOnly={readonly}
/>
</FormUi>
)}
@@ -123,13 +126,15 @@ export default function BdstAdd({ form, readonly }: { form: any; readonly?: bool
control={form.control}
name={`chgBuilding.${index}.archChgArea`}
render={({ field: f }) => (
<FormUi label="면적">
<FormUi label="면적(㎡)">
<Input
placeholder="-"
type="text"
onChange={(e) => f.onChange(e.target.value)}
value={f.value || ''}
className={selectClass}
readOnly={readonly}
maxLength={numSize}
/>
</FormUi>
)}
@@ -1,6 +1,8 @@
import { useWrStore } from "@/app/store";
import { numSize, txtSize } from "@/app/store/common/code/basicCode";
import { selectClass } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import { formH1Class } from "@/components/lib/class/comClass";
import { handleCommaNumberChange } from "@/components/lib/func/commom";
import {
FormField,
FormUi,
@@ -134,6 +136,7 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) {
field.onChange(e.target.value)
}}
value={field.value||''}
maxLength={txtSize}
/>
</FormUi>
)}
@@ -153,6 +156,7 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) {
field.onChange(e.target.value)
}}
value={field.value||''}
maxLength={50}
/>
</FormUi>
)}
@@ -217,9 +221,10 @@ export default function BdstReg({ form, type }: { form: any; type?: string }) {
placeholder="면적을 입력하세요"
type="text"
onChange={(e) => {
field.onChange(e.target.value)
handleCommaNumberChange(e, field.onChange);
}}
value={field.value||''}
maxLength={numSize}
/>
</FormUi>
)}
@@ -476,7 +476,7 @@ export default function HtdflRegForm({
control={form.control}
name="reuseBuilding.0.htdflObj.grssClfg"
render={({ field }) => (
<FormUi label="총대장균군">
<FormUi label="총대장균군(개/mg)">
<Input
className={selectClass}
placeholder="10"
@@ -499,7 +499,7 @@ export default function HtdflRegForm({
control={form.control}
name="reuseBuilding.0.htdflObj.tn"
render={({ field }) => (
<FormUi label="총질소">
<FormUi label="총질소(T-N)(mg/L)">
<Input
className={selectClass}
placeholder="10"
@@ -524,7 +524,7 @@ export default function HtdflRegForm({
control={form.control}
name="reuseBuilding.0.htdflObj.combResdch"
render={({ field }) => (
<FormUi label="결합잔류염소">
<FormUi label="결합잔류염소(mh/L)">
<Input
className={selectClass}
placeholder="10"
@@ -547,7 +547,7 @@ export default function HtdflRegForm({
control={form.control}
name="reuseBuilding.0.htdflObj.tph"
render={({ field }) => (
<FormUi label="총인">
<FormUi label="총인(T-P)(mg/L)">
<Input
className={selectClass}
placeholder="10"
@@ -572,7 +572,7 @@ export default function HtdflRegForm({
control={form.control}
name="reuseBuilding.0.htdflObj.trbt"
render={({ field }) => (
<FormUi label="탁도">
<FormUi label="탁도(NTU)">
<Input
className={selectClass}
placeholder="10"
@@ -595,7 +595,7 @@ export default function HtdflRegForm({
control={form.control}
name="reuseBuilding.0.htdflObj.ph"
render={({ field }) => (
<FormUi label="수소이온농도">
<FormUi label="수소이온농도(PH)">
<Input
className={selectClass}
placeholder="10"
@@ -620,7 +620,7 @@ export default function HtdflRegForm({
control={form.control}
name="reuseBuilding.0.htdflObj.bod"
render={({ field }) => (
<FormUi label="생물학적 산소요구량">
<FormUi label="생물학적 산소요구량(mg/L)">
<Input
className={selectClass}
placeholder="10"
@@ -643,7 +643,7 @@ export default function HtdflRegForm({
control={form.control}
name="reuseBuilding.0.htdflObj.clIonQnt"
render={({ field }) => (
<FormUi label="염화물">
<FormUi label="염화물(mg/L)">
<Input
className={selectClass}
placeholder="10"
@@ -691,7 +691,7 @@ export default function HtdflRegForm({
control={form.control}
name="reuseBuilding.0.htdflObj.cdtnv"
render={({ field }) => (
<FormUi label="전기전도도">
<FormUi label="전기전도도(μs/cm)">
<Input
className={selectClass}
placeholder="10"
@@ -716,7 +716,7 @@ export default function HtdflRegForm({
control={form.control}
name="reuseBuilding.0.htdflObj.crmty"
render={({ field }) => (
<FormUi label="색도">
<FormUi label="색도(도)">
<Input
className={selectClass}
placeholder="10"
@@ -253,7 +253,7 @@ export default function RswtrRegForm({
const isUnknown = value === null || value === -1; // 또는 Number(value) === -1
return (
<FormUi label="처리시설 용량">
<FormUi label="처리시설 용량(m³)">
<Input
className={selectClass}
placeholder=""
@@ -238,26 +238,26 @@ export default function ChkgdModal({ type, obj, setIsModal }: { type: string; ob
<>
<div>
<div>
<Title
title={
type === "RNB"
? "빗물이용시설 " + "지도점검 결과등록"
: "중수도 이용시설 " + "지도점검 결과등록"
}
></Title>
</div>
<div className="flex justify-between">
<div className="flex justify-between">
<Title
title={
type === "RNB"
? "빗물이용시설 " + "지도점검 결과등록"
: "중수도 이용시설 " + "지도점검 결과등록"
}
></Title>
{!rainChkSttn.isSttn ? (
<Button className="mt-8 mr-7" onClick={allDataUpdate}>
저장
</Button>
) : (
<></>
)}
</div>
<h3 className="text-2xl font-bold text-gray-900 mt-2 ml-6">
{type === "RNB"
? `(${obj.bdstNm})` : `(${obj.building.bdstNm})`}
</h3>
{!rainChkSttn.isSttn ? (
<Button className="" onClick={allDataUpdate}>
저장
</Button>
) : (
<></>
)}
</div>
<ScrollArea className="h-[60vh]">
@@ -14,12 +14,12 @@ export default function DrgtDetailModal({
data: customDrgt[];
}) {
// const [isSggNm, setIsSggNm] = useState('')
const [excelData, setExcelData] = useState<any[]>();
// const [isSggNm, setIsSggNm] = useState('')
const [excelData, setExcelData] = useState<any[]>();
const excelClick = () => {
downloadExcel({
data: excelData ?? [],
fileName: "우리동네가뭄 상세현황",
fileName: `우리동네가뭄 상세현황 - ${data[0]?.sggNm}`,
sheetNameArray: ["Sheet1"],
headerRange: "A1:C1"
})
@@ -36,10 +36,10 @@ export default function DrgtDetailModal({
}
}) : [];
setExcelData(exData)
// if(data&&data[0].sggNm){
////TODO: data.sggNm [0[인지 data.sggNm 인지 사용하는지 확인필요
// setIsSggNm(data[0].sggNm)
// }
// if(data&&data[0].sggNm){
////TODO: data.sggNm [0[인지 data.sggNm 인지 사용하는지 확인필요
// setIsSggNm(data[0].sggNm)
// }
}, [data])
return (
@@ -47,7 +47,7 @@ export default function DrgtDetailModal({
<div className="grid grid-cols-4 gap-4 h-full">
<div className="col-span-4">
<div className="flex items-center justify-between">
<Title title={`우리동네가뭄 상세내용 - ${data[0]&&data[0].sggNm ?data[0].sggNm:'' }`} />
<Title title={`우리동네가뭄 상세내용 - ${data[0] && data[0].sggNm ? data[0].sggNm : ''}`} />
<div className="flex flex-row space-x-2">
<Button
size={"sm"}
@@ -65,15 +65,11 @@ export default function DrgtDetailModal({
<ScrollArea className="h-[63vh]">
<UiTable
headName={undefined}
tableData={data }
tableData={data}
headlist={drgtDetailHeadListExport}
pageSize={10}
total={10000}
cellClick={(index: number | undefined, headId: string) => {
console.log(' indx ' , index)
console.log(' headId ' , headId)
}}
pageSize={0}
total={0}
cellClick={undefined}
onPageChange={() => { }}
></UiTable>
</ScrollArea>
@@ -326,7 +326,7 @@ export function PbnstSttnModal({ data, titleVisible }: { data: customPbnst; titl
<ScrollArea className="h-[60vh]">
<div className="card-header">
<h3 className="text-2xl font-medium text-label">
{"하수처리수재이용 실적(m3) 등록결과"}
{"하수처리수재이용 실적(m³) 등록결과"}
</h3>
</div>
<Table variant="secondary">