From 2af3714c6d65bf479632c3ec149f90652ba0499a Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Fri, 6 Jan 2023 21:49:06 +0800 Subject: [PATCH] =?UTF-8?q?1.6=20=E7=AC=AC=E5=8D=81=E4=B8=89=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ElecEvaluation/Monitor/Exception/index.tsx | 14 +++++++------- src/pages/ElecEvaluation/Monitor/Home/index.tsx | 3 --- .../ElecEvaluation/Monitor/OpenToday/index.tsx | 8 ++++---- src/pages/ElecEvaluation/Monitor/style.less | 2 +- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/pages/ElecEvaluation/Monitor/Exception/index.tsx b/src/pages/ElecEvaluation/Monitor/Exception/index.tsx index a43fe06..3820875 100644 --- a/src/pages/ElecEvaluation/Monitor/Exception/index.tsx +++ b/src/pages/ElecEvaluation/Monitor/Exception/index.tsx @@ -164,17 +164,17 @@ const MonitorException: React.FC<{}> = () => { const v3 = document.getElementsByClassName("scroll-select-bg")[3]; const v4 = document.getElementsByClassName("scroll-select-bg")[4]; const v5 = document.getElementsByClassName("scroll-select-bg")[5]; - v0.scrollIntoView(false); - v1.scrollIntoView(false); - v2.scrollIntoView(false); - v3.scrollIntoView(false); - v4.scrollIntoView(false); - v5.scrollIntoView(false); + v0?.scrollIntoView(false); + v1?.scrollIntoView(false); + v2?.scrollIntoView(false); + v3?.scrollIntoView(false); + v4?.scrollIntoView(false); + v5?.scrollIntoView(false); count++; } else { count = 0; } - }, 5000) + }, 3000) } return () => { clearInterval(interval); diff --git a/src/pages/ElecEvaluation/Monitor/Home/index.tsx b/src/pages/ElecEvaluation/Monitor/Home/index.tsx index 33e341c..ea67c7a 100644 --- a/src/pages/ElecEvaluation/Monitor/Home/index.tsx +++ b/src/pages/ElecEvaluation/Monitor/Home/index.tsx @@ -473,9 +473,6 @@ export const ScrollTable = (props: { dataSource: any[], columns: any[], rollTime }} // dataSource={tableData} rowClassName={(record, index) => { - if ((selectKey >= (dataSource?.length - 1)) && (index == (dataSource?.length - 1))) {//超过列表长度后锁定最后一条 - return "scroll-select-bg"; - } if (index == selectKey) { return "scroll-select-bg"; //highlight样式需要自己定义 } diff --git a/src/pages/ElecEvaluation/Monitor/OpenToday/index.tsx b/src/pages/ElecEvaluation/Monitor/OpenToday/index.tsx index 67380e0..1ad88b7 100644 --- a/src/pages/ElecEvaluation/Monitor/OpenToday/index.tsx +++ b/src/pages/ElecEvaluation/Monitor/OpenToday/index.tsx @@ -38,7 +38,7 @@ const OpenToday: React.FC<{}> = () => { //权限校验 const auth = useRef(authCheck()); //定时器描述 - const _time = 20000; + const _time = 60000; //初始化字典 let dic: any = getDicData(); let dicData: any = JSON.parse(dic); @@ -245,13 +245,13 @@ const OpenToday: React.FC<{}> = () => { setSelectKey(count); const v0 = document.getElementsByClassName("scroll-select-bg")[0]; const v1 = document.getElementsByClassName("scroll-select-bg")[1]; - v0.scrollIntoView(false); - v1.scrollIntoView(false); + v0?.scrollIntoView(false); + v1?.scrollIntoView(false); count++; } else { count = 0; } - }, 5000) + }, 3000) } return () => { clearInterval(interval); diff --git a/src/pages/ElecEvaluation/Monitor/style.less b/src/pages/ElecEvaluation/Monitor/style.less index 8f2aaea..220ecb2 100644 --- a/src/pages/ElecEvaluation/Monitor/style.less +++ b/src/pages/ElecEvaluation/Monitor/style.less @@ -726,7 +726,7 @@ } .scroll-select-bg { - background: #1b7ef266; + background: #66666666; } }