ソースを参照

Merge branch 'master' of http://39.106.8.246:3003/sagacloud/sagacloud-manager-control

zhaojijng 2 年 前
コミット
2106f80920

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

@@ -82,7 +82,7 @@ export default ({ spaceId, projectId }) => {
     let countTimer = 0;
     airLoadingTimer.current = setInterval(() => {
       if (countTimer >= 30 || isNowAirStatus.current === val) {
-        setIsOpen(val); // 开关
+        // setIsOpen(isNowAirStatus.current); // 开关
         setIsLoading(false);
         clearInterval(airLoadingTimer.current);
       } else {
@@ -100,12 +100,10 @@ export default ({ spaceId, projectId }) => {
       .then((res) => {
         const val = res.icon == 7 ? false : true;
         if (firstLoading.current) {
-          isNowAirStatus.current = val;
-          setIsOpen(val); // 开关
           setIsLoading(false);
-        } else {
-          isNowAirStatus.current = val;
         }
+        isNowAirStatus.current = val;
+        setIsOpen(val); // 开关
         firstLoading.current = false;
         // setFirstLoading(false)
         timerGetAirInfo(1000);