diff --git a/web/client/src/sections/control/containers/control.jsx b/web/client/src/sections/control/containers/control.jsx index 4f6f71b..81d9d68 100644 --- a/web/client/src/sections/control/containers/control.jsx +++ b/web/client/src/sections/control/containers/control.jsx @@ -100,6 +100,50 @@ const Control = (props) => { }) } concentration2() + + const domProject = document.getElementById("news"); + if (domProject) { + newScrollbar = new PerfectScrollbar("#news", { + suppressScrollX: true, + }); + } + + const domProject2 = document.getElementById("member"); + if (domProject2) { + memberScrollbar = new PerfectScrollbar("#member", { + 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 () => { } @@ -271,6 +315,25 @@ const Control = (props) => { } } concentration3() + + const domProject1 = document.getElementById("overviewCalc"); + if (domProject1) { + overviewScrollbar = new PerfectScrollbar("#overviewCalc", { + suppressScrollY: true, + }); + } + const pomsList = document.getElementById("pomsList"); + if (pomsList) { + pomsListScrollbar = new PerfectScrollbar("#pomsList", { + suppressScrollX: true, + }); + } + const domProject5 = document.getElementById("problems"); + if (domProject5) { + problemsScrollbar = new PerfectScrollbar("#problems", { + suppressScrollX: true, + }); + } }, [pepProjectId, exhibition.current]) useEffect(() => { @@ -342,9 +405,9 @@ const Control = (props) => { const domProject = document.getElementById("news"); if (domProject) { - newScrollbar = new PerfectScrollbar("#news", { - suppressScrollX: true, - }); + // newScrollbar = new PerfectScrollbar("#news", { + // suppressScrollX: true, + // }); if (domProject && newScrollbar) { newScrollbar.update(); } @@ -352,19 +415,19 @@ const Control = (props) => { const pomsList = document.getElementById("pomsList"); if (pomsList) { - pomsListScrollbar = new PerfectScrollbar("#pomsList", { - suppressScrollX: true, - }); + // pomsListScrollbar = new PerfectScrollbar("#pomsList", { + // suppressScrollX: true, + // }); if (pomsList && pomsListScrollbar) { pomsListScrollbar.update(); } } - const domProject1 = document.getElementById("overview"); + const domProject1 = document.getElementById("overviewCalc"); if (domProject1) { - overviewScrollbar = new PerfectScrollbar("#overview", { - suppressScrollY: true, - }); + // overviewScrollbar = new PerfectScrollbar("#overviewCalc", { + // suppressScrollY: true, + // }); if (domProject1 && overviewScrollbar) { overviewScrollbar.update(); } @@ -372,9 +435,9 @@ const Control = (props) => { const domProject2 = document.getElementById("member"); if (domProject2) { - memberScrollbar = new PerfectScrollbar("#member", { - suppressScrollX: true, - }); + // memberScrollbar = new PerfectScrollbar("#member", { + // suppressScrollX: true, + // }); if (domProject2 && memberScrollbar) { memberScrollbar.update(); } @@ -382,9 +445,9 @@ const Control = (props) => { const domProject3 = document.getElementById("equipment"); if (domProject3) { - equipmentScrollbar = new PerfectScrollbar("#equipment", { - suppressScrollX: true, - }); + // equipmentScrollbar = new PerfectScrollbar("#equipment", { + // suppressScrollX: true, + // }); if (domProject3 && equipmentScrollbar) { equipmentScrollbar.update(); } @@ -392,9 +455,9 @@ const Control = (props) => { const domProject4 = document.getElementById("web"); if (domProject4) { - webScrollbar = new PerfectScrollbar("#web", { - suppressScrollX: true, - }) + // webScrollbar = new PerfectScrollbar("#web", { + // suppressScrollX: true, + // }) if (domProject4 && webScrollbar) { webScrollbar.update(); } @@ -402,9 +465,9 @@ const Control = (props) => { const domProject5 = document.getElementById("problems"); if (domProject5) { - problemsScrollbar = new PerfectScrollbar("#problems", { - suppressScrollX: true, - }); + // problemsScrollbar = new PerfectScrollbar("#problems", { + // suppressScrollX: true, + // }); if (domProject5 && problemsScrollbar) { problemsScrollbar.update(); } @@ -412,9 +475,9 @@ const Control = (props) => { const domProject6 = document.getElementById("alarm"); if (domProject6) { - alarmScrollbar = new PerfectScrollbar("#alarm", { - suppressScrollY: true, - }); + // alarmScrollbar = new PerfectScrollbar("#alarm", { + // suppressScrollY: true, + // }); if (domProject6 && alarmScrollbar) { alarmScrollbar.update(); } @@ -634,7 +697,8 @@ const Control = (props) => { {/* 统计概览 */} - {exhibition.current?.overall?.find(v => v.key == 'statistical') ? <> + { + exhibition.current?.overall?.find(v => v.key == 'statistical') ? <>