From 5807fc22aba974b4ca85a8049ecd983673b0ca28 Mon Sep 17 00:00:00 2001
From: skyouc <958836976@qq.com>
Date: 星期一, 20 十月 2025 16:59:34 +0800
Subject: [PATCH] 1. 添加大屏接口 2. 任务站点确认修改
---
rsf-admin/src/page/dashboard/NbChart.jsx | 44 +++++++++++++++++++++-----------------------
1 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/rsf-admin/src/page/dashboard/NbChart.jsx b/rsf-admin/src/page/dashboard/NbChart.jsx
index de79803..5b4fce4 100644
--- a/rsf-admin/src/page/dashboard/NbChart.jsx
+++ b/rsf-admin/src/page/dashboard/NbChart.jsx
@@ -19,33 +19,31 @@
const dateFormatter = (date) =>
new Date(date).toLocaleDateString();
-const aggregateOrdersByDay = (orders) =>
- orders
- .filter((order) => order.status !== 'cancelled')
- .reduce(
- (acc, curr) => {
- const day = format(curr.date, 'yyyy-MM-dd');
- if (!acc[day]) {
- acc[day] = 0;
- }
- acc[day] += curr.total;
- return acc;
- },
- {}
- );
+// const aggregateOrdersByDay = (orders) =>
+// orders
+// .filter((order) => order.status !== 'cancelled')
+// .reduce(
+// (acc, curr) => {
+// const day = format(curr.date, 'yyyy-MM-dd');
+// if (!acc[day]) {
+// acc[day] = 0;
+// }
+// acc[day] += curr.total;
+// return acc;
+// },
+// {}
+// );
-const getRevenuePerDay = (orders) => {
- const daysWithRevenue = aggregateOrdersByDay(orders);
- return lastMonthDays.map(date => ({
- date: date.getTime(),
- total: daysWithRevenue[format(date, 'yyyy-MM-dd')] || 0,
- }));
-};
+// const getRevenuePerDay = (orders) => {
+// const daysWithRevenue = aggregateOrdersByDay(orders);
+// return lastMonthDays.map(date => ({
+// date: date.getTime(),
+// total: daysWithRevenue[format(date, 'yyyy-MM-dd')] || 0,
+// }));
+// };
const NbChart = (props) => {
const { orders } = props;
- console.log(orders);
-
const translate = useTranslate();
if (!orders) return null;
--
Gitblit v1.9.1