Merge remote-tracking branch 'origin/iipbs/sn/ii' into iipbs/sn/dev
This commit is contained in:
@@ -13,7 +13,6 @@ import { useInfilChartModalStore, useRdiiChartModalStore } from "./chartModalSto
|
||||
import { formatDisplayData } from '@/components/lib/utils/formatDisplayValue';
|
||||
import { codeMapper } from "../common/codeMapper";
|
||||
import LoadingOverlay from '@/components/ui/LoadingBar';
|
||||
// import GisApp from "@common/business_components/ui/map/lib/gis.core";
|
||||
import { searchUpperPpls } from "./smh";
|
||||
|
||||
|
||||
@@ -385,76 +384,6 @@ 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 (
|
||||
<div id="popup" className="absolute top-0 right-0 w-[350px] h-[calc(100vh-5rem)] bg-white border-r border-gray-300 flex flex-col overflow-hidden transition-all duration-300 z-[50]">
|
||||
<LoadingOverlay isLoading={isLoading} />
|
||||
|
||||
@@ -3,7 +3,7 @@ import { VerticalTable } from '@/components/ui/verticalTable';
|
||||
import { useEffect, useState } from 'react';
|
||||
import GisApp from "@common/business_components/ui/map/lib/gis.core";
|
||||
|
||||
// exported helper: 상류관로 검색 및 선택 (FeatureClickEventPopup에서 사용)
|
||||
// 상류관로 보기 함수 (FeatureClickEventPopup에서 사용)
|
||||
export async function searchUpperPpls(gisMap: any, fcltMngNo: any) {
|
||||
const BASE_URL = process.env.NEXT_PUBLIC_SEWERAGE_API_URL || "";
|
||||
const res = await fetch(`${BASE_URL}/v1/fcltmhl/upperPpls/${fcltMngNo}`, {
|
||||
|
||||
Reference in New Issue
Block a user