anxiaoxia 2 years ago
parent
commit
e4eaaa00e7

+ 2 - 1
src/pages/Equipment/components/deviceModal/airEq/index.jsx

@@ -90,7 +90,8 @@ export default ({ spaceId, projectId }) => {
           getAirInfo();
         }, 500);
       } else {
-        message.error('操作失败,请重试');
+        getAirInfo();
+        // message.error('操作失败,请重试');
       }
     });
   };

+ 5 - 3
src/pages/Equipment/components/deviceModal/lampEq/index.jsx

@@ -42,15 +42,17 @@ export default ({ spaceId }) => {
   };
 
   useEffect(() => {
+    getLamp();
     // startLightsStatusTimer.current = setInterval(() => {
-    getLamp(); // 灯设备状态
+    //   getLamp(); // 灯设备状态
     // }, 1000);
-    // return clearInterval(startLightsStatusTimer.current);
+    // return () => {
+    //   clearInterval(startLightsStatusTimer.current);
+    // };
   }, []);
 
   const [flagSvg, setFlagSvg] = useState(false);
   function handleExpend() {
-    clearInterval(startLightsStatusTimer.current);
     setFlagSvg(!flagSvg);
   }
   const changeSwitch = (val, type, id) => {