153 lines
5.6 KiB
TypeScript
153 lines
5.6 KiB
TypeScript
import { headMakeprfmnc } from "@/app/ruseFcltMng/prfmncReg/chkgdnReg/page";
|
|
import { useWrStore } from "@/app/store";
|
|
import { ScrollArea, Title, UiTable } from "@common/business_components/ui";
|
|
import { Button } from "@common/components/ui";
|
|
import { useEffect } from "react";
|
|
|
|
export default function ChkgdModal({type, obj}:{type:string , obj:any} ){
|
|
|
|
|
|
const { rainChkgdn} = useWrStore((state) => state);
|
|
|
|
|
|
|
|
const nodeList = headMakeprfmnc(rainChkgdn?.supWaterHeadList,rainChkgdn?.rainHeadNm ) ;
|
|
const rswtnodeList = headMakeprfmnc(rainChkgdn?.rswtDetailHeadList,rainChkgdn?.rainHeadNm ) ;
|
|
|
|
|
|
useEffect(() =>{
|
|
|
|
},[rainChkgdn])
|
|
|
|
|
|
const cellClick =(val:number|undefined, headId:string)=>{
|
|
if(val!=undefined)
|
|
console.log(rainChkgdn.supWaterData[val])
|
|
|
|
|
|
}
|
|
|
|
return(
|
|
<>
|
|
|
|
<div>
|
|
<div>
|
|
<Title title= {type==='RNB'?'빗물이용시설':'중수도 이용시설' + '지도점검 결과등록' }></Title>
|
|
</div>
|
|
<div className="flex justify-between">
|
|
<h3 className="text-2xl font-bold text-gray-900">{"○"+ obj.bdstNm + `(${obj.chckYmd})`}</h3>
|
|
|
|
<Button className="">저장</Button>
|
|
</div>
|
|
|
|
<ScrollArea className="h-[60vh]">
|
|
<UiTable
|
|
headName={"연간 보급수이용량"}
|
|
tableData={rainChkgdn.supWaterData||[]}
|
|
headlist={rainChkgdn?.supWaterHeadList}
|
|
pageSize={0}
|
|
total={0}
|
|
cellClick={(val, headId) => {
|
|
cellClick(val, headId);
|
|
}}
|
|
onPageChange={function (page: number): void {
|
|
throw new Error("Function not implemented.");
|
|
} }>
|
|
|
|
{nodeList}
|
|
</UiTable>
|
|
|
|
|
|
<UiTable
|
|
headName={"연간 빗물이용량"}
|
|
tableData={rainChkgdn.supWaterData}
|
|
headlist={rainChkgdn?.supWaterHeadList}
|
|
pageSize={0}
|
|
total={0}
|
|
cellClick={(val, headId) => {
|
|
cellClick(val, headId);
|
|
}}
|
|
onPageChange={function (page: number): void {
|
|
throw new Error("Function not implemented.");
|
|
} }>
|
|
{nodeList}
|
|
|
|
</UiTable>
|
|
|
|
{type !=='RNB'?
|
|
<div>
|
|
<UiTable
|
|
headName={"연간이용수질(1분기)"}
|
|
tableData={[]}
|
|
headlist={rainChkgdn?.rswtDetailHeadList}
|
|
pageSize={0}
|
|
total={0}
|
|
cellClick={(val, headId) => {
|
|
cellClick(val, headId);
|
|
}}
|
|
onPageChange={function (page: number): void {
|
|
throw new Error("Function not implemented.");
|
|
} }>
|
|
{rswtnodeList}
|
|
|
|
</UiTable>
|
|
|
|
<UiTable
|
|
headName={"연간이용수질(2분기)"}
|
|
tableData={[]}
|
|
headlist={rainChkgdn?.rswtDetailHeadList}
|
|
pageSize={0}
|
|
total={0}
|
|
cellClick={(val, headId) => {
|
|
cellClick(val, headId);
|
|
}}
|
|
onPageChange={function (page: number): void {
|
|
throw new Error("Function not implemented.");
|
|
} }>
|
|
{rswtnodeList}
|
|
|
|
</UiTable>
|
|
|
|
<UiTable
|
|
headName={"연간이용수질(3분기)"}
|
|
tableData={[]}
|
|
headlist={rainChkgdn?.rswtDetailHeadList}
|
|
pageSize={0}
|
|
total={0}
|
|
cellClick={(val, headId) => {
|
|
cellClick(val, headId);
|
|
}}
|
|
onPageChange={function (page: number): void {
|
|
throw new Error("Function not implemented.");
|
|
} }>
|
|
{rswtnodeList}
|
|
|
|
</UiTable>
|
|
|
|
<UiTable
|
|
headName={"연간이용수질(4분기)"}
|
|
tableData={[]}
|
|
headlist={rainChkgdn?.rswtDetailHeadList}
|
|
pageSize={0}
|
|
total={0}
|
|
cellClick={(val, headId) => {
|
|
cellClick(val, headId);
|
|
}}
|
|
onPageChange={function (page: number): void {
|
|
throw new Error("Function not implemented.");
|
|
} }>
|
|
{rswtnodeList}
|
|
|
|
</UiTable>
|
|
</div>
|
|
:<></>}
|
|
|
|
</ScrollArea>
|
|
</div>
|
|
</>
|
|
|
|
|
|
|
|
)
|
|
|
|
} |