From 85b0bd357103af52424f87d2b14a1c5708e30571 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 21 九月 2024 11:19:43 +0800
Subject: [PATCH] #
---
zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/AgvDetail.java | 2
zy-acs-flow/src/page/agv/AgvShow.jsx | 4
zy-acs-flow/src/page/agv/show/AgvShowDetail.jsx | 323 +++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 322 insertions(+), 7 deletions(-)
diff --git a/zy-acs-flow/src/page/agv/AgvShow.jsx b/zy-acs-flow/src/page/agv/AgvShow.jsx
index 8cf7851..5a42156 100644
--- a/zy-acs-flow/src/page/agv/AgvShow.jsx
+++ b/zy-acs-flow/src/page/agv/AgvShow.jsx
@@ -60,13 +60,13 @@
<Box mt={1}>
<Stack direction='row'>
<Typography
- variant="h6"
+ variant="h5"
sx={{
mt: .5,
mr: 2
}}
>
- {record.agvModelData.type}
+ {record.agvModelData?.type}
</Typography>
<Avatar sx={{ bgcolor: theme.palette.primary.main }}>{record.uuid}</Avatar>
</Stack>
diff --git a/zy-acs-flow/src/page/agv/show/AgvShowDetail.jsx b/zy-acs-flow/src/page/agv/show/AgvShowDetail.jsx
index 64c22a4..3166e66 100644
--- a/zy-acs-flow/src/page/agv/show/AgvShowDetail.jsx
+++ b/zy-acs-flow/src/page/agv/show/AgvShowDetail.jsx
@@ -5,7 +5,7 @@
TabbedShowLayout,
useListContext,
useRecordContext,
- useShowContext,
+ useTranslate,
} from 'react-admin';
import { Link as RouterLink, useLocation } from 'react-router-dom';
import {
@@ -23,7 +23,7 @@
export const AgvShowDetail = (props) => {
const { record, ...rest } = props;
-
+ const translate = useTranslate();
const [data, setData] = useState(null);
useEffect(() => {
@@ -54,12 +54,327 @@
</Stack>
);
}
+ console.log(record);
return (
<>
- <Card>
+ <Box display="flex" m={2}>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ ip
+ </Typography>
+ <Typography variant="body2">
+ {record.ip}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ position
+ </Typography>
+ <Typography variant="body2">
+ {record.agvDetail.pos === 1 ? translate('common.enums.true') : translate('common.enums.false')}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ code
+ </Typography>
+ <Typography variant="body2">
+ {record.agvDetail.code$}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ angle
+ </Typography>
+ <Typography variant="body2">
+ {record.agvDetail.agvAngle}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ gyroAngle
+ </Typography>
+ <Typography variant="body2">
+ {record.agvDetail.gyroAngle}
+ </Typography>
+ </Box>
- </Card>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ encoderAngle
+ </Typography>
+ <Typography variant="body2">
+ {record.agvDetail.encoderAngle}
+ </Typography>
+ </Box>
+
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ high
+ </Typography>
+ <Typography variant="body2">
+ {record.agvDetail.high}
+ </Typography>
+ </Box>
+
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ vol
+ </Typography>
+ <Typography variant="body2">
+ {record.agvDetail.vol}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ soc
+ </Typography>
+ <Typography variant="body2">
+ {record.agvDetail.soc}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ soh
+ </Typography>
+ <Typography variant="body2">
+ {record.agvDetail.soh}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ tempe
+ </Typography>
+ <Typography variant="body2">
+ {record.agvDetail.tempe}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ motorFail
+ </Typography>
+ <Typography variant="body2">
+ {record.agvDetail.motorFail}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ workDistance
+ </Typography>
+ <Typography variant="body2">
+ {record.agvDetail.workDistance}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ status
+ </Typography>
+ <Typography variant="body2">
+ {record.agvDetail.statusDesc}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ model name
+ </Typography>
+ <Typography variant="body2">
+ {record.agvModel.name}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ model length
+ </Typography>
+ <Typography variant="body2">
+ {record.agvModel.length}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ model width
+ </Typography>
+ <Typography variant="body2">
+ {record.agvModel.width}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ model height
+ </Typography>
+ <Typography variant="body2">
+ {record.agvModel.height}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ model liftHeight
+ </Typography>
+ <Typography variant="body2">
+ {record.agvModel.liftHeight}
+ </Typography>
+ </Box>
+
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ model diameter
+ </Typography>
+ <Typography variant="body2">
+ {record.agvModel.diameter}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ model backpack
+ </Typography>
+ <Typography variant="body2">
+ {record.agvModel.backpack}
+ </Typography>
+ </Box>
+
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ model lowBattery
+ </Typography>
+ <Typography variant="body2">
+ {record.agvModel.lowBattery}
+ </Typography>
+ </Box>
+
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ model quaBattery
+ </Typography>
+ <Typography variant="body2">
+ {record.agvModel.quaBattery}
+ </Typography>
+ </Box>
+
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ model travelSpeed
+ </Typography>
+ <Typography variant="body2">
+ {record.agvModel.travelSpeed}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ model workDirection
+ </Typography>
+ <Typography variant="body2">
+ {record.agvModel.workDirection}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ model allDirection
+ </Typography>
+ <Typography variant="body2">
+ {record.agvModel.allDirection}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ model protocol
+ </Typography>
+ <Typography variant="body2">
+ {record.agvModel.protocol}
+ </Typography>
+ </Box>
+ <Box display="flex" mr={5} flexDirection="column">
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ model mqttTopic
+ </Typography>
+ <Typography variant="body2">
+ {record.agvModel.mqttTopic}
+ </Typography>
+ </Box>
+ </Box>
</>
)
}
\ No newline at end of file
diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/AgvDetail.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/AgvDetail.java
index c7d4d49..d418475 100644
--- a/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/AgvDetail.java
+++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/AgvDetail.java
@@ -315,7 +315,7 @@
CodeService service = SpringUtils.getBean(CodeService.class);
Code code = service.getById(this.code);
if (!Cools.isEmpty(code)){
- return String.valueOf(code.getUuid());
+ return String.valueOf(code.getData());
}
return null;
}
--
Gitblit v1.9.1