From ebe7d1a86c7a7c5a4380cf445701b1a41edc70cb Mon Sep 17 00:00:00 2001 From: jsyang Date: Fri, 29 Aug 2025 14:55:55 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A3=BC=EC=9A=94=EA=B7=B8=EB=9E=98=ED=94=84?= =?UTF-8?q?=20=EC=B4=9D=EC=9D=B8=EC=9C=A0=EC=9E=85tp=200=EC=9D=B4=EB=82=98?= =?UTF-8?q?=20null=EC=9D=B8=20=EA=B2=BD=EC=9A=B0=20=EC=95=88=EB=B3=B4?= =?UTF-8?q?=EC=97=AC=EC=A7=80=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95(0?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=95=88=EB=82=98=EC=98=A4=EB=8F=84?= =?UTF-8?q?=EB=A1=9D..)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/(with-layout)/dashboard/page.tsx | 19 ++++++++++--------- apps/fo/app/store/dashboard/index.tsx | 4 ++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/apps/fo/app/pages/(with-layout)/dashboard/page.tsx b/apps/fo/app/pages/(with-layout)/dashboard/page.tsx index 167df2a7b..df41340e4 100644 --- a/apps/fo/app/pages/(with-layout)/dashboard/page.tsx +++ b/apps/fo/app/pages/(with-layout)/dashboard/page.tsx @@ -9,6 +9,7 @@ import ProcessFacilitySearch from "./facilityInfo/page"; import DashBoardChart from "./maingraph/page"; import RainManageTab from "./rainManage/page"; import DrainageEquipment from "./drainageEquipment/page"; +import { roundNumber } from "@/app/components/common/DataForm"; const tabList = [ { value: 'facilityInfo', label: '시설정보 및 운영현황' }, @@ -193,55 +194,55 @@ export default function DashBoard() { const sheetParameter = [ { - data: [['날짜', '강수량'],...chart_inflowRain.map((item) => [item.label, item.barVal0])], + data: [['날짜', '강수량'],...chart_inflowRain.map((item) => [item.label, roundNumber(item.barVal0, 1)])], headerNum: 1, headerRange: 'A1:B1', sheetName: '강수량' }, { - data: [['날짜', '유입하수량'],...chart_inflowRain.map((item) => [item.label, item.lineVal1])], + data: [['날짜', '유입하수량'],...chart_inflowRain.map((item) => [item.label, roundNumber(item.lineVal1, 0)])], headerNum: 1, headerRange: 'A1:B1', sheetName: '유입하수량' }, { - data: [['날짜', '시설용량'],...chart_inflowRain.map((item) => [item.label, item.lineVal0])], + data: [['날짜', '시설용량'],...chart_inflowRain.map((item) => [item.label, roundNumber(item.lineVal0, 0)])], headerNum: 1, headerRange: 'A1:B1', sheetName: '시설용량' }, { - data: [['날짜', '유입BOD'],...chart_bodRain.map((item) => [item.label, item.lineVal0])], + data: [['날짜', '유입BOD'],...chart_bodRain.map((item) => [item.label, roundNumber(item.lineVal0, 1)])], headerNum: 1, headerRange: 'A1:B1', sheetName: '유입BOD' }, { - data: [['날짜', '유입T-P'],...chart_inflTp.map((item) => [item.label, item.val])], + data: [['날짜', '유입T-P'],...chart_inflTp.map((item) => [item.label, roundNumber(item.val, 3)])], headerNum: 1, headerRange: 'A1:B1', sheetName: '유입T-P' }, { - data: [['날짜', '총인유입T-P'],...chart_chongInTp.map((item) => [item.label, item.val])], + data: [['날짜', '총인유입T-P'],...chart_chongInTp.map((item) => [item.label, roundNumber(item.val, 3)])], headerNum: 1, headerRange: 'A1:B1', sheetName: '총인유입T-P' }, { - data: [['날짜', '방류T-P'],...chart_efflTp.map((item) => [item.label, item.val])], + data: [['날짜', '방류T-P'],...chart_efflTp.map((item) => [item.label, roundNumber(item.val, 3)])], headerNum: 1, headerRange: 'A1:B1', sheetName: '방류T-P' }, { - data: [['날짜', '유입T-N'],...chart_inflTn.map((item) => [item.label, item.val])], + data: [['날짜', '유입T-N'],...chart_inflTn.map((item) => [item.label, roundNumber(item.val, 3)])], headerNum: 1, headerRange: 'A1:B1', sheetName: '유입T-N' }, { - data: [['날짜', '방류T-N'],...chart_efflTn.map((item) => [item.label, item.val])], + data: [['날짜', '방류T-N'],...chart_efflTn.map((item) => [item.label, roundNumber(item.val, 3)])], headerNum: 1, headerRange: 'A1:B1', sheetName: '방류T-N' diff --git a/apps/fo/app/store/dashboard/index.tsx b/apps/fo/app/store/dashboard/index.tsx index 5000492c0..11a215a1d 100644 --- a/apps/fo/app/store/dashboard/index.tsx +++ b/apps/fo/app/store/dashboard/index.tsx @@ -1854,10 +1854,10 @@ export const dashBoardReducer:(set:(fn: (state: DashBoardType) => DashBoardType) label: item.msrDt.substring(0, 4)+"-"+item.msrDt.substring(4, 6)+"-"+item.msrDt.substring(6, 8), val : item.inflAssctBfrWqltTp ?? 0 })); - + const chart_chongInTp = res.data.wqltObjs.map((item: FacilityWaterQltyProps) => ({ label: item.msrDt.substring(0, 4)+"-"+item.msrDt.substring(4, 6)+"-"+item.msrDt.substring(6, 8), - val : item.tpInflWqltTp ?? 0 + val : Number(item.tpInflWqltTp) == 0 ? null : item.tpInflWqltTp })); const chart_efflTp = res.data.wqltObjs.map((item: FacilityWaterQltyProps) => ({