From 41da932b9629d7f1426e2030412df1a41f65ff6e Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期一, 21 十月 2024 11:05:14 +0800 Subject: [PATCH] # --- zy-acs-flow/src/map/insight/agv/AgvMain.jsx | 33 ++++++++++++++++++--------------- 1 files changed, 18 insertions(+), 15 deletions(-) diff --git a/zy-acs-flow/src/map/insight/agv/AgvMain.jsx b/zy-acs-flow/src/map/insight/agv/AgvMain.jsx index 5e22aff..68fbd29 100644 --- a/zy-acs-flow/src/map/insight/agv/AgvMain.jsx +++ b/zy-acs-flow/src/map/insight/agv/AgvMain.jsx @@ -1,6 +1,6 @@ import React, { useRef, useEffect, useState } from 'react'; import * as THREE from 'three'; -import { useTranslate, useDataProvider } from 'react-admin'; +import { useTranslate, useDataProvider, useRedirect } from 'react-admin'; import { Box, CircularProgress, @@ -17,6 +17,7 @@ import { handleRestoreAgvAll } from '../../http'; import BoolValueIcon from '../BoolValueIcon'; import ConfirmButton from '../../../page/components/ConfirmButton'; +import { grey } from '@mui/material/colors'; let three; @@ -82,6 +83,7 @@ const theme = useTheme(); const translate = useTranslate(); const dataProvider = useDataProvider(); + const redirect = useRedirect(); const notify = useNotification(); const containerRef = useRef(); const [loading, setLoading] = useState(true); @@ -134,7 +136,7 @@ left="50%" style={{ transform: 'translate(-50%, -50%)' }} > - <CircularProgress /> + <CircularProgress sx={{ color: grey[50] }} /> </Box> )} </Box> @@ -190,22 +192,15 @@ <Grid container spacing={2} style={{ marginTop: '0px' }}> <Grid item xs={12}> <Stack spacing={2} mt={2}> - <ConfirmButton - label="page.map.action.reset" + <Button color="primary" variant="contained" - onConfirm={() => { - handleReset(); + onClick={() => { + redirect(`/agv/${info?.agvId}/show`); }} - /> - <ConfirmButton - label="page.map.action.restoreALl" - color="primary" - variant="contained" - onConfirm={() => { - handleRestoreAll(); - }} - /> + > + {translate('page.map.settings.map.more.title')} + </Button> {info && ( info.status === 1 ? <Button variant="contained" color="error" fullWidth onClick={() => { @@ -219,6 +214,14 @@ {translate('page.map.action.enable')} </Button> )} + <ConfirmButton + label="page.map.action.restoreALl" + color="inherit" + // variant="contained" + onConfirm={() => { + handleRestoreAll(); + }} + /> </Stack> </Grid> </Grid> -- Gitblit v1.9.1