| | |
| | | import * as React from 'react'; |
| | | import { Avatar } from '@mui/material'; |
| | | import { useRecordContext } from 'react-admin'; |
| | | import { blueGrey } from '@mui/material/colors'; |
| | | |
| | | export const AgvAvatar = (props) => { |
| | | const { width = 40, height = 40 } = props; |
| | |
| | | width, |
| | | height, |
| | | fontSize: height !== 40 ? '0.6rem' : undefined, |
| | | bgcolor: blueGrey[500] |
| | | }} |
| | | > |
| | | {record.uuid} |
| | |
| | | <PulseSignal |
| | | flag={true} |
| | | /> |
| | | <Box display="flex" alignItems="center"> |
| | | <BatteryCharging90Icon |
| | | sx={{ |
| | | width: 12, |
| | | height: 12, |
| | | color: record.vol > 50 ? 'green' : record.vol > 20 ? 'orange' : 'red', |
| | | }} |
| | | /> |
| | | <Typography variant="body2"> |
| | | {record.vol} |
| | | </Typography> |
| | | </Box> |
| | | <Typography variant="caption"> |
| | | vol: {record.vol} |
| | | </Typography> |
| | | </Box> |
| | | <Box display="flex" flexDirection="column" alignItems="center"> |
| | | <AgvAvatar /> |
| | |
| | | import * as React from 'react'; |
| | | import { Paper, Typography, Box, Chip, Avatar } from '@mui/material'; |
| | | import { teal } from '@mui/material/colors'; |
| | | |
| | | const PulseSignal = (props) => { |
| | | const { flag = true, width = 8, ...rest } = props; |
| | |
| | | width: width, |
| | | height: width, |
| | | borderRadius: '50%', |
| | | backgroundColor: flag ? '#3f51b5' : '#f44336', |
| | | backgroundColor: flag ? `${teal[400]}` : '#f44336', |
| | | display: 'inline-block', |
| | | animation: 'pulse 1.5s infinite', |
| | | animation: 'pulse 1.2s infinite', |
| | | '@keyframes pulse': { |
| | | '0%': { |
| | | transform: 'scale(1)', |
| | |
| | | |
| | | @Override |
| | | public PageResult<AgvResult> pageRel(PageParam<Agv, BaseParam> pageParam) { |
| | | return new PageResult<AgvResult>(this.baseMapper.selectPageRel(pageParam, pageParam.checkoutMap()), pageParam.getTotal()); |
| | | return new PageResult<>(this.baseMapper.selectPageRel(pageParam, pageParam.checkoutMap()), pageParam.getTotal()); |
| | | } |
| | | |
| | | @Override |
| | |
| | | from man_agv ma |
| | | left join man_agv_detail mad on ma.id = mad.agv_id |
| | | where 1=1 |
| | | order by ma.uuid asc |
| | | </select> |
| | | |
| | | </mapper> |