|
|
@ -29,7 +29,6 @@ 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) |
|
|
|
setxunjiandata(res2?.payload?.data.filter(i => parseInt(moment().format('YYYYMMDD')) === parseInt(moment(i.inspectionTime).format('YYYYMMDD')))) |
|
|
|
let num = 0 |
|
|
@ -63,14 +62,11 @@ const Information = (props) => { |
|
|
|
// &&moment(j.inspectionTim).month()===moment().month()).length<parseInt(i?.frequency?.match(/[\d.]/g).join(''))
|
|
|
|
} |
|
|
|
}) |
|
|
|
console.log(num, 'count') |
|
|
|
setplandata(num) |
|
|
|
console.log(res, 'res') |
|
|
|
|
|
|
|
calcChartData(res2?.payload?.data) |
|
|
|
}) |
|
|
|
}, []) |
|
|
|
console.log(xunjiandata, 'xunjiandata') |
|
|
|
|
|
|
|
const calcChartData = (data) => { |
|
|
|
let arr1 = [], arr2 = [], arr4 = [] |
|
|
|