지도점검결과 현황 검색조건 시설명 추가
This commit is contained in:
@@ -83,7 +83,7 @@ export default function Page() {
|
|||||||
String(new Date().getFullYear())
|
String(new Date().getFullYear())
|
||||||
);
|
);
|
||||||
const cellClick = () => {
|
const cellClick = () => {
|
||||||
if (searchYear)
|
if (searchYear) {
|
||||||
if (selFcltDiv === "RNB") {
|
if (selFcltDiv === "RNB") {
|
||||||
if (fcltNm) {
|
if (fcltNm) {
|
||||||
rainChkNmSearch(
|
rainChkNmSearch(
|
||||||
@@ -99,8 +99,8 @@ export default function Page() {
|
|||||||
} else {
|
} else {
|
||||||
if (fcltNm) {
|
if (fcltNm) {
|
||||||
rswtChkNmSearch(
|
rswtChkNmSearch(
|
||||||
rainPageNation,
|
rswtPageNation,
|
||||||
rainPageSize,
|
rswtPageSize,
|
||||||
searchYear,
|
searchYear,
|
||||||
commonCd,
|
commonCd,
|
||||||
fcltNm
|
fcltNm
|
||||||
@@ -109,6 +109,7 @@ export default function Page() {
|
|||||||
rswtChkgdnInit(rswtPageNation, rswtPageSize, searchYear, commonCd);
|
rswtChkgdnInit(rswtPageNation, rswtPageSize, searchYear, commonCd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const rainPageChange = (pageNo: number) => {
|
const rainPageChange = (pageNo: number) => {
|
||||||
if (pageNo > 0) {
|
if (pageNo > 0) {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import {
|
|||||||
SearchDiv,
|
SearchDiv,
|
||||||
SearchFormLeft,
|
SearchFormLeft,
|
||||||
SearchFormRight,
|
SearchFormRight,
|
||||||
|
SearchInput,
|
||||||
SelectBox,
|
SelectBox,
|
||||||
Title,
|
Title,
|
||||||
UiModal
|
UiModal
|
||||||
@@ -30,9 +31,9 @@ export default function Page() {
|
|||||||
rainChkSttn,
|
rainChkSttn,
|
||||||
rswtChkSttn,
|
rswtChkSttn,
|
||||||
rainChkSttnInit,
|
rainChkSttnInit,
|
||||||
rainChkSttnSearch,
|
rainChkSttnNmSearch,
|
||||||
rswtChkSttnSearch,
|
|
||||||
rswtChkSttnInit,
|
rswtChkSttnInit,
|
||||||
|
rswtChkNmSttnSearch,
|
||||||
isRainSttn,
|
isRainSttn,
|
||||||
isRswtSttn,
|
isRswtSttn,
|
||||||
rswtChkPolInit,
|
rswtChkPolInit,
|
||||||
@@ -43,6 +44,7 @@ export default function Page() {
|
|||||||
const [selFcltDiv, setSelFcltDiv] = useState("RNB");
|
const [selFcltDiv, setSelFcltDiv] = useState("RNB");
|
||||||
const [rainPageNation, setRainPageNation] = useState(1);
|
const [rainPageNation, setRainPageNation] = useState(1);
|
||||||
const [rswtPageNation, setRswtPageNation] = useState(1);
|
const [rswtPageNation, setRswtPageNation] = useState(1);
|
||||||
|
const [fcltNm, setFcltNm] = useState<string>("");
|
||||||
const [isModal, setIsModal] = useState({
|
const [isModal, setIsModal] = useState({
|
||||||
open: false,
|
open: false,
|
||||||
data: {},
|
data: {},
|
||||||
@@ -51,9 +53,29 @@ export default function Page() {
|
|||||||
const cellClick = () => {
|
const cellClick = () => {
|
||||||
if (searchYear) {
|
if (searchYear) {
|
||||||
if (selFcltDiv === "RNB") {
|
if (selFcltDiv === "RNB") {
|
||||||
rainChkSttnSearch(rainPageNation, rainPageSize, searchYear, commonCd);
|
if (fcltNm) {
|
||||||
|
rainChkSttnNmSearch(
|
||||||
|
rainPageNation,
|
||||||
|
rainPageSize,
|
||||||
|
searchYear,
|
||||||
|
commonCd,
|
||||||
|
fcltNm
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
rainChkSttnInit(rainPageNation, rainPageSize, searchYear, commonCd);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
rswtChkSttnSearch(rswtPageNation, rswtPageSize, searchYear, commonCd);
|
if (fcltNm) {
|
||||||
|
rswtChkNmSttnSearch(
|
||||||
|
rswtPageNation,
|
||||||
|
rswtPageSize,
|
||||||
|
searchYear,
|
||||||
|
commonCd,
|
||||||
|
fcltNm
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
rswtChkSttnInit(rswtPageNation, rswtPageSize, searchYear, commonCd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -151,6 +173,17 @@ export default function Page() {
|
|||||||
value={selFcltDiv ?? rainChkSttn.fcltDiv[0]?.val}
|
value={selFcltDiv ?? rainChkSttn.fcltDiv[0]?.val}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="col-span-2 flex flex-row space-x-2">
|
||||||
|
<Label className="w-28 mt-2 text-xl text-gray-600">
|
||||||
|
{"시설명"}
|
||||||
|
</Label>
|
||||||
|
<SearchInput
|
||||||
|
className={"w-full text-2xl"}
|
||||||
|
label={""}
|
||||||
|
textValue={fcltNm || ""}
|
||||||
|
setText={setFcltNm}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</SearchFormLeft>
|
</SearchFormLeft>
|
||||||
<SearchFormRight>
|
<SearchFormRight>
|
||||||
<div className="space-y">
|
<div className="space-y">
|
||||||
|
|||||||
@@ -217,12 +217,11 @@ export const rswtChkgdnActionsExport: (set: any) => rswtChkgdnActions = (
|
|||||||
"wr",
|
"wr",
|
||||||
`/reuseChk/reuseWater` +
|
`/reuseChk/reuseWater` +
|
||||||
(pageNo ? `/${pageNo}` : "/1") +
|
(pageNo ? `/${pageNo}` : "/1") +
|
||||||
(cnt ? `/${cnt}` : "/20") +
|
(cnt ? `/${cnt}` : "/5") +
|
||||||
(year ? `/${year}` : `/${currentYear}`) +
|
(year ? `/${year}` : `/${currentYear}`) +
|
||||||
(sggCd ? `/${sggCd}` : "/0") +
|
(sggCd ? `/${sggCd}` : "/0") +
|
||||||
(txt ? `/${txt}` : "")
|
(txt ? `/${txt}` : "")
|
||||||
);
|
);
|
||||||
|
|
||||||
return set((state: rswtChkgdnState) => ({
|
return set((state: rswtChkgdnState) => ({
|
||||||
...state,
|
...state,
|
||||||
rswtChkgdn: {
|
rswtChkgdn: {
|
||||||
|
|||||||
@@ -36,9 +36,9 @@ export type rainChkSttnState = {
|
|||||||
|
|
||||||
type rainChkSttnActions = {
|
type rainChkSttnActions = {
|
||||||
rainChkSttnInit: (pageNo: number, cnt: number, searchTxt: string, sggCd: string) => void;
|
rainChkSttnInit: (pageNo: number, cnt: number, searchTxt: string, sggCd: string) => void;
|
||||||
rainChkSttnSearch: (pageNo: number, cnt: number, searchTxt: string, sggCd: string) => void;
|
|
||||||
isRainSttn: (isSttn: boolean) => void;
|
isRainSttn: (isSttn: boolean) => void;
|
||||||
getRainSttnExcel: (excelList: rainChkZodType[]) => void;
|
getRainSttnExcel: (excelList: rainChkZodType[]) => void;
|
||||||
|
rainChkSttnNmSearch: (pageNo: number, cnt: number, year: string, sggCd: string, txt: string) => void
|
||||||
};
|
};
|
||||||
|
|
||||||
export type rainChkSttnType = rainChkSttnState & rainChkSttnActions;
|
export type rainChkSttnType = rainChkSttnState & rainChkSttnActions;
|
||||||
@@ -91,21 +91,37 @@ export const rainChkSttnActionsExport: (set: any) => rainChkSttnActions = (
|
|||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
rainChkSttnSearch: async (pageNo: number, cnt: number, searchTxt: string, sggCd: string) => {
|
rainChkSttnNmSearch: async (
|
||||||
|
pageNo: number,
|
||||||
|
cnt: number,
|
||||||
|
year: string,
|
||||||
|
sggCd: string,
|
||||||
|
txt: string
|
||||||
|
) => {
|
||||||
try {
|
try {
|
||||||
const rainChkRes = await initFetch(pageNo, cnt, searchTxt, sggCd);
|
const currentYear = new Date().getFullYear();
|
||||||
|
const rainChkRes = await getCountFetch(
|
||||||
|
"wr",
|
||||||
|
`/reuseChk/rainy` +
|
||||||
|
(pageNo ? `/${pageNo}` : "/1") +
|
||||||
|
(cnt ? `/${cnt}` : "/5") +
|
||||||
|
(year ? `/${year}` : `/${currentYear}`) +
|
||||||
|
(sggCd ? `/${sggCd}` : "/0") +
|
||||||
|
(txt ? `/${txt}` : "")
|
||||||
|
);
|
||||||
return set((state: rainChkSttnState) => ({
|
return set((state: rainChkSttnState) => ({
|
||||||
...state,
|
...state,
|
||||||
rainChkSttn: {
|
rainChkSttn: {
|
||||||
...state.rainChkSttn,
|
...state.rainChkSttn,
|
||||||
rainChkRes: rainChkRes
|
rainChkRes: rainChkRes.data,
|
||||||
|
rainChkCount: rainChkRes.count,
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
}, isRainSttn: (isSttn: boolean) => {
|
},
|
||||||
|
isRainSttn: (isSttn: boolean) => {
|
||||||
try {
|
try {
|
||||||
return set((state: rainChkSttnState) => ({
|
return set((state: rainChkSttnState) => ({
|
||||||
...state,
|
...state,
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ type rswtChkSttnActions = {
|
|||||||
rswtChkSttnInit: (pageNo: number, cnt: number, searchTxt: string, sggCd: string) => void;
|
rswtChkSttnInit: (pageNo: number, cnt: number, searchTxt: string, sggCd: string) => void;
|
||||||
isRswtSttn: (isSttn: boolean) => void;
|
isRswtSttn: (isSttn: boolean) => void;
|
||||||
getRswtSttnExcel: (excelList: rswtChkZodType[]) => void;
|
getRswtSttnExcel: (excelList: rswtChkZodType[]) => void;
|
||||||
rswtChkSttnSearch: (pageNo: number, cnt: number, searchTxt: string, sggCd: string) => void;
|
rswtChkNmSttnSearch: (pageNo: number, cnt: number, year: string, sggCd: string, txt: string) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type rswtChkSttnType = rswtChkSttnState & rswtChkSttnActions;
|
export type rswtChkSttnType = rswtChkSttnState & rswtChkSttnActions;
|
||||||
@@ -109,9 +109,24 @@ export const rswtChkSttnActionsExport: (set: any) => rswtChkSttnActions = (
|
|||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
rswtChkSttnSearch: async (pageNo: number, cnt: number, searchTxt: string, sggCd: string) => {
|
rswtChkNmSttnSearch: async (
|
||||||
|
pageNo: number,
|
||||||
|
cnt: number,
|
||||||
|
year: string,
|
||||||
|
sggCd: string,
|
||||||
|
txt: string
|
||||||
|
) => {
|
||||||
try {
|
try {
|
||||||
const rswtChkRes = await initFetch(pageNo, cnt, searchTxt, sggCd);
|
const currentYear = new Date().getFullYear().toString();
|
||||||
|
const rswtChkRes = await getCountFetch(
|
||||||
|
"wr",
|
||||||
|
`/reuseChk/reuseWater` +
|
||||||
|
(pageNo ? `/${pageNo}` : "/1") +
|
||||||
|
(cnt ? `/${cnt}` : "/20") +
|
||||||
|
(year ? `/${year}` : `/${currentYear}`) +
|
||||||
|
(sggCd ? `/${sggCd}` : "/0") +
|
||||||
|
(txt ? `/${txt}` : "")
|
||||||
|
);
|
||||||
|
|
||||||
return set((state: rswtChkSttnState) => ({
|
return set((state: rswtChkSttnState) => ({
|
||||||
...state,
|
...state,
|
||||||
@@ -119,6 +134,7 @@ export const rswtChkSttnActionsExport: (set: any) => rswtChkSttnActions = (
|
|||||||
...state.rswtChkSttn,
|
...state.rswtChkSttn,
|
||||||
rswtChkRes: rswtChkRes.data,
|
rswtChkRes: rswtChkRes.data,
|
||||||
rswtChkCount: rswtChkRes.count,
|
rswtChkCount: rswtChkRes.count,
|
||||||
|
isInit: false,
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user