From 2a85ea7a57b1c9a9aa8ddef71b764286184e56cb Mon Sep 17 00:00:00 2001 From: wenlele Date: Thu, 26 Oct 2023 16:52:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sections/control/containers/control.jsx | 72 ++++++++----------- 1 file changed, 31 insertions(+), 41 deletions(-) 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) => {