From 49c475709faa6fd83ebb0ad293f00282adeae447 Mon Sep 17 00:00:00 2001 From: swcho Date: Thu, 28 Aug 2025 17:11:35 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20-=20=EC=8B=9C=EC=84=A4=20=EA=B2=80?= =?UTF-8?q?=EC=83=89,=20=EB=8B=A4=EC=A4=91=20=EC=8B=9C=EC=84=A4=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=20=EC=8B=9C=20=EC=9D=B4=EC=A0=84=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=20=EC=8B=9C=EC=84=A4=20=EB=A0=88=EC=9D=B4=EC=96=B4=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?-=20=EC=8B=9C=EC=84=A4=20=EC=9C=84=EC=B9=98=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=20=EC=97=86=EC=9D=84=20=EB=95=8C=20alert=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20-=20=EC=8B=9C=EC=84=A4=20=EA=B2=80=EC=83=89=20?= =?UTF-8?q?=EC=8B=9C=20=ED=95=B4=EB=8B=B9=20=EC=8B=9C=EC=84=A4=20=EC=95=84?= =?UTF-8?q?=EC=9D=B4=EC=BD=98=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=ED=91=9C?= =?UTF-8?q?=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ui/map/lib/gis.layer.js | 59 +++++++++++++------ .../src/ui/map/lib/gis.select.js | 1 + 2 files changed, 43 insertions(+), 17 deletions(-) diff --git a/packages/common/business_components/src/ui/map/lib/gis.layer.js b/packages/common/business_components/src/ui/map/lib/gis.layer.js index 538fad976..ff8266067 100644 --- a/packages/common/business_components/src/ui/map/lib/gis.layer.js +++ b/packages/common/business_components/src/ui/map/lib/gis.layer.js @@ -591,40 +591,63 @@ GisOlLayer.prototype = { const tileSize = 256; // 기본 타일 크기 return Math.ceil(Math.log2(maxResolution / (cameraHeight / tileSize))); }, - ensureSearchLayer: function () { + ensureSearchLayer: function (option) { let layer = this.searchLayer; if (!layer) { - layer = new VectorLayer({ - source: new VectorSource(), + let source; + + try { + if (option.cmncNm == 'bbox') { + source = this.getVectorSourceBbox(option); + } else { + source = this.getVectorSourceAll(option); + } + } catch (error) { + console.warn(option); + } + + layer = new VectorImageLayer({ + ...option, + id: 'search-layer', + source: source, zIndex: 9999 }); + layer.setStyle(this.gisStyle.getLayerStyleFunction(layer, option)); + let map = GisApp.Module.core.map; map.addLayer(layer); + + this.searchLayer = layer; } return layer; }, - clearSearchLayer: function () { - const layer = this.ensureSearchLayer(); + clearSearchLayer: function (option) { + const layer = this.ensureSearchLayer(option); layer.getSource().clear(true); + + if (this.searchLayer) { + GisApp.Module.core.map.removeLayer(this.searchLayer); + this.searchLayer = null; + } }, showSearchResultsFromGeoJSON: function (lyrTyNm, featureId) { - const layer = this.ensureSearchLayer(); - - // 이전 검색결과는 깨끗이 - const prev = layer.getSource(); - if (prev) prev.clear(true); - //레이어 타입 설정(point, line 등. 이걸 style에서 사용) const layerCode = GisApp.layerCode; const matched = Object.values(layerCode).find(obj => obj.lyrTyNm === lyrTyNm); + // 이전 검색 레이어 완전히 제거 + this.clearSearchLayer(matched); + // 새로운 검색 레이어 생성 + const layer = this.ensureSearchLayer(matched); layer.set("gobjTy", matched.gobjTy); // 새 소스 만들기 - const source = this.getFeatureSourceFromGeoserver(lyrTyNm, featureId); + const source = this.getFeatureSourceFromGeoserver(lyrTyNm, featureId, matched); // 1) 로드 완료시 extent 맞추기 const onLoadEnd = () => { + if (Object.keys(source.nullGeometryFeatures_).length > 0) alert('해당 시설의 위치 정보가 없습니다.'); + const feats = source.getFeatures(); if (feats && feats.length > 0) { const select = GisApp.Module.select; @@ -659,12 +682,13 @@ GisOlLayer.prototype = { * @param {*} featureId * @returns */ - getFeatureSourceFromGeoserver: function (lyrTyNm, featureId) { + getFeatureSourceFromGeoserver: function (lyrTyNm, featureId, option) { const typeName = this.storageNm + lyrTyNm; const srsName = GisApp.TO_PROJ; const baseUrl = GisApp.GEOSERVER_URL; const source = new VectorSource({ + ...option, format: new GeoJSON(), url: () => { const params = new URLSearchParams({ @@ -689,13 +713,14 @@ GisOlLayer.prototype = { * @param {Array|string} featureIds 피처 ID 배열 또는 단일 ID */ showMultipleSearchResultsFromGeoJSON: function (lyrTyNm, featureIds) { - const layer = this.ensureSearchLayer(); - - const prev = layer.getSource(); - if (prev) prev.clear(true); const layerCode = GisApp.layerCode; const matched = Object.values(layerCode).find(obj => obj.lyrTyNm === lyrTyNm); + + // 이전 검색 레이어 완전히 제거 + this.clearSearchLayer(matched); + // 새로운 검색 레이어 생성 + const layer = this.ensureSearchLayer(matched); layer.set("gobjTy", matched.gobjTy); const source = this.getMultiFeatureSourceFromGeoserver(lyrTyNm, featureIds); diff --git a/packages/common/business_components/src/ui/map/lib/gis.select.js b/packages/common/business_components/src/ui/map/lib/gis.select.js index d0209a6ed..ed4f9a2a7 100644 --- a/packages/common/business_components/src/ui/map/lib/gis.select.js +++ b/packages/common/business_components/src/ui/map/lib/gis.select.js @@ -284,6 +284,7 @@ GisOlSelect.prototype = { selectedFeatures.forEach(feature => { selectedFeatures.remove(feature); }); + selectedFeatures.clear(); }, /** * SELECT 이벤트 활성화 From 28d0e21815be1be6ec016216951041150cfc6bf0 Mon Sep 17 00:00:00 2001 From: swcho Date: Thu, 28 Aug 2025 17:32:52 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20UiTable=EC=97=90=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EB=B2=88=ED=98=B8=20props=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/business_components/src/ui/table/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/common/business_components/src/ui/table/index.tsx b/packages/common/business_components/src/ui/table/index.tsx index 9ffea89bf..6d5b24c70 100644 --- a/packages/common/business_components/src/ui/table/index.tsx +++ b/packages/common/business_components/src/ui/table/index.tsx @@ -30,6 +30,7 @@ type UiTableProps = { boldArray?: number[]; resetSelection?: boolean; index?: number; + curPage?: number; headButton?: React.ReactNode | undefined; }; @@ -54,9 +55,10 @@ export function UiTable({ boldArray = [], resetSelection = false, index = -1, + curPage = 1, headButton = undefined, }: UiTableProps) { - const [cur, setCur] = useState(1); + const [cur, setCur] = useState(curPage); const [idx, setIdx] = useState(index); const [headerHeight, setHeaderHeight] = useState(0); const headerRef = useRef(null); @@ -84,6 +86,10 @@ export function UiTable({ setIdx(index); }, [index]) + useEffect(() => { + setCur(curPage); + }, [curPage]) + const handlePageChange = (page: number) => { setCur(page); onPageChange(page); From 26f2c60f4cac0194767d65bc319270d162dcf064 Mon Sep 17 00:00:00 2001 From: jsyang Date: Fri, 29 Aug 2025 14:59:10 +0900 Subject: [PATCH 3/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} />