|
|
@ -29,8 +29,8 @@ const Information = (props) => { |
|
|
|
useEffect(()=>{ |
|
|
|
dispatch(getPatrolPlan()).then(async (res)=>{ |
|
|
|
const res2 = await dispatch(patrolManage.records(`patrolRecord/all/${times[0]}/${times[1]}/null/null`)) |
|
|
|
console.log(res2,'res2') |
|
|
|
setshijiandata(res2?.payload?.data) |
|
|
|
console.log(res2,'res2') |
|
|
|
setshijiandata(res2?.payload?.data) |
|
|
|
setxunjiandata(res2?.payload?.data.filter(i=>parseInt(moment().format('YYYYMMDD'))=== parseInt(moment(i.inspectionTime ).format('YYYYMMDD')))) |
|
|
|
const count = res?.payload?.data?.rows?.filter(i=>{ |
|
|
|
// console.log(i?.frequency?.match(/^[0-9]*$/),'jjj')
|
|
|
@ -75,38 +75,40 @@ const Information = (props) => { |
|
|
|
|
|
|
|
return ( |
|
|
|
<> |
|
|
|
<div className='shouyetop'> |
|
|
|
<div className='shouyetopitem'> |
|
|
|
<div className='shouyetopitem-left' > |
|
|
|
<div>今日巡检</div> |
|
|
|
<div>{planedata.length}</div> |
|
|
|
</div> |
|
|
|
<div className='shouyetopitem-right'> |
|
|
|
<div>完成巡检:{xunjiandata.length}个</div> |
|
|
|
<div>巡检上报:{xunjiandata.filter(i=>i?.alarm===true).length}个</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className='shouyetopitem'> |
|
|
|
<div className='shouyetopitem-left' > |
|
|
|
<div>今日事件</div> |
|
|
|
<div>{xunjiandata.filter(i=>i?.alarm===true).length}</div> |
|
|
|
</div> |
|
|
|
<div className='shouyetopitem-right'> |
|
|
|
<div>已处理:个</div> |
|
|
|
<div>未处理:2个</div> |
|
|
|
<div className='shouyetop'> |
|
|
|
<div className='shouyetopitem'> |
|
|
|
<div className='shouyetopitem-left' > |
|
|
|
<div>今日巡检</div> |
|
|
|
<div>{planedata.length}</div> |
|
|
|
</div> |
|
|
|
<div className='shouyetopitem-right'> |
|
|
|
<div>完成巡检:{xunjiandata.length}个</div> |
|
|
|
<div>巡检上报:{xunjiandata.filter(i=>i?.alarm===true).length}个</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className='shouyetopitem'> |
|
|
|
<div className='shouyetopitem-left' > |
|
|
|
<div>今日预警</div> |
|
|
|
<div>0</div> |
|
|
|
<div className='shouyetopitem'> |
|
|
|
<div className='shouyetopitem-left' > |
|
|
|
<div>今日事件</div> |
|
|
|
<div>{xunjiandata.filter(i=>i?.alarm===true).length}</div> |
|
|
|
</div> |
|
|
|
<div className='shouyetopitem-right'> |
|
|
|
<div>已处理:{shijiandata.filter(i => i?.patrolRecordIssueHandles[0]?.yanshoushijian && parseInt(moment(i?.patrolRecordIssueHandles[0]?.yanshoushijian).format('YYYYMMDD')) === parseInt(moment().format('YYYYMMDD'))).length}个</div> |
|
|
|
<div>未处理:{shijiandata.filter(i => i?.alarm === true && i?.patrolRecordIssueHandles[0]?.state === 1).length}个</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className='shouyetopitem-right'> |
|
|
|
<div>已下发:2个</div> |
|
|
|
<div className='shouyetopitem'> |
|
|
|
<div className='shouyetopitem-left' > |
|
|
|
<div>今日预警</div> |
|
|
|
<div>{shijiandata.filter(i => i?.alarm === true && i?.patrolRecordIssueHandles[0]?.yujingshijian && moment(i?.patrolRecordIssueHandles[0]?.yujingshijian).format |
|
|
|
('YYYYMMDD') === moment().format('YYYYMMDD') && i?.patrolRecordIssueHandles[0]?.isgaojing !== true).length}</div> |
|
|
|
</div> |
|
|
|
<div className='shouyetopitem-right'> |
|
|
|
<div>已下发:{shijiandata.filter(i => i?.alarm === true && i?.patrolRecordIssueHandles[0]?.yujingshijian && moment(i?.patrolRecordIssueHandles[0]?.yujingshijian).format |
|
|
|
('YYYYMMDD') === moment().format('YYYYMMDD') && i?.patrolRecordIssueHandles[0]?.isgaojing === true).length}个</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<Card className='shouye-chart-card'> |
|
|
|
<Card className='shouye-chart-card'> |
|
|
|
<div style={{ display: 'flex', justifyContent: 'space-between' }}> |
|
|
|
<div style={{ width: '45%' }}> |
|
|
|
<XColumn |
|
|
|