From 1bc33546a044cbc84dd9595c19dbcd9a4e309fc9 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期六, 10 一月 2026 14:06:10 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/map/header/AreaFab.jsx |   21 +++++++--------------
 1 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/zy-acs-flow/src/map/header/AreaFab.jsx b/zy-acs-flow/src/map/header/AreaFab.jsx
index 5111ca6..ab8e847 100644
--- a/zy-acs-flow/src/map/header/AreaFab.jsx
+++ b/zy-acs-flow/src/map/header/AreaFab.jsx
@@ -1,29 +1,22 @@
-import React, { useState, useRef, useEffect, useMemo } from "react";
+import React from "react";
 import { useTranslate } from "react-admin";
-import {
-    Fab,
-    Box,
-    Backdrop,
-    useTheme,
-} from '@mui/material';
+import { Fab } from '@mui/material';
 import CropFreeIcon from '@mui/icons-material/CropFree';
+import CropIcon from '@mui/icons-material/Crop';
 import CircularProgress from '@mui/material/CircularProgress';
 import * as Tool from '../tool';
 
 const AreaFab = (props) => {
-    const { curZone, showAreas, setShowAreas, notify } = props;
+    const { curZone, showAreas, setShowAreas } = props;
     const translate = useTranslate();
-    const theme = useTheme();   // theme.palette.primary.main
 
     const [loading, setLoading] = React.useState(false);
 
     const handleClick = () => {
         if (showAreas) {
-            setShowAreas(false);
-            // Tool.hideRoutes(curZone, setShowAreas);
+            Tool.hideAreas(curZone, setShowAreas);
         } else {
-            setShowAreas(true);
-            // Tool.showRoutes(curZone, setShowAreas, setLoading);
+            Tool.showAreas(curZone, setShowAreas, setLoading);
         }
     }
 
@@ -39,7 +32,7 @@
                     minWidth: 100
                 }}
             >
-                <CropFreeIcon />
+                <CropIcon />
                 &nbsp;{translate('page.map.action.area')}&nbsp;
                 {loading && (
                     <>

--
Gitblit v1.9.1