From 010d8beeb4c25d630c0a4fff886af94f3beb6306 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期一, 11 八月 2025 17:04:42 +0800
Subject: [PATCH] 物料基础信息优化
---
rsf-admin/src/page/dashboard/index.jsx | 66 +++++++++++++++++++++++++++++----
1 files changed, 58 insertions(+), 8 deletions(-)
diff --git a/rsf-admin/src/page/dashboard/index.jsx b/rsf-admin/src/page/dashboard/index.jsx
index 9a8c629..d8694e0 100644
--- a/rsf-admin/src/page/dashboard/index.jsx
+++ b/rsf-admin/src/page/dashboard/index.jsx
@@ -10,6 +10,9 @@
import WifiIcon from '@mui/icons-material/Wifi';
import request from '@/utils/request';
import { Box, Typography, LinearProgress, Stack } from '@mui/material';
+import NbChart from "./NbChart";
+import NbList from "./NbList";
+import NbCard from "./NbCard";
const styles = {
flex: { display: 'flex' },
@@ -51,14 +54,14 @@
padding: '2rem 1rem',
}}
>
- <WordEffect
+ {/* <WordEffect
words={translate('page.welcome.index')}
color={theme.palette.mode === 'light' ? '#666' : '#eeeeee'}
/>
<WordEffect
words={translate('page.welcome.tech')}
color={theme.palette.mode === 'light' ? '#666' : '#eeeeee'}
- />
+ /> */}
</div>
</>
)
@@ -77,13 +80,46 @@
if (code === 200) {
setStatistic(data);
} else {
- notify(msg, { type: 'error', messageArgs: { _: msg } });
+ // notify(msg, { type: 'error', messageArgs: { _: msg } });
}
}).catch((error) => {
- notify(error.message, { type: 'error', messageArgs: { _: error.message } });
+ // notify(error.message, { type: 'error', messageArgs: { _: error.message } });
console.error(error);
})
}, [])
+
+ const recentOrders = [
+ {
+ id: 1,
+ name: 'a',
+ date: "2025-08-10T12:23:56.959Z",
+ total: 138.94
+ },
+ {
+ id: 2,
+ name: 'b',
+ date: "2025-08-03T07:45:00.304Z",
+ total: 214.66
+ },
+ {
+ id: 3,
+ name: 'c',
+ date: "2025-07-28T00:20:10.968Z",
+ total: 68.19
+ },
+ {
+ id: 4,
+ name: 'd',
+ date: "2025-07-22T20:39:00.293Z",
+ total: 36.56
+ },
+ {
+ id: 5,
+ name: 'e',
+ date: "2025-07-16T17:40:24.791Z",
+ total: 100.82
+ },
+ ]
return (
<>
@@ -103,24 +139,38 @@
/>
</div>
<div style={styles.singleCol}>
- {/* <OrderChart orders={recentOrders} /> */}
+ <NbChart orders={recentOrders} />
</div>
<div style={styles.singleCol}>
- {/* <PendingOrders orders={pendingOrders} /> */}
+ <NbList orders={recentOrders} />
</div>
</div>
<div style={styles.rightCol}>
<div style={styles.flex}>
- <CardWithIcon
+ <NbCard
icon={WifiIcon}
title={translate('page.member.header.onlineMembers')}
subtitle={`${statistic?.membersOnlineQua}`}
+ to={{
+ pathname: '/task',
+ search: JSON.stringify({
+ filter: JSON.stringify({ status: 1 }),
+ }),
+ }}
+ list={recentOrders}
/>
<Spacer />
- <CardWithIcon
+ <NbCard
icon={SensorOccupiedIcon}
title={translate('page.member.header.totalMembers')}
subtitle={`${statistic?.membersTotalQua}`}
+ to={{
+ pathname: '/task',
+ search: JSON.stringify({
+ filter: JSON.stringify({ status: 1 }),
+ }),
+ }}
+ list={recentOrders}
/>
</div>
</div>
--
Gitblit v1.9.1