#
luxiaotao1123
2024-10-21 41da932b9629d7f1426e2030412df1a41f65ff6e
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>