diff --git a/weapp/package/subSystem/subSystem.js b/weapp/package/subSystem/subSystem.js
index b553893..efd1a1a 100644
--- a/weapp/package/subSystem/subSystem.js
+++ b/weapp/package/subSystem/subSystem.js
@@ -37,6 +37,7 @@ Page({
},
date: '',
show: true,
+ record:[],//巡检记录
currentPatrolCount: 0, //当月巡检次数
currentRepairCount: 0, //当月维修次数
// level1Count: 0, //轻微
@@ -71,9 +72,19 @@ Page({
},
onDateSelect(e) {
- wx.navigateTo({
- url: `/package/subSystem/dayPatrolInfo/dayPatrolInfo?day=${moment(e.detail).format('YYYY-MM-DD')}&subType=${this.subType}`,
- })
+ 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({
+ 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,
currentPatrolCount: res.length,
questions:totalValue,
+ record:res,
formatter: function (e) {
let allRecordsAreClean=false
// console.log('filter',filteredData)
diff --git a/weapp/pages/home/home.wxml b/weapp/pages/home/home.wxml
index a26db33..e35948c 100644
--- a/weapp/pages/home/home.wxml
+++ b/weapp/pages/home/home.wxml
@@ -5,7 +5,7 @@
-
+
@@ -73,5 +73,5 @@
-
+
\ No newline at end of file
diff --git a/weapp/pages/home/home.wxss b/weapp/pages/home/home.wxss
index 087286f..ab8d117 100644
--- a/weapp/pages/home/home.wxss
+++ b/weapp/pages/home/home.wxss
@@ -62,7 +62,7 @@
.slide-image {
/* background: 100% 100% */
- background-size:cover;
+ /* background-size:cover; */
}
.fontStyle {
width: 18px;