CODE 1 year ago
parent
commit
a309698eea
  1. 18
      weapp/package/subSystem/subSystem.js
  2. 4
      weapp/pages/home/home.wxml
  3. 2
      weapp/pages/home/home.wxss

18
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)

4
weapp/pages/home/home.wxml

@ -5,7 +5,7 @@
<swiper class="home-swiper" indicator-dots="true" autoplay="{{true}}" interval="{{2000}}" duration="{{500}}">
<block wx:for-items="{{swiperData}}" wx:key="*this">
<swiper-item>
<image src="{{item.imgurl}}" class="slide-image" />
<image src="{{item.imgurl}}" mode="aspectFill"/>
</swiper-item>
</block>
</swiper>
@ -73,5 +73,5 @@
</view>
</view>
<view></view>
</view>

2
weapp/pages/home/home.wxss

@ -62,7 +62,7 @@
.slide-image {
/* background: 100% 100% */
background-size:cover;
/* background-size:cover; */
}
.fontStyle {
width: 18px;

Loading…
Cancel
Save