테이블 헤드 기호 추가 및 버튼 위치 수정

This commit is contained in:
leedj312
2025-09-16 10:13:35 +09:00
parent 682cc1297c
commit 5588eddbc5
4 changed files with 71 additions and 53 deletions
@@ -227,9 +227,9 @@ export default function CoMatRvw() {
</div>
</div>
</SearchFormLeft>
<SearchFormRight className="w-2/12 mx-5 flex flex-col items-center justify-center space-x-2 ">
<SearchFormRight className="w-2/12 mx-5 flex flex-col space-x-2 ">
<div className="space-y">
<div className="flex flex-row space-x-2">
<div className="flex flex-row w-full justify-end space-x-2 mt-6">
<Button
size={"sm"}
onClick={() => {
@@ -313,7 +313,7 @@ export const ruseCaseHeadListExport: TableUpperProps[] = [
},
{
id: "prcmPlanEcqrRt",
title: "국고비율",
title: "국고비율(%)",
visible: true,
row: 1,
},
@@ -350,7 +350,7 @@ export const ruseCaseHeadListExport: TableUpperProps[] = [
},
{
id: "clclnEcqrRt",
title: "국고비율",
title: "국고비율(%)",
visible: true,
row: 1,
},
@@ -885,7 +885,7 @@ export default function HtdflRegForm({
</div>
<div className="grid grid-cols-12 gap-4">
<div className="col-span-6">
<Label className="text-xl">수소이온농도(ph)</Label>
<Label className="text-xl">수소이온농도(pH)</Label>
<div className="flex flex-row items-center gap-2">
<Input
className="!text-xl w-1/2"
@@ -18,16 +18,17 @@ import toast from "react-hot-toast";
import { useTranslation } from "react-i18next";
export function RuseFacility({
rtnFeature,
}: {
rtnFeature: (feature: any) => void;
}) {
const { code, ruseMap, ruseMapInit, getMapFlcts,ruseMapSearch } = useWrStore(
rtnFeature,
}: {
rtnFeature: (feature: any) => void;
}) {
const { code, ruseMap, ruseMapInit, getMapFlcts, ruseMapSearch } = useWrStore(
(state) => state
);
const { t } = useTranslation("base");
const { ruseMapCount, ruseExcelList,fclts, ruseMapRes,ruseMapHeadList } = ruseMap;
const { ruseMapCount, ruseExcelList, fclts, ruseMapRes, ruseMapHeadList } =
ruseMap;
const [ruseTable, setRuseTable] = useState<WaterReuseFacility[]>();
const [isReset, setIsReset] = useState(false);
@@ -38,10 +39,7 @@ export function RuseFacility({
const [pbnRuseNm, setPbnRuseNm] = useState<string>("");
const ruseCellClick = (index: number | undefined) => {
if (
index !== undefined &&
ruseTable !== undefined
) {
if (index !== undefined && ruseTable !== undefined) {
rtnFeature(ruseTable[index]);
}
};
@@ -51,12 +49,11 @@ export function RuseFacility({
}
}, [ruseMap.isInit]);
useEffect(() => {
ruseMapInit(1,ruseMapSize, ref.current, searchYear, fclts);
ruseMapInit(1, ruseMapSize, ref.current, searchYear, fclts);
}, [fclts]);
useEffect(()=>{
if(ruseExcelList&&ruseExcelList.length>0){
useEffect(() => {
if (ruseExcelList && ruseExcelList.length > 0) {
if (ruseExcelList.length > 0) {
excelDownload(
ruseExcelList,
@@ -66,20 +63,18 @@ export function RuseFacility({
3
);
} else {
toast.error(t('excelDownErrMsg'));
toast.error(t("excelDownErrMsg"));
}
}
},[ruseExcelList])
}, [ruseExcelList]);
useEffect(() => {
if (ruseMapRes && ruseMapRes.length > 0) {
setRuseTable(ruseMapRes);
setRuseTable(ruseMapRes);
} else {
setRuseTable([]);
setRuseTable([]);
}
}, [ruseMapRes]);
return (
<>
<ContentsDiv>
@@ -94,34 +89,35 @@ export function RuseFacility({
selectMiddleRegionData={code.mdmbsnCd}
selectEnvPartData={code.lclgvrnmntCd}
buttonOrder={["query", "init", "excel"]}
rightClassName="ml-auto mr-6 flex items-center space-x-1"
rightClassName="ml-auto mr-6 flex items-center space-x-1 "
leftClassName="flex gap-5 w-9/12 m-4"
leftSelectClassName="w-1/4"
rightChildren={<></>}
leftChildren={
<div className="col-span-3 flex items-center">
<SelectBox
className="w-48 h-full text-2xl"
label="연도"
selectClass={"w-full "}
selectArray={yearOptions}
value={searchYear}
onSelectValue={(val: string | number) =>
setSearchYear(String(val))
}
/>
<Label className="w-full mt-2 ml-4 text-xl text-gray-600">
{"하수처리시설명"}
</Label>
<SearchInput
className={"text-2xl w-full"}
label=""
textValue={pbnRuseNm || ""}
setText={(e) => {
setPbnRuseNm(e || "");
}}
/>
</div>
<SelectBox
label="연도"
selectClass={"w-full w-48 h-full text-2xl rounded-none"}
selectArray={yearOptions}
value={searchYear}
onSelectValue={(val: string | number) =>
setSearchYear(String(val))
}
className={""}
selectContentClass={''}
/>
<Label className="w-full mt-2 ml-4 text-xl text-gray-600">
{"하수처리시설명"}
</Label>
<SearchInput
className={"text-2xl w-full"}
label=""
textValue={pbnRuseNm || ""}
setText={(e) => {
setPbnRuseNm(e || "");
}}
/>
</div>
}
queryClick={() => {
setIsReset(true);
@@ -133,7 +129,15 @@ export function RuseFacility({
ref={ref}
isAdmin={false}
excelClick={function (returnType: ReturnType): void {
ruseMapSearch(true,1,1000000 , returnType, searchYear, fclts,pbnRuseNm??'')
ruseMapSearch(
true,
1,
1000000,
returnType,
searchYear,
fclts,
pbnRuseNm ?? ""
);
}}
/>
</div>
@@ -147,10 +151,24 @@ export function RuseFacility({
headName={""}
cellClick={ruseCellClick}
onPageChange={(page) => {
if(pbnRuseNm&&pbnRuseNm.length>0){
ruseMapSearch(false,page,ruseMapSize , ref.current, searchYear, fclts,pbnRuseNm)
}else{
ruseMapInit(page,ruseMapSize , ref.current, searchYear, fclts);
if (pbnRuseNm && pbnRuseNm.length > 0) {
ruseMapSearch(
false,
page,
ruseMapSize,
ref.current,
searchYear,
fclts,
pbnRuseNm
);
} else {
ruseMapInit(
page,
ruseMapSize,
ref.current,
searchYear,
fclts
);
}
setIsReset(false);