diff --git a/web/client/src/sections/control/containers/control.jsx b/web/client/src/sections/control/containers/control.jsx index 7ae3ae3..7444a20 100644 --- a/web/client/src/sections/control/containers/control.jsx +++ b/web/client/src/sections/control/containers/control.jsx @@ -210,44 +210,6 @@ const Control = ({ dispatch, actions, user, history, loading, socket, pepProject attribute(v) }) - const domProject = document.getElementById("news"); - if (domProject) { - newScrollbar = new PerfectScrollbar("#news", { - suppressScrollX: true, - }); - } - - - - const domProject3 = document.getElementById("equipment"); - if (domProject3) { - equipmentScrollbar = new PerfectScrollbar("#equipment", { - suppressScrollX: true, - }); - } - - const domProject4 = document.getElementById("web"); - if (domProject4) { - webScrollbar = new PerfectScrollbar("#web", { - suppressScrollX: true, - }) - } - - const domProject5 = document.getElementById("problems"); - if (domProject5) { - problemsScrollbar = new PerfectScrollbar("#problems", { - suppressScrollX: true, - }); - } - - const domProject6 = document.getElementById("alarm"); - if (domProject6) { - alarmScrollbar = new PerfectScrollbar("#alarm", { - suppressScrollY: true, - }); - } - - return () => { } @@ -430,6 +392,7 @@ const Control = ({ dispatch, actions, user, history, loading, socket, pepProject } if (exhibition.current?.overall?.find(v => v.key == 'dynamic')) { + concentration3() } @@ -451,6 +414,33 @@ const Control = ({ dispatch, actions, user, history, loading, socket, pepProject suppressScrollX: true, }); } + const domProject = document.getElementById("news"); + if (domProject) { + newScrollbar = new PerfectScrollbar("#news", { + suppressScrollX: true, + }); + } + const domProject3 = document.getElementById("equipment"); + if (domProject3) { + equipmentScrollbar = new PerfectScrollbar("#equipment", { + suppressScrollX: true, + }); + } + + const domProject4 = document.getElementById("web"); + if (domProject4) { + webScrollbar = new PerfectScrollbar("#web", { + suppressScrollX: true, + }) + } + + + const domProject6 = document.getElementById("alarm"); + if (domProject6) { + alarmScrollbar = new PerfectScrollbar("#alarm", { + suppressScrollY: true, + }); + } }, [pepProjectId, exhibition.current]) useEffect(() => { @@ -459,7 +449,7 @@ const Control = ({ dispatch, actions, user, history, loading, socket, pepProject if (line && news) { news.onscroll = (e) => { e.stopPropagation(); - if ((line.clientHeight - 578) < news.scrollTop + 10) { + if ((line.clientHeight - 565) < news.scrollTop + 10) { setQuery({ ...query, page: query.page + 1 }) if (exhibition?.current?.dynamic?.length > 0) { dispatch(control.getLatestDynamic({ ...query, projectCorrelationId: pepProjectId, page: query.page + 1 })).then(res => { @@ -736,7 +726,7 @@ const Control = ({ dispatch, actions, user, history, loading, socket, pepProject {/* 循环类型 */} - + {exhibition.current['workbench']?.map((item, index) => { return ( pepProjectId && item.name == '关注的项目' ? '' :
@@ -1224,7 +1214,7 @@ const Control = ({ dispatch, actions, user, history, loading, socket, pepProject }} />
-
+
{querydata.current?.map((v, index) => {