diff --git a/web-screen/client/src/layout/components/header/index.js b/web-screen/client/src/layout/components/header/index.js index 2f6c04a..78f6b2d 100644 --- a/web-screen/client/src/layout/components/header/index.js +++ b/web-screen/client/src/layout/components/header/index.js @@ -28,7 +28,7 @@ const Header = props => { const [patrolManageVisible, setPatrolManageVisible] = useState(false) const [deviceManageTabsVisible, setDeviceManageTabsVisible] = useState(false) const [currentSubMenuTab, setCurrentSubMenuTab] = useState('') - const [tab, setTab] = useState('run') + const [tab, setTab] = useState('leader') const [weather, setWeather] = useState([]) let headerTitleStyle = { position: 'absolute', @@ -61,11 +61,11 @@ const Header = props => { }, []) const queryWeather = () => { - // RouteRequest.get(`/query/weather/3d?location=101240101`).then(res => { - // if (res?.daily?.length === 3) { - // setWeather(res.daily) - // } - // }) + RouteRequest.get(`/query/weather/3d?location=101240101`).then(res => { + if (res?.daily?.length === 3) { + setWeather(res.daily) + } + }) } const iconSrc = useMemo(() => { diff --git a/web-screen/client/src/layout/reducers/tab.js b/web-screen/client/src/layout/reducers/tab.js index a13b333..811aa98 100644 --- a/web-screen/client/src/layout/reducers/tab.js +++ b/web-screen/client/src/layout/reducers/tab.js @@ -3,7 +3,7 @@ import Immutable from 'immutable'; const initState = { - tab: 'run', + tab: 'leader', showCG: true }; diff --git a/web-screen/client/src/sections/bigScreen/components/run/right.js b/web-screen/client/src/sections/bigScreen/components/run/right.js index 2f9e3f2..7cc11d4 100644 --- a/web-screen/client/src/sections/bigScreen/components/run/right.js +++ b/web-screen/client/src/sections/bigScreen/components/run/right.js @@ -131,7 +131,7 @@ const Right = (props) => { }, [deployPoints]) useEffect(() => { const structArr = JSON.parse(sessionStorage.getItem('user')).monitorObject - dispatch(bigScreen.getProjectGraph({ projectId: structArr.toString(), subType })).then(_ => { + dispatch(bigScreen.getProjectGraph({ projectId: [...structArr].toString(), subType })).then(_ => { if (_.success) { let graph = _.payload.data setGraph(graph) @@ -312,17 +312,20 @@ const Right = (props) => { {/* 中间的图片 */}