Merge remote-tracking branch 'origin/iipbs/wr/dev'
This commit is contained in:
@@ -20,7 +20,7 @@ export default function MapFeaturePopup() {
|
||||
coSttnMapDetail
|
||||
} = useWrStore((state) => state);
|
||||
const { pbnMapHeadList } = pbnMap;
|
||||
const [isDetail, setIsDetail] = useState<any>(null);
|
||||
const [isDetail, setIsDetail] = useState<any>(undefined);
|
||||
const [layerNm, setLayerNm] = useState<string>();
|
||||
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 ? (
|
||||
|
||||
@@ -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 (
|
||||
<BaseLayout currentPath={pathname ?? ""} handleMenuClick={changeMenu}>
|
||||
|
||||
Reference in New Issue
Block a user