From 913256cac4546dcf2d896e39c4574ba8698ea1f3 Mon Sep 17 00:00:00 2001 From: yschoi Date: Tue, 29 Jul 2025 15:16:45 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9B=90=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dm/src/entities/auth/api/login-service.ts | 1 - .../fo/src/entities/auth/api/login-service.ts | 2 - apps/wr/app/map/mainMap/page.tsx | 17 +--- apps/wr/app/map/newWindowPopup.tsx | 21 ++-- apps/wr/app/store/matDmd/coSttn/index.tsx | 2 - .../wr/src/entities/auth/api/login-service.ts | 1 - .../business_components/src/ui/map/Gis.js | 95 +------------------ .../business_components/src/ui/map/GisTree.js | 2 +- .../src/ui/map/lib/gis.layer.js | 2 - 9 files changed, 19 insertions(+), 124 deletions(-) diff --git a/apps/dm/src/entities/auth/api/login-service.ts b/apps/dm/src/entities/auth/api/login-service.ts index 614aadbf9..43ea1c33d 100644 --- a/apps/dm/src/entities/auth/api/login-service.ts +++ b/apps/dm/src/entities/auth/api/login-service.ts @@ -16,7 +16,6 @@ export class LoginApiService implements LoginService { public async login(payload: ILogin): Promise { try { - console.log(' ENDPOINT.USER_SERVICE.LOGIN ', ENDPOINT.USER_SERVICE.LOGIN) const response = await fetch( PROXY_HOST+ ENDPOINT.USER_SERVICE.LOGIN, { method: "POST", body: JSON.stringify({ diff --git a/apps/fo/src/entities/auth/api/login-service.ts b/apps/fo/src/entities/auth/api/login-service.ts index fafb467e7..3f2d958c6 100644 --- a/apps/fo/src/entities/auth/api/login-service.ts +++ b/apps/fo/src/entities/auth/api/login-service.ts @@ -17,8 +17,6 @@ export class LoginApiService implements LoginService { public async login(payload: ILogin): Promise { try { - console.log(' ENDPOINT.USER_SERVICE.LOGIN ', ENDPOINT.USER_SERVICE.LOGIN) - console.log(payload.userId+' '+payload.password) const response = await fetch( PROXY_HOST+ ENDPOINT.USER_SERVICE.LOGIN, { method: "POST", body: JSON.stringify({ diff --git a/apps/wr/app/map/mainMap/page.tsx b/apps/wr/app/map/mainMap/page.tsx index 1e9afd74b..cc71e69aa 100644 --- a/apps/wr/app/map/mainMap/page.tsx +++ b/apps/wr/app/map/mainMap/page.tsx @@ -61,13 +61,16 @@ const Map = () => { // 2. data가 OpenLayers Feature 인스턴스인지 확인 let foundFeature: any = null; + console.log(data) + //console.log(data.getId()) let featureId = data.fid; const layerName = data.layerNm; - if (layerName === "tb_wr_bdst_ruse_fclt") { + + if (layerName === "재이용시설") { // 재이용시설 featureId = `${layerName}.${data.searchPk}`; } else if ( //빗물이용시설, 중수도시설 - layerName === "tb_wr_rnwtr_utztn_fclt" || + layerName === "빗물이용시설" || layerName == "tb_wr_rswtr_fclt" ) { featureId = `${layerName}.${data.bdstInfoSn}`; @@ -136,16 +139,6 @@ const Map = () => { gisMaps={gisMaps} isMiniMap={false} searchView={undefined} - // searchView={(props: any) => ( - // - // ) - // } detailView={(props: any) => ( = ({ const [mngList, setMngList] = useState(coSttnRes || []); ///////////////////////////////////////////// 피쳐데이터 선택 시 각 시설별 데이터 처리 /////////////////////////////////////////////// const getSelectedLayers = () => { + console.log(1) let result = null; const layers = gisMap ? gisMap.getLayers().getArray().filter((l: any) => l.getVisible()) : []; // gisMap이 null인지 확인 후 레이어 가져오기 let featureLayer: { get: (key: string) => any } = { get: () => null }; @@ -127,6 +128,7 @@ const NewWindowPopup: React.FC = ({ } }); result = featureLayer.get('lyrNm'); + console.log(result) return result; }; @@ -156,15 +158,15 @@ const NewWindowPopup: React.FC = ({ } }; const detainSttn = async (featureCd: string, layerNm: string) => { - if (layerNm == 'tb_wr_rnwtr_utztn_fclt') { //빗물이용시설 + if (layerNm == '빗물이용시설') { //빗물이용시설 const res = await getFetch(fetchType.WR, `/reuseFc/rainyInfoList/1/20/0/${featureCd}`) setRainList(res) } - else if (layerNm == 'tb_wr_rswtr_fclt') { //중수도 시설 + else if (layerNm == '중수도시설') { //중수도 시설 const res = await getFetch(fetchType.WR, `/reuseFc/waterreuseFc/1/20/0/${featureCd}`) setRswtrList(res) } - else if(layerNm =='tb_wr_ruse_fclt_dmd_co'){ //수요처 + else if(layerNm =='수요처'){ //수요처 const res = await getFetch(fetchType.WR, `/reuseFc/request/1/20/0/${featureCd}`) setMngList(res) } @@ -192,6 +194,7 @@ const NewWindowPopup: React.FC = ({ },[mngList]) const layerId = getSelectedLayers(); + console.log(layerId) if (featureData && typeof featureData.getProperties === "function") { const selectedVal = featureData.getProperties(); let featureCd = layerId == '하수재이용시설' ? selectedVal?.swtrmt_fclt_cd : layerId == '빗물이용시설' || layerId == '중수도시설' || layerId == '온배수시설' || layerId == '수요처' ? selectedVal?.bdst_nm : layerId == '하수처리시설' ? selectedVal?.swtrmt_fclt_nm : null; @@ -505,17 +508,17 @@ const NewWindowPopup: React.FC = ({ layerId = seletectedLayerNm || ''; } //하수처리시설 - const isPrcsFclt = layerId == 'tb_il_swage_prcs_fclt' + const isPrcsFclt = layerId == '하수처리시설' // 재이용시설 - const isPbnst = layerId == 'tb_wr_bdst_ruse_fclt'; + const isPbnst = layerId == '재이용시설'; // 빗물이용시설 - const isRain = layerId == 'tb_wr_rnwtr_utztn_fclt'; + const isRain = layerId == '빗물이용시설'; // 중수도시설 - const isRswt = layerId == 'tb_wr_rswtr_fclt'; + const isRswt = layerId == '중수도시설'; // 온배수시설 - const isHtdfl = layerId == 'tb_wr_htdfl_fclt'; + const isHtdfl = layerId == '온배수시설'; // 수요처관리 - const isReuseMng = layerId == 'tb_wr_ruse_fclt_dmd_co'; + const isReuseMng = layerId == '수요처관리'; if (isPrcsFclt) { if (viewMode == 'list') { return ( diff --git a/apps/wr/app/store/matDmd/coSttn/index.tsx b/apps/wr/app/store/matDmd/coSttn/index.tsx index cc1db4566..1e20e8a76 100644 --- a/apps/wr/app/store/matDmd/coSttn/index.tsx +++ b/apps/wr/app/store/matDmd/coSttn/index.tsx @@ -52,8 +52,6 @@ export const coSttnActionsExport: (set: any) => coSttnActions = ( `/reuseFc/request/${pageNo}/${pageCnt}/${con}` ); - console.log('coSttnRes ', coSttnRes) - set((state: coSttnState) => { return { ...state, diff --git a/apps/wr/src/entities/auth/api/login-service.ts b/apps/wr/src/entities/auth/api/login-service.ts index 1808f7de8..77d114004 100644 --- a/apps/wr/src/entities/auth/api/login-service.ts +++ b/apps/wr/src/entities/auth/api/login-service.ts @@ -17,7 +17,6 @@ export class LoginApiService implements LoginService { public async login(payload: ILogin): Promise { try { - console.log(' ENDPOINT.USER_SERVICE.LOGIN ', ENDPOINT.USER_SERVICE.LOGIN) const response = await fetch( PROXY_HOST+ ENDPOINT.USER_SERVICE.LOGIN, { method: "POST", body: JSON.stringify({ diff --git a/packages/common/business_components/src/ui/map/Gis.js b/packages/common/business_components/src/ui/map/Gis.js index 6898e37ee..117601cc3 100644 --- a/packages/common/business_components/src/ui/map/Gis.js +++ b/packages/common/business_components/src/ui/map/Gis.js @@ -128,101 +128,7 @@ function Gis({ // Feature Click Event const handleFeatureSelect = useCallback((data) => { console.log(data); - // gisMap = mapInstanceRef.current; - // gisMap = mapInstanceRef.current; - - // if (!gisMap) { - // console.warn('지도가 초기화되지 않았습니다.'); - // return; - // } - // if (!gisMap) { - // console.warn('지도가 초기화되지 않았습니다.'); - // return; - // } - - // // 항상 같은 select 객체 사용 - // const select = GisApp.Module.select; - // if (!select) return; - // // 항상 같은 select 객체 사용 - // const select = GisApp.Module.select; - // if (!select) return; - - // // 1. 기존 선택 초기화 - // select.resetSelectedFeature(); - - // // 2. data가 OpenLayers Feature 인스턴스인지 확인 - // let foundFeature = null; - // if (data && typeof data.getGeometry === 'function' && typeof data.setStyle === 'function') { - // // 이미 Feature 인스턴스라면 그대로 사용 - // foundFeature = data; - // } else { - // // 아니면 featureId로 맵에서 Feature 인스턴스를 찾아서 사용 - // let featureId = data.fid; - // const layerName = layerNmRef.current - // if (layerName === '하수재이용시설') { - // featureId = data.searchPk; - // } else if (layerName === '빗물이용시설' || layerName == '중수도시설') { - // featureId = data.bdstInfoSn; - // } else if (layerName === '하수처리시설') { - // featureId = data.bscFctCd; - // } else if (layerName === '온배수시설') { - // featureId = data.bdstRuseFcltSn; - // } else if(layerName == '수요처'){ - // featureId = data.dmdInfoId.replaceAll('-','') - // } - // else { - // console.warn('해당 레이어에 대한 featureId 매핑 없음', layerNm); - // featureId = data.fid || data.id || data.ftrIdn; - // } - // // gisMap.getLayers().getArray().forEach(layer => { - // // const source = layer.getSource?.(); - // // if (source?.getFeatureById) { - // // const feature = source.getFeatureById(String(featureId).trim()); - // // if (feature) foundFeature = feature; - // // } - // // }); - // // const [layerType, id] = String(featureId).split('.'); - // gisMap.getLayers().getArray().forEach(layer => { - // const source = layer.getSource?.(); - // if (source?.getFeatures) { - // const allFeatures = source.getFeatures(); - // for (const f of allFeatures) { - // const id = String(f.getId()); - // // console.log('id', id, featureId) - // if (id && id.split('.')[1] === String(featureId)) { - // foundFeature = f; - // break; - // } - // } - // } - // }); - // } - - // // 3. 피처 선택 - // if (foundFeature) { - // let geometry = foundFeature.getGeometry(); - // if (geometry) { - // let extent = geometry.getExtent(); - - // gisMap.getView().fit(extent, { - // duration: 300, - // padding: [50, 50, 50, 50], - // maxZoom: 16, - // constrainResolution: true, - // nearest: true, - // }); - // } - // select.selectFeature(foundFeature, true); - // } else { - // console.warn('OpenLayers Feature를 찾을 수 없습니다:', data); - // } - - // setFeatureData(data); - // setIsOpen(true); - // setIsSearchModalOpen(false); - onFeatureSelect?.(data); // 선택된 피쳐 데이터 콜백 호출 - console.log(data) }, [mapInstanceRef]); // 지도 생성 및 초기화 @@ -467,6 +373,7 @@ function Gis({ setVisible={setTabVisible} onCheckedChange={handleCheckedLayersChange} onLayerIconClick={(layerNm) => { + console.log(layerNm) layerNmRef.current = layerNm setLayerNm(layerNm); setIsOpen(true); const dummyFeature = { getProperties: () => ({}), // 최소 구조 diff --git a/packages/common/business_components/src/ui/map/GisTree.js b/packages/common/business_components/src/ui/map/GisTree.js index ccaa3c186..335b1b119 100644 --- a/packages/common/business_components/src/ui/map/GisTree.js +++ b/packages/common/business_components/src/ui/map/GisTree.js @@ -189,7 +189,7 @@ export default React.memo(function GisTree({ checkedNodes = [], setCheckedNodes }; const handleLayerImgClick = (nodeNm, nodeId, layerNm) => { if(!checked.includes(nodeId)) alert('시설을 선택해주세요') - else onLayerIconClick(layerNm) + else onLayerIconClick(nodeNm) } if (!treeData || treeData.length === 0) return null; 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 fee3f247b..d8474ce0a 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 @@ -130,8 +130,6 @@ GisOlLayer.prototype = { strategy: all, }); return source; - - return source; }, /** * [사용]WFS 레이어 생성