高峰期进入中转页

parent a73c6a26
......@@ -806,7 +806,7 @@
</view>
</view>
</view>
<view v-else class="nodata">
<view v-else class="nodata" @click="nodataClick">
<view class="nodataImg">
<img style="width: 100%"
src="https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/images/purchaseChart.gif" />
......@@ -942,14 +942,19 @@
},
containerHeight: '',
pubTalkSummaryHeight: 525,
pubTalkNoopenHeight:1260
pubTalkNoopenHeight: 1260,
isnodataClick: false
}
},
mounted() {
// if (this.isPeakPeriod()) {
// this.showReport = false;
// return
// }
this.init()
},
methods: {
init() {
if (this.isPeakPeriod() && !this.isnodataClick) {
this.showReport = false;
return
}
this.showReport = true;
// 有无消费报告入口
if (new Date().getTime() <= new Date('2022/06/30').getTime()) {
......@@ -964,7 +969,8 @@
// 有无进出校、公话入口
this.queryMemberServcieItem().then(() => {
if (this.queryMemberServcieItemList.length) {
this.isAttendanceService = this.queryMemberServcieItemList.indexOf(3002) == -1 ? false : true;
this.isAttendanceService = this.queryMemberServcieItemList.indexOf(3002) == -1 ? false :
true;
this.isPubTalkService = this.queryMemberServcieItemList.indexOf(2002) == -1 ? false : true;
}
})
......@@ -980,7 +986,8 @@
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day') + 1;
this.containerHeight = 4200;
this.queryConsumerSummaryAmount(1).then(e => this.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex));
this.queryDayConsumerTrend(1).then(e => this.linechart(this
.reportTypeIndex));
} else {
this.queryIsDredgeMember(1002, 1).then(() => {
this.queryConsumerSummaryAmount(1).then(e => this
......@@ -1031,23 +1038,24 @@
this.queryNotRepastDetails(this.dataRangeArr[this.dataRangeIndex].startDate, this.dataRangeArr[this
.dataRangeIndex].endDate).then(() => {
if (this.diningSituations.notRepastDetailsDTOS) {
let today = this.diningSituations.notRepastDetailsDTOS.filter(e => e.repastDate === tmpDate)[
let today = this.diningSituations.notRepastDetailsDTOS.filter(e => e.repastDate ===
tmpDate)[
0];
this.diningSituations.notRepastDetails = today;
} else {
this.diningSituations.notRepastDetails = {};
}
});
this.getPubTalkReport(1);
this.getPubTalkReport();
},
methods: {
// 当天6:30 ~ 9:00,11:30 ~ 12:00, 17:30 ~ 19:00属于高峰期
// 当天11:00 ~ 13:00属于高峰期
isPeakPeriod() {
let first = this.timeIn("06:30:00", "09:00:00");
let second = this.timeIn("11:00:00", "12:00:00");
let three = this.timeIn("17:30:00", "19:00:00");
console.log(first, "first", second, "second", three, "three");
return first || second || three;
let first = this.timeIn("11:00:00", "13:00:00");
return first;
},
nodataClick: function() {
this.isnodataClick = true
this.init()
},
/*在某段时间内*/
timeIn(s, e) {
......@@ -1139,23 +1147,21 @@
this.memberInfo.differDay = '';
this.memberInfo.invalidDateStr = '';
this.memberInfo.leastAmount = '';
this.getPubTalkReport().then(() => {
this.queryIsDredgeMember(2002).then(e => {
if (this.isPubTalkOpen) {
this.getPubTalkReport().then(() => {
this.$nextTick(() => {
this.callNumberBarchart();
this.callDurationBarchart();
this.leaveMessageBarchart();
})
})
} else {
this.getPubTalkReport().then(() => {
this.$nextTick(() => {
this.callNumberBarchart();
})
})
}
})
})
}
}
},
......@@ -1972,7 +1978,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
}
},
// 获取公话报告
async getPubTalkReport(num) {
async getPubTalkReport() {
try {
let data = await this.$http.post({
url: gHost +
......@@ -1992,7 +1998,6 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
return
}
this.pubTalkReport = data.data || {};
if (num == 1) {
if (!this.pubTalkReport.talkText5 && !this.pubTalkReport.talkText9) {
this.pubTalkSummaryHeight = 275;
} else if (this.pubTalkReport.talkText5 && !this.pubTalkReport.talkText9) {
......@@ -2000,7 +2005,6 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
} else {
this.pubTalkSummaryHeight = 525;
}
}
} catch (e) {
//TODO handle the exception
console.log(e);
......@@ -2111,13 +2115,13 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
}
switch (serviceItemCode) {
case 1002:
this.isOpen = data.obj.status;
this.isOpen = data.obj && data.obj.status || false;
if (!this.isOpen) {
this.flag = 1;
}
break;
case 2002:
this.isPubTalkOpen = data.obj.status;
this.isPubTalkOpen = data.obj && data.obj.status || false;
if (this.isPubTalkOpen) {
this.queryMemberValidTime(serviceItemCode);
this.containerHeight = 2765 + this.pubTalkSummaryHeight;
......@@ -2125,12 +2129,12 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
} else {
this.queryMemberConsumerAmount(serviceItemCode);
this.containerHeight = 1605 + this.pubTalkSummaryHeight;
this.pubTalkNoopenHeight=735+this.pubTalkSummaryHeight;
this.pubTalkNoopenHeight = 735 + this.pubTalkSummaryHeight;
this.flag = 3;
}
break;
case 3002:
this.isAttendanceOpen = data.obj.status;
this.isAttendanceOpen = data.obj && data.obj.status || false;
if (this.isAttendanceOpen) {
this.queryMemberValidTime(serviceItemCode);
this.containerHeight = 2762;
......@@ -3206,7 +3210,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
color: rgba(0, 0, 0, 0.85);
line-height: 40rpx;
.attendance-report-time-txt{
.attendance-report-time-txt {
width: 56rpx;
}
......@@ -3286,6 +3290,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.attendance-report-details-img-box {
width: 155rpx;
height: 95rpx;
image {
width: 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