diff --git a/web/client/src/sections/bigScreen/components/basis.js b/web/client/src/sections/bigScreen/components/basis.js index 394e279..4d7dabf 100644 --- a/web/client/src/sections/bigScreen/components/basis.js +++ b/web/client/src/sections/bigScreen/components/basis.js @@ -17,8 +17,8 @@ const Basis = ({ actions, dispatch, setshowData }) => { const [siteList, setSiteList] = useState([]) //站点列表 const [strucId, setStrucId] = useState() //站点ID const [pageRefresh1, setPageRefresh1] = useState(false) - const [pageRefresh2, setPageRefresh2] = useState(false) - const [pageRefresh3, setPageRefresh3] = useState(false) + const [pageRefresh2, setPageRefresh2] = useState(0) + const [pageRefresh3, setPageRefresh3] = useState(0) const [left2List, setleft2List] = useState([]) const [depthWater, setDepthWater] = useState([]) const [information, setInformation] = useState({}) @@ -61,7 +61,7 @@ const Basis = ({ actions, dispatch, setshowData }) => { })).then(async d => { if (d.success) { left1Data.current?.push({ name: v.name, level: d.payload.data?.stations[0]?.data[0]?.sLiquid_level || 0 }) - setPageRefresh1(!pageRefresh1) + setPageRefresh1(moment().format('x')) } }) } @@ -101,7 +101,7 @@ const Basis = ({ actions, dispatch, setshowData }) => { })).then(d => { if (d.success) { left2Data.current?.push({ name: v.name, data: d.payload.data?.stations }) - setPageRefresh2(!pageRefresh2) + setPageRefresh2(moment().format('x')) } }) } diff --git a/web/client/src/sections/bigScreen/components/basis/right_1.js b/web/client/src/sections/bigScreen/components/basis/right_1.js index 17f7be2..db76ee7 100644 --- a/web/client/src/sections/bigScreen/components/basis/right_1.js +++ b/web/client/src/sections/bigScreen/components/basis/right_1.js @@ -16,7 +16,7 @@ export default function Right_1 ({ data, siteList, strucId, setStrucId, POWER_ST onSelect={(v, option) => { setStrucId(v); for (let key in POWER_STATIONS) { - if (POWER_STATIONS[key]?.name == option?.name) { + if (POWER_STATIONS[key]?.name == option?.label) { setInformation(POWER_STATIONS[key]) } } diff --git a/web/client/src/sections/bigScreen/components/capacity.js b/web/client/src/sections/bigScreen/components/capacity.js index c125dca..f566be3 100644 --- a/web/client/src/sections/bigScreen/components/capacity.js +++ b/web/client/src/sections/bigScreen/components/capacity.js @@ -30,6 +30,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => { }, [siteList]) useEffect(async () => { + let pump = [] let cabinetSun = [] let sun = {} @@ -347,7 +348,8 @@ const Capacity = ({ actions, dispatch, siteList, }) => { sun.day30 = day30 + day1 sun.day365 = day365 + day1 sun.daySun = daySun - + setPageLeft(0) + setPageRight(0) setCentreData(sun) }, [strucId]) @@ -500,7 +502,7 @@ const Capacity = ({ actions, dispatch, siteList, }) => {