From c5b679ca873428b5d94aa820cd327f2de80796c7 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 25 三月 2024 11:10:04 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/map/batch/modify.jsx |    7 -------
 zy-asrs-flow/src/pages/map/index.jsx        |    6 +++++-
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/batch/modify.jsx b/zy-asrs-flow/src/pages/map/batch/modify.jsx
index 6c0872e..5b0347f 100644
--- a/zy-asrs-flow/src/pages/map/batch/modify.jsx
+++ b/zy-asrs-flow/src/pages/map/batch/modify.jsx
@@ -1,14 +1,7 @@
 import React, { useState, useRef, useEffect } from 'react';
 import { Drawer, Space, Button, Card, Select, InputNumber, Input, Result, Form } from 'antd';
 import {
-    ProCard,
     ProForm,
-    ProFormCheckbox,
-    ProFormDatePicker,
-    ProFormDateRangePicker,
-    ProFormSelect,
-    ProFormText,
-    ProFormTextArea,
     StepsForm,
 } from '@ant-design/pro-components';
 import { FormattedMessage, useIntl, useModel } from '@umijs/max';
diff --git a/zy-asrs-flow/src/pages/map/index.jsx b/zy-asrs-flow/src/pages/map/index.jsx
index 3da9f60..8ed7dd8 100644
--- a/zy-asrs-flow/src/pages/map/index.jsx
+++ b/zy-asrs-flow/src/pages/map/index.jsx
@@ -87,7 +87,10 @@
     const prevCurSpriteRef = React.useRef();
     const hasFloor = true;
     // const [hasFloor, setHasFloor] = React.useState(true);
-    const [curFloor, setCurFloor] = React.useState(1);
+    const [curFloor, setCurFloor] = React.useState(() => {
+        const storedValue = localStorage.getItem('curFloor');
+        return storedValue !== null ? JSON.parse(storedValue) : 1;
+    });
     const [batchSprites, setBatchSprites] = React.useState([]);
     const [batchDrawerVisible, setBatchDrawerVisible] = React.useState(false);
 
@@ -246,6 +249,7 @@
             return;
         }
         switchFloor(curFloor);
+        localStorage.setItem('curFloor', JSON.stringify(curFloor));
     }, [curFloor]);
 
     // watch spriteBySettings

--
Gitblit v1.9.1