校园报告—公话报告

parent 2475955f
......@@ -45,12 +45,12 @@
@tap="tabTap(1)">
<text>消费报告</text>
</view>
<view class="school-report-context-tab-item-one" :class="tabIndex==2?'active':''"
@tap="tabTap(2)">
<view v-if="isAttendanceService" class="school-report-context-tab-item-one"
:class="tabIndex==2?'active':''" @tap="tabTap(2)">
<text>门禁报告</text>
</view>
<view class="school-report-context-tab-item-one" :class="tabIndex==3?'active':''"
@tap="tabTap(3)">
<view v-if="isPubTalkService" class="school-report-context-tab-item-one"
:class="tabIndex==3?'active':''" @tap="tabTap(3)">
<text>公话报告</text>
</view>
</view>
......@@ -71,7 +71,7 @@
<view :class="['consumer-report-img','attendance-report-img','pubTalk-report-img'][tabIndex-1]">
</view>
<!-- 消费报告 -->
<view v-if="tabIndex==1" class="school-report-context-card-one-context">
<view v-show="tabIndex==1" class="school-report-context-card-one-context">
<view class="school-report-context-card-one-context-item">
<view class="school-report-context-card-one-context-dot">
<view class="school-report-context-card-one-context-dot-item">
......@@ -122,7 +122,7 @@
</view>
</view>
<!-- 门禁报告 -->
<view v-else-if="tabIndex==2" class="attendance-report-context-card-one-context">
<view v-show="tabIndex==2" class="attendance-report-context-card-one-context">
<view class="attendance-report-context-card-one-context-item">
<text><text class="txt-important">4</text>天出勤异常,请及时关注</text>
<!-- <text>恭喜<text
......@@ -130,42 +130,57 @@
</view>
</view>
<!-- 公话报告 -->
<view v-else class="pubTalk-report-context-card-one-context">
<view class="pubTalk-report-context-card-one-context-item">
<view v-show="tabIndex==3" class="pubTalk-report-context-card-one-context">
<view class="pubTalk-report-context-card-one-context-item" v-if="pubTalkReport.talkText1">
<view class="pubTalk-report-context-card-one-context-dot">
<view class="pubTalk-report-context-card-one-context-dot-item">
</view>
</view>
<view class="pubTalk-report-context-card-one-context-txt">
<text>最喜欢和<text class="txt-important">妈妈</text>沟通,共通话<text class="txt-important">16次
52分钟</text>,超过全校<text class="txt-important">96%</text>的同学</text>
<text>最喜欢和<text class="txt-important">{{pubTalkReport.talkText1}}</text>沟通,共通话<text
class="txt-important">{{pubTalkReport.talkText2}}
{{pubTalkReport.talkText3}}分钟</text>,超过全校<text
class="txt-important">{{pubTalkReport.talkText4}}</text>的同学</text>
</view>
</view>
<view class="pubTalk-report-context-card-one-context-item">
<view class="pubTalk-report-context-card-one-context-item" v-else>
<view class="pubTalk-report-context-card-one-context-dot">
<view class="pubTalk-report-context-card-one-context-dot-item">
</view>
</view>
<view class="pubTalk-report-context-card-one-context-txt">
<text><text class="txt-important">爷爷</text>沟通最少,共通话<text class="txt-important">1次
10分钟</text>,超过全校<text class="txt-important">10%</text>的同学</text>
<text class="txt-important">有事没事记得和家人多联系哦~</text>
</view>
</view>
<view class="pubTalk-report-context-card-one-context-item" v-if="pubTalkReport.talkText5">
<view class="pubTalk-report-context-card-one-context-dot">
<view class="pubTalk-report-context-card-one-context-dot-item">
</view>
</view>
<view class="pubTalk-report-context-card-one-context-txt">
<text><text class="txt-important">{{pubTalkReport.talkText5}}</text>沟通最少,共通话<text
class="txt-important">{{pubTalkReport.talkText6}}
{{pubTalkReport.talkText7}}分钟</text>,超过全校<text
class="txt-important">{{pubTalkReport.talkText8}}</text>的同学</text>
</view>
</view>
<view
class="pubTalk-report-context-card-one-context-item pubTalk-report-context-card-one-context-item-last">
class="pubTalk-report-context-card-one-context-item pubTalk-report-context-card-one-context-item-last"
v-if="pubTalkReport.talkText9">
<view class="pubTalk-report-context-card-one-context-dot">
<view class="pubTalk-report-context-card-one-context-dot-item">
</view>
</view>
<view class="pubTalk-report-context-card-one-context-txt">
<text><text class="txt-important">爸爸</text>是默默的守护,有时也不要忘记多和<text
class="txt-important">爸爸</text>进行交流</text>
<text><text
class="txt-important">{{pubTalkReport.talkText9}}</text>是默默的守护,有时也不要忘记多和<text
class="txt-important">{{pubTalkReport.talkText9}}</text>进行交流</text>
</view>
</view>
</view>
</view>
<!-- 消费报告 -->
<view v-if="tabIndex==1" class="school-report-context-card-two">
<view v-show="tabIndex==1" class="school-report-context-card-two">
<view class="school-report-context-card-title">
<view class="school-report-context-card-title-img">
<text>就餐情况</text>
......@@ -331,7 +346,7 @@
</view>
</view>
<!-- 门禁报告 -->
<view v-if="tabIndex==2" class="attendance-report-context-card-two">
<view v-show="tabIndex==2" class="attendance-report-context-card-two">
<view class="school-report-context-card-title">
<view class="school-report-context-card-title-img">
<text>出勤情况</text>
......@@ -372,7 +387,7 @@
</van-calendar>
</view>
</view>
<view class="attendance-report-context-card-two-details">
<view v-show="tabIndex==2" class="attendance-report-context-card-two-details">
<view class="attendance-report-context-card-two-details-item">
<view class="attendance-report-context-card-two-details-time">
<view class="attendance-report-context-card-two-details-time-img">
......@@ -385,27 +400,81 @@
</view>
</view>
<view class="attendance-report-context-card-two-details-date">
<text>{{diningSituations.diningSituationsDate}}</text>
<text>{{attendanceSituations.attendanceDate}}</text>
</view>
</view>
</view>
<view v-show="tabIndex==2" class="attendance-report-context-card-three">
<view class="dashed-line-first">
</view>
<view class="attendance-report-context-card-three">
<view class="attendance-report-dot">
</view>
<view v-for="(item,index) in tempList">
<view class="dashed-line">
</view>
<view class="attendance-report-dot" :style="{border:item.border}">
</view>
</view>
</view>
<!-- 公话报告 -->
<view class="">
<view v-show="tabIndex==3" class="pubTalk-report-context-card-two">
<view class="school-report-context-card-title">
<view class="school-report-context-card-title-img">
<text>通话次数</text>
</view>
</view>
<view class="call-number-bar-unit">
<text>(次)</text>
</view>
<view id="call-number-bar">
</view>
</view>
<view v-show="tabIndex==3&&this.isPubTalkOpen" class="pubTalk-report-context-card-three">
<view class="school-report-context-card-title">
<view class="school-report-context-card-title-img">
<text>通话时长</text>
</view>
</view>
<view class="call-duration-bar-unit">
<text>(min)</text>
</view>
<view id="call-duration-bar">
</view>
</view>
<view v-show="tabIndex==3&&this.isPubTalkOpen" class="pubTalk-report-context-card-four">
<view class="school-report-context-card-title">
<view class="school-report-context-card-title-img">
<text>亲子留言</text>
</view>
</view>
<view class="leave-message-summary" v-if="pubTalkReport.messageText1">
<text><text class="txt-important">{{pubTalkReport.messageText1}}</text> 最喜欢和你留言,共 <text
class="txt-important">{{pubTalkReport.messageText2}}</text> 次,超过全校<text
class="txt-important">{{pubTalkReport.messageText3}}%</text>的同学</text>
</view>
<view v-if="isOpen" class="school-report-footer">
<view class="leave-message-summary" v-else>
<text class="txt-important">想家人了可以多多留言哦~</text>
</view>
<view class="leave-message-summary leave-message-less-summary"
v-if="pubTalkReport.messageText4">
<text><text class="txt-important">{{pubTalkReport.messageText4}}</text> 留言最少,共 <text
class="txt-important">{{pubTalkReport.messageText5}}</text> 次,超过全校<text
class="txt-important">{{pubTalkReport.messageText6}}%</text>的同学</text>
</view>
<view class="leave-message-bar-unit">
<text>(次)</text>
</view>
<view id="leave-message-bar">
</view>
</view>
<view v-if="isOpen||isPubTalkOpen||isAttendanceOpen" class="school-report-footer">
<view class="school-report-footer-item">
<view class="school-report-footer-item-txt">
<text>到期后将无法查看完整报告</text>
</view>
<view class="school-report-validity">
<text>有效期至<text
class="validity-date">{{[memberInfo.invalidDateStr,'2023年12月31日','2024年12月31日'][tabIndex-1]}}</text>,剩余<text
class="validity-date">{{[memberInfo.differDay,9,10][tabIndex-1]}}天</text></text>
<text>有效期至<text class="validity-date">{{memberInfo.invalidDateStr}}</text>,剩余<text
class="validity-date">{{memberInfo.differDay}}天</text></text>
</view>
</view>
<view class="school-report-footer-item-two">
......@@ -416,10 +485,11 @@
</view>
</view>
</view>
<view v-if="!isOpen" class="no-open" :style="{height:[915,845,891][tabIndex-1]+'rpx'}">
<view v-if="flag==tabIndex" class="no-open"
: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,0.1,0.3][tabIndex-1]}}元/天开通,查看完整{{['消费','门禁','公话'][tabIndex-1]}}报告</text>
<text>最低{{memberInfo.leastAmount}}元/天开通,查看完整{{['消费','门禁','公话'][tabIndex-1]}}报告</text>
</view>
<view class="no-open-solution-item">
</view>
......@@ -638,25 +708,95 @@
consumerTrend: {},
isAbnormal: false,
lineDatas: [],
// 门禁报告数据
attendanceSituations: {
attendanceDate: ''
},
// 公话报告数据
pubTalkReport: {
// 通话次数
callNumberInfoList: [],
// 通话时长
callDurationInfoList: [],
// 亲子留言
leaveMessageInfoList: []
},
// 会员信息
// 消费
isOpen: false,
// 门禁
// isAttendanceService: false,
// isAttendanceOpen: false,
isAttendanceService: true,
isAttendanceOpen: true,
// 公话
// isPubTalkService: false,
// isPubTalkOpen: false,
isPubTalkService: true,
isPubTalkOpen: true,
flag: 0,
memberInfo: {
leastAmount: '',
invalidDateStr: '',
differDay: ''
},
containerHeight: '',
tempList:[{border:'4rpx solid #F9793F'},{border:'4rpx solid rgba(0, 0, 0, 0.25)'},{border:'4rpx solid #F9793F'}]
}
},
mounted() {
// 判断有无公话门禁服务
// this.queryIsDredgeMember(2001);
// this.queryIsDredgeMember(3001);
// 消费报告
this.queryIsDredgeMember(4001).then(() => {
if (this.isOpen) {
this.queryMemberValidTime(4001).then(e => {
if (new Date(this.memberInfo.invalidDate).getTime() <= new Date('2022/06/30')
.getTime()) {
this.isOpen = true;
this.memberInfo.invalidDateStr = '2022年6月30日';
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day');
this.containerHeight = 4200;
this.queryStudentConsumerPreference(1).then(e => this.piechart());
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();
}
});
}
})
} else {
if (new Date().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;
this.queryStudentConsumerPreference(1).then(e => this.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex));
} else {
this.queryIsDredgeMember();
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();
}
});
}
}
});
let tmpArr = []
// 获取时间
for (let i = 0; i <= 11; i++) {
......@@ -675,13 +815,7 @@
this.maxDate = new Date(this.dataRangeArr[this.dataRangeIndex].endDate);
this.diningSituations.diningSituationsRequestDate = this.dataRangeArr[this.dataRangeIndex].startDate;
this.diningSituations.diningSituationsDate = this.formatDate(this.minDate);
if (this.isOpen) {
this.queryStudentConsumerPreference(1).then(e => this.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex));
} else {
this.queryStudentConsumerPreference();
this.queryDayConsumerTrend();
}
this.attendanceSituations.attendanceDate = this.formatDate(this.minDate);
this.queryCampusStudentInfo();
this.queryNotRepastDetails(this.diningSituations.diningSituationsRequestDate, this.diningSituations
.diningSituationsRequestDate, 1);
......@@ -692,6 +826,42 @@
methods: {
tabTap: function(num) {
this.tabIndex = num;
if (num == 1) {
this.$nextTick(() => {
if (this.isOpen) {
this.queryStudentConsumerPreference(1).then(e => this.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this
.reportTypeIndex));
} else {
this.queryStudentConsumerPreference();
this.queryDayConsumerTrend();
}
})
} else if (num == 3) {
// 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.$nextTick(() => {
this.callNumberBarchart();
this.callDurationBarchart();
this.leaveMessageBarchart();
})
})
}
},
toImage: function() {
this.$nextTick(() => {
......@@ -773,6 +943,7 @@
}
this.minDate = new Date(this.dataRangeArr[this.dataRangeIndex].startDate);
this.maxDate = new Date(this.dataRangeArr[this.dataRangeIndex].endDate);
if (this.tabIndex == 1) {
this.diningSituations.diningSituationsDate = this.formatDate(this.minDate);
this.diningSituations.diningSituationsRequestDate = this.dataRangeArr[this.dataRangeIndex]
.startDate;
......@@ -788,6 +959,17 @@
this.queryStudentConsumerPreference();
this.queryDayConsumerTrend();
}
} else if (this.tabIndex == 2) {
this.attendanceSituations.attendanceDate = this.formatDate(this.minDate);
} else {
this.getPubTalkReport().then(() => {
this.$nextTick(() => {
this.callNumberBarchart();
this.callDurationBarchart();
this.leaveMessageBarchart();
})
})
}
},
formatter(day) {
const year = day.date.getFullYear();
......@@ -838,7 +1020,7 @@
this.queryNotRepastDetails(dateStr, dateStr, 1);
},
attendanceDateSelect(date) {
this.attendanceSituations.attendanceDate = this.formatDate(date);
},
piechart: function() {
var myChart = echarts.init(document.getElementById('consumer-preferences-pie'));
......@@ -896,9 +1078,9 @@
},
linechart: function(num) {
var mySize = document.getElementById('consumer-trend-line');
mySize.style.width = window.innerWidth - 20 + 'px';
mySize.style.height = window.innerHeight - 500 + 'px';
var myChart = echarts.init(mySize);
mySize.style.width = 360 + 'px';
mySize.style.height = 260 + 'px';
var myLineChart = echarts.init(mySize);
var xdata = this.lineDatas.map(v => v.name);
var year = this.dataRangeArr[this.dataRangeIndex].startDate.slice(0, 4);
var month = this.dataRangeArr[this.dataRangeIndex].startDate.slice(5, 7);
......@@ -1011,9 +1193,249 @@
}
},
};
option && myChart.setOption(option);
option && myLineChart.setOption(option);
window.addEventListener('resize', function() {
myChart.resize();
myLineChart.resize();
})
},
callNumberBarchart: function() {
var mySize = document.getElementById('call-number-bar');
mySize.style.width = 350 + 'px';
mySize.style.height = 260 + 'px';
var myCallNumberBarchart = echarts.init(mySize);
var xdata = this.pubTalkReport.callNumberInfoList.map(v => v.nickname);
var seriesData = this.pubTalkReport.callNumberInfoList.map(v => v.callNumber);
var option = {
xAxis: {
type: 'category',
data: xdata,
axisLabel: {
show: true,
interval: 0,
textStyle: {
color: 'rgba(0, 0, 0, 0.5)',
fontSize: 12
},
formatter: function(params) {
var newParamsName = "";
var tempParamsName = "";
var paramsNameNumber = params.length;
var provideNumber = 2;
var rowNumber = Math.ceil(paramsNameNumber / provideNumber);
if (paramsNameNumber > provideNumber) {
for (var p = 0; p < rowNumber; p++) {
var tempStr = "";
var start = p * provideNumber;
var end = start + provideNumber;
if (p == rowNumber - 1) {
tempStr = params.substring(start, paramsNameNumber);
} else {
tempStr = params.substring(start, end) + "\n";
}
tempParamsName += tempStr;
}
} else {
tempParamsName = params;
}
if (tempParamsName.length > 9) {
newParamsName = tempParamsName.substring(0, 10) + '...';
} else {
newParamsName = tempParamsName;
}
return newParamsName;
}
}
},
yAxis: {
type: 'value',
min: 0,
max: function(value) {
return Math.ceil(value.max) + 1
},
minInterval: 1
},
series: [{
data: seriesData,
type: 'bar',
itemStyle: {
color: '#FF9523',
barBorderRadius: [5, 5, 0, 0],
},
label: {
show: true,
position: 'top',
color: '#FE931F',
fontSize: '14px',
formatter: (params) => {
return params.value[params.encode.x[0]];
}
},
barWidth: 25
}]
};
option && myCallNumberBarchart.setOption(option);
window.addEventListener('resize', function() {
myCallNumberBarchart.resize();
})
},
callDurationBarchart: function() {
var mySize = document.getElementById('call-duration-bar');
mySize.style.width = 340 + 'px';
mySize.style.height = 260 + 'px';
var myCallDurationBarchart = echarts.init(mySize);
var xdata = this.pubTalkReport.callDurationInfoList.map(v => v.nickname);
var seriesData = this.pubTalkReport.callDurationInfoList.map(v => v.duration);
var option = {
xAxis: {
type: 'category',
data: xdata,
axisLabel: {
show: true,
interval: 0,
textStyle: {
color: 'rgba(0, 0, 0, 0.5)',
fontSize: 12
},
formatter: function(params) {
var newParamsName = "";
var tempParamsName = "";
var paramsNameNumber = params.length;
var provideNumber = 2;
var rowNumber = Math.ceil(paramsNameNumber / provideNumber);
if (paramsNameNumber > provideNumber) {
for (var p = 0; p < rowNumber; p++) {
var tempStr = "";
var start = p * provideNumber;
var end = start + provideNumber;
if (p == rowNumber - 1) {
tempStr = params.substring(start, paramsNameNumber);
} else {
tempStr = params.substring(start, end) + "\n";
}
tempParamsName += tempStr;
}
} else {
tempParamsName = params;
}
if (tempParamsName.length > 9) {
newParamsName = tempParamsName.substring(0, 10) + '...';
} else {
newParamsName = tempParamsName;
}
return newParamsName;
}
}
},
yAxis: {
type: 'value',
min: 0,
max: function(value) {
return Math.ceil(value.max)
},
minInterval: 1
},
series: [{
data: seriesData,
type: 'bar',
itemStyle: {
color: '#D59F00',
barBorderRadius: [5, 5, 0, 0],
},
label: {
show: true,
position: 'top',
color: '#D59F00',
fontSize: '14px',
formatter: (params) => {
return params.value[params.encode.x[0]];
}
},
barWidth: 25
}]
};
option && myCallDurationBarchart.setOption(option);
window.addEventListener('resize', function() {
myCallDurationBarchart.resize();
})
},
leaveMessageBarchart: function() {
var mySize = document.getElementById('leave-message-bar');
mySize.style.width = 350 + 'px';
mySize.style.height = 260 + 'px';
var myLeaveMessageBarchart = echarts.init(mySize);
var xdata = this.pubTalkReport.leaveMessageInfoList.map(v => v.nickname);
var seriesData = this.pubTalkReport.leaveMessageInfoList.map(v => v.leaveMessageNumber);
var option = {
xAxis: {
type: 'category',
data: xdata,
axisLabel: {
show: true,
interval: 0,
textStyle: {
color: 'rgba(0, 0, 0, 0.5)',
fontSize: 12
},
formatter: function(params) {
var newParamsName = "";
var tempParamsName = "";
var paramsNameNumber = params.length;
var provideNumber = 2;
var rowNumber = Math.ceil(paramsNameNumber / provideNumber);
if (paramsNameNumber > provideNumber) {
for (var p = 0; p < rowNumber; p++) {
var tempStr = "";
var start = p * provideNumber;
var end = start + provideNumber;
if (p == rowNumber - 1) {
tempStr = params.substring(start, paramsNameNumber);
} else {
tempStr = params.substring(start, end) + "\n";
}
tempParamsName += tempStr;
}
} else {
tempParamsName = params;
}
if (tempParamsName.length > 9) {
newParamsName = tempParamsName.substring(0, 10) + '...';
} else {
newParamsName = tempParamsName;
}
return newParamsName;
}
}
},
yAxis: {
type: 'value',
min: 0,
max: function(value) {
return Math.ceil(value.max)
},
minInterval: 1
},
series: [{
data: seriesData,
type: 'bar',
itemStyle: {
color: '#00AB6C',
barBorderRadius: [5, 5, 0, 0],
},
label: {
show: true,
position: 'top',
color: '#00AB6C',
fontSize: '14px',
formatter: (params) => {
return params.value[params.encode.x[0]];
}
},
barWidth: 25
}]
};
option && myLeaveMessageBarchart.setOption(option);
window.addEventListener('resize', function() {
myLeaveMessageBarchart.resize();
})
},
// 查询学生信息
......@@ -1230,8 +1652,39 @@
})
}
},
// 是否开通消费报告
async queryIsDredgeMember() {
// 获取公话报告
async getPubTalkReport() {
try {
let data = await this.$http.post({
url: gHost +
'/report-push/vpt-web-report/pubTalkReport/getPubTalkReport'
}, {
schoolId: getQueryParams('schoolId'),
studentId: getQueryParams('userId'),
startDate: this.dataRangeArr[this.dataRangeIndex].startDate,
endDate: this.dataRangeArr[this.dataRangeIndex].endDate,
})
if (data.code != 0) {
uni.showToast({
icon: "none",
mask: true,
title: data.msg
})
return
}
this.pubTalkReport = data.data;
} catch (e) {
//TODO handle the exception
console.log(e);
uni.showToast({
icon: "none",
mask: true,
title: e.message
})
}
},
// 是否开通会员功能
async queryIsDredgeMember(serviceItemCode, num) {
try {
let data = await this.$http.get({
url: gHost +
......@@ -1239,7 +1692,7 @@
}, {
schoolId: getQueryParams('schoolId'),
userId: getQueryParams('userId'),
serviceItemCode: 4001
serviceItemCode
})
if (data.code != 200) {
uni.showToast({
......@@ -1249,13 +1702,52 @@
})
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) {
this.flag = 1;
}
break;
case 4002:
this.isPubTalkOpen = data.obj.status;
if (this.isPubTalkOpen) {
this.queryMemberValidTime(serviceItemCode);
this.containerHeight = 3290;
} else {
this.queryMemberConsumerAmount(serviceItemCode);
this.containerHeight = 2130;
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;
this.flag = 2;
}
break;
}
if (num == 1) {
if (this.isOpen) {
this.queryMemberValidTime();
this.queryMemberValidTime(serviceItemCode);
this.containerHeight = 4200;
this.flag = 0;
} else {
this.queryMemberConsumerAmount();
this.queryMemberConsumerAmount(serviceItemCode);
this.containerHeight = 2340;
this.flag = 1;
}
}
} catch (e) {
//TODO handle the exception
......@@ -1268,7 +1760,7 @@
}
},
// 查询会员消费金额
async queryMemberConsumerAmount() {
async queryMemberConsumerAmount(serviceItemCode) {
try {
let data = await this.$http.get({
url: gHost +
......@@ -1276,7 +1768,7 @@
}, {
schoolId: getQueryParams('schoolId'),
userId: getQueryParams('userId'),
serviceItemCode: 4001
serviceItemCode
})
if (data.code != 200) {
uni.showToast({
......@@ -1298,7 +1790,7 @@
}
},
// 查询会员有效期
async queryMemberValidTime() {
async queryMemberValidTime(serviceItemCode) {
try {
let data = await this.$http.get({
url: gHost +
......@@ -1306,7 +1798,7 @@
}, {
schoolId: getQueryParams('schoolId'),
userId: getQueryParams('userId'),
serviceItemCode: 4001
serviceItemCode
})
if (data.code != 200) {
uni.showToast({
......@@ -1317,6 +1809,7 @@
return
}
this.memberInfo.differDay = data.obj.differDay;
this.memberInfo.invalidDate = data.obj.invalidDate;
let month = data.obj.invalidDate.slice(5, 6) == 0 ? data
.obj.invalidDate.slice(6, 7) : data.obj
.invalidDate.slice(5, 7);
......@@ -1377,17 +1870,25 @@
margin-left: 9rpx;
.user-name {
width: 200rpx;
font-size: 34rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #1B1B1B;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.class-name {
width: 200rpx;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(0, 0, 0, 0.25);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
......@@ -1541,7 +2042,7 @@
background: #E5F8F1;
padding: 0 30rpx;
position: absolute;
top: 654rpx;
top: 650rpx;
box-sizing: border-box;
.school-report-context-card-one {
......@@ -1736,6 +2237,25 @@
.school-report-context-card-two-calendar {
height: 575rpx;
width: 690rpx;
/deep/ .van-calendar__weekdays {
background: #F7FAF8;
}
/deep/ .van-calendar__weekday {
text-align: left;
padding-left: 30rpx;
box-sizing: border-box;
}
/deep/ .van-calendar__weekday:first-of-type {
color: rgba(0, 0, 0, 0.25);
}
/deep/ .van-calendar__weekday:last-of-type {
color: rgba(0, 0, 0, 0.25);
}
/deep/ .van-calendar__month-title {
display: none;
......@@ -1747,11 +2267,17 @@
/deep/ .van-calendar__day {
margin: 0 0 8rpx;
border-radius: 22rpx;
display: flex;
align-items: flex-end;
}
/deep/ .van-calendar__selected-day {
background: rgba(0, 0, 0, .1);
color: #F9793F;
display: flex;
align-items: flex-end;
border-radius: 22rpx;
}
/deep/ .van-calendar__top-info {
......@@ -1761,21 +2287,23 @@
font-weight: 400;
color: #F9793F;
line-height: 28rpx;
margin: 0 0 4rpx;
margin: 12rpx 0 4rpx;
}
/deep/ .notice-day {
color: #F9793F;
background: rgba(249, 121, 63, .1);
border-radius: 8rpx;
border-radius: 22rpx;
width: 88rpx;
height: 88rpx;
margin-left: 10rpx;
margin-right: 10rpx;
display: flex;
align-items: flex-end;
}
}
.school-report-context-card-two-details {
height: 128rpx;
height: 132rpx;
background: no-repeat center/100% url(../../static/images/diningSituations.png);
padding: 55rpx 42rpx 30rpx 29rpx;
box-sizing: border-box;
......@@ -1788,10 +2316,12 @@
.school-report-context-card-two-details-date {
width: 130rpx;
height: 43rpx;
border-radius: 4rpx;
border-radius: 8rpx;
border: 1rpx solid #04B871;
font-size: 28rpx;
font-family: FontName;
font-weight: 700;
font-style: italic;
color: #04B871;
margin-right: 65rpx;
display: flex;
......@@ -1916,6 +2446,7 @@
.attendance-report-context-card-two-calendar {
height: 575rpx;
width: 690rpx;
.mark-green {
color: #04B871;
......@@ -1925,6 +2456,24 @@
color: #F9793F;
}
/deep/ .van-calendar__weekdays {
background: #F7FAF8;
}
/deep/ .van-calendar__weekday {
text-align: left;
padding-left: 30rpx;
box-sizing: border-box;
}
/deep/ .van-calendar__weekday:first-of-type {
color: rgba(0, 0, 0, 0.25);
}
/deep/ .van-calendar__weekday:last-of-type {
color: rgba(0, 0, 0, 0.25);
}
/deep/ .van-calendar__month-title {
display: none;
}
......@@ -1935,11 +2484,17 @@
/deep/ .van-calendar__day {
margin: 0 0 8rpx;
border-radius: 22rpx;
display: flex;
align-items: flex-end;
}
/deep/ .van-calendar__selected-day {
background: rgba(0, 0, 0, .1);
color: #F9793F;
display: flex;
align-items: flex-end;
border-radius: 22rpx;
}
/deep/ .van-calendar__top-info {
......@@ -1949,13 +2504,13 @@
font-weight: 400;
color: #F9793F;
line-height: 28rpx;
margin: 0 0 4rpx;
margin: 12rpx 0 4rpx;
}
/deep/ .late-day {
color: #F9793F;
background: rgba(249, 121, 63, .1);
border-radius: 8rpx;
border-radius: 22rpx;
width: 88rpx;
height: 88rpx;
margin-left: 10rpx;
......@@ -1964,7 +2519,7 @@
/deep/ .leave-day {
color: #04B871;
background: rgba(4, 184, 113, .09);
border-radius: 8rpx;
border-radius: 22rpx;
width: 88rpx;
height: 88rpx;
margin-left: 10rpx;
......@@ -2012,10 +2567,12 @@
.attendance-report-context-card-two-details-date {
width: 130rpx;
height: 43rpx;
border-radius: 4rpx;
border-radius: 8rpx;
border: 1rpx solid #04B871;
font-size: 28rpx;
font-family: FontName;
font-weight: 700;
font-style: italic;
color: #04B871;
display: flex;
justify-content: center;
......@@ -2025,9 +2582,128 @@
}
.attendance-report-context-card-three {
.dashed-line{
height: 742rpx;
background: #F5F7F7;
margin: -40rpx 0 0;
.dashed-line-first {
width: 2rpx;
height: 66rpx;
border: 2rpx dashed rgba(0, 0, 0, 0.25);
border-left: 2rpx dashed rgba(0, 0, 0, .25);
position: relative;
top: -40rpx;
left: 44rpx;
}
.attendance-report-dot {
width: 16rpx;
height: 16rpx;
background: #FFFFFF;
border: 4rpx solid rgba(0, 0, 0, 0.25);
border-radius: 16rpx;
position: relative;
top: -40rpx;
left: 34rpx;
}
.dashed-line {
width: 2rpx;
height: 146rpx;
border-left: 2rpx dashed rgba(0, 0, 0, .25);
position: relative;
left:44rpx;
top:-40rpx;
}
}
.pubTalk-report-context-card-two {
height: 506rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin: 0 0 40rpx;
.call-number-bar-unit {
margin: 0 0 28rpx 28rpx;
height: 33rpx;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.5);
line-height: 33rpx;
}
#call-number-bar {
position: relative;
top: -110rpx;
left: 18rpx;
z-index: 100;
}
}
.pubTalk-report-context-card-three {
height: 537rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin: 0 0 40rpx;
.call-duration-bar-unit {
margin: 0 0 28rpx 28rpx;
height: 33rpx;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.5);
line-height: 33rpx;
}
#call-duration-bar {
position: relative;
top: -88rpx;
left: 28rpx;
z-index: 100;
}
}
.pubTalk-report-context-card-four {
height: 756rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin: 0 0 40rpx;
.leave-message-summary {
height: 90rpx;
margin: 42rpx 36rpx 0;
font-size: 32rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
line-height: 45rpx;
.txt-important {
color: #04B871;
margin: 0 4rpx;
}
&.leave-message-less-summary {
margin: 0 36rpx 0;
}
}
.leave-message-bar-unit {
margin: 43rpx 0 28rpx 28rpx;
height: 33rpx;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.5);
line-height: 33rpx;
}
#leave-message-bar {
position: relative;
top: -116rpx;
left: 18rpx;
z-index: 100;
}
}
......@@ -2299,18 +2975,15 @@
}
// 门禁报告
}
.no-open {
width: 100%;
height: 915rpx;
background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.97) 38%, #FFFFFF 100%);
position: absolute;
top: 1425rpx;
background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.97) 38%, #FFFFFF 100%);
padding: 309rpx 30rpx 63rpx;
box-sizing: border-box;
z-index: 101;
.no-open-solution {
height: 40rpx;
......
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