fo: undefined 수정
This commit is contained in:
@@ -1495,9 +1495,10 @@ export const dashBoardReducer: (set: (fn: (state: DashBoardType) => DashBoardTyp
|
||||
const bscFctCd = fcltyCd;
|
||||
const res2 = await fetchFlowRateModalList(bscFctCd, searchYear); // /fclt/flow/
|
||||
|
||||
const calData = CalcRainEffect(clone(res2.data), 'SUNNY');
|
||||
const calRainData = CalcRainEffect(clone(res2.data), 'RAIN');
|
||||
//const calData = CalcRainEffect(clone(res2.data), 'SUNNY');
|
||||
//const calRainData = CalcRainEffect(clone(res2.data), 'RAIN');
|
||||
|
||||
let cntSunnyDay = 0; // 청천일 수
|
||||
// 지하수유입량 - 청천시 기준
|
||||
let chungcunSumFlow = 0;
|
||||
let sumSummerChungcunFlow = 0;
|
||||
@@ -1540,6 +1541,7 @@ export const dashBoardReducer: (set: (fn: (state: DashBoardType) => DashBoardTyp
|
||||
summerRainDayEfflFlow += efflAmnt;
|
||||
}
|
||||
} else if (rainEffectDay < 0) {
|
||||
cntSunnyDay += 1; // 청천일수
|
||||
// 청천시
|
||||
chungcunSumFlow += inflAmnt;
|
||||
|
||||
@@ -1651,7 +1653,7 @@ export const dashBoardReducer: (set: (fn: (state: DashBoardType) => DashBoardTyp
|
||||
operationalStatusList[0].winterSunnyAvg = roundUp(Number(operationalStatusList[0].winterSunnyAvg), 0) + roundUp(winterSunnyAvg, 0);
|
||||
|
||||
// 지하수유입량
|
||||
const usage = chungcunSumFlow / calData.length;
|
||||
const usage = chungcunSumFlow / cntSunnyDay; //calData.length;
|
||||
const summerUsage = sumSummerChungcunFlow / summerChungchunDay;
|
||||
const winterUsage = sumWinterChungcunFlow / winterChungchuDay;
|
||||
|
||||
@@ -1664,10 +1666,6 @@ export const dashBoardReducer: (set: (fn: (state: DashBoardType) => DashBoardTyp
|
||||
operationalStatusList[0].groundWaterSummer = Math.round((summerUsage - (summerUsage * 0.65 * OSU_PERCENT)) * 100) / 100;
|
||||
operationalStatusList[0].groundWaterWinter = Math.round((winterUsage - (winterUsage * 0.65 * OSU_PERCENT)) * 100) / 100;
|
||||
|
||||
//operationalStatusList[0].groundWaterAvg = calData.length === 0 ? '' : Number(calData[0].inflAmnt) - (Number(calData[0].inflAmnt)*0.65*0.8);
|
||||
//operationalStatusList[0].groundWaterSummer = calData.length === 0 ? '' : Number(calData[0].inflAmnt) - (Number(calData[0].inflAmnt)*0.65*0.8);
|
||||
//operationalStatusList[0].groundWaterWinter = calData.length === 0 ? '' : Number(calData[0].inflAmnt) - (Number(calData[0].inflAmnt)*0.65*0.8);
|
||||
|
||||
// 오염물질
|
||||
// RDII 추정 = 하절기(6~8월) 중 최저 유입 BOD일때 유입유량 x ((동절기 청천시 유입BOD - 하절기(6~8월) 중 최저 유입BOD) / (동절기 청천시 유입BOD))
|
||||
const resp = await fetchMainGraph(searchYear, fcltyCd);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
import { useRouter} from "next/navigation";
|
||||
import { useRouter, usePathname } from "next/navigation";
|
||||
import { client } from "@/src/shared/api";
|
||||
import type { IUserInfo } from "@/src/shared/store";
|
||||
import { useUserStore, getCookie } from "@/src/shared/lib";
|
||||
@@ -12,7 +12,7 @@ const LOGIN_PAGE_URL = process.env.NEXT_PUBLIC_CM_LOGIN_PAGE_URL || "http://loca
|
||||
|
||||
const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
||||
const router = useRouter();
|
||||
// const pathname = usePathname();
|
||||
const pathname = usePathname();
|
||||
const { userInfo, setUserInfo } = useUserStore((state) => state);
|
||||
|
||||
async function authCheck() {
|
||||
@@ -53,7 +53,7 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
||||
}
|
||||
}
|
||||
})();
|
||||
}, []);
|
||||
}, [pathname]);
|
||||
|
||||
return <>{children}</>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user