From 2abbf857c0fcde937ae54da4ff51d2ce0111fd92 Mon Sep 17 00:00:00 2001 From: JIeunhuh Date: Tue, 8 Jul 2025 11:24:25 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=ED=8C=9D=EC=97=85=20=ED=81=AC=EA=B8=B0=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/map/newWindowPopup.tsx | 22 ++++------------------ apps/wr/app/map/newWindowPortal.tsx | 2 +- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/apps/wr/app/map/newWindowPopup.tsx b/apps/wr/app/map/newWindowPopup.tsx index c60c3b537..43a122f02 100644 --- a/apps/wr/app/map/newWindowPopup.tsx +++ b/apps/wr/app/map/newWindowPopup.tsx @@ -19,6 +19,7 @@ import type { customHtdflBdst } from "@/app/store/ruseFcltMng/fcltReg/htdflReg"; import { getFetch } from "@/components/lib/api"; import { useGisContext } from "@common/business_components/ui/map/Gis"; import ListDiv from "@common/business_components/ui/list_div"; +import SttnDetailModal from "@/components/ui/modal/sttn/sttnDetailModal/sttnDetailModal"; interface NewWindowPopupProps { featureData: any; @@ -532,12 +533,7 @@ const NewWindowPopup: React.FC = ({ if (viewMode == 'detail') { // 빗물이용시설 상세 return ( - <> -
- - </div> - <RainPrfmncSttnPopup rainForm={rainDetailModal.data as customRainBdst} isModal={false} /> - </> + <SttnDetailModal type={"RNB"} formObj={rainDetailModal.data as customRainBdst} /> ); } else { // 빗물이용시설 목록 @@ -572,12 +568,7 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({ if (viewMode == 'detail') { // 중수도시설 상세 return ( - <> - <div className="flex justify-between items-center mb-4"> - <Title title="중수도시설 상세정보" /> - </div> - <RswtrPrfmncsSttnPopup rswtForm={rswtrDetailModal.data as customRswtBdst} isModal={false} /> - </> + <SttnDetailModal type={"RST"} formObj={rswtrDetailModal.data as customRswtBdst}/> ); } else { // 중수도시설 목록 @@ -612,12 +603,7 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({ if (viewMode == 'detail') { // 온배수시설 상세 return ( - <> - <div className="flex justify-between items-center mb-4"> - <Title title="온배수시설 상세정보" /> - </div> - <HtdflPrfmncSttnPopup htdflForm={htdflDetailModal.data as customHtdflBdst} isModal={false} /> - </> + <SttnDetailModal type={"HTB"} formObj={htdflDetailModal.data as customHtdflBdst}/> ); } else { // 온배수시설 목록 diff --git a/apps/wr/app/map/newWindowPortal.tsx b/apps/wr/app/map/newWindowPortal.tsx index 49949e0f4..51c6d5d8f 100644 --- a/apps/wr/app/map/newWindowPortal.tsx +++ b/apps/wr/app/map/newWindowPortal.tsx @@ -48,7 +48,7 @@ const NewWindowPortal: React.FC<NewWindowPortalProps> = ({ children, onClose, ti if (newWindowRef.current && !newWindowRef.current.closed) return; // 1. 새 창을 열고 참조를 저장합니다. - newWindowRef.current = window.open('', title, 'width=1400,height=1024,resizable=yes,scrollbars=yes'); + newWindowRef.current = window.open('', title, 'width=1000,height=800,resizable=yes,scrollbars=yes'); if (newWindowRef.current) { newWindowRef.current.document.title = title; From 131dad82306d8f2006d16e79e067628d382138b7 Mon Sep 17 00:00:00 2001 From: JIeunhuh <entks301@naver.com> Date: Tue, 8 Jul 2025 14:43:05 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=ED=98=84=ED=99=A9=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=85=80=ED=81=B4=EB=A6=AD=20=EC=8B=9C=20=EC=A7=80=EB=8F=84=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99=20=EC=9E=91=EC=97=85=20=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/map/newWindowPopup.tsx | 50 ++++++++++++----------------- apps/wr/app/map/newWindowPortal.tsx | 2 +- 2 files changed, 22 insertions(+), 30 deletions(-) diff --git a/apps/wr/app/map/newWindowPopup.tsx b/apps/wr/app/map/newWindowPopup.tsx index 43a122f02..5d724cecf 100644 --- a/apps/wr/app/map/newWindowPopup.tsx +++ b/apps/wr/app/map/newWindowPopup.tsx @@ -1,24 +1,17 @@ import { useWrStore } from "@/app/store"; -import { btnClass } from "@/app/store/common/code"; import type { customPbnst, pubHasuType } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type"; import { excelDownload, tableData } from "@/components/lib/func/commom"; import { Title, UiTable, UITab, ContentsDiv, ScrollArea } from '@common/business_components'; import { HeadMakeColSpan } from "@common/business_components/ui/table/HeadMakeColSpan"; -import { Button } from "@common/components/ui"; import React, { useCallback, useState, useEffect } from 'react'; import NewWindowPortal from '@/app/map/newWindowPortal'; -import PbnstPrfmncSttnPopup from "@/app/map/pbnstPrfmncSttnPopup"; import { PbnstSttnModal } from "@/components/ui/modal/sttn/pbnstSttnModal/pbnstSttnModal"; import type { WaterReuseFacility } from "@/app/store/ruseFcltMng/fcltSttn/pbnstSttn/type"; import type { chgBuilding, customRainBdst } from "@/app/store/ruseFcltMng/fcltReg/rainReg"; -import RainPrfmncSttnPopup from "@/app/map/rainPrfmncSttnPopup"; -import RswtrPrfmncsSttnPopup from "@/app/map/rswtrPrfmncSttnPopup"; import type { customRswtBdst } from "@/app/store/ruseFcltMng/fcltReg/rswtReg"; -import HtdflPrfmncSttnPopup from "@/app/map/htdflPrfmncSttnPopup"; import type { customHtdflBdst } from "@/app/store/ruseFcltMng/fcltReg/htdflReg"; import { getFetch } from "@/components/lib/api"; import { useGisContext } from "@common/business_components/ui/map/Gis"; -import ListDiv from "@common/business_components/ui/list_div"; import SttnDetailModal from "@/components/ui/modal/sttn/sttnDetailModal/sttnDetailModal"; interface NewWindowPopupProps { @@ -27,6 +20,7 @@ interface NewWindowPopupProps { checkedLayersData?: any[]; seletectedLayerNm?: string viewMode?: 'list' | 'detail' | 'nothing' + onFeatureSelect: (data: any) => void; onClose: () => void; } @@ -52,6 +46,7 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({ checkedLayers = [], checkedLayersData = [], seletectedLayerNm, + onFeatureSelect, onClose }) => { const { gisMap } = useGisContext() as unknown as { checkedLayerIds: React.MutableRefObject<number[]>; treeData: { lyrSn: number }[] | null; gisCore: any; gisMap: any; }; @@ -127,38 +122,37 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({ const layerId = getSelectedLayers(); if (featureData && typeof featureData.getProperties === "function") { const selectedVal = featureData.getProperties(); - let featureCd = layerId == '하수재이용시설' ? selectedVal?.swtrmt_fclt_cd : layerId == '빗물이용시설' || layerId == '중수도시설' ? selectedVal?.bdst_nm : layerId == '하수처리시설' ? 'a' : null; + let featureCd = layerId == '하수재이용시설' ? selectedVal?.swtrmt_fclt_cd : layerId == '빗물이용시설' || layerId == '중수도시설' || layerId == '온배수시설'? selectedVal?.bdst_nm : layerId == '하수처리시설' ? 'a' : null; if (featureCd && featureCd !== fcltPk) { if (layerId == '하수재이용시설') { featureCd = selectedVal?.swtrmt_fclt_cd; setFcltPk(featureCd); // 현재 호출된 featureCd 저장 setActiveTab(featureCd) fetchpbnstDetail(featureCd); // 상세정보 - setViewMode("detail") } else if (layerId == '빗물이용시설') { featureCd = selectedVal?.bdst_nm; setFcltPk(featureCd) rainSttnSearch(1, '20', '', featureCd, code.cityCd, code.sggCd); setRainDetailModal({ isOpen: true, data: rainSttn.rainSttnRes[0] }); - setViewMode("detail") } else if (layerId == '중수도시설') { featureCd = selectedVal?.bdst_nm; - console.log(featureCd) setFcltPk(featureCd) rswtSttnSearch(1, '20', '', featureCd, code.cityCd, code.sggCd); setRswtrDetailModal({ isOpen: true, data: rswtSttnRes[0] }); - setViewMode("detail") } else if (layerId == '온배수시설') { featureCd = selectedVal?.bdst_nm; setFcltPk(featureCd) htdflSttnSearch(1, '20', '', featureCd, code.cityCd, code.sggCd); setHtdflDetailModal({ isOpen: true, data: htdflSttnRes[0] }); - setViewMode("detail") } - else if(layerId =='하수처리시설') onClose(); + else if(layerId =='하수처리시설') { + + }; + setViewMode("detail") + } } else if (layerId === null && seletectedLayerNm) { setViewMode("list") } }, [featureData]); @@ -173,9 +167,11 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({ pbnstSttn.pbnstSttnRes[index] ) { setFcltPk(pbnstSttn.pbnstSttnRes[index].pbnstRuseFcltPk); - fetchpbnstDetail(pbnstSttn.pbnstSttnRes[index].pbnstRuseFcltPk) - setActiveTab(pbnstSttn.pbnstSttnRes[index].pbnstRuseFcltPk) - setViewMode("detail") + // fetchpbnstDetail(pbnstSttn.pbnstSttnRes[index].pbnstRuseFcltPk) + onFeatureSelect(pbnstSttn.pbnstSttnRes[index]); + // setActiveTab(pbnstSttn.pbnstSttnRes[index].pbnstRuseFcltPk) + // setViewMode("detail") + onClose() } }; const getSelectedLayers = () => { @@ -188,7 +184,6 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({ && typeof featureData.getId === 'function' && source.hasFeature(featureData)) { featureLayer = layer; // 피처가 속한 레이어 찾기) } - console.log('layernm',layer.get('lyrNm')) }); result = featureLayer.get('lyrNm'); @@ -274,8 +269,10 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({ index !== undefined && rainTable !== undefined && headId !== 'chBuildingYn') { - setRainDetailModal({ isOpen: true, data: rainTable[index] }) - setViewMode('detail') + // setRainDetailModal({ isOpen: true, data: rainTable[index] }) + // setViewMode('detail') + onFeatureSelect(rainTable[index]); + onClose(); } else if (headId === 'chBuildingYn' && index !== undefined && rainTable !== undefined) { if (rainTable[index] && rainTable[index]?.chgBuilding[0]?.bdstChgNm !== null) setRainBdstChgProps({ isOpen: true, chBuilding: rainTable[index].chgBuilding }); @@ -365,7 +362,6 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({ }, [code, rswtSttnRes]); // 엑셀 관련 const rswtSttnExcelDownload = useCallback(() => { - console.log('excel', rswtSttn.excelList, rswtrTable) if (rswtSttn.excelList.length > 0) { if (rswtSttn.excelList.length === 0) return; excelDownload( @@ -425,19 +421,15 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({ }, [code, pbnstHasuRes]); useEffect(() => { if (!pbnst.isInit) { - pubHasuInit("1", "41"); + pubHasuInit("1", "0"); } }, [pbnst.isInit, pubHasuInit]); useEffect(() => { - pubHasuInit(String(hasuPage), "41"); - }, [hasuPage, pubHasuInit]); + pubHasuInit(String(hasuPage), "0"); + }, [hasuPage]); // 체크된 레이어에 따른 조건부 컴포넌트 렌더링 함수 const renderConditionalContent = () => { - // 특정 레이어가 체크되었는지 확인 - const hasWaterTreatmentLayer = checkedLayersData.some(layer => - layer.data?.lyrNm?.includes('하수처리') || layer.data?.lyrNm?.includes('재이용시설') - ); const actTabData = tabData.find((tab) => tab.id === activeTab); let layerId = getSelectedLayers(); if (layerId === null || layerId === undefined) { @@ -462,7 +454,7 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({ </div> {/* 높이 조정 */} <UiTable - tableData={bdstTable || []} + tableData={hasuTable || []} headlist={pubFacHeadList} pageSize={10} total={100000} diff --git a/apps/wr/app/map/newWindowPortal.tsx b/apps/wr/app/map/newWindowPortal.tsx index 51c6d5d8f..6bc1cd047 100644 --- a/apps/wr/app/map/newWindowPortal.tsx +++ b/apps/wr/app/map/newWindowPortal.tsx @@ -48,7 +48,7 @@ const NewWindowPortal: React.FC<NewWindowPortalProps> = ({ children, onClose, ti if (newWindowRef.current && !newWindowRef.current.closed) return; // 1. 새 창을 열고 참조를 저장합니다. - newWindowRef.current = window.open('', title, 'width=1000,height=800,resizable=yes,scrollbars=yes'); + newWindowRef.current = window.open('', title, 'width=900,height=800,resizable=yes,scrollbars=yes'); if (newWindowRef.current) { newWindowRef.current.document.title = title; From ef1643e9da4cb71ac202ac995157136023ef7bb2 Mon Sep 17 00:00:00 2001 From: JIeunhuh <entks301@naver.com> Date: Tue, 8 Jul 2025 16:09:01 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=EC=83=81=EC=84=B8=20=EB=82=98=EC=98=A4?= =?UTF-8?q?=EA=B2=8C=20=EC=9A=B0=EC=84=A0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/map/newWindowPopup.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/wr/app/map/newWindowPopup.tsx b/apps/wr/app/map/newWindowPopup.tsx index 5d724cecf..e1a26267f 100644 --- a/apps/wr/app/map/newWindowPopup.tsx +++ b/apps/wr/app/map/newWindowPopup.tsx @@ -167,11 +167,11 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({ pbnstSttn.pbnstSttnRes[index] ) { setFcltPk(pbnstSttn.pbnstSttnRes[index].pbnstRuseFcltPk); - // fetchpbnstDetail(pbnstSttn.pbnstSttnRes[index].pbnstRuseFcltPk) - onFeatureSelect(pbnstSttn.pbnstSttnRes[index]); - // setActiveTab(pbnstSttn.pbnstSttnRes[index].pbnstRuseFcltPk) - // setViewMode("detail") - onClose() + fetchpbnstDetail(pbnstSttn.pbnstSttnRes[index].pbnstRuseFcltPk) + // onFeatureSelect(pbnstSttn.pbnstSttnRes[index]); + setActiveTab(pbnstSttn.pbnstSttnRes[index].pbnstRuseFcltPk) + setViewMode("detail") + // onClose() } }; const getSelectedLayers = () => { @@ -269,10 +269,10 @@ const NewWindowPopup: React.FC<NewWindowPopupProps> = ({ index !== undefined && rainTable !== undefined && headId !== 'chBuildingYn') { - // setRainDetailModal({ isOpen: true, data: rainTable[index] }) - // setViewMode('detail') - onFeatureSelect(rainTable[index]); - onClose(); + setRainDetailModal({ isOpen: true, data: rainTable[index] }) + setViewMode('detail') + // onFeatureSelect(rainTable[index]); + // onClose(); } else if (headId === 'chBuildingYn' && index !== undefined && rainTable !== undefined) { if (rainTable[index] && rainTable[index]?.chgBuilding[0]?.bdstChgNm !== null) setRainBdstChgProps({ isOpen: true, chBuilding: rainTable[index].chgBuilding });