From 7f70cb15d035f0c233b9e62b9e43aa985317c908 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 04 十一月 2024 10:22:45 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/map/batch/BatchSettings.jsx |   65 ++++++++++++++++++++++++++++++--
 1 files changed, 61 insertions(+), 4 deletions(-)

diff --git a/zy-acs-flow/src/map/batch/BatchSettings.jsx b/zy-acs-flow/src/map/batch/BatchSettings.jsx
index ce07303..cbcaed5 100644
--- a/zy-acs-flow/src/map/batch/BatchSettings.jsx
+++ b/zy-acs-flow/src/map/batch/BatchSettings.jsx
@@ -1,10 +1,67 @@
+import React, { useState, useRef, useEffect } from 'react';
+import { useTranslate } from "react-admin";
+import { Box, Typography, Toolbar, Stack, useTheme, Card, Divider, Button } from '@mui/material';
+import JsonShow from '../JsonShow';
+import CheckOutlinedIcon from '@mui/icons-material/CheckOutlined';
+import ClearOutlinedIcon from '@mui/icons-material/ClearOutlined';
+import * as Tool from '../tool';
 
-const BatchSettings = () => {
+const BatchSettings = (props) => {
+    const theme = useTheme();
+    const themeMode = theme.palette.mode;
+    const translate = useTranslate();
+    const { batchSprites, drawerClose } = props;
 
     return (
-        <>
-            <h1>s</h1>
-        </>
+        <Box>
+            <JsonShow
+                data={
+                    batchSprites?.map(item => {
+                        return item.data?.type + '-' + item.data?.no;
+                    })
+                }
+                height={550}
+            />
+            <Box mt={2}>
+                <Divider sx={{
+                    marginBottom: '16px'
+                }} />
+                <Toolbar sx={{
+                    display: 'flex',
+                    justifyContent: 'space-between',
+                    minHeight: { sm: 0 },
+                }}>
+                    <Button
+                        variant="outlined"
+                        color="primary"
+                        onClick={drawerClose}
+                        sx={{ borderColor: theme => theme.palette.success.main }}
+                        startIcon={
+                            <CheckOutlinedIcon sx={{ color: theme => theme.palette.success.main }} />
+                        }
+                    >
+                        {translate('ra.action.confirm')}
+                    </Button>
+
+                    <Button
+                        variant="outlined"
+                        color="primary"
+                        onClick={() => {
+                            batchSprites?.forEach((sprite) => {
+                                Tool.getMapContainer().removeChild(sprite);
+                                drawerClose();
+                            })
+                        }}
+                        sx={{ borderColor: theme => theme.palette.error.main }}
+                        startIcon={
+                            <ClearOutlinedIcon sx={{ color: theme => theme.palette.error.main }} />
+                        }
+                    >
+                        {translate('ra.action.delete')}
+                    </Button>
+                </Toolbar>
+            </Box>
+        </Box>
     )
 }
 

--
Gitblit v1.9.1