Commit 46353995 authored by 袁玲利's avatar 袁玲利

报告foreach加判空

parent f05c1e4b
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
<view class="school-report-context"> <view class="school-report-context">
<view class="school-report-context-tab"> <view class="school-report-context-tab">
<view class="school-report-context-tab-item"> <view class="school-report-context-tab-item">
<view v-if="isService" class="school-report-context-tab-item-one" :class="tabIndex==1?'active':''" <view v-if="isService" class="school-report-context-tab-item-one"
@tap="tabTap(1)"> :class="tabIndex==1?'active':''" @tap="tabTap(1)">
<text>消费报告</text> <text>消费报告</text>
</view> </view>
<view v-if="isAttendanceService" class="school-report-context-tab-item-one" <view v-if="isAttendanceService" class="school-report-context-tab-item-one"
...@@ -814,7 +814,7 @@ ...@@ -814,7 +814,7 @@
// 会员信息 // 会员信息
// 消费 // 消费
isOpen: false, isOpen: false,
isService:false, isService: false,
// 出入校 // 出入校
isAttendanceOpen: false, isAttendanceOpen: false,
isAttendanceService: false, isAttendanceService: false,
...@@ -837,8 +837,8 @@ ...@@ -837,8 +837,8 @@
} }
this.showReport = true; this.showReport = true;
if (new Date().getTime() <= new Date('2022/06/30').getTime()) { if (new Date().getTime() <= new Date('2022/06/30').getTime()) {
this.isService=true; this.isService = true;
}else{ } else {
this.queryIsDredgeMember(1001); this.queryIsDredgeMember(1001);
} }
// 有无进出校公话服务 // 有无进出校公话服务
...@@ -1878,12 +1878,14 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -1878,12 +1878,14 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
var tempList = data.data; var tempList = data.data;
if (tempList && tempList.length) { if (tempList && tempList.length) {
tempList.forEach(e => { tempList.forEach(e => {
e.attendDetailReportDTOList.forEach(c => { if (e.attendDetailReportDTOList && e.attendDetailReportDTOList.length) {
c.border = c.describeContent && c e.attendDetailReportDTOList.forEach(c => {
.describeContent != '当日早到冠军' ? c.border = c.describeContent && c
'4rpx solid #F9793F' : .describeContent != '当日早到冠军' ?
'4rpx solid rgba(0, 0, 0, 0.25)' '4rpx solid #F9793F' :
}) '4rpx solid rgba(0, 0, 0, 0.25)'
})
}
}) })
this.attendanceReportDatail = tempList || []; this.attendanceReportDatail = tempList || [];
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment