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

1.提交更新;

parent db78304c
<template>
<view class="tainer" :style="{ height: containerHeight + 'rpx' }">
<view>
<view class="tainer" :style="{height:containerHeight+'rpx'}">
<view v-if="showReport">
<view class="school-report-header">
<view class="school-report-header-item">
<view class="user-avatar"> </view>
<view class="user-avatar">
</view>
<view class="user-info">
<view class="user-name">
<text>{{ userInfo.userName }}</text>
<text>{{userInfo.userName}}</text>
</view>
<view class="class-name">
<text>{{ userInfo.gradeName }} {{ userInfo.className }}</text>
<text>{{userInfo.gradeName}} {{userInfo.className}}</text>
</view>
</view>
</view>
......@@ -19,22 +19,20 @@
<view class="school-report-screen-item">
<view class="school-report-type">
<picker @change="schoolReportChange" :value="reportTypeIndex" :range="reportTypeArr">
<view class="uni-input">{{
reportTypeArr[reportTypeIndex]
}}</view>
<view class="uni-input">{{reportTypeArr[reportTypeIndex]}}</view>
</picker>
</view>
<view class="triangle"> </view>
<view class="triangle">
</view>
</view>
<view class="school-report-screen-item-two">
<view class="school-report-date">
<picker @change="dataRangeChange" :value="dataRangeIndex" :range="dataRangeArr" range-key="week">
<view class="uni-input">{{
dataRangeArr[dataRangeIndex].weekstr || ""
}}</view>
<view class="uni-input">{{dataRangeArr[dataRangeIndex].weekstr||""}}</view>
</picker>
</view>
<view class="triangle"> </view>
<view class="triangle">
</view>
</view>
</view>
</view>
......@@ -42,112 +40,33 @@
<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 active">
<view class="school-report-context-tab-item-one" :class="tabIndex==1?'active':''" @tap="tabTap(1)">
<text>消费报告</text>
</view>
<!-- <view class="school-report-context-tab-item-one">
<text>门禁报告</text>
</view>
<view class="triangle">
</view>
</view>
<view class="school-report-screen-item-two">
<view class="school-report-date">
<picker @change="dataRangeChange" :value="dataRangeIndex" :range="dataRangeArr"
range-key="week">
<view class="uni-input">{{dataRangeArr[dataRangeIndex].weekstr||""}}</view>
</picker>
</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-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 class="school-report-context-card-one-context-item">
<view class="school-report-context-card-one-context-dot">
......@@ -733,7 +652,7 @@ range-key="week">
</view>
<view v-else class="nodata">
<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 class="nodataTxt">
<text>当前为使用高峰期,请稍后再试</text>
......@@ -741,7 +660,7 @@ range-key="week">
</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>
</view>
</view>
</view>
</template>
......@@ -766,15 +685,17 @@ function getQueryParams(params) {
}
// 时间处理模块
import dayjs from 'dayjs'
import moment from "moment";
export default {
name: 'SchoolReport',
data() {
return {
showReport: true,
nodataImgUrl: this.$ImgUrl,
userInfo: {},
reportTypeIndex: 0,
reportTypeArr: ['月报', '周报'],
dataRangeIndex: 0,
nodataImgUrl: this.$ImgUrl,
dataRangeArr: [{
week: "",
weekstr: "",
......@@ -848,6 +769,11 @@ export default {
}
},
mounted() {
if (this.isPeakPeriod()) {
this.showReport = false;
return
}
this.showReport = true;
if (new Date().getTime() <= new Date('2022/06/30').getTime()) {
this.isAttendanceOpen = true;
this.isPubTalkOpen = true;
......@@ -2142,7 +2068,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.nodata {
position: absolute;
left: 50%;
top: 30%;
top: 0%;
width: 100%;
transform: translate(-50%, 0);
......@@ -2152,10 +2078,10 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
}
.nodataTxt {
margin-top: 10rpx;
margin-top: -100rpx;
display: flex;
justify-content: center;
font-size: 28rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
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