From 772ddfc92ac6ca334fca5ad38c2a988335e48e1e Mon Sep 17 00:00:00 2001 From: dengyinhuan Date: Thu, 9 Mar 2023 16:41:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E5=8F=91=E5=91=8A=E8=AD=A6=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shouye/components/alarm/alarmStatistics.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/web/client/src/sections/shouye/components/alarm/alarmStatistics.js b/web/client/src/sections/shouye/components/alarm/alarmStatistics.js index 6cc94d1..486ab3d 100644 --- a/web/client/src/sections/shouye/components/alarm/alarmStatistics.js +++ b/web/client/src/sections/shouye/components/alarm/alarmStatistics.js @@ -28,15 +28,11 @@ class AlarmStatistics extends Component { const { patrolManage } = actions const times = [moment().subtract(70, 'years').format(format), moment().format(format)]; const format = 'YYYY-MM-DD HH:mm:ss'; - const res = await dispatch(patrolManage.records(`patrolRecord/all/${times[0]}/${times[1]}/true/null`)); - const data = res?.payload?.data?.filter(i=>{ - return i?.patrolRecordIssueHandles[0]?.yanshoucishu>2&&i?.patrolRecordIssueHandles[0]?.isgaojing!==true - &&res?.payload?.data?.filter(j=>j?.pointId===i?.pointId&&j?.points?.project?.id===i?.points?.project?.id - &&j?.patrolRecordIssueHandles[0]?.yujingshijian - &&i?.patrolRecordIssueHandles[0]?.yujingshijian&& - parseInt(moment(i?.patrolRecordIssueHandles[0].yujingshijian).format('YYYYMMDDHHMMSS')){ + return i?.patrolRecordIssueHandles[0]?.isgaojing===true&&i?.patrolRecordIssueHandles[0]?.yujingafchishu===null + + }) const obj = {}; data.map((i)=>{ if(obj[i.pointId]){ @@ -54,7 +50,7 @@ class AlarmStatistics extends Component { }) console.log(obj,'obj') this.setState({ - alarmList:dd + alarmList:dd.sort((x,y)=>y.count-x.count) }) }