高峰期进入中转页

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