校园报告—门禁报告公话报告

parent 3500e779
...@@ -45,11 +45,11 @@ ...@@ -45,11 +45,11 @@
@tap="tabTap(1)"> @tap="tabTap(1)">
<text>消费报告</text> <text>消费报告</text>
</view> </view>
<view v-if="isAttendanceService" class="school-report-context-tab-item-one" <view v-if="isAttendanceOpen" class="school-report-context-tab-item-one"
:class="tabIndex==2?'active':''" @tap="tabTap(2)"> :class="tabIndex==2?'active':''" @tap="tabTap(2)">
<text>门禁报告</text> <text>门禁报告</text>
</view> </view>
<view v-if="isPubTalkService" class="school-report-context-tab-item-one" <view v-if="isPubTalkOpen" class="school-report-context-tab-item-one"
:class="tabIndex==3?'active':''" @tap="tabTap(3)"> :class="tabIndex==3?'active':''" @tap="tabTap(3)">
<text>公话报告</text> <text>公话报告</text>
</view> </view>
...@@ -126,7 +126,8 @@ ...@@ -126,7 +126,8 @@
<view class="attendance-report-context-card-one-context-item"> <view class="attendance-report-context-card-one-context-item">
<text v-if="attendanceReport.abnormalNum"><text <text v-if="attendanceReport.abnormalNum"><text
class="txt-important">{{attendanceReport.abnormalNum}}</text>天出勤异常,请及时关注</text> class="txt-important">{{attendanceReport.abnormalNum}}</text>天出勤异常,请及时关注</text>
<text v-else>恭喜<text class="txt-important">{{userInfo.userName}}</text>荣获全勤好学生,风雨无阻上学路</text> <text v-else>恭喜<text
class="txt-important">{{userInfo.userName}}</text>荣获全勤好学生,风雨无阻上学路</text>
</view> </view>
</view> </view>
<!-- 公话报告 --> <!-- 公话报告 -->
...@@ -430,7 +431,8 @@ ...@@ -430,7 +431,8 @@
</view> </view>
<view v-else class="dashed-line-first"> <view v-else class="dashed-line-first">
</view> </view>
<view v-if="index" class="attendance-report-dot" :style="{border:item.border}"> <view v-if="index" class="attendance-report-dot"
:style="{border:item.border}">
</view> </view>
<view v-else class="attendance-report-dot-first" <view v-else class="attendance-report-dot-first"
:style="{border:item.border}"> :style="{border:item.border}">
...@@ -457,14 +459,16 @@ ...@@ -457,14 +459,16 @@
</view> </view>
<view class="attendance-report-details-img-item"> <view class="attendance-report-details-img-item">
<view class="attendance-report-time-details"> <view class="attendance-report-time-details">
<view v-if="item.describeContent!='当日早到冠军'" class="attendance-report-time-details-item"> <view v-if="item.describeContent!='当日早到冠军'"
class="attendance-report-time-details-item">
<text>{{item.describeContent}}</text> <text>{{item.describeContent}}</text>
</view> </view>
<view class="attendance-report-time-details-icon"> <view class="attendance-report-time-details-icon">
</view> </view>
</view> </view>
<view class="attendance-report-details-img-box"> <view class="attendance-report-details-img-box">
<image v-if="item.attendImage" :src="item.attendImage" mode="" @click="imageClick(item.attendImage)"> <image v-if="item.attendImage" :src="item.attendImage" mode=""
@click="imageClick(item.attendImage)">
</image> </image>
</view> </view>
</view> </view>
...@@ -552,7 +556,7 @@ ...@@ -552,7 +556,7 @@
:style="{height:[915,845,891][tabIndex-1]+'rpx',top:[1425,1099,1260][tabIndex-1]+'rpx'}"> :style="{height:[915,845,891][tabIndex-1]+'rpx',top:[1425,1099,1260][tabIndex-1]+'rpx'}">
<view class="no-open-solution" @tap="equityPay"> <view class="no-open-solution" @tap="equityPay">
<view class="no-open-solution-txt"> <view class="no-open-solution-txt">
<text>最低{{memberInfo.leastAmount}}元/天开通,查看完整{{['消费','门禁','公话'][tabIndex-1]}}报告</text> <text>最低{{memberInfo.leastAmount||''}}元/天开通,查看完整{{['消费','门禁','公话'][tabIndex-1]}}报告</text>
</view> </view>
<view class="no-open-solution-item"> <view class="no-open-solution-item">
</view> </view>
...@@ -700,11 +704,11 @@ ...@@ -700,11 +704,11 @@
</view> </view>
</view> </view>
</view> </view>
</view>
<van-dialog class="htmlCanvas" id="htmlCanvas" ref="imgCanvas" v-model="dialogShow" show-cancel-button
style="width: 100%; max-height: 80% !important;overflow: scroll">
</van-dialog>
</view> </view>
<van-dialog class="htmlCanvas" id="htmlCanvas" ref="imgCanvas" v-model="dialogShow" show-cancel-button
style="width: 100%; max-height: 80% !important;overflow: scroll">
</van-dialog>
</view>
</view> </view>
</template> </template>
...@@ -777,8 +781,8 @@ ...@@ -777,8 +781,8 @@
attendanceDate: '', attendanceDate: '',
abnomalDateList: [], abnomalDateList: [],
}, },
imageDialogShow:false, imageDialogShow: false,
imageDialogSrc:'', imageDialogSrc: '',
// 公话报告数据 // 公话报告数据
pubTalkReport: { pubTalkReport: {
// 通话次数 // 通话次数
...@@ -798,15 +802,9 @@ ...@@ -798,15 +802,9 @@
// 消费 // 消费
isOpen: false, isOpen: false,
// 门禁 // 门禁
// isAttendanceService: false, isAttendanceOpen: false,
// isAttendanceOpen: false,
isAttendanceService: true,
isAttendanceOpen: true,
// 公话 // 公话
// isPubTalkService: false, isPubTalkOpen: false,
// isPubTalkOpen: false,
isPubTalkService: true,
isPubTalkOpen: true,
flag: 0, flag: 0,
memberInfo: { memberInfo: {
leastAmount: '', leastAmount: '',
...@@ -817,9 +815,13 @@ ...@@ -817,9 +815,13 @@
} }
}, },
mounted() { mounted() {
// 判断有无公话门禁服务 if (new Date().getTime() <= new Date('2022/06/30').getTime()) {
// this.queryIsDredgeMember(2001); this.isAttendanceOpen = true;
// this.queryIsDredgeMember(3001); this.isPubTalkOpen = true;
} else {
this.queryIsDredgeMember(4002);
this.queryIsDredgeMember(4003);
}
// 消费报告 // 消费报告
this.queryIsDredgeMember(4001).then(() => { this.queryIsDredgeMember(4001).then(() => {
if (this.isOpen) { if (this.isOpen) {
...@@ -827,6 +829,7 @@ ...@@ -827,6 +829,7 @@
if (new Date(this.memberInfo.invalidDate).getTime() <= new Date('2022/06/30') if (new Date(this.memberInfo.invalidDate).getTime() <= new Date('2022/06/30')
.getTime()) { .getTime()) {
this.isOpen = true; this.isOpen = true;
this.flag = 0;
this.memberInfo.invalidDateStr = '2022年6月30日'; this.memberInfo.invalidDateStr = '2022年6月30日';
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day'); this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day');
this.containerHeight = 4200; this.containerHeight = 4200;
...@@ -834,15 +837,10 @@ ...@@ -834,15 +837,10 @@
this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex)); this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex));
} else { } else {
this.queryIsDredgeMember(4001, 1).then(() => { this.queryIsDredgeMember(4001, 1).then(() => {
if (this.isOpen) { this.queryStudentConsumerPreference(1).then(e => this
this.queryStudentConsumerPreference(1).then(e => this .piechart());
.piechart()); this.queryDayConsumerTrend(1).then(e => this.linechart(this
this.queryDayConsumerTrend(1).then(e => this.linechart(this .reportTypeIndex));
.reportTypeIndex));
} else {
this.queryStudentConsumerPreference();
this.queryDayConsumerTrend();
}
}); });
} }
}) })
...@@ -857,14 +855,8 @@ ...@@ -857,14 +855,8 @@
this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex)); this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex));
} else { } else {
this.queryIsDredgeMember(4001, 1).then(() => { this.queryIsDredgeMember(4001, 1).then(() => {
if (this.isOpen) { this.queryStudentConsumerPreference();
this.queryStudentConsumerPreference(1).then(e => this.piechart()); this.queryDayConsumerTrend();
this.queryDayConsumerTrend(1).then(e => this.linechart(this
.reportTypeIndex));
} else {
this.queryStudentConsumerPreference();
this.queryDayConsumerTrend();
}
}); });
} }
} }
...@@ -912,31 +904,113 @@ ...@@ -912,31 +904,113 @@
} }
}) })
} else if (num == 2) { } else if (num == 2) {
this.statisAttendanceAbnormal(); this.memberInfo.differDay = '';
this.attendanceReprotDatail(this.dataRangeArr[this.dataRangeIndex].startDate); this.memberInfo.invalidDateStr = '';
this.memberInfo.leastAmount = '';
this.queryIsDredgeMember(4003).then(() => {
if (this.isAttendanceOpen) {
if (new Date(this.memberInfo.invalidDate).getTime() <= new Date('2022/06/30')
.getTime()) {
this.isAttendanceOpen = true;
this.flag = 0;
this.memberInfo.invalidDateStr = '2022年6月30日';
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day');
this.statisAttendanceAbnormal();
this.attendanceReprotDatail(this.dataRangeArr[this.dataRangeIndex].startDate)
.then(e => {
if (this.attendanceReportDatail.length) {
this.containerHeight = 2762;
} else {
this.containerHeight = 1904;
}
});
} else {
this.queryIsDredgeMember(4003, 2);
this.statisAttendanceAbnormal();
this.attendanceReprotDatail(this.dataRangeArr[this.dataRangeIndex].startDate)
.then(e => {
if (this.attendanceReportDatail.length) {
this.containerHeight = 2762;
} else {
this.containerHeight = 1904;
}
});
}
} else {
if (new Date().getTime() <= new Date('2022/06/30').getTime()) {
this.isAttendanceOpen = true;
this.flag = 0;
this.memberInfo.invalidDateStr = '2022年6月30日';
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day');
this.statisAttendanceAbnormal();
this.attendanceReprotDatail(this.dataRangeArr[this.dataRangeIndex].startDate)
.then(e => {
if (this.attendanceReportDatail.length) {
this.containerHeight = 2762;
} else {
this.containerHeight = 1904;
}
});
} else {
this.queryIsDredgeMember(4003, 2);
}
}
})
} else { } else {
// this.memberInfo.differDay=''; this.memberInfo.differDay = '';
// this.memberInfo.invalidDateStr=''; this.memberInfo.invalidDateStr = '';
// this.memberInfo.leastAmount=''; this.memberInfo.leastAmount = '';
// this.queryIsDredgeMember(4002).then(() => { this.queryIsDredgeMember(4002).then(() => {
// if (this.isPubTalkOpen) { if (this.isPubTalkOpen) {
// this.$nextTick(() => { if (new Date(this.memberInfo.invalidDate).getTime() <= new Date('2022/06/30')
// this.callNumberBarchart(); .getTime()) {
// this.callDurationBarchart(); this.isPubTalkOpen = true;
// this.leaveMessageBarchart(); this.flag = 0;
// }) this.memberInfo.invalidDateStr = '2022年6月30日';
// } else { this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day');
// this.$nextTick(() => { this.containerHeight = 3290;
// this.callNumberBarchart(); this.getPubTalkReport().then(e => {
// }) this.$nextTick(() => {
// } this.callNumberBarchart();
// }) this.callDurationBarchart();
this.getPubTalkReport().then(() => { this.leaveMessageBarchart();
this.$nextTick(() => { })
this.callNumberBarchart(); })
this.callDurationBarchart(); } else {
this.leaveMessageBarchart(); this.queryIsDredgeMember(4002, 3).then(() => {
}) this.$nextTick(() => {
this.callNumberBarchart();
this.callDurationBarchart();
this.leaveMessageBarchart();
})
});
}
} else {
if (new Date().getTime() <= new Date('2022/06/30').getTime()) {
this.isPubTalkOpen = true;
this.flag = 0;
this.memberInfo.invalidDateStr = '2022年6月30日';
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day');
this.containerHeight = 3290;
this.getPubTalkReport().then(e => {
this.$nextTick(() => {
this.callNumberBarchart();
this.callDurationBarchart();
this.leaveMessageBarchart();
})
})
} else {
this.queryIsDredgeMember(4002, 3).then(() => {
this.queryStudentConsumerPreference();
this.queryDayConsumerTrend();
this.getPubTalkReport().then(e => {
this.$nextTick(() => {
this.callNumberBarchart();
})
})
});
}
}
}) })
} }
}, },
...@@ -1753,7 +1827,7 @@ ...@@ -1753,7 +1827,7 @@
}) })
return return
} }
this.pubTalkReport = data.data; this.pubTalkReport = data.data || {};
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception
console.log(e); console.log(e);
...@@ -1823,7 +1897,8 @@ ...@@ -1823,7 +1897,8 @@
if (tempList.length) { if (tempList.length) {
tempList.forEach(e => { tempList.forEach(e => {
e.attendDetailReportDTOList.forEach(c => { e.attendDetailReportDTOList.forEach(c => {
c.border = c.describeContent&&c.describeContent!='当日早到冠军' ? '4rpx solid #F9793F' : c.border = c.describeContent && c.describeContent != '当日早到冠军' ?
'4rpx solid #F9793F' :
'4rpx solid rgba(0, 0, 0, 0.25)' '4rpx solid rgba(0, 0, 0, 0.25)'
}) })
}) })
...@@ -1861,12 +1936,6 @@ ...@@ -1861,12 +1936,6 @@
return return
} }
switch (serviceItemCode) { switch (serviceItemCode) {
case 2001:
this.isPubTalkService = data.obj.status;
break;
case 3001:
this.isAttendanceService = data.obj.status;
break;
case 4001: case 4001:
this.isOpen = data.obj.status; this.isOpen = data.obj.status;
if (!this.isOpen) { if (!this.isOpen) {
...@@ -1875,23 +1944,13 @@ ...@@ -1875,23 +1944,13 @@
break; break;
case 4002: case 4002:
this.isPubTalkOpen = data.obj.status; this.isPubTalkOpen = data.obj.status;
if (this.isPubTalkOpen) { if (!this.isPubTalkOpen) {
this.queryMemberValidTime(serviceItemCode);
this.containerHeight = 3290;
} else {
this.queryMemberConsumerAmount(serviceItemCode);
this.containerHeight = 2130;
this.flag = 3; this.flag = 3;
} }
break; break;
case 4003: case 4003:
this.isAttendanceOpen = data.obj.status; this.isAttendanceOpen = data.obj.status;
if (this.isAttendanceOpen) { if (!this.isAttendanceOpen) {
this.queryMemberValidTime(serviceItemCode);
this.containerHeight = 2868;
} else {
this.queryMemberConsumerAmount(serviceItemCode);
this.containerHeight = 1944;
this.flag = 2; this.flag = 2;
} }
break; break;
...@@ -1904,7 +1963,24 @@ ...@@ -1904,7 +1963,24 @@
} else { } else {
this.queryMemberConsumerAmount(serviceItemCode); this.queryMemberConsumerAmount(serviceItemCode);
this.containerHeight = 2340; this.containerHeight = 2340;
this.flag = 1; }
} else if (num == 2) {
if (this.isAttendanceOpen) {
this.queryMemberValidTime(serviceItemCode);
this.containerHeight = 2762;
this.flag = 0;
} else {
this.queryMemberConsumerAmount(serviceItemCode);
this.containerHeight = 1944;
}
} else if (num == 3) {
if (this.isPubTalkOpen) {
this.queryMemberValidTime(serviceItemCode);
this.containerHeight = 3290;
this.flag = 0;
} else {
this.queryMemberConsumerAmount(serviceItemCode);
this.containerHeight = 2130;
} }
} }
} catch (e) { } catch (e) {
...@@ -2000,9 +2076,9 @@ ...@@ -2000,9 +2076,9 @@
} }
}); });
}, },
imageClick:function(src){ imageClick: function(src) {
this.imageDialogSrc=src; this.imageDialogSrc = src;
this.imageDialogShow=true; this.imageDialogShow = true;
}, },
}, },
} }
...@@ -2765,7 +2841,7 @@ ...@@ -2765,7 +2841,7 @@
margin: -40rpx 0 0; margin: -40rpx 0 0;
position: relative; position: relative;
border-radius: 0 0 16rpx 16rpx; border-radius: 0 0 16rpx 16rpx;
.attendance-report-details { .attendance-report-details {
width: 572rpx; width: 572rpx;
height: 168rpx; height: 168rpx;
...@@ -2836,10 +2912,10 @@ ...@@ -2836,10 +2912,10 @@
.attendance-report-time-item { .attendance-report-time-item {
color: #F9793F; color: #F9793F;
margin:0 21rpx 0 15rpx; margin: 0 21rpx 0 15rpx;
} }
.early-champions{ .early-champions {
width: 183rpx; width: 183rpx;
background: #F7E4BB; background: #F7E4BB;
border-radius: 20rpx; border-radius: 20rpx;
...@@ -2847,14 +2923,15 @@ ...@@ -2847,14 +2923,15 @@
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
.early-champions-img{ .early-champions-img {
width: 32rpx; width: 32rpx;
height: 29rpx; height: 29rpx;
background: no-repeat center/100% url(../../static/images/champions.png); background: no-repeat center/100% url(../../static/images/champions.png);
margin-right: 2rpx; margin-right: 2rpx;
} }
.early-champions-txt{
.early-champions-txt {
font-size: 24rpx; font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
...@@ -2912,11 +2989,12 @@ ...@@ -2912,11 +2989,12 @@
} }
} }
} }
.image-dialog{ .image-dialog {
width: 620rpx; width: 620rpx;
height: 800rpx; height: 800rpx;
image{
image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
......
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