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

parent 3500e779
......@@ -45,11 +45,11 @@
@tap="tabTap(1)">
<text>消费报告</text>
</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)">
<text>门禁报告</text>
</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)">
<text>公话报告</text>
</view>
......@@ -126,7 +126,8 @@
<view class="attendance-report-context-card-one-context-item">
<text v-if="attendanceReport.abnormalNum"><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>
<!-- 公话报告 -->
......@@ -430,7 +431,8 @@
</view>
<view v-else class="dashed-line-first">
</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 v-else class="attendance-report-dot-first"
:style="{border:item.border}">
......@@ -457,14 +459,16 @@
</view>
<view class="attendance-report-details-img-item">
<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>
</view>
<view class="attendance-report-time-details-icon">
</view>
</view>
<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>
</view>
</view>
......@@ -552,7 +556,7 @@
: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-txt">
<text>最低{{memberInfo.leastAmount}}元/天开通,查看完整{{['消费','门禁','公话'][tabIndex-1]}}报告</text>
<text>最低{{memberInfo.leastAmount||''}}元/天开通,查看完整{{['消费','门禁','公话'][tabIndex-1]}}报告</text>
</view>
<view class="no-open-solution-item">
</view>
......@@ -777,8 +781,8 @@
attendanceDate: '',
abnomalDateList: [],
},
imageDialogShow:false,
imageDialogSrc:'',
imageDialogShow: false,
imageDialogSrc: '',
// 公话报告数据
pubTalkReport: {
// 通话次数
......@@ -798,15 +802,9 @@
// 消费
isOpen: false,
// 门禁
// isAttendanceService: false,
// isAttendanceOpen: false,
isAttendanceService: true,
isAttendanceOpen: true,
isAttendanceOpen: false,
// 公话
// isPubTalkService: false,
// isPubTalkOpen: false,
isPubTalkService: true,
isPubTalkOpen: true,
isPubTalkOpen: false,
flag: 0,
memberInfo: {
leastAmount: '',
......@@ -817,9 +815,13 @@
}
},
mounted() {
// 判断有无公话门禁服务
// this.queryIsDredgeMember(2001);
// this.queryIsDredgeMember(3001);
if (new Date().getTime() <= new Date('2022/06/30').getTime()) {
this.isAttendanceOpen = true;
this.isPubTalkOpen = true;
} else {
this.queryIsDredgeMember(4002);
this.queryIsDredgeMember(4003);
}
// 消费报告
this.queryIsDredgeMember(4001).then(() => {
if (this.isOpen) {
......@@ -827,6 +829,7 @@
if (new Date(this.memberInfo.invalidDate).getTime() <= new Date('2022/06/30')
.getTime()) {
this.isOpen = true;
this.flag = 0;
this.memberInfo.invalidDateStr = '2022年6月30日';
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day');
this.containerHeight = 4200;
......@@ -834,15 +837,10 @@
this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex));
} else {
this.queryIsDredgeMember(4001, 1).then(() => {
if (this.isOpen) {
this.queryStudentConsumerPreference(1).then(e => this
.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this
.reportTypeIndex));
} else {
this.queryStudentConsumerPreference();
this.queryDayConsumerTrend();
}
});
}
})
......@@ -857,14 +855,8 @@
this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex));
} else {
this.queryIsDredgeMember(4001, 1).then(() => {
if (this.isOpen) {
this.queryStudentConsumerPreference(1).then(e => this.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this
.reportTypeIndex));
} else {
this.queryStudentConsumerPreference();
this.queryDayConsumerTrend();
}
});
}
}
......@@ -912,32 +904,114 @@
}
})
} else if (num == 2) {
this.memberInfo.differDay = '';
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);
this.attendanceReprotDatail(this.dataRangeArr[this.dataRangeIndex].startDate)
.then(e => {
if (this.attendanceReportDatail.length) {
this.containerHeight = 2762;
} else {
// this.memberInfo.differDay='';
// this.memberInfo.invalidDateStr='';
// this.memberInfo.leastAmount='';
// this.queryIsDredgeMember(4002).then(() => {
// if (this.isPubTalkOpen) {
// this.$nextTick(() => {
// this.callNumberBarchart();
// this.callDurationBarchart();
// this.leaveMessageBarchart();
// })
// } else {
// this.$nextTick(() => {
// this.callNumberBarchart();
// })
// }
// })
this.getPubTalkReport().then(() => {
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 {
this.memberInfo.differDay = '';
this.memberInfo.invalidDateStr = '';
this.memberInfo.leastAmount = '';
this.queryIsDredgeMember(4002).then(() => {
if (this.isPubTalkOpen) {
if (new Date(this.memberInfo.invalidDate).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.$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();
})
})
});
}
}
})
}
},
toImage: function() {
......@@ -1753,7 +1827,7 @@
})
return
}
this.pubTalkReport = data.data;
this.pubTalkReport = data.data || {};
} catch (e) {
//TODO handle the exception
console.log(e);
......@@ -1823,7 +1897,8 @@
if (tempList.length) {
tempList.forEach(e => {
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)'
})
})
......@@ -1861,12 +1936,6 @@
return
}
switch (serviceItemCode) {
case 2001:
this.isPubTalkService = data.obj.status;
break;
case 3001:
this.isAttendanceService = data.obj.status;
break;
case 4001:
this.isOpen = data.obj.status;
if (!this.isOpen) {
......@@ -1875,23 +1944,13 @@
break;
case 4002:
this.isPubTalkOpen = data.obj.status;
if (this.isPubTalkOpen) {
this.queryMemberValidTime(serviceItemCode);
this.containerHeight = 3290;
} else {
this.queryMemberConsumerAmount(serviceItemCode);
this.containerHeight = 2130;
if (!this.isPubTalkOpen) {
this.flag = 3;
}
break;
case 4003:
this.isAttendanceOpen = data.obj.status;
if (this.isAttendanceOpen) {
this.queryMemberValidTime(serviceItemCode);
this.containerHeight = 2868;
} else {
this.queryMemberConsumerAmount(serviceItemCode);
this.containerHeight = 1944;
if (!this.isAttendanceOpen) {
this.flag = 2;
}
break;
......@@ -1904,7 +1963,24 @@
} else {
this.queryMemberConsumerAmount(serviceItemCode);
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) {
......@@ -2000,9 +2076,9 @@
}
});
},
imageClick:function(src){
this.imageDialogSrc=src;
this.imageDialogShow=true;
imageClick: function(src) {
this.imageDialogSrc = src;
this.imageDialogShow = true;
},
},
}
......@@ -2836,10 +2912,10 @@
.attendance-report-time-item {
color: #F9793F;
margin:0 21rpx 0 15rpx;
margin: 0 21rpx 0 15rpx;
}
.early-champions{
.early-champions {
width: 183rpx;
background: #F7E4BB;
border-radius: 20rpx;
......@@ -2848,13 +2924,14 @@
display: flex;
align-items: center;
.early-champions-img{
.early-champions-img {
width: 32rpx;
height: 29rpx;
background: no-repeat center/100% url(../../static/images/champions.png);
margin-right: 2rpx;
}
.early-champions-txt{
.early-champions-txt {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
......@@ -2913,10 +2990,11 @@
}
}
.image-dialog{
.image-dialog {
width: 620rpx;
height: 800rpx;
image{
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