|
@ -202,15 +202,13 @@ Page({ |
|
|
const data1=Object.entries(levelCounts).map(([name, value]) => ({ name, value })); |
|
|
const data1=Object.entries(levelCounts).map(([name, value]) => ({ name, value })); |
|
|
const totalValue = data1.reduce((accumulator, item) => accumulator + item.value, 0); |
|
|
const totalValue = data1.reduce((accumulator, item) => accumulator + item.value, 0); |
|
|
that.setData({ |
|
|
that.setData({ |
|
|
currentRepairCount: res?.filter(i => i.patrolRecordIssueHandles.length > 0).length || 0, |
|
|
currentRepairCount: res?.filter(i => i.patrolRecordIssueHandles.length > 0?i.patrolRecordIssueHandles[0].state===6:[]).length || 0, |
|
|
currentPatrolCount: res.length, |
|
|
currentPatrolCount: res.length, |
|
|
questions:totalValue, |
|
|
questions:totalValue, |
|
|
record:res, |
|
|
record:res, |
|
|
formatter: function (e) { |
|
|
formatter: function (e) { |
|
|
let allRecordsAreClean=false |
|
|
|
|
|
// console.log('filter',filteredData)
|
|
|
|
|
|
const currentDate = moment(e.date).format('YYYY-MM-DD'); |
|
|
const currentDate = moment(e.date).format('YYYY-MM-DD'); |
|
|
const rs= filteredData.filter(item=>currentDate===moment(item.inspectionTime).format('YYYY-MM-DD')) |
|
|
const rs= res.filter(item=> currentDate===moment(item.inspectionTime).format('YYYY-MM-DD') ) |
|
|
if(rs&&rs.length){ |
|
|
if(rs&&rs.length){ |
|
|
if(rs.some(item=>item.patrolRecordIssueHandles.length>0)){ |
|
|
if(rs.some(item=>item.patrolRecordIssueHandles.length>0)){ |
|
|
e.bottomInfo = '.'; |
|
|
e.bottomInfo = '.'; |
|
|