import React from 'react'; import { YearRangeSelectBox } from '@/components/ui/YearRangeSelectBox'; import { SelectBox } from '@common/business_components/ui'; import { Button, Input, Label } from '@common/components'; import useStore from '../../../store/useStore'; // 운영정보 '구분' 선택 목록 export const WORK_TYPES = [ { val: "['200', '201', '204']", text: "보수 및 갱신" }, { val: "['100']", text: "점검 및 진단" }, { val: "['203']", text: "청소 및 준설" }, ]; // 운영정보 - 사업 현황 export const operationTableHeadlist = [ { id: 'rowNumber', title: '일련번호' }, { id: "bizInfoNm", title: "사업명" }, { id: "flfmtBgngYmd", title: "수행시작일자" }, { id: "flfmtEndYmd", title: "수행종료일자" }, { id: "flfmtYr", title: "수행년도" }, { id: "bizTypeCd", title: "사업유형" }, { id: "bizAmt", title: "사업금액" }, ]; // 운영정보 - 보수 및 갱신 결과표 export const operationMaintenanceTableHeadlist = [ { id: 'rowNumber', title: '일련번호' }, { id: "fcltMngNo", title: "관리번호" }, { id: "usgCd", title: "용도" }, { id: "mqltCd", title: "재질" }, { id: "pdmtVl", title: "관경(mm)" }, { id: "prlgVl", title: "연장(m)" }, { id: "instlYmd", title: "설치일자" }, // { id: "instlYmd", title: "사업구분" }, ]; // 운영정보 - 청소 및 준설 결과표 export const operationCleaningTableHeadlist = [ { id: 'rowNumber', title: '일련번호' }, { id: "fcltMngNo", title: "관리번호" }, { id: "usgCd", title: "용도" }, { id: "mqltCd", title: "재질" }, { id: "pdmtVl", title: "관경(mm)" }, { id: "prlgVl", title: "연장(m)" }, { id: "instlYmd", title: "설치일자" }, ]; // 운영정보 - 점검 및 진단 결과표 export const operationInspectionTableHeadlist = [ { id: 'rowNumber', title: '일련번호' }, { id: "fcltMngNo", title: "관리번호" }, { id: "usgCd", title: "용도" }, { id: "mqltCd", title: "재질" }, { id: "pdmtVl", title: "관경(mm)" }, { id: "prlgVl", title: "연장(m)" }, { id: "instlYmd", title: "설치일자" }, { id: "strct_stat_grd", title: "구조적 상태등급" }, { id: "oper_stat_grd", title: "운영적 상태등급" }, ]; interface OperationTabProps { workType: string; var1: string; var2: string; yearFilter: { start: string; end: string; }; handleSearch: () => void; setWorkType: (type: string) => void; setYearFilter: (filter: { start: string; end: string }) => void; setVar1: (value: string) => void; setVar2: (value: string) => void; } const OperationTab: React.FC = ({ workType, var1, var2, yearFilter, handleSearch, setWorkType, setVar1, setVar2, setYearFilter, }) => { const { BIZ_TY_CD } = useStore(); const BIZ_TY_CD_SELECT_ARRAY = BIZ_TY_CD.map(item => ({ val: item.lwpoCd, text: item.lwpoCdNm, })); return (
({ val: w.val, text: w.text, }))} onSelectValue={(val) => setWorkType(String(val))} value={workType} selectContentClass="z-[101]" />
{ setVar1(e.target.value); }} onKeyDown={(e) => { if (e.key === 'Enter') { e.preventDefault(); // Enter 키 기본 동작 방지 handleSearch(); } }} /> setYearFilter({ ...yearFilter, start: range.start, end: range.end })} startLabel="수행기간" endLabel="" /> { setVar2(String(val)); }} selectContentClass="z-[101]" /> {/* 조회 버튼 */}
) }; export default React.memo(OperationTab);