|
|
@ -46,8 +46,6 @@ const Basis = ({ actions, dispatch, setshowData, siteList, siteData }) => { |
|
|
|
useEffect(async () => { |
|
|
|
|
|
|
|
if (siteData) { |
|
|
|
setStrucId(siteData[0]?.id) |
|
|
|
|
|
|
|
//获取所有泵站的集水池液位
|
|
|
|
siteData?.map(async v => { |
|
|
|
await dispatch(bigScreen.axyData({ type: 'get', url: `structures/${v.id}/factors` })).then(async r => { |
|
|
@ -125,12 +123,21 @@ const Basis = ({ actions, dispatch, setshowData, siteList, siteData }) => { |
|
|
|
}, [siteData]) |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
setStrucId(siteList[0]?.value) |
|
|
|
const autoStructId = sessionStorage.getItem('structId'); |
|
|
|
let nextStructId = siteList[0]?.value; |
|
|
|
if (autoStructId) { |
|
|
|
for (let i = 0; i < siteList.length; i++) { |
|
|
|
if (autoStructId == siteList[i].value) { |
|
|
|
nextStructId = siteList[i].value; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
setStrucId(nextStructId); |
|
|
|
}, [siteList]) |
|
|
|
|
|
|
|
useEffect(async () => { |
|
|
|
if (strucId) { |
|
|
|
|
|
|
|
await dispatch(bigScreen.axyData({ type: 'get', url: `structures/${strucId}/factors` })).then(async r => { |
|
|
|
//泵站信息
|
|
|
|
let informationId = r.payload.data?.find(v => v.name == '泵站信息')?.id |
|
|
@ -155,16 +162,12 @@ const Basis = ({ actions, dispatch, setshowData, siteList, siteData }) => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, [strucId]) |
|
|
|
|
|
|
|
|
|
|
|
return <div className='super-screen-body'> |
|
|
|
<div className='super-screen-card left'> |
|
|
|
<Left_1 data={left1Data.current} /> |
|
|
|