Browse Source

今日预警

master
dengyinhuan 2 years ago
parent
commit
5e1dbe2aef
  1. 7
      web/client/src/sections/patrolManage/containers/yujingguanli.js
  2. 2
      web/client/src/sections/shouye/components/alarm/alarmStatistics.js
  3. 4
      web/client/src/sections/shouye/containers/shouye.js

7
web/client/src/sections/patrolManage/containers/yujingguanli.js

@ -200,12 +200,13 @@ function YujingGuanli (props) {
// } // }
// }) // })
const res = await dispatch(patrolManage.records(`patrolRecord/all/${times[0]}/${times[1]}/true/null`)); const res = await dispatch(patrolManage.records(`patrolRecord/all/${times[0]}/${times[1]}/true/null`));
const data = res?.payload?.data?.filter(i=>{ const data = res?.payload?.data?.filter(i=>{
return i?.patrolRecordIssueHandles[0]?.yanshoucishu>2&&i?.patrolRecordIssueHandles[0]?.isgaojing!==true 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 &&res?.payload?.data?.filter(j=>j?.pointId===i?.pointId&&j?.points?.project?.id===i?.points?.project?.id
&&j?.patrolRecordIssueHandles[0]?.yujingshijian &&j?.patrolRecordIssueHandles[0]?.yujingshijian
&&i?.patrolRecordIssueHandles[0]?.yujingshijian&& &&i?.patrolRecordIssueHandles[0]?.yujingshijian
parseInt(moment(i?.patrolRecordIssueHandles[0].yujingshijian).format('YYYYMMDDHHMMSS'))<parseInt(moment(j?.patrolRecordIssueHandles[0]?.yujingshijian).format('YYYYMMDDHHMMSS')) &&moment(i?.patrolRecordIssueHandles[0].yanshoushijian).valueOf()<moment(j?.patrolRecordIssueHandles[0]?.yanshoushijian).valueOf()
).length===0 ).length===0
}) })
console.log(res,'res') console.log(res,'res')

2
web/client/src/sections/shouye/components/alarm/alarmStatistics.js

@ -50,7 +50,7 @@ class AlarmStatistics extends Component {
}) })
console.log(obj,'obj') console.log(obj,'obj')
this.setState({ this.setState({
alarmList:dd.sort((x,y)=>y.count-x.count) alarmList:dd.sort((x,y)=>y?.count-x?.count)
}) })
} }

4
web/client/src/sections/shouye/containers/shouye.js

@ -132,8 +132,8 @@ const Information = (props) => {
&&shijiandata?.filter(j=>j?.pointId===i?.pointId&&j?.points?.project?.id===i?.points?.project?.id &&shijiandata?.filter(j=>j?.pointId===i?.pointId&&j?.points?.project?.id===i?.points?.project?.id
&&j?.patrolRecordIssueHandles[0]?.yujingshijian &&j?.patrolRecordIssueHandles[0]?.yujingshijian
&&i?.patrolRecordIssueHandles[0]?.yujingshijian&&moment(i?.patrolRecordIssueHandles[0]?.yujingshijian).format &&i?.patrolRecordIssueHandles[0]?.yujingshijian&&moment(i?.patrolRecordIssueHandles[0]?.yujingshijian).format
('YYYYMMDD') === moment().format('YYYYMMDD')&& ('YYYYMMDD') === moment().format('YYYYMMDD')
parseInt(moment(i?.patrolRecordIssueHandles[0].yujingshijian).format('YYYYMMDDHHMMSS'))<parseInt(moment(j?.patrolRecordIssueHandles[0]?.yujingshijian).format('YYYYMMDDHHMMSS')) &&moment(i?.patrolRecordIssueHandles[0].yanshoushijian).valueOf()<moment(j?.patrolRecordIssueHandles[0]?.yanshoushijian).valueOf()
).length===0 ).length===0
}).length}</div> }).length}</div>
</div> </div>

Loading…
Cancel
Save