From 037a04f1c92e785ad399061f17d7d379ab63f7ad Mon Sep 17 00:00:00 2001 From: swcho Date: Wed, 14 May 2025 13:18:04 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=ED=85=8C=EB=91=90=EB=A6=AC=20?= =?UTF-8?q?=EA=B3=A1=EB=A5=A0=20=EB=86=92=EC=9E=84,=20BASIC=5FTYPES=20key?= =?UTF-8?q?=20->=20val,=20label=20->=20text=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/sn/app/map/SearchModal.tsx | 53 ++++++++++++++------------------- 1 file changed, 22 insertions(+), 31 deletions(-) diff --git a/apps/sn/app/map/SearchModal.tsx b/apps/sn/app/map/SearchModal.tsx index 0368f84ac..b770b9dc2 100644 --- a/apps/sn/app/map/SearchModal.tsx +++ b/apps/sn/app/map/SearchModal.tsx @@ -1,11 +1,11 @@ import FeatureClickEventPopup from './featureClickEventPopup'; import React, { useState } from 'react'; import axios from 'axios'; -import { UiModal } from '@common/business_components/ui/dialog_ui'; -import { Button } from '@common/components'; +import { SelectBox, UiModal, UiTable } from '@common/business_components/ui'; +import { Button, Input } from '@common/components'; import { UiTable2 } from '@common/business_components/ui/table/index-2'; import { UITab2 } from '@common/business_components/ui/tab/index-2'; -import { SelectBox } from '@common/business_components/ui'; + @@ -19,26 +19,14 @@ const TABS = [ ]; // 기본정보 '구분' 선택 목록 const BASIC_TYPES = [ - { key: 'tb_ms_swage_ppl', label: '하수관로' }, - { key: 'tb_il_swage_prcs_fclt', label: '하수처리시설' }, - { key: 'tb_ms_swage_prcs_zone', label: '하수처리구역' }, - { key: 'tb_ms_swage_mh', label: '하수맨홀' }, - { key: 'tb_ms_swage_psmtn_1', label: '오수펌프' }, - { key: 'tb_ms_swage_psmtn_2', label: '빗물펌프' }, - { key: 'tb_ms_otfl', label: '우수토실' }, + { val: 'tb_ms_swage_ppl', text: '하수관로' }, + { val: 'tb_il_swage_prcs_fclt', text: '하수처리시설' }, + { val: 'tb_ms_swage_prcs_zone', text: '하수처리구역' }, + { val: 'tb_ms_swage_mh', text: '하수맨홀' }, + { val: 'tb_ms_swage_psmtn_1', text: '오수펌프' }, + { val: 'tb_ms_swage_psmtn_2', text: '빗물펌프' }, + { val: 'tb_ms_otfl', text: '우수토실' }, ]; -// const BASIC_TYPES = Array.from( -// [ -// { key: 'tb_ms_swage_ppl', label: '하수관로' }, -// { key: 'tb_il_swage_prcs_fclt', label: '하수처리시설' }, -// { key: 'tb_ms_swage_prcs_zone', label: '하수처리구역' }, -// { key: 'tb_ms_swage_mh', label: '하수맨홀' }, -// { key: 'tb_ms_swage_psmtn_1', label: '오수펌프' }, -// { key: 'tb_ms_swage_psmtn_2', label: '빗물펌프' }, -// { key: 'tb_ms_otfl', label: '우수토실' }, -// ], -// (item) => ({ text: item.label, val: item.key }) -// ); // 운영정보 '구분' 선택 목록 const WORK_TYPES = [ { key: 'maintenance', label: '보수 및 갱신' }, @@ -280,8 +268,8 @@ const SearchModal: React.FC = ({ open, onOpenChange, onFeature const [activeTab, setActiveTab] = useState(TABS[0]?.key ?? 'basic'); const [workType, setWorkType] = useState(WORK_TYPES[0]?.key ?? ''); const [showTable, setShowTable] = useState(false); - const [curPage, setCurPage] = useState(1); - const [basicType, setBasicType] = useState(BASIC_TYPES[0]?.key ?? ''); + const [curPage, setCurPage] = useState(0); + const [basicType, setBasicType] = useState(BASIC_TYPES[0]?.val ?? ''); const [하수처리구역명, set하수처리구역명] = useState(''); const [하수처리시설명, set하수처리시설명] = useState(''); const [시도, set시도] = useState(0); @@ -529,6 +517,8 @@ const SearchModal: React.FC = ({ open, onOpenChange, onFeature const queryParams = new URLSearchParams({ lyrTypeNm: basicType }); + // page와 size 사용해서 api 호출하는 걸로 바꾸기 + const size = 10; let cqlFilters: string[] = []; if (activeTab === 'basic') { @@ -569,7 +559,7 @@ const SearchModal: React.FC = ({ open, onOpenChange, onFeature {/* 각각의 탭 영역 */} {/* 기본정보 탭 */} {activeTab === 'basic' && ( -
+
{/* 구분 */}
@@ -580,6 +570,7 @@ const SearchModal: React.FC = ({ open, onOpenChange, onFeature label="구분" selectArray={BASIC_TYPES} onSelectValue={(value: string | number) => setBasicType(String(value))} + value={basicType} /> */}
@@ -1110,7 +1101,7 @@ const SearchModal: React.FC = ({ open, onOpenChange, onFeature )} {/* 운영정보 탭 */} {activeTab === 'operation' && ( -
+