diff --git a/web/client/src/layout/components/header/components/customProjGroupModal.jsx b/web/client/src/layout/components/header/components/customProjGroupModal.jsx index 5b40557..7969055 100644 --- a/web/client/src/layout/components/header/components/customProjGroupModal.jsx +++ b/web/client/src/layout/components/header/components/customProjGroupModal.jsx @@ -53,7 +53,7 @@ const CustomProjGroupModal = (props) => { {({ formState, values, formApi }) => ( <> - + { pomsList.map((item, index) => { return ( diff --git a/web/client/src/sections/projectGroup/containers/bigscreen.jsx b/web/client/src/sections/projectGroup/containers/bigscreen.jsx index fcb6ad3..1ffa0e3 100644 --- a/web/client/src/sections/projectGroup/containers/bigscreen.jsx +++ b/web/client/src/sections/projectGroup/containers/bigscreen.jsx @@ -267,7 +267,7 @@ const Bigscreen = ({ dispatch, actions, user, match, history, clientHeight, grou interrupt.update(); } }) - + useEffect(() => { const maxCombinedValue = mockData?.reduce((max, item) => { const combinedMax = Math.max(item.alarmCount, item.dealAlarmCount); @@ -275,15 +275,15 @@ const Bigscreen = ({ dispatch, actions, user, match, history, clientHeight, grou return combinedMax; } return max; - }, -Infinity) - const bigD= Math.ceil(maxCombinedValue/50)*50 - if(bigD==0){ - setXData([5,4,3,2,1,0,1,2,3,4,5])//最大值为0,默认横坐标 - }else{ - setXData([bigD,(bigD-bigD/5),(bigD-bigD*2/5),(bigD-bigD*3/5),(bigD-bigD*4/5),0,(bigD-bigD*4/5),(bigD-bigD*3/5),(bigD-bigD*2/5),(bigD-bigD/5),bigD]) - } - setBiggest(bigD) - if (mockData && mockData.length > 3 && mockData.length < 21) { + }, -Infinity) + const bigD = Math.ceil(maxCombinedValue / 50) * 50 + if (bigD == 0) { + setXData([5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5])//最大值为0,默认横坐标 + } else { + setXData([bigD, (bigD - bigD / 5), (bigD - bigD * 2 / 5), (bigD - bigD * 3 / 5), (bigD - bigD * 4 / 5), 0, (bigD - bigD * 4 / 5), (bigD - bigD * 3 / 5), (bigD - bigD * 2 / 5), (bigD - bigD / 5), bigD]) + } + setBiggest(bigD) + if (mockData && mockData.length > 3 && mockData.length < 21) { const newArray = mockData.slice(3) setAlarmData(newArray) } @@ -292,8 +292,8 @@ const Bigscreen = ({ dispatch, actions, user, match, history, clientHeight, grou const newArray = mockData.slice(3, 20) setAlarmData(newArray) } - },[mockData]) - + }, [mockData]) + // const mockData=[ // {id: 1,name: '测试结构物测试结构物',alarmCount: 200,dealAlarmCount: 23}, // {id: 2,name: '测试结构物2',alarmCount: 300,dealAlarmCount: 22}, @@ -531,6 +531,7 @@ const Bigscreen = ({ dispatch, actions, user, match, history, clientHeight, grou {/*
*/}