diff --git a/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx b/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx index 7c4762a3c..2fb4e7cae 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx @@ -479,14 +479,16 @@ const SearchModal: React.FC = ({ }; // 기본정보 테이블 cellClick 핸들러 - const handleBasicCellClick = (index?: number | undefined, headId?: String) => { + const handleBasicCellClick = async (index?: number | undefined, headId?: String) => { if (typeof index === "number") { + setIsLoading(true); const row = tableData[index]; const layerNm = row.lyrTypeNm; const fid = row.fid; const core = GisApp.Module.layer as any; - core.showSearchResultsFromGeoJSON(layerNm, fid); + await core.showSearchResultsFromGeoJSON(layerNm, fid); + setIsLoading(false); onOpenChange(false); // SearchModal 닫기 } }; @@ -577,18 +579,20 @@ const SearchModal: React.FC = ({ const handleOperationResultCellClick = async (index?: number | undefined, headId?: String) => { if (typeof index === "number") { + setIsLoading(true); const row = detailTableData[index]; const layerNm = row.lyrTypeNm; const fid = row.fid; const core = GisApp.Module.layer as any; - core.showSearchResultsFromGeoJSON(layerNm, fid); + await core.showSearchResultsFromGeoJSON(layerNm, fid); + setIsLoading(false); onOpenChange(false); // SearchModal 닫기 } }; // 기본정보 Excel 다운로드 핸들러 - const BasicExcelDownload = async () => { + const basicExcelDownload = async () => { if (tableData.length === 0) { alert("다운로드 할 Excel 파일이 없습니다.\n조회 후 다시 시도해주세요."); return; @@ -804,7 +808,7 @@ const SearchModal: React.FC = ({ }; // 운영정보 Excel 다운로드 핸들러 추가 - const OperationExcelDownload = async () => { + const operationExcelDownload = async () => { if (tableData.length === 0) { alert("다운로드 할 Excel 파일이 없습니다.\n조회 후 다시 시도해주세요."); return; @@ -898,7 +902,7 @@ const SearchModal: React.FC = ({ }; // 운영정보 Excel 다운로드 핸들러 추가 - const OperationResultExcelDownload = async () => { + const operationResultExcelDownload = async () => { if (detailTableData.length === 0) { alert("다운로드 할 Excel 파일이 없습니다.\n조회 후 다시 시도해주세요."); return; @@ -1001,6 +1005,20 @@ const SearchModal: React.FC = ({ } }; + const viewMultipleFeature = async () => { + if (!(tableData.length === 0)) { + setIsLoading(true); + + const row = tableData[0]; + const layerNm = row.lyrTypeNm; + const fids = tableData.map((item) => item.fid); + const core = GisApp.Module.layer as any; + await core.showMultipleSearchResultsFromGeoJSON(layerNm, fids); + setIsLoading(false); + onOpenChange(false); + } + } + const renderBody = () => ( <> @@ -1084,7 +1102,10 @@ const SearchModal: React.FC = ({ resetPageNo={isResetPage} resetSelection={isResetSelection} headButton={ - +
+ + +
} /> @@ -1112,7 +1133,7 @@ const SearchModal: React.FC = ({ resetPageNo={isResetPage} resetSelection={isResetSelection} headButton={ - + } /> @@ -1138,7 +1159,7 @@ const SearchModal: React.FC = ({ resetPageNo={isResetDetailPage} resetSelection={isResetDetailSelection} headButton={ - + } />