|
@ -37,6 +37,7 @@ Page({ |
|
|
}, |
|
|
}, |
|
|
date: '', |
|
|
date: '', |
|
|
show: true, |
|
|
show: true, |
|
|
|
|
|
record:[],//巡检记录
|
|
|
currentPatrolCount: 0, //当月巡检次数
|
|
|
currentPatrolCount: 0, //当月巡检次数
|
|
|
currentRepairCount: 0, //当月维修次数
|
|
|
currentRepairCount: 0, //当月维修次数
|
|
|
// level1Count: 0, //轻微
|
|
|
// level1Count: 0, //轻微
|
|
@ -71,9 +72,19 @@ Page({ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onDateSelect(e) { |
|
|
onDateSelect(e) { |
|
|
|
|
|
const currentDate =moment(e.detail).format('YYYY-MM-DD') |
|
|
|
|
|
const inspectionData = this.data.record.find(item => currentDate == moment(item.inspectionTime).format('YYYY-MM-DD')); |
|
|
|
|
|
if (inspectionData) { |
|
|
wx.navigateTo({ |
|
|
wx.navigateTo({ |
|
|
url: `/package/subSystem/dayPatrolInfo/dayPatrolInfo?day=${moment(e.detail).format('YYYY-MM-DD')}&subType=${this.subType}`, |
|
|
url: `/package/subSystem/dayPatrolInfo/dayPatrolInfo?day=${moment(e.detail).format('YYYY-MM-DD')}&subType=${this.subType}`, |
|
|
}) |
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
wx.showToast({ |
|
|
|
|
|
title: '当天没有巡检记录', |
|
|
|
|
|
icon: 'none', |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -194,6 +205,7 @@ Page({ |
|
|
currentRepairCount: res?.filter(i => i.patrolRecordIssueHandles.length > 0).length || 0, |
|
|
currentRepairCount: res?.filter(i => i.patrolRecordIssueHandles.length > 0).length || 0, |
|
|
currentPatrolCount: res.length, |
|
|
currentPatrolCount: res.length, |
|
|
questions:totalValue, |
|
|
questions:totalValue, |
|
|
|
|
|
record:res, |
|
|
formatter: function (e) { |
|
|
formatter: function (e) { |
|
|
let allRecordsAreClean=false |
|
|
let allRecordsAreClean=false |
|
|
// console.log('filter',filteredData)
|
|
|
// console.log('filter',filteredData)
|
|
|