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) => { {/* 中间的图片 */}
{/* */} - {graph?.length ? graph.map(item => (item?.projectGraphs.length ? -
- { - deployPoints.length ? deployPoints.map(item => ( + {graph?.length ? graph.map(item => (item?.projectGraphs.length ? +
+ { + deployPoints.length ? deployPoints.map(item => ( +
+
{moment(points.find(i => i.point_id === item.pointId)?.inspectTime).format('YYYY-MM-DD HH:mm:ss') + '巡检发现异常'}
进度:{renderOptionText(points.find(i => i.point_id === item.pointId)?.state)}
{/*
{}
*/} @@ -335,34 +338,33 @@ const Right = (props) => { }>
i.point_id === item.pointId)?.alarm ? 'rgb(233 16 16)' : 'rgb(16, 142, 233)', }}>
- )) : "" - } - {deployPoints.length ? -
-
-
{`异常(${points.filter(item => item.alarm).length})`}
-
-
-
{`正常(${points.filter(item => !item.alarm).length})`}
-
-
: '' - } -
- : '暂无数据')) : '暂无数据' +
+ + )) : "" + } + {deployPoints.length ? +
+
+
{`异常(${points.filter(item => item.alarm).length})`}
+
+
+
{`正常(${points.filter(item => !item.alarm).length})`}
+
+
: '' } +
+ : '暂无数据')) : '暂无数据' + } {/* */}
diff --git a/web-screen/client/src/utils/webapi.js b/web-screen/client/src/utils/webapi.js index 405305f..287e1a7 100644 --- a/web-screen/client/src/utils/webapi.js +++ b/web-screen/client/src/utils/webapi.js @@ -172,7 +172,7 @@ export const ApiTable = { //领导仓 findPatrolRecords:'bigScreen/patrolRecord', - findPatrolRate:'bigScreen/getDeployPoints', + findPatrolRate:'bigScreen/patrolRate', countByProject:'bigScreen/patrolCount', getDevices:'bigScreen/devices/guarantee', getHistoricalFaults:'bigScreen/historicalFaults',