From d9cd7423552fae847ab8111332d415b323746a61 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Wed, 3 Sep 2025 15:07:44 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EC=A7=80=EB=8F=84=20=ED=8C=9D=EC=97=85=20?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=97=86=EB=8A=94=EA=B2=BD?= =?UTF-8?q?=EC=9A=B0=20=EB=A9=94=EC=8B=9C=EC=A7=80=20=ED=91=9C=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wr/app/(popUp-layout)/mapFeaturePopup/page.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/wr/app/(popUp-layout)/mapFeaturePopup/page.tsx b/apps/wr/app/(popUp-layout)/mapFeaturePopup/page.tsx index 3b1ec8a78..680f637d4 100644 --- a/apps/wr/app/(popUp-layout)/mapFeaturePopup/page.tsx +++ b/apps/wr/app/(popUp-layout)/mapFeaturePopup/page.tsx @@ -20,7 +20,7 @@ export default function MapFeaturePopup() { coSttnMapDetail } = useWrStore((state) => state); const { pbnMapHeadList } = pbnMap; - const [isDetail, setIsDetail] = useState(null); + const [isDetail, setIsDetail] = useState(undefined); const [layerNm, setLayerNm] = useState(); const searchParams = useSearchParams(); @@ -45,6 +45,15 @@ export default function MapFeaturePopup() { }; }, []); + useEffect(() => { + if(isDetail ===null){ + alert("해당시설은 X,Y좌표를 찾을수 없어 위치를 찾을수 없습니다."); + window.close(); // isDetail이 null이면 팝업 닫기 + } + console.log("isDetail", isDetail); + }, [isDetail]); + + useEffect(() => { if (isFeatureCd && layerNm) { if (layerNm === "tb_wr_bdst_ruse_fclt") { @@ -55,6 +64,7 @@ export default function MapFeaturePopup() { }); } else if (layerNm === "tb_wr_rnwtr_utztn_fclt") { rainMapDetile(isFeatureCd).then((res) => { + setIsDetail(res); }); } else if (layerNm === "tb_wr_rswtr_fclt") { @@ -78,7 +88,7 @@ export default function MapFeaturePopup() { } }, [isFeatureCd, layerNm]); - if (!isDetail) return null; // 데이터 없으면 아무것도 안 그림 + if (isDetail === undefined) return null; // 데이터 없으면 아무것도 안 그림 return ( <> {isDetail ? ( From c4c5e682674126e5d2010839614d5f1d670628c0 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Wed, 3 Sep 2025 17:55:05 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=ED=95=98=EC=88=98=EC=9E=AC=EC=9D=B4?= =?UTF-8?q?=EC=9A=A9=20=ED=86=B5=EA=B3=84=20=EB=A7=A4=EB=89=B4=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99=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/base.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/wr/app/base.tsx b/apps/wr/app/base.tsx index 34452e20b..10a456dde 100644 --- a/apps/wr/app/base.tsx +++ b/apps/wr/app/base.tsx @@ -15,7 +15,15 @@ export default function Base({ const changeMenu = (path: MenuItem) => { getMenuAuthrts(path.menuCd); - router.push(path.urlPath); + if (path.menuKornNm === "하수재이용통계") { + // console.log("외부 페이지로 이동합니다. " ,path); + // const popupOptions = `width=${window.screen.availWidth},height=${window.screen.availHeight},left=0,top=0,resizable=yes,scrollbars=yes`; + // path.newWndwYn ='N' + // window.open(path.urlPath, "candidatePopup", popupOptions); + return null; + } else { + router.push(path.urlPath); + } }; return (