|
@ -12,6 +12,7 @@ const Information = (props) => { |
|
|
const { patrolManage, issueHandle } = actions |
|
|
const { patrolManage, issueHandle } = actions |
|
|
const [planedata,setplandata] = useState([]) |
|
|
const [planedata,setplandata] = useState([]) |
|
|
const [xunjiandata,setxunjiandata] = useState([]) |
|
|
const [xunjiandata,setxunjiandata] = useState([]) |
|
|
|
|
|
const [shijiandata,setshijiandata] = useState([]) |
|
|
const topdata =[] |
|
|
const topdata =[] |
|
|
const format = 'YYYY-MM-DD HH:mm:ss' |
|
|
const format = 'YYYY-MM-DD HH:mm:ss' |
|
|
const times = [moment().subtract(70, 'years').format(format), moment().format(format)] |
|
|
const times = [moment().subtract(70, 'years').format(format), moment().format(format)] |
|
@ -19,6 +20,7 @@ const Information = (props) => { |
|
|
dispatch(getPatrolPlan()).then(async (res)=>{ |
|
|
dispatch(getPatrolPlan()).then(async (res)=>{ |
|
|
const res2 = await dispatch(patrolManage.records(`patrolRecord/all/${times[0]}/${times[1]}/null/null`)) |
|
|
const res2 = await dispatch(patrolManage.records(`patrolRecord/all/${times[0]}/${times[1]}/null/null`)) |
|
|
console.log(res2,'res2') |
|
|
console.log(res2,'res2') |
|
|
|
|
|
setshijiandata(res2?.payload?.data) |
|
|
setxunjiandata(res2?.payload?.data.filter(i=>parseInt(moment().format('YYYYMMDD'))=== parseInt(moment(i.inspectionTime ).format('YYYYMMDD')))) |
|
|
setxunjiandata(res2?.payload?.data.filter(i=>parseInt(moment().format('YYYYMMDD'))=== parseInt(moment(i.inspectionTime ).format('YYYYMMDD')))) |
|
|
const count = res?.payload?.data?.rows?.filter(i=>{ |
|
|
const count = res?.payload?.data?.rows?.filter(i=>{ |
|
|
// console.log(i?.frequency?.match(/^[0-9]*$/),'jjj')
|
|
|
// console.log(i?.frequency?.match(/^[0-9]*$/),'jjj')
|
|
@ -59,22 +61,21 @@ const Information = (props) => { |
|
|
</div> |
|
|
</div> |
|
|
<div className='shouyetopitem'> |
|
|
<div className='shouyetopitem'> |
|
|
<div className='shouyetopitem-left' > |
|
|
<div className='shouyetopitem-left' > |
|
|
<div>今日巡检</div> |
|
|
<div>今日事件</div> |
|
|
<div>0</div> |
|
|
<div>{xunjiandata.filter(i=>i?.alarm===true).length}</div> |
|
|
</div> |
|
|
</div> |
|
|
<div className='shouyetopitem-right'> |
|
|
<div className='shouyetopitem-right'> |
|
|
<div>完成巡检:2个</div> |
|
|
<div>已处理:个</div> |
|
|
<div>巡检上报:2个</div> |
|
|
<div>未处理:2个</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div className='shouyetopitem'> |
|
|
<div className='shouyetopitem'> |
|
|
<div className='shouyetopitem-left' > |
|
|
<div className='shouyetopitem-left' > |
|
|
<div>今日巡检</div> |
|
|
<div>今日预警</div> |
|
|
<div>0</div> |
|
|
<div>0</div> |
|
|
</div> |
|
|
</div> |
|
|
<div className='shouyetopitem-right'> |
|
|
<div className='shouyetopitem-right'> |
|
|
<div>完成巡检:2个</div> |
|
|
<div>已下发:2个</div> |
|
|
<div>巡检上报:2个</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|