From c3af288c53805cc1b08516cf2f47dcf75f30f67a Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 21 九月 2024 13:53:34 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/agv/show/AgvShowDetail.jsx |   43 +++++++++++++++++++++++++------------------
 1 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/zy-acs-flow/src/page/agv/show/AgvShowDetail.jsx b/zy-acs-flow/src/page/agv/show/AgvShowDetail.jsx
index 5c4c26a..ad3e2a0 100644
--- a/zy-acs-flow/src/page/agv/show/AgvShowDetail.jsx
+++ b/zy-acs-flow/src/page/agv/show/AgvShowDetail.jsx
@@ -73,9 +73,9 @@
         <>
             <Box m={2}>
                 <AgvMainDetail record={record} />
-                <Divider sx={{ m: 2 }} />
+                <Divider sx={{ mt: 2, mb: 2 }} />
                 <AgvMoreDetail record={record} />
-                <Divider sx={{ m: 2 }} />
+                <Divider sx={{ mt: 2, mb: 2 }} />
                 <AgvModelDetail record={record} />
             </Box>
         </>
@@ -96,7 +96,14 @@
 
 const DetailValue = ({ value }) => {
     return (
-        <Typography variant="body2">
+        <Typography
+            variant="body2"
+            width='80%'
+            sx={{
+                wordWrap: 'break-word',
+                whiteSpace: 'normal',
+            }}
+        >
             {value}
         </Typography>
     )
@@ -104,8 +111,21 @@
 
 
 const AgvMainDetail = ({ record }) => {
+    const translate = useTranslate();
     return (
         <Grid container spacing={1} sx={{ maxWidth: GRID_CONTAINER_MAX_WIDTH }}>
+            <Grid item xs={ITEM_COL}>
+                <DetailTitle title='common.field.status' />
+                <DetailValue value={record.agvDetail.statusDesc} />
+            </Grid>
+            <Grid item xs={ITEM_COL}>
+                <DetailTitle title='table.field.agvDetail.pos' />
+                <DetailValue value={record.agvDetail.pos === 1 ? translate('common.enums.true') : translate('common.enums.false')} />
+            </Grid >
+            <Grid item xs={ITEM_COL}>
+                <DetailTitle title='table.field.agvDetail.code' />
+                <DetailValue value={record.agvDetail.code$} />
+            </Grid>
             <Grid item xs={ITEM_COL}>
                 <DetailTitle title='table.field.agv.ip' />
                 <DetailValue value={record.ip} />
@@ -118,14 +138,7 @@
     const translate = useTranslate();
     return (
         <Grid container spacing={1} sx={{ maxWidth: GRID_CONTAINER_MAX_WIDTH }}>
-            <Grid item xs={ITEM_COL}>
-                <DetailTitle title='table.field.agvDetail.pos' />
-                <DetailValue value={record.agvDetail.pos === 1 ? translate('common.enums.true') : translate('common.enums.false')} />
-            </Grid >
-            <Grid item xs={ITEM_COL}>
-                <DetailTitle title='table.field.agvDetail.code' />
-                <DetailValue value={record.agvDetail.code$} />
-            </Grid>
+
             <Grid item xs={ITEM_COL}>
                 <DetailTitle title='table.field.agvDetail.agvAngle' />
                 <DetailValue value={record.agvDetail.agvAngle} />
@@ -168,17 +181,11 @@
                 <DetailTitle title='table.field.agvDetail.workDistance' />
                 <DetailValue value={record.agvDetail.workDistance} />
             </Grid>
-            <Grid item xs={ITEM_COL}>
-                <DetailTitle title='common.field.status' />
-                <DetailValue value={record.agvDetail.statusDesc} />
-            </Grid>
         </Grid >
     )
 }
 const AgvModelDetail = ({ record }) => {
     const translate = useTranslate();
-    console.log(record);
-
     return (
         <Grid container spacing={1} sx={{ maxWidth: GRID_CONTAINER_MAX_WIDTH }}>
             <Grid item xs={ITEM_COL}>
@@ -227,7 +234,7 @@
             </Grid>
             <Grid item xs={ITEM_COL}>
                 <DetailTitle title='table.field.agvModel.allDirection' />
-                <DetailValue value={record.agvModelData.allDirection} />
+                <DetailValue value={record.agvModelData.allDirection === 1 ? translate('common.enums.true') : translate('common.enums.false')} />
             </Grid>
             <Grid item xs={ITEM_COL}>
                 <DetailTitle title='table.field.agvModel.protocol' />

--
Gitblit v1.9.1