feat: 자체입력정보에 관리기관코드 추가

This commit is contained in:
swcho
2025-08-04 18:15:11 +09:00
parent a062810bd0
commit f82a392ef6
@@ -4,7 +4,7 @@ import Modal from "@/components/ui/modal";
import { VerticalTable } from "@/components/ui/verticalTable";
import { useGisContext } from "@common/business_components/ui/map/Gis";
import { Button } from "@common/components/ui";
import { useEffect, useRef, useState, useCallback, useMemo } from "react";
import { useEffect, useRef, useState, useMemo } from "react";
import { getLayerContentComponent } from "../common";
import { SwtrmtFcltCol, SwtrmtFcltCol2, SwtrmtPrcsZoneCol, SwtrmtPrcsZoneCol2, untrtSwgRainCol1, untrtSwgRainCol2, MsSwagePplCol, MsSwagePplCol2, ExclnSewagePumpCol, ExclnSewagePumpCol2, DrtwSewagePumpCol, DrtwSewagePumpCol2, MsSwageMhlCol, MsSwageMhlCol2, stofcbrCol, stofcbrCol2, MS_SWAGE_MHL_CODES, DRTW_SEWAGE_PUMP_USE_CODES } from "../common/table";
import InfilChart from './chart/infilChart';
@@ -61,9 +61,6 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void,
let featureLayer: { get: (key: string) => any }; // 피처가 속한 레이어를 찾기 위한 변수
layers.some((layer: any) => {
const source = layer.getSource();
// console.log('실행됨3 source', source);
// console.log('실행됨3 featureData', featureData);
// console.log('실행됨3 featureData.fid', featureData.fid);
// if (source && featureData && featureData.fid) {
// featureLayer = layer; // 피처가 속한 레이어 찾기
// }
@@ -131,8 +128,6 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void,
setIsClicked(false);
console.log('SearchModal data', featureData);
const lyrTyNm = featureData.lyrTypeNm;
console.log('실행됨4 SearchModal 클릭 이벤트', lyrTyNm);
console.log('실행됨4 SearchModal 클릭 이벤트 featureData', featureData);
if (featureData.lyrTypeNm === 'tb_ms_swage_ppl') {
result = '하수관로';
setHeadlist(MsSwagePplCol2)
@@ -270,11 +265,12 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void,
// 자체입력정보 API 엔드포인트 선택
let apiEndpoint = '';
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}`;
const fcltMngNo = featureData?.values_?.fclt_mng_no || null;
const mngInstCd = featureData?.values_?.mng_inst_cd || null;
if (selectedLayerName === '하수관로') apiEndpoint = `v1/fcltppl/${fcltMngNo}/${mngInstCd}`;
else if (selectedLayerName === '우수토실') apiEndpoint = `v1/fcltstofcbr/${fcltMngNo}/${mngInstCd}`;
else if (selectedLayerName === '하수펌프장') apiEndpoint = `v1/fcltpump/${fcltMngNo}/${mngInstCd}`;
else if (selectedLayerName === '하수맨홀') apiEndpoint = `v1/fcltmhl/${fcltMngNo}/${mngInstCd}`;
// API에서 상세 데이터 가져오기
if (apiEndpoint) {
@@ -353,6 +349,7 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void,
else if (layerNm === '하수맨홀') apiEndpoint = 'v1/fcltmhl';
bodyData['fcltMngNo'] = featureData.values_.fclt_mng_no.toString() || null;
bodyData['mngInstCd'] = featureData.values_.mng_inst_cd.toString() || null;
// 빈 키 제거
if (bodyData[""] !== undefined) delete bodyData[""];