diff --git a/apps/sn/app/(map-layout)/map/components/common/table.ts b/apps/sn/app/(map-layout)/map/components/common/table.ts index 3148b7ea2..84de2b4ab 100644 --- a/apps/sn/app/(map-layout)/map/components/common/table.ts +++ b/apps/sn/app/(map-layout)/map/components/common/table.ts @@ -287,12 +287,12 @@ export const SwtrmtFcltCol = [ { id: 'ycrd', title: 'Y좌표' }, // { id: 'oprtngSttsCd', title: '가동상태코드' }, { id: 'rprs_msrc_cn', title: '대표공법내용' }, - { id: 'stty_crtr_bod', title: '법정기준생물화학적산소요구량(mg/L)' }, - { id: 'stty_crtr_toc', title: '법정기준TOC((mg/L))' }, - { id: 'stty_crtr_ss', title: '법정기준SS(mg/L)' }, - { id: 'stty_crtr_tn', title: '법정기준총질소(mg/L)' }, - { id: 'stty_crtr_tph', title: '법정기준총인(mg/L)' }, - { id: 'stty_crtr_clbcl_cnt', title: '법정기준대장균수(군수/100mL)' }, + // { id: 'stty_crtr_bod', title: '법정기준생물화학적산소요구량(mg/L)' }, + // { id: 'stty_crtr_toc', title: '법정기준TOC((mg/L))' }, + // { id: 'stty_crtr_ss', title: '법정기준SS(mg/L)' }, + // { id: 'stty_crtr_tn', title: '법정기준총질소(mg/L)' }, + // { id: 'stty_crtr_tph', title: '법정기준총인(mg/L)' }, + // { id: 'stty_crtr_clbcl_cnt', title: '법정기준대장균수(군수/100mL)' }, { id: 'bsn_nm', title: '유역명' }, // { id: 'obsrvnSptCd', title: '관측지점코드' }, ]; diff --git a/apps/sn/app/(map-layout)/map/searchModal/operationTab.tsx b/apps/sn/app/(map-layout)/map/searchModal/operationTab.tsx index c880ed1a4..97c0b4c4c 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/operationTab.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/operationTab.tsx @@ -12,11 +12,9 @@ import React from 'react'; // { val: "inspection", text: "점검 및 진단" }, // ]; export const WORK_TYPES = [ - { val: "200", text: "보수 및 갱신(개대체)" }, - { val: "201", text: "보수 및 갱신(유지보수)" }, - { val: "204", text: "보수 및 갱신(단순보수)" }, - { val: "100", text: "점검 및 진단" }, - { val: "203", text: "청소 및 준설" }, + { val: "['200', '201', '204']", text: "보수 및 갱신" }, + { val: "['100']", text: "점검 및 진단" }, + { val: "['203']", text: "청소 및 준설" }, ]; // const BIZ_SE_CD = useBizByFcltStore(state => state.BIZ_SE_CD); export const BIZ_SE_CD = [ diff --git a/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx b/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx index 622fbd63f..ed6cdd608 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx @@ -81,7 +81,7 @@ const SearchModal: React.FC = ({ const [yearFilter, setYearFilter] = useState({ start: "", end: "" }); const [filteredSiguns, setFilteredSiguns] = useState([{ val: '0', text: '전체', sido: '0' }]); - + // 오늘 날짜 구하기 const today = new Date(); const todayYear = today.getFullYear().toString(); @@ -106,11 +106,9 @@ const SearchModal: React.FC = ({ const dynamicHeadlist2: { id: string, title: string }[] = useMemo(() => { if (activeTab === 'operation') { - if (workType === '200') return operationMaintenanceTableHeadlist; - if (workType === '201') return operationMaintenanceTableHeadlist; - if (workType === '204') return operationMaintenanceTableHeadlist; - if (workType === '100') return operationCleaningTableHeadlist; - if (workType === '203') return operationInspectionTableHeadlist; + if (workType === WORK_TYPES[0]?.val) return operationMaintenanceTableHeadlist; + if (workType === WORK_TYPES[1]?.val) return operationCleaningTableHeadlist; + if (workType === WORK_TYPES[2]?.val) return operationInspectionTableHeadlist; } return []; @@ -179,7 +177,7 @@ const SearchModal: React.FC = ({ setIsLoading(true); // 로딩 시작 setIsResetSelection(true); // 선택 초기화 setIsResetDetailSelection(true); // 선택 초기화 - + try { let cqlFilters: string[] = []; if (activeTab === 'basic') { @@ -227,7 +225,7 @@ const SearchModal: React.FC = ({ } else if (activeTab === 'operation') { const RequestDTO: Record = { page: `${curPage - 1}`, - size: '5', + size: '4', }; if (var1) RequestDTO.bizNm = var1; if (var2 != '0' && var2) RequestDTO.bizTyCd = var2; @@ -247,8 +245,8 @@ const SearchModal: React.FC = ({ RequestDTO.fromflfmtEndYmd = startDate; RequestDTO.toflfmtEndYmd = endDate; - - RequestDTO.bizSeCd = workType; + // JSON.parse 사용으로 문자열 -> 배열 변환 + RequestDTO.workTypes = JSON.parse(workType.replace(/'/g, '"')); const params = new URLSearchParams(RequestDTO).toString(); @@ -272,8 +270,7 @@ const SearchModal: React.FC = ({ setTableCount(res.totalElements || 0); setDetailTableData([]); setDetailTableCount(0); - - } + } setShowTable(true); } catch (err) { @@ -446,12 +443,7 @@ const SearchModal: React.FC = ({ // 조회 버튼 클릭 시 1페이지로 이동 및 데이터 초기화 const handleSearch = () => { - setCurPage(1); // 페이지를 1로 초기화 - // setDetailCurPage(1); // 페이지를 1로 초기화 - // setIsResetPage(false); // 페이지를 초기화 - // setIsResetDetailPage(true); // 디테일 페이지를 초기화 - // setIsResetSelection(true); // 선택 초기화 - // setIsResetDetailSelection(true); // 선택 초기화 + setCurPage(1); // 페이지를 1로 초기화 fetchFilteredData(); setIsResetPage(true); // 페이지를 초기화 setIsResetDetailPage(true); // 디테일 페이지를 초기화 @@ -480,12 +472,15 @@ const SearchModal: React.FC = ({ try { const RequestDTO: Record = { page: `${detailCurPage - 1}`, - size: '5', - bizId: tableData[index % 5].bizId, + size: '4', + bizId: tableData[index % 4].bizId, }; + RequestDTO.workTypes = JSON.parse(workType.replace(/'/g, '"')); + const res = await getData(`v1/bizInfo/fclts?${new URLSearchParams(RequestDTO).toString()}`); console.log('운영정보 cellClick 데이터:', res); + console.log('운영정보 cellClick.data:', res.data); console.log('운영정보 length:', res.data.length); const mappedData = (res.data || []).map((item: any, detailIndex: number) => { @@ -501,6 +496,8 @@ const SearchModal: React.FC = ({ }; }); + console.log('운영정보 cellClick mappedData:', mappedData); + setDetailTableData(mappedData); setDetailTableCount(res.count || 0); } catch (error) { @@ -519,7 +516,7 @@ const SearchModal: React.FC = ({ try { const RequestDTO: Record = { page: `${detailCurPage - 1}`, - size: '5', + size: '4', bizId: String(detailBizId), }; const res = await getData(`v1/bizInfo/fclts?${new URLSearchParams(RequestDTO).toString()}`); @@ -546,7 +543,7 @@ const SearchModal: React.FC = ({ } } }; - + const renderBody = () => ( <> @@ -560,63 +557,62 @@ const SearchModal: React.FC = ({ onValueChange={(value: string) => setActiveTab(value)} > - {/* 각각의 탭 영역 */} - {/* 기본정보 탭 */} - {activeTab === 'basic' && ( - - )} - {/* 운영정보 탭 */} - {activeTab === 'operation' && ( - - )} - {/* 하수도정비기본계획보고서 탭 */} - {activeTab === 'report' && ( - - )} - {/* */} - + {/* 각각의 탭 영역 */} + {/* 기본정보 탭 */} + {activeTab === 'basic' && ( + + )} + {/* 운영정보 탭 */} + {activeTab === 'operation' && ( + + )} + {/* 하수도정비기본계획보고서 탭 */} + {activeTab === 'report' && ( + + )} + {/* */} + {/* 📋 결과 리스트 */} - {/* 기본정보 탭, 하수도정비기본계획보고서 탭 */} - {(activeTab === 'basic' ) && ( + {/* 하수도정비기본계획보고서 탭 */} + {activeTab === 'basic' && (
- {/* 테이블2 영역 (가로/세로 스크롤 가능) */}
= ({ } tableData={tableData} headlist={dynamicHeadlist} - pageSize={5} + pageSize={4} total={tableCount} cellClick={handleOperationCellClick} onPageChange={setCurPage} @@ -663,6 +659,7 @@ const SearchModal: React.FC = ({
+ {/* 테이블2 영역 */}
= ({ } tableData={detailTableData} headlist={dynamicHeadlist2} - pageSize={5} + pageSize={4} total={detailTableCount} cellClick={undefined} onPageChange={setDetailCurPage} diff --git a/apps/sn/app/(with-base-layout)/ii/BaseLayout.tsx b/apps/sn/app/(with-base-layout)/ii/BaseLayout.tsx index 51ac4d291..f0a649ad4 100644 --- a/apps/sn/app/(with-base-layout)/ii/BaseLayout.tsx +++ b/apps/sn/app/(with-base-layout)/ii/BaseLayout.tsx @@ -224,8 +224,9 @@ const BaseLayout = ({ value: aplcnYmFrom || (() => { // aplcnYm이 없으면 현재 연월을 기본값으로 설정 const now = new Date(); const year = now.getFullYear(); - const month = String(now.getMonth() + 1).padStart(2, '0'); - return `${year}${month}`; + // const month = String(now.getMonth() + 1).padStart(2, '0'); + // return `${year}${month}`; + return `${year}01`; })(), // yyyyMM 형식 onChange: (value: string) => { setAplcnYmFrom?.(value); // string 값을 직접 전달 diff --git a/apps/sn/app/(with-base-layout)/ii/rdiiResult/page.tsx b/apps/sn/app/(with-base-layout)/ii/rdiiResult/page.tsx index a5ab55407..08c7a8146 100644 --- a/apps/sn/app/(with-base-layout)/ii/rdiiResult/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/rdiiResult/page.tsx @@ -22,8 +22,9 @@ const formSchema = z.object({ aplcnYmFrom: z.string().default(() => { // Date에서 string(yyyyMM 형식)으로 변경 const now = new Date(); const year = now.getFullYear(); - const month = String(now.getMonth() + 1).padStart(2, '0'); - return `${year}${month}`; + // const month = String(now.getMonth() + 1).padStart(2, '0'); + // return `${year}${month}`; + return `${year}01`; // 기본값을 1월로 설정 }), // 분석기간 시작연월 aplcnYmTo: z.string().default(() => { // Date에서 string(yyyyMM 형식)으로 변경 const now = new Date(); @@ -66,8 +67,9 @@ const Result = () => { aplcnYmFrom: (() => { // 현재 연월을 yyyyMM 형식으로 설정 const now = new Date(); const year = now.getFullYear(); - const month = String(now.getMonth() + 1).padStart(2, '0'); - return `${year}${month}`; + // const month = String(now.getMonth() + 1).padStart(2, '0'); + // return `${year}${month}`; + return `${year}01`; })(), aplcnYmTo: (() => { // 현재 연월을 yyyyMM 형식으로 설정 const now = new Date(); diff --git a/apps/sn/app/(with-base-layout)/ii/result/page.tsx b/apps/sn/app/(with-base-layout)/ii/result/page.tsx index 30d0ef07c..974f6fa5f 100644 --- a/apps/sn/app/(with-base-layout)/ii/result/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/result/page.tsx @@ -22,8 +22,9 @@ const formSchema = z.object({ aplcnYmFrom: z.string().default(() => { // Date에서 string(yyyyMM 형식)으로 변경 const now = new Date(); const year = now.getFullYear(); - const month = String(now.getMonth() + 1).padStart(2, '0'); - return `${year}${month}`; + // const month = String(now.getMonth() + 1).padStart(2, '0'); + // return `${year}${month}`; + return `${year}01`; }), // 분석기간 시작연월 aplcnYmTo: z.string().default(() => { // Date에서 string(yyyyMM 형식)으로 변경 const now = new Date(); @@ -62,8 +63,9 @@ const Result = () => { aplcnYmFrom: (() => { // 현재 연월을 yyyyMM 형식으로 설정 const now = new Date(); const year = now.getFullYear(); - const month = String(now.getMonth() + 1).padStart(2, '0'); - return `${year}${month}`; + // const month = String(now.getMonth() + 1).padStart(2, '0'); + // return `${year}${month}`; + return `${year}01`; })(), aplcnYmTo: (() => { // 현재 연월을 yyyyMM 형식으로 설정 const now = new Date(); diff --git a/apps/sn/app/components/ui/verticalTable.tsx b/apps/sn/app/components/ui/verticalTable.tsx index abdad03bb..ee13405fb 100644 --- a/apps/sn/app/components/ui/verticalTable.tsx +++ b/apps/sn/app/components/ui/verticalTable.tsx @@ -121,7 +121,7 @@ export function VerticalTable({ {headlist?.map((head) => ( {/* 컬럼 제목 */} - + {head.title} {/* 데이터 값 또는 입력 필드 */} @@ -168,7 +168,7 @@ export function VerticalTable({ {headlist2?.map((head) => ( {/* 컬럼 제목 */} - + {head.title} {/* 데이터 값 또는 입력 필드 */} diff --git a/packages/common/business_components/src/ui/date_month_picker/mothPicker.tsx b/packages/common/business_components/src/ui/date_month_picker/mothPicker.tsx index b5bc10ba5..78c9cb90b 100644 --- a/packages/common/business_components/src/ui/date_month_picker/mothPicker.tsx +++ b/packages/common/business_components/src/ui/date_month_picker/mothPicker.tsx @@ -61,9 +61,9 @@ const selectedYear = parseInt(yearFromProp); "inline-flex h-9 w-16 items-center justify-center rounded-md p-0 text-sm font-normal ring-offset-white transition-colors hover:bg-slate-100 hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 aria-selected:opacity-100 dark:ring-offset-slate-950 dark:hover:bg-slate-800 dark:hover:text-slate-50 dark:focus-visible:ring-slate-800", isEqual(month, currentMonth) && "bg-slate-900 text-slate-50 hover:bg-slate-900 hover:text-slate-50 focus:bg-slate-900 focus:text-slate-50 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50 dark:hover:text-slate-900 dark:focus:bg-slate-50 dark:focus:text-slate-900", - !isEqual(month, currentMonth) && - isEqual(month, getStartOfCurrentMonth()) && - "bg-slate-100 text-slate-900 dark:bg-slate-800 dark:text-slate-50" + // !isEqual(month, currentMonth) && + // isEqual(month, getStartOfCurrentMonth()) && + // "bg-slate-100 text-slate-900 dark:bg-slate-800 dark:text-slate-50" ); return ( 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..b997a7a0a 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 @@ -149,6 +149,7 @@ GisOlLayer.prototype = { || lyrTyNm == 'tb_ms_sbmrg_dngr_map' || lyrTyNm == 'tb_ms_swage_mhl' || lyrTyNm == 'tb_ms_swage_ppl' + || lyrTyNm == 'tb_ms_swage_pmstn' ) { source = this.getVectorSourceBbox(option); }else {