From 1e80ff3740ea7d5214d79bdfde07802a75ba1429 Mon Sep 17 00:00:00 2001 From: "peng.peng" Date: Wed, 22 Nov 2023 11:30:50 +0800 Subject: [PATCH] =?UTF-8?q?(*)=20=E9=98=B2=E6=B1=9B=20=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=A2=9E=E5=8A=A0loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../water-prevention/containers/homePage.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/super-screen/client/src/sections/water-prevention/containers/homePage.js b/super-screen/client/src/sections/water-prevention/containers/homePage.js index 4170aa0..132b023 100644 --- a/super-screen/client/src/sections/water-prevention/containers/homePage.js +++ b/super-screen/client/src/sections/water-prevention/containers/homePage.js @@ -1,6 +1,7 @@ import React, { useEffect, useState } from 'react' import { connect } from 'react-redux'; import { push } from 'react-router-redux'; +import { Spin } from 'antd'; import LeftTop from '../components/left-top' import LeftBottom from '../components/left-bottom' import RightTop from '../components/right-top' @@ -34,6 +35,7 @@ function homePage(props) { const [structures, setStructures] = useState([]); const [waterLevelAlarms, setWaterLevelAlarms] = useState([]); const [emerResource, setEmerResource] = useState([]); + const [spinning, setSpinning] = useState(true) const { data: emergencyList = {} } = useFsRequest({ url: 'water/emergency' }); const SCREEN_COMPONENTS = { overview: { leftTop: LeftTop, leftBottom: LeftBottom, rightTop: RightTop, rightBottom: RightBottom }, @@ -47,6 +49,9 @@ function homePage(props) { useEffect(() => { getWaterData(); + setTimeout(() => { + setSpinning(false) + }, 8 * 1000); }, []) // 获取水务数据 @@ -148,6 +153,7 @@ function homePage(props) { }; }) setWaterLevelAlarms(levelAlarms); + setSpinning(false) } }) } @@ -159,6 +165,7 @@ function homePage(props) { } return <> +
@@ -166,7 +173,9 @@ function homePage(props) { 防汛提前知
-
{ dispatch(push('/homepage')) }} className='_exit' >返回平台
+ +
{ dispatch(push('/homepage')) }} className='_exit' > 返回平台
+
@@ -206,6 +215,8 @@ function homePage(props) {
+ + }