From 7f70cb15d035f0c233b9e62b9e43aa985317c908 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期一, 04 十一月 2024 10:22:45 +0800 Subject: [PATCH] # --- zy-acs-flow/src/page/agv/AgvCard.jsx | 26 +++++++++++++++++++++++--- 1 files changed, 23 insertions(+), 3 deletions(-) diff --git a/zy-acs-flow/src/page/agv/AgvCard.jsx b/zy-acs-flow/src/page/agv/AgvCard.jsx index ddc07ed..04e7e75 100644 --- a/zy-acs-flow/src/page/agv/AgvCard.jsx +++ b/zy-acs-flow/src/page/agv/AgvCard.jsx @@ -10,7 +10,7 @@ } from 'react-admin'; import PulseSignal from '../components/PulseSignal'; import { AgvAvatar } from './AgvAvatar'; -import { red, blue } from '@mui/material/colors'; +import { red, blue, blueGrey } from '@mui/material/colors'; export const AgvCard = (props) => { const resource = useResourceContext(); @@ -18,6 +18,7 @@ const createPath = useCreatePath(); const record = useRecordContext(props); if (!record) return null; + return ( <Link to={createPath({ @@ -36,6 +37,20 @@ flexDirection: 'column', justifyContent: 'space-between', padding: '1em', + ...(!record.online && { + animation: 'cardBorderPulse 2s infinite', + '@keyframes cardBorderPulse': { + '0%': { + boxShadow: '0 0 2px 1px rgba(255, 0, 0, 0.1)', + }, + '50%': { + boxShadow: '0 0 3px 2px rgba(255, 0, 0, 0.3)', + }, + '100%': { + boxShadow: '0 0 2px 1px rgba(255, 0, 0, 0.1)', + }, + }, + }) }} elevation={elevation} > @@ -57,7 +72,12 @@ <Box display="flex" flexDirection="column" alignItems="center"> <AgvAvatar /> <Box textAlign="center" marginTop={2}> - <Typography variant="subtitle2"> + <Typography + variant="subtitle2" + color="textSecondary" + component="div" + sx={{ fontWeight: 'bold' }} + > {record.agvStatus} </Typography> <Typography variant="overline" sx={{ opacity: .7 }}> @@ -109,7 +129,7 @@ <Avatar key={record.id} title={`${record.seqNum}`} - sx={{ bgcolor: blue[300] }} + sx={{ bgcolor: blueGrey[500] }} > {record.seqNum.slice(0, 4)} </Avatar> -- Gitblit v1.9.1