From 26f2c60f4cac0194767d65bc319270d162dcf064 Mon Sep 17 00:00:00 2001 From: jsyang Date: Fri, 29 Aug 2025 14:59:10 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=EB=9D=BC=EC=9D=B8=EB=B0=94=20=EC=B0=A8?= =?UTF-8?q?=ED=8A=B8=20-=20=EB=8D=B0=EC=9D=B4=ED=84=B0=EA=B0=80=20NaN?= =?UTF-8?q?=EC=9D=B4=EA=B1=B0=EB=82=98=20null=EC=9D=B8=20=EA=B2=BD?= =?UTF-8?q?=EC=9A=B0=20=ED=88=B4=ED=8C=81=EC=97=90=EC=84=9C=20=EC=A0=9C?= =?UTF-8?q?=EC=99=B8=20-=20NULL=EC=9D=B8=20=EA=B2=BD=EC=9A=B0=200=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=9D=BC=EC=9D=B8=EC=9D=84=20=EA=B7=B8=EB=A6=AC?= =?UTF-8?q?=EB=8A=94=20=ED=98=84=EC=83=81=20=EB=8B=A4=EC=9D=8C=20=EC=9E=88?= =?UTF-8?q?=EB=8A=94=EB=8D=B0=EC=9D=B4=ED=84=B0=EB=A1=9C=20=EB=9D=BC?= =?UTF-8?q?=EC=9D=B8=EC=9D=84=20=EA=B7=B8=EB=A6=AC=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/business_components/src/ui/chart/LineBarChart.tsx | 2 +- packages/common/business_components/src/ui/chart/LineChart.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/common/business_components/src/ui/chart/LineBarChart.tsx b/packages/common/business_components/src/ui/chart/LineBarChart.tsx index 2a2ba2b1c..a7319cb01 100644 --- a/packages/common/business_components/src/ui/chart/LineBarChart.tsx +++ b/packages/common/business_components/src/ui/chart/LineBarChart.tsx @@ -165,7 +165,7 @@ export default function LineBarchart({ {chartTitle} ) : null} -
+

{label}

- {payload.map((item, index) => ( + {payload.filter(item => item.value != null && String(item.value) != 'NaN' && item.value != undefined).map((item, index) => (
{/* 색상 박스 추가 (범례 색상과 동일) */}
@@ -267,6 +267,7 @@ export default function Linechart({ type="linear" strokeWidth={2} dot={false} + connectNulls={true} name={String(config?.label || "X축")} stroke={config?.color} /> From 27801244b0316e1b2f46240f76faddba0d727bab Mon Sep 17 00:00:00 2001 From: swcho Date: Mon, 1 Sep 2025 13:06:53 +0900 Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20=EC=83=81=EB=A5=98=EA=B4=80?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=B4=EA=B8=B0=20=ED=95=A8=EC=88=98=20=EC=9C=84?= =?UTF-8?q?=EC=B9=98=20=EC=9D=B4=EB=8F=99=20(Gis.js=20->=20popupComponent/?= =?UTF-8?q?smh.tsx)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../popupComponent/featureClickEventPopup.tsx | 79 ++++++++++++++++++- .../map/components/popupComponent/smh.tsx | 78 ++++++++++++++++++ .../map/searchModal/searchModal.tsx | 7 +- 3 files changed, 154 insertions(+), 10 deletions(-) diff --git a/apps/sn/app/(map-layout)/map/components/popupComponent/featureClickEventPopup.tsx b/apps/sn/app/(map-layout)/map/components/popupComponent/featureClickEventPopup.tsx index 24f9a3f8d..45fcfb0d4 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/featureClickEventPopup.tsx +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/featureClickEventPopup.tsx @@ -12,8 +12,9 @@ import RdiiChart from './chart/rdiiChart'; import { useInfilChartModalStore, useRdiiChartModalStore } from "./chartModalStore"; import { formatDisplayData } from '@/components/lib/utils/formatDisplayValue'; import { codeMapper } from "../common/codeMapper"; -import { searchUpperPpls } from '@common/business_components/ui/map/Gis'; import LoadingOverlay from '@/components/ui/LoadingBar'; +// import GisApp from "@common/business_components/ui/map/lib/gis.core"; +import { searchUpperPpls } from "./smh"; const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void, featureData: any }) => { @@ -58,7 +59,7 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void, const getSelectedLayers = () => { let result = null; const layers = gisMap.getLayers().getArray(); // gisMap에서 모든 레이어 가져오기 - let featureLayer: { get: (key: string) => any }; // 피처가 속한 레이어를 찾기 위한 변수 + let featureLayer: any = null; // 피처가 속한 레이어를 찾기 위한 변수 layers.some((layer: any) => { const source = layer.getSource(); // if (source && featureData && featureData.fid) { @@ -121,7 +122,7 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void, setHeadlist2(untrtSwgRainCol2); setLayerSpecificNm(featureData.values_.manage_no); } - else result = featureLayer.get('lyrNm'); + else result = featureLayer ? featureLayer.get('lyrNm') : null; } else { // SearchModal 클릭 이벤트 @@ -384,6 +385,76 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void, // 레이어명에 따라 상세페이지 렌더링 const ContentComponent = layerNm ? getLayerContentComponent(layerNm) : null; + // const searchUpperPpls = async (fcltMngNo: any) => { + // const BASE_URL = process.env.NEXT_PUBLIC_SEWERAGE_API_URL || ""; + // const res = await fetch(`${BASE_URL}/v1/fcltmhl/upperPpls/${fcltMngNo}`, { + // method: "GET", + // }); + + // let data = null; + // if (res.ok) { + // try { + // // 응답이 비어있는지 확인 + // const contentLength = res.headers.get("content-length"); + // if (contentLength === "0") + // alert(`해당 맨홀의 상류관로를 찾을 수 없습니다.`); + + // // 응답 텍스트를 먼저 가져와서 빈 문자열인지 확인 + // const text = await res.text(); + // if (!text || text.trim() === "") + // alert(`해당 맨홀의 상류관로를 찾을 수 없습니다.`); + + // // JSON 파싱 시도 + // data = JSON.parse(text); + // } catch (error) { + // console.error("JSON parsing error:", error); + // alert(`해당 맨홀의 상류관로를 찾을 수 없습니다.`); + // } + // } + + // const select: any = GisApp.Module.select; + // // const gisMap = GisApp.Module.core?.map; + // let foundFeature: any = null; + + // data.forEach((item: any) => { + // const pplMngNo = item.ppl_mng_no.trim(); + + // gisMap + // .getLayers() + // .getArray() + // .filter((e: any) => e.get("lyrTyNm") == "tb_ms_swage_ppl") + // .forEach((layer: any) => { + // const source = layer.getSource?.(); + // if (source?.getFeatures) { + // const features = source.getFeatures(); + // for (const f of features) { + // if (f.values_.fclt_mng_no.trim() === pplMngNo) { + // foundFeature = f; + // break; + // } + // } + // } + // }); + + // if (foundFeature) select?.selectMultiFeature?.(foundFeature, true); + // }); + + // if (!foundFeature) alert(`해당 맨홀의 상류관로를 찾을 수 없습니다.`); + + // let geometry = foundFeature?.getGeometry(); + // if (geometry) { + // let extent = geometry.getExtent(); + + // gisMap.getView().fit(extent, { + // duration: 300, + // padding: [50, 50, 50, 50], + // maxZoom: 14, + // constrainResolution: true, + // nearest: true, + // }); + // } + // }; + return (