wr: 하수재이용시설 현황 pageSize설정
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
"use client";
|
||||
import { useWrStore } from "@/app/store";
|
||||
import { btnClass } from "@/app/store/common/code";
|
||||
import { prfRegPageSize } from "@/app/store/prfmncReg/pbnstPrfmncReg";
|
||||
import { DEFAULT_LIST_SIZE } from "@/src/shared/config";
|
||||
import type { customPbnst } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type";
|
||||
import type { WaterReuseFacility } from "@/app/store/ruseFcltMng/fcltSttn/pbnstSttn/type";
|
||||
import { excelDownloadNumStyle, yearOptions } from "@/components/lib/func/common";
|
||||
@@ -48,7 +48,7 @@ export default function PbnstSttn() {
|
||||
} = useWrStore((state) => state);
|
||||
|
||||
const { pbnstSttnRes, fclts, pbnstSttnResCount } = pbnstSttn;
|
||||
const { laeSeCd } = auth;
|
||||
const { laeSeCd } = auth; // 지자체구분코드
|
||||
|
||||
const [isReset, setIsReset] = useState(false);
|
||||
const ref = useRef<ReturnType>({} as ReturnType);
|
||||
@@ -66,7 +66,7 @@ export default function PbnstSttn() {
|
||||
const [pbnRuseNm, setPbnRuseNm] = useState<string>("");
|
||||
const { t } = useTranslation("base");
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const isAllAreaUser = laeSeCd === "0";
|
||||
const isAllAreaUser = laeSeCd === "0"; // 모든 지자체 권한이 있는 경우
|
||||
const fixedSidoValue =
|
||||
!isAllAreaUser && laeSeCd?.length ? laeSeCd.slice(0, 2) : "";
|
||||
const fixedSigunValue =
|
||||
@@ -143,7 +143,7 @@ export default function PbnstSttn() {
|
||||
|
||||
useEffect(() => {
|
||||
if (useInitRef.current === true && laeSeCd !== undefined && fclts.length > 0) {
|
||||
pbnSttnInit("1", "15", getFixedSearchValue(ref.current), searchYear, fclts);
|
||||
pbnSttnInit("1", String(DEFAULT_LIST_SIZE), getFixedSearchValue(ref.current), searchYear, fclts);
|
||||
}
|
||||
}, [fclts, laeSeCd, searchYear, pbnSttnInit, getFixedSearchValue]);
|
||||
|
||||
@@ -253,7 +253,7 @@ export default function PbnstSttn() {
|
||||
pbnstSttnSearch(
|
||||
false,
|
||||
"1",
|
||||
String(prfRegPageSize),
|
||||
String(DEFAULT_LIST_SIZE),
|
||||
fixedSearchValue,
|
||||
pbnRuseNm,
|
||||
searchYear,
|
||||
@@ -276,33 +276,33 @@ export default function PbnstSttn() {
|
||||
<div className="grid grid-cols-6 gap-4 ">
|
||||
<div className="col-span-6">
|
||||
<ListDiv>
|
||||
<div className="h-full w-full overflow-x-scroll min-[1900px]:overflow-x-hidden">
|
||||
<div className="w-[160%] min-[1900px]:w-[100%]">
|
||||
<UiTable
|
||||
headName={undefined}
|
||||
tableData={bdstTable || []}
|
||||
headlist={pbnstSttn.pbnstSttHeadList}
|
||||
pageSize={15}
|
||||
total={pbnstSttnResCount}
|
||||
cellClick={(index: number | undefined) => {
|
||||
cellCLick(index);
|
||||
}}
|
||||
onPageChange={(page: number) => {
|
||||
const fixedSearchValue = getFixedSearchValue(ref.current);
|
||||
pbnstSttnSearch(
|
||||
false,
|
||||
String(page),
|
||||
String(prfRegPageSize),
|
||||
fixedSearchValue,
|
||||
pbnRuseNm,
|
||||
searchYear,
|
||||
fclts
|
||||
);
|
||||
setIsReset(false);
|
||||
}}
|
||||
resetPageNo={isReset}
|
||||
widthFixed={true}
|
||||
>
|
||||
<div className="h-full w-full overflow-x-scroll min-[2100px]:overflow-x-hidden">
|
||||
<div className="w-[160%] min-[2100px]:w-[100%]">
|
||||
<UiTable
|
||||
headName={undefined}
|
||||
tableData={bdstTable || []}
|
||||
headlist={pbnstSttn.pbnstSttHeadList}
|
||||
pageSize={DEFAULT_LIST_SIZE}
|
||||
total={pbnstSttnResCount}
|
||||
cellClick={(index: number | undefined) => {
|
||||
cellCLick(index);
|
||||
}}
|
||||
onPageChange={(page: number) => {
|
||||
const fixedSearchValue = getFixedSearchValue(ref.current);
|
||||
pbnstSttnSearch(
|
||||
false,
|
||||
String(page),
|
||||
String(DEFAULT_LIST_SIZE),
|
||||
fixedSearchValue,
|
||||
pbnRuseNm,
|
||||
searchYear,
|
||||
fclts
|
||||
);
|
||||
setIsReset(false);
|
||||
}}
|
||||
resetPageNo={isReset}
|
||||
widthFixed={true}
|
||||
>
|
||||
<HeadMakeColSpan upHeadList={pbnstSttn.pbnstSttNodeList} />
|
||||
</UiTable>
|
||||
</div>
|
||||
|
||||
@@ -292,7 +292,7 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = (
|
||||
isExcel: boolean,
|
||||
page: string,
|
||||
total: string,
|
||||
reurnValue: ReturnType,
|
||||
reurnValue: ReturnType, // 검색조건
|
||||
searchNm: string | undefined,
|
||||
year: string,
|
||||
fclts: string[]
|
||||
|
||||
@@ -30,15 +30,15 @@ type SearchBaseType = {
|
||||
excelDisabled?: boolean;
|
||||
}
|
||||
export type ReturnType = {
|
||||
partValue: string;
|
||||
sidoValue: string;
|
||||
sigunValue: string;
|
||||
regionValue: string;
|
||||
unitWaterShedValue: string;
|
||||
middleRegionValue: string;
|
||||
envPartValue: string;
|
||||
sidoText: string;
|
||||
sigunText: string;
|
||||
partValue: string; // 조회 구분값(A: 행정, R: 유역, G: 환경청)
|
||||
sidoValue: string; // 선택된 시도 코드
|
||||
sigunValue: string; // 선택된 시군구 코드
|
||||
regionValue: string; // 선택된 권역 코드
|
||||
unitWaterShedValue: string; // 선택된 단위유역 코드
|
||||
middleRegionValue: string; // 선택된 중권역 코드
|
||||
envPartValue: string; // 선택된 환경청 코드
|
||||
sidoText: string; // 선택된 시도명
|
||||
sigunText: string; // 선택된 시군구명
|
||||
}
|
||||
|
||||
function SearchBaseForm ({
|
||||
|
||||
Reference in New Issue
Block a user