From 71fa8eb13f7097a726165cbcfd4847e73b1d12b8 Mon Sep 17 00:00:00 2001 From: swcho Date: Mon, 4 Aug 2025 10:14:26 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=9E=90=EC=B2=B4=EC=9E=85?= =?UTF-8?q?=EB=A0=A5=EC=A0=95=EB=B3=B4=20=EB=B3=80=EC=88=98=EB=AA=85=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 --- .../popupComponent/featureClickEventPopup.tsx | 11 +++++------ .../map/components/popupComponent/sewagePump.tsx | 8 ++++---- 2 files changed, 9 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 f50595c10..5e34dbad0 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/featureClickEventPopup.tsx +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/featureClickEventPopup.tsx @@ -187,7 +187,6 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void, const selectedLayerName = getSelectedLayers(); // 레이어 이름 가져오기 setLayerNm(selectedLayerName); // 상태 업데이트 - // console.log('gis data', featureData.values_); let data; if (featureData['ol_uid']) data = featureData.values_; // Gis 레이어 클릭 이벤트일 때 else data = featureData; // SearchModal 클릭 이벤트일 때 @@ -271,11 +270,11 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void, // 자체입력정보 API 엔드포인트 선택 let apiEndpoint = ''; - const getFeatureId = featureId.toString().split('.').pop() || null; - if (selectedLayerName === '하수관로') apiEndpoint = `v1/fcltppl/${getFeatureId}`; - else if (selectedLayerName === '우수토실') apiEndpoint = `v1/fcltstofcbr/${getFeatureId}`; - else if (selectedLayerName === '오수펌프' || selectedLayerName === '빗물펌프') apiEndpoint = `v1/fcltpump/${getFeatureId}`; - else if (selectedLayerName === '하수맨홀') apiEndpoint = `v1/fcltmhl/${getFeatureId}`; + const FcltMngNo = featureData?.values_?.fclt_mng_no || null; + if (selectedLayerName === '하수관로') apiEndpoint = `v1/fcltppl/${FcltMngNo}`; + else if (selectedLayerName === '우수토실') apiEndpoint = `v1/fcltstofcbr/${FcltMngNo}`; + else if (selectedLayerName === '하수펌프장') apiEndpoint = `v1/fcltpump/${FcltMngNo}`; + else if (selectedLayerName === '하수맨홀') apiEndpoint = `v1/fcltmhl/${FcltMngNo}`; // API에서 상세 데이터 가져오기 if (apiEndpoint) { diff --git a/apps/sn/app/(map-layout)/map/components/popupComponent/sewagePump.tsx b/apps/sn/app/(map-layout)/map/components/popupComponent/sewagePump.tsx index 2cde31b64..54f10c47d 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/sewagePump.tsx +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/sewagePump.tsx @@ -1,15 +1,15 @@ import { VerticalTable } from '@/components/ui/verticalTable'; import React, { useState, useEffect } from 'react' -// 빗물펌프 자체 입력 정보 +// 빗물펌프장 자체 입력 정보 const exclnInputColumn = [ { id: "swtrmtZoneCd", title: "배수구역", type: "input" }, { id: "mltvDtdvNm", title: "배수분구", type: "input" }, { id: "dsgnFrqnc", title: "설계빈도(년)", type: "input" }, ] -// 오수펌프 자체 입력 정보 +// 오수펌프장 자체 입력 정보 const drtwInputColumn = [ - { id: "swtrmt_zone_cd", title: "처리구역", type: "input" }, - { id: "mltv_dtdv_nm", title: "처리분구", type: "input" }, + { id: "swtrmtZoneCd", title: "처리구역", type: "input" }, + { id: "mltvDtdvNm", title: "처리분구", type: "input" }, ] // 하수펌프장