Commit dd47f86d authored by 李智书's avatar 李智书

1.提交更新;

parent db78304c
<template> <template>
<view class="tainer" :style="{ height: containerHeight + 'rpx' }"> <view class="tainer" :style="{height:containerHeight+'rpx'}">
<view>
<view v-if="showReport"> <view v-if="showReport">
<view class="school-report-header"> <view class="school-report-header">
<view class="school-report-header-item"> <view class="school-report-header-item">
<view class="user-avatar"> </view> <view class="user-avatar">
</view>
<view class="user-info"> <view class="user-info">
<view class="user-name"> <view class="user-name">
<text>{{ userInfo.userName }}</text> <text>{{userInfo.userName}}</text>
</view> </view>
<view class="class-name"> <view class="class-name">
<text>{{ userInfo.gradeName }} {{ userInfo.className }}</text> <text>{{userInfo.gradeName}} {{userInfo.className}}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -19,22 +19,20 @@ ...@@ -19,22 +19,20 @@
<view class="school-report-screen-item"> <view class="school-report-screen-item">
<view class="school-report-type"> <view class="school-report-type">
<picker @change="schoolReportChange" :value="reportTypeIndex" :range="reportTypeArr"> <picker @change="schoolReportChange" :value="reportTypeIndex" :range="reportTypeArr">
<view class="uni-input">{{ <view class="uni-input">{{reportTypeArr[reportTypeIndex]}}</view>
reportTypeArr[reportTypeIndex]
}}</view>
</picker> </picker>
</view> </view>
<view class="triangle"> </view> <view class="triangle">
</view>
</view> </view>
<view class="school-report-screen-item-two"> <view class="school-report-screen-item-two">
<view class="school-report-date"> <view class="school-report-date">
<picker @change="dataRangeChange" :value="dataRangeIndex" :range="dataRangeArr" range-key="week"> <picker @change="dataRangeChange" :value="dataRangeIndex" :range="dataRangeArr" range-key="week">
<view class="uni-input">{{ <view class="uni-input">{{dataRangeArr[dataRangeIndex].weekstr||""}}</view>
dataRangeArr[dataRangeIndex].weekstr || ""
}}</view>
</picker> </picker>
</view> </view>
<view class="triangle"> </view> <view class="triangle">
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -42,112 +40,33 @@ ...@@ -42,112 +40,33 @@
<view class="school-report-context"> <view class="school-report-context">
<view class="school-report-context-tab"> <view class="school-report-context-tab">
<view class="school-report-context-tab-item"> <view class="school-report-context-tab-item">
<view class="school-report-context-tab-item-one active"> <view class="school-report-context-tab-item-one" :class="tabIndex==1?'active':''" @tap="tabTap(1)">
<text>消费报告</text> <text>消费报告</text>
</view> </view>
<!-- <view 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>
<text>门禁报告</text> </view>
<view v-if="isPubTalkOpen" class="school-report-context-tab-item-one" :class="tabIndex==3?'active':''" @tap="tabTap(3)">
</view> <text>公话报告</text>
</view>
<view class="triangle"> </view>
<view class="school-report-context-tab-item-two">
</view> <view class="share-button" @tap="shareHandler">
<view class="share-button-img">
</view> </view>
<view class="share-button-txt">
<view class="school-report-screen-item-two"> <text>分享</text>
</view>
<view class="school-report-date"> </view>
</view>
<picker @change="dataRangeChange" :value="dataRangeIndex" :range="dataRangeArr" </view>
<view :class="['consumer-report-bgImg','attendance-report-bgImg','pubTalk-report-bgImg'][tabIndex-1]">
range-key="week"> </view>
<view class="school-report-context-card">
<view class="uni-input">{{dataRangeArr[dataRangeIndex].weekstr||""}}</view> <view class="school-report-context-card-one" :style="{height:[598,256,525][tabIndex-1]+'rpx'}">
<view :class="['consumer-report-img','attendance-report-img','pubTalk-report-img'][tabIndex-1]">
</picker> </view>
<!-- 消费报告 -->
</view>
<view class="triangle">
</view>
</view>
</view>
</view>
</view>
<view class="school-report-context">
<view class="school-report-context-tab">
<view class="school-report-context-tab-item">
<view class="school-report-context-tab-item-one" :class="tabIndex==1?'active':''"
@tap="tabTap(1)">
<text>消费报告</text>
</view>
<view v-if="isAttendanceOpen" class="school-report-context-tab-item-one"
:class="tabIndex==2?'active':''" @tap="tabTap(2)">
<text>门禁报告</text>
</view>
<view v-if="isPubTalkOpen" class="school-report-context-tab-item-one"
:class="tabIndex==3?'active':''" @tap="tabTap(3)">
<text>公话报告</text>
</view>
</view>
<view class="school-report-context-tab-item-two">
<view class="share-button" @tap="shareHandler">
<view class="share-button-img">
</view>
<view class="share-button-txt">
<text>分享</text>
</view>
</view>
</view>
</view>
<view :class="['consumer-report-bgImg','attendance-report-bgImg','pubTalk-report-bgImg'][tabIndex-1]">
</view>
<view class="school-report-context-card">
<view class="school-report-context-card-one" :style="{height:[598,256,525][tabIndex-1]+'rpx'}">
<view :class="['consumer-report-img','attendance-report-img','pubTalk-report-img'][tabIndex-1]">
</view>
<!-- 消费报告 -->
<view v-show="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-item">
<view class="school-report-context-card-one-context-dot"> <view class="school-report-context-card-one-context-dot">
...@@ -733,7 +652,7 @@ range-key="week"> ...@@ -733,7 +652,7 @@ range-key="week">
</view> </view>
<view v-else class="nodata"> <view v-else class="nodata">
<view class="nodataImg"> <view class="nodataImg">
<img style="width: 35vw" :src="nodataImgUrl + 'images/1.png'" /> <img style="width: 100%" src="https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/images/purchaseChart.gif" />
</view> </view>
<view class="nodataTxt"> <view class="nodataTxt">
<text>当前为使用高峰期,请稍后再试</text> <text>当前为使用高峰期,请稍后再试</text>
...@@ -741,7 +660,7 @@ range-key="week"> ...@@ -741,7 +660,7 @@ range-key="week">
</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 class="htmlCanvas" id="htmlCanvas" ref="imgCanvas" v-model="dialogShow" show-cancel-button style="width: 100%; max-height: 80% !important;overflow: scroll">
</van-dialog> </van-dialog>
</view> </view>
</view> </view>
</template> </template>
...@@ -766,15 +685,17 @@ function getQueryParams(params) { ...@@ -766,15 +685,17 @@ function getQueryParams(params) {
} }
// 时间处理模块 // 时间处理模块
import dayjs from 'dayjs' import dayjs from 'dayjs'
import moment from "moment";
export default { export default {
name: 'SchoolReport', name: 'SchoolReport',
data() { data() {
return { return {
showReport: true,
nodataImgUrl: this.$ImgUrl,
userInfo: {}, userInfo: {},
reportTypeIndex: 0, reportTypeIndex: 0,
reportTypeArr: ['月报', '周报'], reportTypeArr: ['月报', '周报'],
dataRangeIndex: 0, dataRangeIndex: 0,
nodataImgUrl: this.$ImgUrl,
dataRangeArr: [{ dataRangeArr: [{
week: "", week: "",
weekstr: "", weekstr: "",
...@@ -848,6 +769,11 @@ export default { ...@@ -848,6 +769,11 @@ export default {
} }
}, },
mounted() { mounted() {
if (this.isPeakPeriod()) {
this.showReport = false;
return
}
this.showReport = true;
if (new Date().getTime() <= new Date('2022/06/30').getTime()) { if (new Date().getTime() <= new Date('2022/06/30').getTime()) {
this.isAttendanceOpen = true; this.isAttendanceOpen = true;
this.isPubTalkOpen = true; this.isPubTalkOpen = true;
...@@ -2142,7 +2068,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -2142,7 +2068,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.nodata { .nodata {
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 30%; top: 0%;
width: 100%; width: 100%;
transform: translate(-50%, 0); transform: translate(-50%, 0);
...@@ -2152,10 +2078,10 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -2152,10 +2078,10 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
} }
.nodataTxt { .nodataTxt {
margin-top: 10rpx; margin-top: -100rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
font-size: 28rpx; font-size: 30rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #999999; color: #999999;
......
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