fo: /sites/FO 여러번 호출 수정

This commit is contained in:
2026-05-28 15:31:03 +09:00
parent ac00f978be
commit c2fdc3aa71
3 changed files with 18 additions and 2 deletions
@@ -1,6 +1,7 @@
"use client"
import { BaseLayout } from "@common/components";
import { useQueryClient } from "@tanstack/react-query";
import type { MenuItem } from "@/app/store/common";
import { useFoStore } from "@/app/store";
import { usePathname, useRouter } from "next/navigation";
@@ -16,6 +17,7 @@ export default function RootLayout({
const setCurrentMenuInfo = useMenuStore((state) => state.setCurrentMenuInfo);
const pathname = usePathname();
const router = useRouter();
const queryClient = useQueryClient();
const handleClick = (id: MenuItem) => {
setCurrentMenuInfo(id);
@@ -25,6 +27,7 @@ export default function RootLayout({
return (
<BaseLayout
queryClient={queryClient}
currentPath={pathname ?? ""}
handleMenuClick={handleClick}
>
+12 -1
View File
@@ -459,7 +459,18 @@ const fetchFacilityList = async (pageNo: number, pageSize: number, partValue?: s
}
};
// 시설정보 리스트 데이터 호출 (대시보드용)
/**
* 시설정보 리스트 데이터 호출 (대시보드용)
* @param pageNo 페이지번호
* @param pageSize 페이지크기
* @param partValue 조회구분값(0 전체,A: 행정, R: 유역, G: 환경청)
* @param nameCd 조회구분에 따른 지역코드(0 전체)
* @param fcltCpct 시설용량 필터값(0 전체)
* @param oprtngSttsCd 운영상태 코드(0 전체,1: 가동중, 2:재가동, 3:가동중지, 4:시설폐쇄)
* @param facilityPartValue 시설구분 코드(0 전체,ET:기타기초시설,SW:공공하수처리시설,SS:오수처리장,NS:분뇨처리장)
* @param facilityName 시설명 검색어
* @returns 시설목록과 전체건수
*/
const fetchFacilityListSearching = async (pageNo: number, pageSize: number, partValue?: string, nameCd?: string
, fcltCpct?: string, oprtngSttsCd?: string, facilityPartValue?: string, facilityName?: string): Promise<{ data: facilityListProps[], count: number }> => {
try {
+3 -1
View File
@@ -19,6 +19,7 @@
"use client";
import { BaseLayout } from "@common/components/ui";
import { useQueryClient } from "@tanstack/react-query";
import { useWrStore } from "../store";
import { MainDiv } from "@common/business_components/ui";
import type { MenuItem } from "../store/common/type/menu";
@@ -35,6 +36,7 @@ export default function RootLayout({
const setCurrentMenuInfo = useMenuStore((state) => state.setCurrentMenuInfo);
const router = useRouter();
const pathname = usePathname();
const queryClient = useQueryClient();
const changeMenu = (path: MenuItem) => {
setCurrentMenuInfo(path);
@@ -46,7 +48,7 @@ export default function RootLayout({
}
};
return (
<BaseLayout currentPath={pathname ?? ""} handleMenuClick={changeMenu}>
<BaseLayout queryClient={queryClient} currentPath={pathname ?? ""} handleMenuClick={changeMenu}>
<PageLayout>
<MainDiv>{children}</MainDiv>
</PageLayout>