From 590adb5b4ebc18d42153b9a7f19500ed4d797673 Mon Sep 17 00:00:00 2001 From: swcho Date: Fri, 25 Jul 2025 11:42:51 +0900 Subject: [PATCH 1/8] =?UTF-8?q?fix:=20=EC=98=A4=EC=88=98=ED=8E=8C=ED=94=84?= =?UTF-8?q?=EC=9E=A5,=20=EC=9A=B0=EC=88=98=ED=8E=8C=ED=94=84=EC=9E=A5=20?= =?UTF-8?q?=EB=AA=85=EC=B9=AD=20=EB=B0=94=EB=80=90=20=EA=B2=83=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map/components/popupComponent/sewagePump.tsx | 8 ++++---- apps/sn/app/(map-layout)/map/featureClickEventPopup.tsx | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/sn/app/(map-layout)/map/components/popupComponent/sewagePump.tsx b/apps/sn/app/(map-layout)/map/components/popupComponent/sewagePump.tsx index 18cac4c00..2a945edbc 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/sewagePump.tsx +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/sewagePump.tsx @@ -2,14 +2,14 @@ import { VerticalTable } from '@/components/ui/verticalTable'; import React, { useState, useEffect } from 'react' // 빗물펌프 자체 입력 정보 const exclnInputColumn = [ - { id: "swtrmtZoneCd", title: "배수구역", type: "input" }, - { id: "mltvDtdvNm", title: "배수분구", type: "input" }, + { id: "swtrmtZoneCd", title: "처리구역", type: "input" }, + { id: "mltvDtdvNm", title: "처리분구", type: "input" }, { id: "dsgnFrqnc", title: "설계빈도(년)", type: "input" }, ] // 오수펌프 자체 입력 정보 const drtwInputColumn = [ - { id: "swtrmt_zone_cd", title: "배수구역", type: "input" }, - { id: "mltv_dtdv_nm", title: "배수분구", type: "input" }, + { id: "swtrmt_zone_cd", title: "처리구역", type: "input" }, + { id: "mltv_dtdv_nm", title: "처리분구", type: "input" }, ] // 하수펌프장 diff --git a/apps/sn/app/(map-layout)/map/featureClickEventPopup.tsx b/apps/sn/app/(map-layout)/map/featureClickEventPopup.tsx index 198194918..5c1ebc797 100644 --- a/apps/sn/app/(map-layout)/map/featureClickEventPopup.tsx +++ b/apps/sn/app/(map-layout)/map/featureClickEventPopup.tsx @@ -95,13 +95,13 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void, else if (lyrTyNm === 'tb_ms_swage_pmstn') { // 하수펌프장 const drtwPumpCode = DRTW_SEWAGE_PUMP_USE_CODES.find(code => code.text === '오수펌프장'); if (drtwPumpCode && featureData.values_.usg_cd.trim() === drtwPumpCode.val) { - setIsDrtwSewagePump(false); - setHeadlist(ExclnSewagePumpCol); - } - else { setIsDrtwSewagePump(true); setHeadlist(DrtwSewagePumpCol); } + else { + setIsDrtwSewagePump(false); + setHeadlist(ExclnSewagePumpCol); + } setLayerSpecificNm(featureData.values_.fclt_mng_no); result = '하수펌프장'; } From b98032155715655915ad1a71122fa0d9f181fb1a Mon Sep 17 00:00:00 2001 From: swcho Date: Fri, 25 Jul 2025 14:24:24 +0900 Subject: [PATCH 2/8] =?UTF-8?q?fix:=20-=20=EC=9A=B4=EC=98=81=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=20=EA=B2=80=EC=83=89=20=ED=95=9C=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=EC=97=90=204=EA=B0=9C=EC=94=A9=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20(=ED=99=94=EB=A9=B4=20=EB=B9=84=EC=9C=A8?= =?UTF-8?q?=20=EA=B3=A0=EB=A0=A4)=20-=20=EC=83=81=EC=84=B8=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20X=20=EB=B2=84=ED=8A=BC=20=EC=9C=84?= =?UTF-8?q?=EC=B9=98=20=EA=B3=A0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map/featureClickEventPopup.tsx | 87 ++++++++++--------- .../map/searchModal/searchModal.tsx | 12 +-- 2 files changed, 51 insertions(+), 48 deletions(-) diff --git a/apps/sn/app/(map-layout)/map/featureClickEventPopup.tsx b/apps/sn/app/(map-layout)/map/featureClickEventPopup.tsx index 5c1ebc797..5259fdab6 100644 --- a/apps/sn/app/(map-layout)/map/featureClickEventPopup.tsx +++ b/apps/sn/app/(map-layout)/map/featureClickEventPopup.tsx @@ -473,55 +473,58 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void, return ( 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 d6084e95e..ad21e9cca 100644 --- a/apps/sn/app/(with-base-layout)/ii/result/page.tsx +++ b/apps/sn/app/(with-base-layout)/ii/result/page.tsx @@ -81,6 +81,7 @@ const Result = () => { const [isLoadingResult, setIsLoadingResult] = useState(false); // 로딩 상태 const [selectedRowData, setSelectedRowData] = useState(null); const [resetSelection, setResetSelection] = useState(false); + const [isResetPage, setIsResetPage] = useState(false); const [curPage, setCurPage] = useState(1); // 현재 페이지 useEffect(() => { @@ -90,9 +91,17 @@ const Result = () => { // 페이지 변경 시마다 데이터 fetch useEffect(() => { + setIsResetPage(false); handleSearchButtonClick(); }, [curPage]); + // 조회 버튼 클릭 시 1페이지로 이동 및 데이터 초기화 + const handleSearch: () => Promise = async () => { + setCurPage(1); // 페이지를 1로 초기화 + setIsResetPage(true); // 페이지를 초기화 + await handleSearchButtonClick(); + }; + const handleSearchButtonClick = async () => { setIsLoadingResult(true); setResetSelection(true); @@ -253,7 +262,7 @@ const Result = () => { // 테이블 선택 상태 초기화 트리거 setResetSelection(true); - + // 검색 버튼 클릭 이벤트 트리거 await handleSearchButtonClick(); @@ -270,10 +279,9 @@ const Result = () => { }; - return ( { }} // BaseLayout의 form 태그에 연결될 onSubmit @@ -311,6 +319,7 @@ const Result = () => { cellClick={handleCellClick} onPageChange={setCurPage} resetSelection={resetSelection} + resetPageNo={isResetPage} /> diff --git a/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx b/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx index 432a9de5a..4d1c0fbe8 100644 --- a/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx +++ b/apps/sn/app/(with-base-layout)/oper/floodPre/page.tsx @@ -27,6 +27,25 @@ const Page = () => { const [isLoading, setIsLoading] = useState(true) //로딩 상태 const [isModalOpen, setIsModalOpen] = useState(false) // 모달 상태 const [resetSelection, setResetSelection] = useState(false); // 선택 초기화 상태 + const [isResetPage, setIsResetPage] = useState(false); + + useEffect(() => { + setCurPage(1) + fetchData() + }, []) + + // 페이지 변경 시마다 데이터 fetch + useEffect(() => { + setIsResetPage(false); + fetchData(); + }, [curPage]); + + // 조회 버튼 클릭 시 1페이지로 이동 및 데이터 초기화 + const handleSearch: () => Promise = async () => { + setCurPage(1); // 페이지를 1로 초기화 + setIsResetPage(true); // 페이지를 초기화 + await fetchData(); + }; // 조회 const fetchData = async () => { @@ -60,11 +79,6 @@ const Page = () => { } } - useEffect(() => { - setCurPage(1) - fetchData() - }, []) - // 파일 다운로드 const isChckFile = () => { if (fileNm === '' || fileNm === undefined) { @@ -106,7 +120,7 @@ const Page = () => { if (data) { alert('파일이 등록되었습니다.'); setIsModalOpen(false); - fetchData(); + handleSearch(); } } @@ -160,7 +174,7 @@ const Page = () => {
- +
@@ -188,8 +202,9 @@ const Page = () => { setSbmrgPrevntBizSn(tableData[index]?.sbmrgPrevntBizSn); } }} - onPageChange={async (page: number) => { setCurPage(page); await fetchData() }} + onPageChange={setCurPage} resetSelection={resetSelection} + resetPageNo={isResetPage} /> {/* 파일 업로드 모달 */} diff --git a/apps/sn/app/(with-base-layout)/oper/oldPp/page.tsx b/apps/sn/app/(with-base-layout)/oper/oldPp/page.tsx index af2e584f4..4f46aee91 100644 --- a/apps/sn/app/(with-base-layout)/oper/oldPp/page.tsx +++ b/apps/sn/app/(with-base-layout)/oper/oldPp/page.tsx @@ -25,6 +25,25 @@ const Page = () => { const [isLoading, setIsLoading] = useState(true) //로딩 상태 const [isModalOpen, setIsModalOpen] = useState(false) // 모달 상태 const [resetSelection, setResetSelection] = useState(false); // 선택 초기화 상태 + const [isResetPage, setIsResetPage] = useState(false); + + useEffect(() => { + setCurPage(1) + fetchData() + }, []) + + // 페이지 변경 시마다 데이터 fetch + useEffect(() => { + setIsResetPage(false); + fetchData(); + }, [curPage]); + + // 조회 버튼 클릭 시 1페이지로 이동 및 데이터 초기화 + const handleSearch: () => Promise = async () => { + setCurPage(1); // 페이지를 1로 초기화 + setIsResetPage(true); // 페이지를 초기화 + await fetchData(); + }; // 데이터 조회 const fetchData = async () => { @@ -57,11 +76,6 @@ const Page = () => { } } - useEffect(() => { - setCurPage(1) - fetchData() - }, []) - // 파일 다운로드 const isChckFile = () => { if (fileNm === '' || fileNm === undefined) { @@ -103,7 +117,7 @@ const Page = () => { if (data) { alert('파일이 등록되었습니다.'); setIsModalOpen(false); - fetchData(); + handleSearch(); } } @@ -155,7 +169,7 @@ const Page = () => {
- +
@@ -184,7 +198,7 @@ const Page = () => { setDcrpPplMtncBizSn(tableData[index]?.dcrpPplMtncBizSn); } }} - onPageChange={async (page: number) => { setCurPage(page); await fetchData() }} + onPageChange={setCurPage} resetSelection={resetSelection} /> From 1ca2900a63882bff09b4ca8b77c05b9949da9125 Mon Sep 17 00:00:00 2001 From: ljpark Date: Fri, 25 Jul 2025 20:41:38 +0900 Subject: [PATCH 8/8] =?UTF-8?q?=EC=A1=B0=ED=9A=8Cclick=EC=8B=9C=20paging?= =?UTF-8?q?=EC=B4=88=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx b/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx index 749edfb38..825bcda87 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx @@ -487,15 +487,15 @@ const SearchModal: React.FC = ({ // 조회 버튼 클릭 시 1페이지로 이동 및 데이터 초기화 const handleSearch = () => { - // setCurPage(1); // 페이지를 1로 초기화 + setCurPage(1); // 페이지를 1로 초기화 // setDetailCurPage(1); // 페이지를 1로 초기화 // setIsResetPage(false); // 페이지를 초기화 // setIsResetDetailPage(true); // 디테일 페이지를 초기화 // setIsResetSelection(true); // 선택 초기화 // setIsResetDetailSelection(true); // 선택 초기화 fetchFilteredData(); - setIsResetPage(false); // 페이지를 초기화 - setIsResetDetailPage(false); // 디테일 페이지를 초기화 + setIsResetPage(true); // 페이지를 초기화 + setIsResetDetailPage(true); // 디테일 페이지를 초기화 setIsResetSelection(false); // 선택 초기화 setIsResetDetailSelection(false); // 선택 초기화 setShowTable(true);