fix : 테두리 곡률 높임, BASIC_TYPES key -> val, label -> text로 수정

This commit is contained in:
swcho
2025-05-14 13:18:04 +09:00
parent a8c3e49226
commit 037a04f1c9
+22 -31
View File
@@ -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<SearchModalProps> = ({ 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<SearchModalProps> = ({ 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<SearchModalProps> = ({ open, onOpenChange, onFeature
{/* 각각의 탭 영역 */}
{/* 기본정보 탭 */}
{activeTab === 'basic' && (
<div className="border rounded p-6 mb-4 w-full h-[22vh] overflow-y-auto">
<div className="border rounded-lg p-6 mb-4 w-full h-[22vh]">
{/* 구분 */}
<div className="flex justify-between items-center mb-3 gap-4">
<div className="flex items-center">
@@ -580,6 +570,7 @@ const SearchModal: React.FC<SearchModalProps> = ({ open, onOpenChange, onFeature
label="구분"
selectArray={BASIC_TYPES}
onSelectValue={(value: string | number) => setBasicType(String(value))}
value={basicType}
/> */}
<select
className="border rounded text-xl px-2 py-1"
@@ -587,7 +578,7 @@ const SearchModal: React.FC<SearchModalProps> = ({ open, onOpenChange, onFeature
onChange={e => setBasicType(e.target.value)}
>
{BASIC_TYPES.map(opt => (
<option key={opt.key} value={opt.key}>{opt.label}</option>
<option key={opt.text} value={opt.val}>{opt.text}</option>
))}
</select>
</div>
@@ -1110,7 +1101,7 @@ const SearchModal: React.FC<SearchModalProps> = ({ open, onOpenChange, onFeature
)}
{/* 운영정보 탭 */}
{activeTab === 'operation' && (
<div className="border rounded p-6 mb-4 w-full h-[22vh] overflow-y-auto">
<div className="border rounded-lg p-6 mb-4 w-full h-[22vh]">
<div className="flex items-center mb-6">
<label className="w-24 font-semibold text-xl">업무구분</label>
<select
@@ -1178,7 +1169,7 @@ const SearchModal: React.FC<SearchModalProps> = ({ open, onOpenChange, onFeature
)}
{/* 하수도정비기본계획보고서 탭 */}
{activeTab === 'report' && (
<div className="border rounded p-6 mb-4 w-full h-[22vh] overflow-y-auto">
<div className="border rounded-lg p-6 mb-4 w-full h-[22vh]">
{/* 시도, 시군구, 하수처리구역 한 줄 */}
<div className="flex items-center mb-6">
<label className="font-semibold text-xl mr-2">시도</label>
@@ -1242,7 +1233,7 @@ const SearchModal: React.FC<SearchModalProps> = ({ open, onOpenChange, onFeature
{/* 📋 결과 리스트 */}
< div
className="border rounded space-y-2 w-full h-[60vh] overflow-auto"
className="border rounded-lg space-y-2 w-full h-[60vh] overflow-auto"
onWheel={e => {
// 세로 스크롤이 최상단/최하단에 도달했을 때 가로 스크롤이 막히는 현상을 해결
const container = e.currentTarget;
@@ -1271,7 +1262,7 @@ const SearchModal: React.FC<SearchModalProps> = ({ open, onOpenChange, onFeature
// 탭별 라벨
const label =
activeTab === 'basic'
? BASIC_TYPES.find(type => type.key === basicType)?.label
? BASIC_TYPES.find(type => type.val === basicType)?.val
: activeTab === 'operation'
? WORK_TYPES.find(type => type.key === workType)?.label
: activeTab === 'report'
@@ -1321,7 +1312,7 @@ const SearchModal: React.FC<SearchModalProps> = ({ open, onOpenChange, onFeature
max-w-none
max-h-none
overflow-hidden
z-[200]
z-[101]
`}
body={renderBody()}
headerTitle="검색"