[ST] - fix: 통계 집계표 조회 기본값 수정, 엑셀 다운로드 스타일 적용, 요약표 마우스 툴팁 추가 / 입력단 오류 수정 및 검토단 컬럼 설정 수정

This commit is contained in:
2026-08-18 17:44:22 +09:00
parent df24e7c2a8
commit 5b12f81b8f
70 changed files with 944 additions and 570 deletions
+25 -4
View File
@@ -73,6 +73,21 @@ function buildSearchFormValues(
};
}
if (props.defaultRegionAll) {
return {
sido: "ALL",
gugun: "ALL",
year: d?.year || defaultYear.toString(),
order: d?.order || "",
fctName: d?.fctName || "",
bsnmCd: "",
isDetail: false,
isSummary: d?.isSummary || "",
clsfCd: initialClsfCd,
capacityGbn: d?.capacityGbn || "ALL",
};
}
const first = sidoList?.data?.sidoList?.[0];
const useFirstSido = (props.sido ?? defaultSearchFormProps.sido) && first;
@@ -132,6 +147,7 @@ const SearchForm = (props: SearchFormProps = {}) => {
// 최초 진입만 시도 API가 늦게 오는 경우
useEffect(() => {
if (props.defaultRegionAll) return;
if (props.defaultValues?.sido) return;
const first = sidoList?.data?.sidoList?.[0];
if (!first || !mergedProps.sido) return;
@@ -145,7 +161,7 @@ const SearchForm = (props: SearchFormProps = {}) => {
bsnmCd: first.bsnmCd,
},
);
}, [sidoList, props.defaultValues?.sido, mergedProps.sido]);
}, [sidoList, props.defaultValues?.sido, props.defaultRegionAll, mergedProps.sido]);
const sggKey: [string, string, string, string] | null =
values.sido && values.sido !== "ALL"
@@ -177,6 +193,7 @@ const SearchForm = (props: SearchFormProps = {}) => {
// 시도 설정 후 시군구 목록이 오면 첫 번째 항목 자동 선택
useEffect(() => {
if (!mergedProps.gugun) return;
if (props.defaultRegionAll) return;
if (props.defaultValues?.gugun) return;
if (!values.sido || values.sido === "ALL") return;
@@ -196,6 +213,7 @@ const SearchForm = (props: SearchFormProps = {}) => {
values.sido,
mergedProps.gugun,
props.defaultValues?.gugun,
props.defaultRegionAll,
]);
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
@@ -210,11 +228,13 @@ const SearchForm = (props: SearchFormProps = {}) => {
const handleSidoChange = (value: string) => {
const selectedBsnm =
sidoList?.data?.sidoList?.find((v) => v.sido === value)?.bsnmCd || "";
value === "ALL"
? ""
: sidoList?.data?.sidoList?.find((v) => v.sido === value)?.bsnmCd || "";
setValues((prev) => ({
...prev,
sido: value,
gugun: "",
gugun: props.defaultRegionAll || value === "ALL" ? "ALL" : "",
bsnmCd: selectedBsnm,
}));
};
@@ -403,7 +423,8 @@ const SearchForm = (props: SearchFormProps = {}) => {
)}
{mergedProps.isSummary && (
<div className="flex items-center gap-2">
<Label className="text-label cursor-pointer">
<Label className="text-label cursor-pointer" title="시·군·구 및 읍·면·동 변경에 따라 인구 및 관로 등 공표된 통계수치와 일부 상이할 수 있으니 유의 바랍니다.">
<i className="diveicon di-exclamation-circle mr-1" />
요약표 포함
</Label>
<Select