Commit d886b04b authored by 袁玲利's avatar 袁玲利

校园报告高峰期判断

parent 50f300b6
This source diff could not be displayed because it is too large. You can view the blob instead.
<template> <template>
<view class="tainer" :style="{height:containerHeight+'rpx'}"> <view class="tainer" :style="{ height: containerHeight + 'rpx' }">
<view> <view>
<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 class="user-avatar"> </view>
</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>
...@@ -18,22 +18,32 @@ ...@@ -18,22 +18,32 @@
<view class="school-report-screen"> <view class="school-report-screen">
<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
<view class="uni-input">{{reportTypeArr[reportTypeIndex]}}</view> @change="schoolReportChange"
:value="reportTypeIndex"
:range="reportTypeArr"
>
<view class="uni-input">{{
reportTypeArr[reportTypeIndex]
}}</view>
</picker> </picker>
</view> </view>
<view class="triangle"> <view class="triangle"> </view>
</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" <picker
range-key="week"> @change="dataRangeChange"
<view class="uni-input">{{dataRangeArr[dataRangeIndex].weekstr||""}}</view> :value="dataRangeIndex"
:range="dataRangeArr"
range-key="week"
>
<view class="uni-input">{{
dataRangeArr[dataRangeIndex].weekstr || ""
}}</view>
</picker> </picker>
</view> </view>
<view class="triangle"> <view class="triangle"> </view>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -53,66 +63,102 @@ ...@@ -53,66 +63,102 @@
</view> </view>
<view class="school-report-context-tab-item-two"> <view class="school-report-context-tab-item-two">
<view class="share-button" @tap="shareHandler"> <view class="share-button" @tap="shareHandler">
<view class="share-button-img"> <view class="share-button-img"> </view>
</view>
<view class="share-button-txt"> <view class="share-button-txt">
<text>分享</text> <text>分享</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="school-report-context-bgImg"> <view class="school-report-context-bgImg"> </view>
</view>
<view class="school-report-context-card"> <view class="school-report-context-card">
<view class="school-report-context-card-one"> <view class="school-report-context-card-one">
<view class="school-report-context-card-one-img"> <view class="school-report-context-card-one-img"> </view>
</view>
<view class="school-report-context-card-one-context"> <view 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">
<view class="school-report-context-card-one-context-dot-item"> <view
class="school-report-context-card-one-context-dot-item"
>
</view> </view>
</view> </view>
<view class="school-report-context-card-one-context-txt"> <view class="school-report-context-card-one-context-txt">
<text v-if="diningSituations.cateringLevel"><text <text v-if="diningSituations.cateringLevel"
class="txt-important">{{diningSituations.notCateringNumber}}</text>次未吃{{diningSituations.notCateringType}},请提醒<text ><text class="txt-important">{{
class="txt-important">{{userInfo.userName}}</text> diningSituations.notCateringNumber
{{diningSituations.clues}}</text> }}</text
<text v-else>恭喜<text >次未吃{{ diningSituations.notCateringType }},请提醒<text
class="txt-important">{{userInfo.userName}}</text>荣获“快乐干饭人”称号,快乐要和家人一起分享哦</text> class="txt-important"
>{{ userInfo.userName }}</text
>
{{ diningSituations.clues }}</text
>
<text v-else
>恭喜<text class="txt-important">{{
userInfo.userName
}}</text
>荣获“快乐干饭人”称号,快乐要和家人一起分享哦</text
>
</view> </view>
</view> </view>
<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">
<view class="school-report-context-card-one-context-dot-item"> <view
class="school-report-context-card-one-context-dot-item"
>
</view> </view>
</view> </view>
<view class="school-report-context-card-one-context-txt"> <view class="school-report-context-card-one-context-txt">
<text v-if="isEatLow">食堂消费占比<text <text v-if="isEatLow"
class="txt-important-two">过低</text>,请及时调整饮食习惯</text> >食堂消费占比<text class="txt-important-two">过低</text
<text v-else>饮食较<text class="txt-important-two">均衡</text>,继续保持哦</text> >,请及时调整饮食习惯</text
>
<text v-else
>饮食较<text class="txt-important-two">均衡</text
>,继续保持哦</text
>
</view> </view>
</view> </view>
<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">
<view class="school-report-context-card-one-context-dot-item"> <view
class="school-report-context-card-one-context-dot-item"
>
</view> </view>
</view> </view>
<view class="school-report-context-card-one-context-txt"> <view class="school-report-context-card-one-context-txt">
消费总额 <text class="txt-important">{{consumerAmountObj.consumerAmount}}</text>元,超过全校 消费总额
<text class="txt-important">{{consumerAmountObj.exceedRate}}%</text> <text class="txt-important">{{
的同学<text v-if="isReasonable">,请及时评估生活费是否合理</text> consumerAmountObj.consumerAmount
}}</text
>元,超过全校
<text class="txt-important"
>{{ consumerAmountObj.exceedRate }}%</text
>
的同学<text v-if="isReasonable"
>,请及时评估生活费是否合理</text
>
</view> </view>
</view> </view>
<view <view
class="school-report-context-card-one-context-item school-report-context-card-one-context-item-last"> class="
school-report-context-card-one-context-item
school-report-context-card-one-context-item-last
"
>
<view class="school-report-context-card-one-context-dot"> <view class="school-report-context-card-one-context-dot">
<view class="school-report-context-card-one-context-dot-item"> <view
class="school-report-context-card-one-context-dot-item"
>
</view> </view>
</view> </view>
<view class="school-report-context-card-one-context-txt"> <view class="school-report-context-card-one-context-txt">
<text v-if="isAbnormal"><text <text v-if="isAbnormal"
class="txt-important-two">{{consumerTrend.clues}}</text>的消费金额存在异常,请及时关注</text> ><text class="txt-important-two">{{
consumerTrend.clues
}}</text
>的消费金额存在异常,请及时关注</text
>
<text v-else>每日消费金额较稳定,继续保持哦</text> <text v-else>每日消费金额较稳定,继续保持哦</text>
</view> </view>
</view> </view>
...@@ -127,67 +173,136 @@ ...@@ -127,67 +173,136 @@
</view> </view>
<view class="school-report-context-card-two-conclusion"> <view class="school-report-context-card-two-conclusion">
<view class="school-report-context-card-two-conclusion-txt"> <view class="school-report-context-card-two-conclusion-txt">
<text>{{['',''][reportTypeIndex]}}<text <text
class="abnormal-days">{{diningSituations.notRepastDay}}</text>天就餐异常</text> >{{ ["", ""][reportTypeIndex] }}<text
class="abnormal-days"
>{{ diningSituations.notRepastDay }}</text
>天就餐异常</text
>
</view> </view>
<view class="school-report-context-card-two-conclusion-logo"> <view class="school-report-context-card-two-conclusion-logo">
<view class="school-report-context-card-two-conclusion-logo-item"> <view
<view class="school-report-context-card-two-conclusion-logo-item-dot"> class="school-report-context-card-two-conclusion-logo-item"
>
<view
class="
school-report-context-card-two-conclusion-logo-item-dot
"
>
</view> </view>
</view> </view>
<view <view
class="school-report-context-card-two-conclusion-logo-item school-report-context-card-two-conclusion-logo-item-right"> class="
school-report-context-card-two-conclusion-logo-item
school-report-context-card-two-conclusion-logo-item-right
"
>
<text>未就餐</text> <text>未就餐</text>
</view> </view>
</view> </view>
</view> </view>
<view class="school-report-context-card-two-calendar"> <view class="school-report-context-card-two-calendar">
<van-calendar :formatter="formatter" :min-date="minDate" :max-date="maxDate" <van-calendar
:default-date="minDate" :show-title="false" :show-subtitle="false" :show-mark="false" :formatter="formatter"
:poppable="false" :show-confirm="false" :style="{ height: '575rpx' }" :min-date="minDate"
@select="dateSelect" /> :max-date="maxDate"
:default-date="minDate"
:show-title="false"
:show-subtitle="false"
:show-mark="false"
:poppable="false"
:show-confirm="false"
:style="{ height: '575rpx' }"
@select="dateSelect"
/>
</view> </view>
<view class="school-report-context-card-two-details"> <view class="school-report-context-card-two-details">
<view class="school-report-context-card-two-details-item"> <view class="school-report-context-card-two-details-item">
<view class="school-report-context-card-two-details-date"> <view class="school-report-context-card-two-details-date">
<text>{{diningSituations.diningSituationsDate}}</text> <text>{{ diningSituations.diningSituationsDate }}</text>
</view> </view>
<view class="school-report-context-card-two-details-meal"> <view class="school-report-context-card-two-details-meal">
<view class="school-report-context-card-two-details-meal-txt"> <view
class="school-report-context-card-two-details-meal-txt"
>
<text>早餐</text> <text>早餐</text>
</view> </view>
<view class="school-report-context-card-two-details-meal-logo"> <view
<view v-if="diningSituations.notRepastDetails.breakfastStatus" class="school-report-context-card-two-details-meal-logo"
class="school-report-context-card-two-details-meal-img"> >
<image src="../../static/images/eatted.png" mode=""></image> <view
v-if="diningSituations.notRepastDetails.breakfastStatus"
class="school-report-context-card-two-details-meal-img"
>
<image
src="../../static/images/eatted.png"
mode=""
></image>
</view> </view>
<view v-else class="school-report-context-card-two-details-meal-noeat"> <view
v-else
class="
school-report-context-card-two-details-meal-noeat
"
>
<text></text> <text></text>
</view> </view>
</view> </view>
<view class="school-report-context-card-two-details-meal-txt"> <view
class="school-report-context-card-two-details-meal-txt"
>
<text>中餐</text> <text>中餐</text>
</view> </view>
<view <view
class="school-report-context-card-two-details-meal-logo school-report-context-card-two-details-meal-logo-two"> class="
<view v-if="diningSituations.notRepastDetails.lunchStatus" school-report-context-card-two-details-meal-logo
class="school-report-context-card-two-details-meal-img"> school-report-context-card-two-details-meal-logo-two
<image src="../../static/images/eatted.png" mode=""></image> "
>
<view
v-if="diningSituations.notRepastDetails.lunchStatus"
class="school-report-context-card-two-details-meal-img"
>
<image
src="../../static/images/eatted.png"
mode=""
></image>
</view> </view>
<view v-else class="school-report-context-card-two-details-meal-noeat"> <view
v-else
class="
school-report-context-card-two-details-meal-noeat
"
>
<text></text> <text></text>
</view> </view>
</view> </view>
<view class="school-report-context-card-two-details-meal-txt"> <view
class="school-report-context-card-two-details-meal-txt"
>
<text>晚餐</text> <text>晚餐</text>
</view> </view>
<view <view
class="school-report-context-card-two-details-meal-logo school-report-context-card-two-details-meal-logo-three"> class="
<view v-if="diningSituations.notRepastDetails.supperStatus" school-report-context-card-two-details-meal-logo
class="school-report-context-card-two-details-meal-img"> school-report-context-card-two-details-meal-logo-three
<image src="../../static/images/eatted.png" mode=""></image> "
>
<view
v-if="diningSituations.notRepastDetails.supperStatus"
class="school-report-context-card-two-details-meal-img"
>
<image
src="../../static/images/eatted.png"
mode=""
></image>
</view> </view>
<view v-else class="school-report-context-card-two-details-meal-noeat"> <view
v-else
class="
school-report-context-card-two-details-meal-noeat
"
>
<text></text> <text></text>
</view> </view>
</view> </view>
...@@ -203,14 +318,25 @@ ...@@ -203,14 +318,25 @@
</view> </view>
<view class="school-report-context-card-three-conclusion"> <view class="school-report-context-card-three-conclusion">
<view class="school-report-context-card-three-conclusion-item"> <view class="school-report-context-card-three-conclusion-item">
<text v-if="isEatLow">食堂消费占比<text <text v-if="isEatLow"
class="school-report-context-card-three-conclusion-item-describe">过低</text>,请及时调整饮食习惯</text> >食堂消费占比<text
<text v-else>饮食较<text class="
class="school-report-context-card-three-conclusion-item-describe">均衡</text>,继续保持哦</text> school-report-context-card-three-conclusion-item-describe
</view> "
</view> >过低</text
<view id="consumer-preferences-pie"> >,请及时调整饮食习惯</text
</view> >
<text v-else
>饮食较<text
class="
school-report-context-card-three-conclusion-item-describe
"
>均衡</text
>,继续保持哦</text
>
</view>
</view>
<view id="consumer-preferences-pie"> </view>
</view> </view>
<view v-if="isOpen" class="school-report-context-card-four"> <view v-if="isOpen" class="school-report-context-card-four">
<view class="school-report-context-card-title"> <view class="school-report-context-card-title">
...@@ -220,27 +346,45 @@ ...@@ -220,27 +346,45 @@
</view> </view>
<view class="school-report-context-card-four-conclusion"> <view class="school-report-context-card-four-conclusion">
<view class="school-report-context-card-four-conclusion-item"> <view class="school-report-context-card-four-conclusion-item">
<text>消费总额<text <text
class="consume-total">{{consumerAmountObj.consumerAmount}}</text>元,超过全校<text >消费总额<text class="consume-total">{{
class="consume-total">{{consumerAmountObj.exceedRate}}%</text>的同学<text consumerAmountObj.consumerAmount
v-if="isReasonable">,请及时评估生活费是否合理</text></text> }}</text
>元,超过全校<text class="consume-total"
>{{ consumerAmountObj.exceedRate }}%</text
>的同学<text v-if="isReasonable"
>,请及时评估生活费是否合理</text
></text
>
</view> </view>
</view> </view>
<view class="consume-total-img"> <view class="consume-total-img">
<view class="school-average" :style="{height:schoolAverageHeight+'rpx'}"> <view
class="school-average"
:style="{ height: schoolAverageHeight + 'rpx' }"
>
<view class="school-average-num"> <view class="school-average-num">
<text>{{consumerAmountObj.schoolAmount}}</text> <text>{{ consumerAmountObj.schoolAmount }}</text>
</view> </view>
<view class="school-average-img"> <view class="school-average-img">
<image src="../../static/images/greenArrow.png" mode=""></image> <image
src="../../static/images/greenArrow.png"
mode=""
></image>
</view> </view>
</view> </view>
<view class="user-consume" :style="{height:userConsumeHeight+'rpx'}"> <view
class="user-consume"
:style="{ height: userConsumeHeight + 'rpx' }"
>
<view class="user-consume-num"> <view class="user-consume-num">
<text>{{consumerAmountObj.consumerAmount}}</text> <text>{{ consumerAmountObj.consumerAmount }}</text>
</view> </view>
<view class="user-consume-img"> <view class="user-consume-img">
<image src="../../static/images/yellowArrow.png" mode=""></image> <image
src="../../static/images/yellowArrow.png"
mode=""
></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -261,22 +405,20 @@ ...@@ -261,22 +405,20 @@
</view> </view>
<view class="school-report-context-card-five-conclusion"> <view class="school-report-context-card-five-conclusion">
<view class="school-report-context-card-five-conclusion-item"> <view class="school-report-context-card-five-conclusion-item">
<text v-if="isAbnormal"><text <text v-if="isAbnormal"
class="abnormal-date">{{consumerTrend.clues}}</text>的消费金额存在异常,请及时关注</text> ><text class="abnormal-date">{{ consumerTrend.clues }}</text
>的消费金额存在异常,请及时关注</text
>
<text v-else>每日消费金额较稳定,继续保持哦</text> <text v-else>每日消费金额较稳定,继续保持哦</text>
</view> </view>
</view> </view>
<view id="consumer-trend-line"> <view id="consumer-trend-line"> </view>
</view>
<view class="consumer-trend-line-icon"> <view class="consumer-trend-line-icon">
<view class="consumer-trend-line-icon-item"> <view class="consumer-trend-line-icon-item">
<view class="consumer-trend-line-icon-logo"> <view class="consumer-trend-line-icon-logo">
<view class="consumer-trend-line-icon-logo-left"> <view class="consumer-trend-line-icon-logo-left"> </view>
</view> <view class="consumer-trend-line-icon-logo-middle"> </view>
<view class="consumer-trend-line-icon-logo-middle"> <view class="consumer-trend-line-icon-logo-right"> </view>
</view>
<view class="consumer-trend-line-icon-logo-right">
</view>
</view> </view>
<view class="consumer-trend-line-icon-txt"> <view class="consumer-trend-line-icon-txt">
<text>消费金额</text> <text>消费金额</text>
...@@ -290,8 +432,14 @@ ...@@ -290,8 +432,14 @@
<text>到期后将无法查看完整报告</text> <text>到期后将无法查看完整报告</text>
</view> </view>
<view class="school-report-validity"> <view class="school-report-validity">
<text>有效期至<text class="validity-date">{{memberInfo.invalidDateStr}}</text>,剩余<text <text
class="validity-date">{{memberInfo.differDay}}</text></text> >有效期至<text class="validity-date">{{
memberInfo.invalidDateStr
}}</text
>,剩余<text class="validity-date"
>{{ memberInfo.differDay }}</text
></text
>
</view> </view>
</view> </view>
<view class="school-report-footer-item-two"> <view class="school-report-footer-item-two">
...@@ -305,10 +453,12 @@ ...@@ -305,10 +453,12 @@
<view v-if="!isOpen" class="no-open"> <view v-if="!isOpen" class="no-open">
<view class="no-open-solution" @tap="equityPay"> <view class="no-open-solution" @tap="equityPay">
<view class="no-open-solution-txt"> <view class="no-open-solution-txt">
<text>最低 {{memberInfo.leastAmount}}元/天开通,查看完整消费报告</text> <text
</view> >最低
<view class="no-open-solution-item"> {{ memberInfo.leastAmount }}元/天开通,查看完整消费报告</text
>
</view> </view>
<view class="no-open-solution-item"> </view>
</view> </view>
<view class="open-results"> <view class="open-results">
<view class="open-results-title"> <view class="open-results-title">
...@@ -328,39 +478,33 @@ ...@@ -328,39 +478,33 @@
</view> </view>
<view class="open-results-items-details"> <view class="open-results-items-details">
<view class="open-results-items-details-item"> <view class="open-results-items-details-item">
<view class="dining-situations-img"> <view class="dining-situations-img"> </view>
</view>
<view class="open-results-items-details-item-txt"> <view class="open-results-items-details-item-txt">
<text>就餐情况分析</text> <text>就餐情况分析</text>
</view> </view>
<view class="consumer-rationality-img"> <view class="consumer-rationality-img"> </view>
</view>
<view class="open-results-items-details-item-txt"> <view class="open-results-items-details-item-txt">
<text>消费合理性</text> <text>消费合理性</text>
</view> </view>
</view> </view>
<view class="open-results-items-details-item"> <view class="open-results-items-details-item">
<view class="consumer-preference-img"> <view class="consumer-preference-img"> </view>
</view>
<view class="open-results-items-details-item-txt"> <view class="open-results-items-details-item-txt">
<text>消费偏好分析</text> <text>消费偏好分析</text>
</view> </view>
<view class="consumer-advice-img"> <view class="consumer-advice-img"> </view>
</view>
<view class="open-results-items-details-item-txt"> <view class="open-results-items-details-item-txt">
<text>消费建议</text> <text>消费建议</text>
</view> </view>
</view> </view>
<view class="open-results-items-details-item"> <view class="open-results-items-details-item">
<view class="consumer-num-img"> <view class="consumer-num-img"> </view>
</view>
<view class="open-results-items-details-item-txt"> <view class="open-results-items-details-item-txt">
<text>消费总额分析</text> <text>消费总额分析</text>
</view> </view>
</view> </view>
<view class="open-results-items-details-item"> <view class="open-results-items-details-item">
<view class="consumer-trend-img"> <view class="consumer-trend-img"> </view>
</view>
<view class="open-results-items-details-item-txt"> <view class="open-results-items-details-item-txt">
<text>消费趋势分析</text> <text>消费趋势分析</text>
</view> </view>
...@@ -370,23 +514,38 @@ ...@@ -370,23 +514,38 @@
</view> </view>
</view> </view>
</view> </view>
<van-dialog class="htmlCanvas" id="htmlCanvas" ref="imgCanvas" v-model="dialogShow" show-cancel-button <view v-else class="nodata">
style="width: 100%; max-height: 80% !important;overflow: scroll"> <view class="nodataImg">
<img style="width: 35vw" :src="nodataImgUrl + 'images/1.png'" />
</view>
<view class="nodataTxt">
<text>当前为使用高峰期,请点击加载更多数据</text>
</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> </van-dialog>
</view> </view>
</view>
</template> </template>
<script> <script>
import html2cancas from "html2canvas" import html2cancas from "html2canvas";
var gHost = "https://" + window.location.host; var gHost = "https://" + window.location.host;
if (window.location.protocol != "https:") { if (window.location.protocol != "https:") {
gHost = "https://fpdev.xiaopay.net"; gHost = "https://fpdev.xiaopay.net";
} }
//获取参数 //获取参数
function getQueryParams(params) { function getQueryParams(params) {
let href = window.location.href let href = window.location.href;
let query = href.substring(href.indexOf('?') + 1); let query = href.substring(href.indexOf("?") + 1);
let vars = query.split("&"); let vars = query.split("&");
for (var i = 0; i < vars.length; i++) { for (var i = 0; i < vars.length; i++) {
let pair = vars[i].split("="); let pair = vars[i].split("=");
...@@ -394,38 +553,43 @@ ...@@ -394,38 +553,43 @@
return pair[1]; return pair[1];
} }
} }
return (false); return false;
} }
// 时间处理模块 // 时间处理模块
import dayjs from 'dayjs' import dayjs from "dayjs";
export default { import moment from "moment";
name: 'SchoolReport', export default {
name: "SchoolReport",
data() { data() {
return { return {
showReport: true,
userInfo: {}, userInfo: {},
reportTypeIndex: 0, reportTypeIndex: 0,
reportTypeArr: ['月报', '周报'], reportTypeArr: ["月报", "周报"],
dataRangeIndex: 0, dataRangeIndex: 0,
dataRangeArr: [{ nodataImgUrl: this.$ImgUrl,
dataRangeArr: [
{
week: "", week: "",
weekstr: "", weekstr: "",
startDate: "", startDate: "",
endDate: "" endDate: "",
}], },
minDate: new Date('1970/01/01'), ],
minDate: new Date("1970/01/01"),
maxDate: new Date(), maxDate: new Date(),
imgUrl: '', // 存储base64图片 imgUrl: "", // 存储base64图片
dialogShow: false, dialogShow: false,
// 就餐情况 // 就餐情况
diningSituations: { diningSituations: {
diningSituationsDate: '', diningSituationsDate: "",
diningSituationsRequestDate: '', diningSituationsRequestDate: "",
notRepastDay: '', notRepastDay: "",
notRepastDetails: {}, notRepastDetails: {},
notRepastDetailsDTOS: [], notRepastDetailsDTOS: [],
cateringLevel: '', cateringLevel: "",
notCateringNumber: '', notCateringNumber: "",
notCateringType: '' notCateringType: "",
}, },
// 消费偏好 // 消费偏好
pieDatas: [], pieDatas: [],
...@@ -433,8 +597,8 @@ ...@@ -433,8 +597,8 @@
// 消费总额 // 消费总额
consumerAmountObj: {}, consumerAmountObj: {},
isReasonable: false, isReasonable: false,
schoolAverageHeight: '', schoolAverageHeight: "",
userConsumeHeight: '', userConsumeHeight: "",
// 消费趋势 // 消费趋势
consumerTrend: {}, consumerTrend: {},
isAbnormal: false, isAbnormal: false,
...@@ -442,53 +606,77 @@ ...@@ -442,53 +606,77 @@
// 会员信息 // 会员信息
isOpen: false, isOpen: false,
memberInfo: { memberInfo: {
leastAmount: '', leastAmount: "",
invalidDateStr: '', invalidDateStr: "",
differDay: '' differDay: "",
}, },
containerHeight: '', containerHeight: "",
} };
}, },
mounted() { mounted() {
// 判断是否在高峰期内
if (this.isPeakPeriod()) {
this.showReport = false;
} else {
this.showReport = true;
this.queryIsDredgeMember().then(() => { this.queryIsDredgeMember().then(() => {
if (this.isOpen) { if (this.isOpen) {
this.queryMemberValidTime().then(e => { this.queryMemberValidTime().then((e) => {
if (new Date(this.memberInfo.invalidDate).getTime() <= new Date('2022/06/30') if (
.getTime()) { new Date(this.memberInfo.invalidDate).getTime() <=
new Date("2022/06/30").getTime()
) {
this.isOpen = true; this.isOpen = true;
this.memberInfo.invalidDateStr = '2022年6月30日'; this.memberInfo.invalidDateStr = "2022年6月30日";
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day'); this.memberInfo.differDay = dayjs("2022/06/30").diff(
dayjs(),
"day"
);
this.containerHeight = 4200; this.containerHeight = 4200;
this.queryStudentConsumerPreference(1).then(e => this.piechart()); this.queryStudentConsumerPreference(1).then((e) =>
this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex)); this.piechart()
);
this.queryDayConsumerTrend(1).then((e) =>
this.linechart(this.reportTypeIndex)
);
} else { } else {
this.queryIsDredgeMember(1).then(() => { this.queryIsDredgeMember(1).then(() => {
if (this.isOpen) { if (this.isOpen) {
this.queryStudentConsumerPreference(1).then(e => this this.queryStudentConsumerPreference(1).then((e) =>
.piechart()); this.piechart()
this.queryDayConsumerTrend(1).then(e => this.linechart(this );
.reportTypeIndex)); this.queryDayConsumerTrend(1).then((e) =>
this.linechart(this.reportTypeIndex)
);
} else { } else {
this.queryStudentConsumerPreference(); this.queryStudentConsumerPreference();
this.queryDayConsumerTrend(); this.queryDayConsumerTrend();
} }
}); });
} }
}) });
} else { } else {
if (new Date().getTime() <= new Date('2022/06/30').getTime()) { if (new Date().getTime() <= new Date("2022/06/30").getTime()) {
this.isOpen = true; this.isOpen = true;
this.memberInfo.invalidDateStr = '2022年6月30日'; this.memberInfo.invalidDateStr = "2022年6月30日";
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day'); this.memberInfo.differDay = dayjs("2022/06/30").diff(
dayjs(),
"day"
);
this.containerHeight = 4200; this.containerHeight = 4200;
this.queryStudentConsumerPreference(1).then(e => this.piechart()); this.queryStudentConsumerPreference(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(1).then(() => { this.queryIsDredgeMember(1).then(() => {
if (this.isOpen) { if (this.isOpen) {
this.queryStudentConsumerPreference(1).then(e => this.piechart()); this.queryStudentConsumerPreference(1).then((e) =>
this.queryDayConsumerTrend(1).then(e => this.linechart(this this.piechart()
.reportTypeIndex)); );
this.queryDayConsumerTrend(1).then((e) =>
this.linechart(this.reportTypeIndex)
);
} else { } else {
this.queryStudentConsumerPreference(); this.queryStudentConsumerPreference();
this.queryDayConsumerTrend(); this.queryDayConsumerTrend();
...@@ -497,51 +685,82 @@ ...@@ -497,51 +685,82 @@
} }
} }
}); });
let tmpArr = [] let tmpArr = [];
// 获取时间 // 获取时间
for (let i = 0; i <= 11; i++) { for (let i = 0; i <= 11; i++) {
let startWeek = dayjs().subtract(i, 'month').startOf('month'); let startWeek = dayjs().subtract(i, "month").startOf("month");
let endWeek = dayjs().$d.getTime() > dayjs().subtract(i, 'month').endOf('month').$d.getTime() ? dayjs() let endWeek =
.subtract(i, 'month').endOf('month') : dayjs(); dayjs().$d.getTime() >
dayjs().subtract(i, "month").endOf("month").$d.getTime()
? dayjs().subtract(i, "month").endOf("month")
: dayjs();
tmpArr.push({ tmpArr.push({
week: (startWeek.format("YYYY/MM/DD")) + '~' + (endWeek.format("YYYY/MM/DD")), week:
weekstr: (startWeek.format("MM/DD")) + '~' + (endWeek.format("MM/DD")), startWeek.format("YYYY/MM/DD") + "~" + endWeek.format("YYYY/MM/DD"),
weekstr: startWeek.format("MM/DD") + "~" + endWeek.format("MM/DD"),
startDate: startWeek.format("YYYY-MM-DD"), startDate: startWeek.format("YYYY-MM-DD"),
endDate: endWeek.format("YYYY-MM-DD") endDate: endWeek.format("YYYY-MM-DD"),
}) });
} }
this.dataRangeArr = tmpArr this.dataRangeArr = tmpArr;
this.minDate = new Date(this.dataRangeArr[this.dataRangeIndex].startDate); this.minDate = new Date(this.dataRangeArr[this.dataRangeIndex].startDate);
this.maxDate = new Date(this.dataRangeArr[this.dataRangeIndex].endDate); this.maxDate = new Date(this.dataRangeArr[this.dataRangeIndex].endDate);
this.diningSituations.diningSituationsRequestDate = this.dataRangeArr[this.dataRangeIndex].startDate; this.diningSituations.diningSituationsRequestDate =
this.diningSituations.diningSituationsDate = this.formatDate(this.minDate); this.dataRangeArr[this.dataRangeIndex].startDate;
this.diningSituations.diningSituationsDate = this.formatDate(
this.minDate
);
this.queryCampusStudentInfo(); this.queryCampusStudentInfo();
let tmpDate=this.formatDateTwo(this.minDate); let tmpDate = this.formatDateTwo(this.minDate);
this.queryNotRepastDetails(this.dataRangeArr[this.dataRangeIndex].startDate, this.dataRangeArr[this this.queryNotRepastDetails(
.dataRangeIndex].endDate).then(()=>{ this.dataRangeArr[this.dataRangeIndex].startDate,
let today = this.diningSituations.notRepastDetailsDTOS.filter(e => e.repastDate === tmpDate)[0]; this.dataRangeArr[this.dataRangeIndex].endDate
).then(() => {
let today = this.diningSituations.notRepastDetailsDTOS.filter(
(e) => e.repastDate === tmpDate
)[0];
this.diningSituations.notRepastDetails = today; this.diningSituations.notRepastDetails = today;
}); });
this.queryConsumerTrend(); this.queryConsumerTrend();
}
}, },
methods: { methods: {
toImage: function() { // 当天6:30 ~ 9:00,11:30 ~ 12:00, 17:30 ~ 19:00属于高峰期
isPeakPeriod() {
let first = this.timeIn("06:30:00", "09:00:00");
let second = this.timeIn("11:00:00", "12:00:00");
let three = this.timeIn("17:30:00", "19:00:00");
console.log(first, "first", second, "second", three, "three");
return first || second || three;
},
/*在某段时间内*/
timeIn(s, e) {
let t = moment().format("YYYY-MM-DD");
if (
moment(t + " " + s).diff(moment()) < 0 &&
moment(t + " " + e).diff(moment()) > 0
) {
return true;
}
return false;
},
toImage: function () {
this.$nextTick(() => { this.$nextTick(() => {
html2cancas(document.getElementsByClassName("tainer")[0], { html2cancas(document.getElementsByClassName("tainer")[0], {
useCORS: true, useCORS: true,
}).then((canvas) => { }).then((canvas) => {
let htmlCanvas = document.getElementById('htmlCanvas'); let htmlCanvas = document.getElementById("htmlCanvas");
let url = canvas.toDataURL('image/png'); let url = canvas.toDataURL("image/png");
this.imgUrl = url; this.imgUrl = url;
let img = document.createElement("img"); let img = document.createElement("img");
img.setAttribute('src', this.imgUrl); img.setAttribute("src", this.imgUrl);
img.setAttribute('class', 'htmlCanvasImg'); img.setAttribute("class", "htmlCanvasImg");
img.style.width = '100vw'; img.style.width = "100vw";
htmlCanvas.appendChild(img); htmlCanvas.appendChild(img);
}) });
}) });
}, },
shareHandler: function() { shareHandler: function () {
let htmlCanvasImg = document.getElementsByClassName("htmlCanvasImg")[0]; let htmlCanvasImg = document.getElementsByClassName("htmlCanvasImg")[0];
if (htmlCanvasImg) { if (htmlCanvasImg) {
htmlCanvasImg.parentNode.removeChild(htmlCanvasImg); htmlCanvasImg.parentNode.removeChild(htmlCanvasImg);
...@@ -549,75 +768,101 @@ ...@@ -549,75 +768,101 @@
this.toImage(); this.toImage();
this.dialogShow = true; this.dialogShow = true;
}, },
schoolReportChange: function(e) { schoolReportChange: function (e) {
this.reportTypeIndex = e.target.value; this.reportTypeIndex = e.target.value;
this.getDataRangeArr(this.reportTypeIndex); this.getDataRangeArr(this.reportTypeIndex);
}, },
dataRangeChange: function(e) { dataRangeChange: function (e) {
this.dataRangeIndex = e.target.value; this.dataRangeIndex = e.target.value;
this.getDataRangeArr(this.reportTypeIndex); this.getDataRangeArr(this.reportTypeIndex);
}, },
getDataRangeArr: function(num) { getDataRangeArr: function (num) {
if (num) { if (num) {
let tmpArr = [] let tmpArr = [];
for (let i = 1; i <= 52; i++) { for (let i = 1; i <= 52; i++) {
let startWeek = dayjs().subtract(i, 'week').startOf('week'); let startWeek = dayjs().subtract(i, "week").startOf("week");
let endWeek = dayjs().$d.getTime() > dayjs().subtract(i, 'week').endOf('week').$d.getTime() ? let endWeek =
dayjs().subtract(i, 'week').endOf('week') : dayjs(); dayjs().$d.getTime() >
dayjs().subtract(i, "week").endOf("week").$d.getTime()
? dayjs().subtract(i, "week").endOf("week")
: dayjs();
tmpArr.push({ tmpArr.push({
week: (startWeek.format("YYYY/MM/DD")) + '~' + (endWeek.format("YYYY/MM/DD")), week:
weekstr: (startWeek.format("MM/DD")) + '~' + (endWeek.format("MM/DD")), startWeek.format("YYYY/MM/DD") +
"~" +
endWeek.format("YYYY/MM/DD"),
weekstr: startWeek.format("MM/DD") + "~" + endWeek.format("MM/DD"),
startDate: startWeek.format("YYYY-MM-DD"), startDate: startWeek.format("YYYY-MM-DD"),
endDate: endWeek.format("YYYY-MM-DD") endDate: endWeek.format("YYYY-MM-DD"),
}) });
} }
this.dataRangeArr = tmpArr; this.dataRangeArr = tmpArr;
} else { } else {
let tmpArr = [] let tmpArr = [];
if (new Date().getDate() > 5) { if (new Date().getDate() > 5) {
for (let i = 0; i <= 11; i++) { for (let i = 0; i <= 11; i++) {
let startWeek = dayjs().subtract(i, 'month').startOf('month'); let startWeek = dayjs().subtract(i, "month").startOf("month");
let endWeek = dayjs().$d.getTime() > dayjs().subtract(i, 'month').endOf('month').$d let endWeek =
.getTime() ? dayjs().$d.getTime() >
dayjs().subtract(i, 'month').endOf('month') : dayjs(); dayjs().subtract(i, "month").endOf("month").$d.getTime()
? dayjs().subtract(i, "month").endOf("month")
: dayjs();
tmpArr.push({ tmpArr.push({
week: (startWeek.format("YYYY/MM/DD")) + '~' + (endWeek.format("YYYY/MM/DD")), week:
weekstr: (startWeek.format("MM/DD")) + '~' + (endWeek.format("MM/DD")), startWeek.format("YYYY/MM/DD") +
"~" +
endWeek.format("YYYY/MM/DD"),
weekstr:
startWeek.format("MM/DD") + "~" + endWeek.format("MM/DD"),
startDate: startWeek.format("YYYY-MM-DD"), startDate: startWeek.format("YYYY-MM-DD"),
endDate: endWeek.format("YYYY-MM-DD") endDate: endWeek.format("YYYY-MM-DD"),
}) });
} }
} else { } else {
for (let i = 1; i <= 11; i++) { for (let i = 1; i <= 11; i++) {
let startWeek = dayjs().subtract(i, 'month').startOf('month'); let startWeek = dayjs().subtract(i, "month").startOf("month");
let endWeek = dayjs().$d.getTime() > dayjs().subtract(i, 'month').endOf('month').$d let endWeek =
.getTime() ? dayjs().$d.getTime() >
dayjs().subtract(i, 'month').endOf('month') : dayjs(); dayjs().subtract(i, "month").endOf("month").$d.getTime()
? dayjs().subtract(i, "month").endOf("month")
: dayjs();
tmpArr.push({ tmpArr.push({
week: (startWeek.format("YYYY/MM/DD")) + '~' + (endWeek.format("YYYY/MM/DD")), week:
weekstr: (startWeek.format("MM/DD")) + '~' + (endWeek.format("MM/DD")), startWeek.format("YYYY/MM/DD") +
"~" +
endWeek.format("YYYY/MM/DD"),
weekstr:
startWeek.format("MM/DD") + "~" + endWeek.format("MM/DD"),
startDate: startWeek.format("YYYY-MM-DD"), startDate: startWeek.format("YYYY-MM-DD"),
endDate: endWeek.format("YYYY-MM-DD") endDate: endWeek.format("YYYY-MM-DD"),
}) });
} }
} }
this.dataRangeArr = tmpArr; this.dataRangeArr = tmpArr;
} }
this.minDate = new Date(this.dataRangeArr[this.dataRangeIndex].startDate); this.minDate = new Date(this.dataRangeArr[this.dataRangeIndex].startDate);
this.maxDate = new Date(this.dataRangeArr[this.dataRangeIndex].endDate); this.maxDate = new Date(this.dataRangeArr[this.dataRangeIndex].endDate);
this.diningSituations.diningSituationsDate = this.formatDate(this.minDate); this.diningSituations.diningSituationsDate = this.formatDate(
this.diningSituations.diningSituationsRequestDate = this.dataRangeArr[this.dataRangeIndex] this.minDate
.startDate; );
let tmpDate=this.formatDateTwo(this.minDate); this.diningSituations.diningSituationsRequestDate =
this.queryNotRepastDetails(this.dataRangeArr[this.dataRangeIndex].startDate, this.dataRangeArr[this this.dataRangeArr[this.dataRangeIndex].startDate;
.dataRangeIndex].endDate).then(()=>{ let tmpDate = this.formatDateTwo(this.minDate);
let today = this.diningSituations.notRepastDetailsDTOS.filter(e => e.repastDate === tmpDate)[0]; this.queryNotRepastDetails(
this.dataRangeArr[this.dataRangeIndex].startDate,
this.dataRangeArr[this.dataRangeIndex].endDate
).then(() => {
let today = this.diningSituations.notRepastDetailsDTOS.filter(
(e) => e.repastDate === tmpDate
)[0];
this.diningSituations.notRepastDetails = today; this.diningSituations.notRepastDetails = today;
});; });
this.queryConsumerTrend(); this.queryConsumerTrend();
if (this.isOpen) { if (this.isOpen) {
this.queryStudentConsumerPreference(1).then(e => this.piechart()); this.queryStudentConsumerPreference(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.queryStudentConsumerPreference(); this.queryStudentConsumerPreference();
this.queryDayConsumerTrend(); this.queryDayConsumerTrend();
...@@ -626,317 +871,367 @@ ...@@ -626,317 +871,367 @@
formatter(day) { formatter(day) {
const year = day.date.getFullYear(); const year = day.date.getFullYear();
const month = day.date.getMonth() + 1; const month = day.date.getMonth() + 1;
const monthstr = month < 10 ? '0' + month : month; const monthstr = month < 10 ? "0" + month : month;
const date = day.date.getDate(); const date = day.date.getDate();
const datestr = date < 10 ? '0' + date : date; const datestr = date < 10 ? "0" + date : date;
const sum = year + '-' + monthstr + '-' + datestr; const sum = year + "-" + monthstr + "-" + datestr;
const contrastList = this.diningSituations.notRepastDetailsDTOS.filter(e => e const contrastList = this.diningSituations.notRepastDetailsDTOS.filter(
.dayNotEatNumber != 0); (e) => e.dayNotEatNumber != 0
contrastList.forEach(item => { );
contrastList.forEach((item) => {
if (sum == item.repastDate) { if (sum == item.repastDate) {
const breakfastTxt = item.breakfastStatus ? '' : ''; const breakfastTxt = item.breakfastStatus ? "" : "";
const lunchTxt = item.lunchStatus ? '' : ''; const lunchTxt = item.lunchStatus ? "" : "";
const supperTxt = item.supperStatus ? '' : ''; const supperTxt = item.supperStatus ? "" : "";
day.topInfo = breakfastTxt + lunchTxt + supperTxt; day.topInfo = breakfastTxt + lunchTxt + supperTxt;
day.className = 'notice-day' day.className = "notice-day";
} }
}) });
return day; return day;
}, },
formatDate(date) { formatDate(date) {
return `${date.getMonth()+1}${date.getDate()}日`; return `${date.getMonth() + 1}${date.getDate()}日`;
}, },
formatDateTwo(date) { formatDateTwo(date) {
return `${date.getFullYear()}-${date.getMonth()<9?'0'+(date.getMonth()+1):date.getMonth()+1}-${date.getDate()<10?'0'+date.getDate():date.getDate()}`; return `${date.getFullYear()}-${
date.getMonth() < 9 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1
}-${date.getDate() < 10 ? "0" + date.getDate() : date.getDate()}`;
}, },
dateSelect(date) { dateSelect(date) {
this.diningSituations.diningSituationsDate = this.formatDate(date); this.diningSituations.diningSituationsDate = this.formatDate(date);
var dateStr = var dateStr = `${date.getFullYear()}-${
`${date.getFullYear()}-${date.getMonth()<9?'0'+(date.getMonth()+1):date.getMonth()+1}-${date.getDate()<10?'0'+date.getDate():date.getDate()}`; date.getMonth() < 9 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1
let today = this.diningSituations.notRepastDetailsDTOS.filter(e => e.repastDate === dateStr)[0]; }-${date.getDate() < 10 ? "0" + date.getDate() : date.getDate()}`;
let today = this.diningSituations.notRepastDetailsDTOS.filter(
(e) => e.repastDate === dateStr
)[0];
this.diningSituations.notRepastDetails = today; this.diningSituations.notRepastDetails = today;
}, },
piechart: function() { piechart: function () {
var myChart = echarts.init(document.getElementById('consumer-preferences-pie')); var myChart = echarts.init(
document.getElementById("consumer-preferences-pie")
);
var option = { var option = {
tooltip: { tooltip: {
trigger: 'item' trigger: "item",
}, },
series: this.pieDatas.map(function(data, idx) { series: this.pieDatas.map(function (data, idx) {
return { return {
type: 'pie', type: "pie",
radius: ['33', '58'], radius: ["33", "58"],
data: data, data: data,
itemStyle: { itemStyle: {
borderColor: '#fff', borderColor: "#fff",
borderWidth: 3, borderWidth: 3,
}, },
label: { label: {
formatter: function(e) { formatter: function (e) {
return e.name + "\n" + e.value + ''; return e.name + "\n" + e.value + "";
}, },
padding: [0, 2], padding: [0, 2],
rich: { rich: {
color: 'rgba(0, 0, 0, 0.85)', color: "rgba(0, 0, 0, 0.85)",
fontSize: 12, fontSize: 12,
fontFamily: 'PingFangSC-Regular, PingFang SC', fontFamily: "PingFangSC-Regular, PingFang SC",
fontWeight: 400, fontWeight: 400,
lineHeight: 17 lineHeight: 17,
} },
} },
}; };
}), }),
color: ['#00C47C', '#F6C723', '#FF8646'] color: ["#00C47C", "#F6C723", "#FF8646"],
}; };
option && myChart.setOption(option); option && myChart.setOption(option);
window.addEventListener('resize', function() { window.addEventListener("resize", function () {
myChart.resize(); myChart.resize();
}) });
}, },
// 获取某月的所有周六 // 获取某月的所有周六
getMonthSaturdayDate: function(year, month) { getMonthSaturdayDate: function (year, month) {
const lastDay = new Date(year, month, 0).getDate(); const lastDay = new Date(year, month, 0).getDate();
const startDay = new Date(year, month, 1).getDate() const startDay = new Date(year, month, 1).getDate();
const allDate = []; const allDate = [];
for (var i = startDay; i <= lastDay; i++) { for (var i = startDay; i <= lastDay; i++) {
allDate[i - 1] = i < 10 ? year + '-' + month + '-' + '0' + i : year + '-' + month + '-' + allDate[i - 1] =
i; i < 10
? year + "-" + month + "-" + "0" + i
: year + "-" + month + "-" + i;
} }
const saturdayDate = allDate.filter(e => { const saturdayDate = allDate.filter((e) => {
const date = new Date(e); const date = new Date(e);
if (date.getDay() == 6) { if (date.getDay() == 6) {
return true return true;
} }
}) });
return saturdayDate; return saturdayDate;
}, },
linechart: function(num) { linechart: function (num) {
var mySize = document.getElementById('consumer-trend-line'); var mySize = document.getElementById("consumer-trend-line");
mySize.style.width = 360 + 'px'; mySize.style.width = 360 + "px";
mySize.style.height = 260 + 'px'; mySize.style.height = 260 + "px";
var myChart = echarts.init(mySize); var myChart = echarts.init(mySize);
var xdata = this.lineDatas.map(v => v.name); var xdata = this.lineDatas.map((v) => v.name);
var year = this.dataRangeArr[this.dataRangeIndex].startDate.slice(0, 4); var year = this.dataRangeArr[this.dataRangeIndex].startDate.slice(0, 4);
var month = this.dataRangeArr[this.dataRangeIndex].startDate.slice(5, 7); var month = this.dataRangeArr[this.dataRangeIndex].startDate.slice(5, 7);
var saturdayList = this.getMonthSaturdayDate(year, month); var saturdayList = this.getMonthSaturdayDate(year, month);
switch (num) { switch (num) {
case 0: case 0:
var seriesData = []; var seriesData = [];
this.lineDatas.map(v => { this.lineDatas.map((v) => {
if (v.isException == 1) { if (v.isException == 1) {
if (v.date == this.formatDateTwo(new Date(year, month, 0)) || if (
saturdayList v.date == this.formatDateTwo(new Date(year, month, 0)) ||
.includes(v.date)) { saturdayList.includes(v.date)
seriesData.push(Object.assign(v, { ) {
seriesData.push(
Object.assign(v, {
itemStyle: { itemStyle: {
color: '#0BDB7E', color: "#0BDB7E",
borderWidth: 1.5 borderWidth: 1.5,
} },
})) })
);
} else { } else {
seriesData.push(Object.assign(v, { seriesData.push(
Object.assign(v, {
itemStyle: { itemStyle: {
color: '#0BDB7E', color: "#0BDB7E",
borderWidth: 1.5 borderWidth: 1.5,
}, },
symbol: 'none' symbol: "none",
})) })
);
} }
} else { } else {
if (v.date == this.formatDateTwo(new Date(year, month, 0)) || if (
saturdayList v.date == this.formatDateTwo(new Date(year, month, 0)) ||
.includes(v.date)) { saturdayList.includes(v.date)
seriesData.push(Object.assign(v, { ) {
seriesData.push(
Object.assign(v, {
itemStyle: { itemStyle: {
color: '#FF8646', color: "#FF8646",
borderWidth: 1.5 borderWidth: 1.5,
} },
})) })
);
} else { } else {
seriesData.push(Object.assign(v, { seriesData.push(
Object.assign(v, {
itemStyle: { itemStyle: {
color: '#FF8646', color: "#FF8646",
borderWidth: 1.5 borderWidth: 1.5,
}, },
symbol: 'none' symbol: "none",
})) })
);
} }
} }
}); });
break; break;
case 1: case 1:
var seriesData = []; var seriesData = [];
this.lineDatas.map(v => { this.lineDatas.map((v) => {
if (v.isException == 1) { if (v.isException == 1) {
seriesData.push(Object.assign(v, { seriesData.push(
Object.assign(v, {
itemStyle: { itemStyle: {
color: '#0BDB7E', color: "#0BDB7E",
borderWidth: 1.5 borderWidth: 1.5,
} },
})) })
);
} else { } else {
seriesData.push(Object.assign(v, { seriesData.push(
Object.assign(v, {
itemStyle: { itemStyle: {
color: '#FF8646', color: "#FF8646",
borderWidth: 1.5 borderWidth: 1.5,
} },
})) })
);
} }
}); });
break; break;
} }
var option = { var option = {
xAxis: { xAxis: {
type: 'category', type: "category",
data: xdata data: xdata,
}, },
yAxis: { yAxis: {
type: 'value', type: "value",
}, },
series: [{ series: [
{
data: seriesData, data: seriesData,
type: 'line', type: "line",
smooth: true, smooth: true,
areaStyle: { areaStyle: {
color: 'linear-gradient(180 deg, #0DDE7E 0%, rgba(4, 205, 124, 0) 100%)', color:
opacity: 0.2 "linear-gradient(180 deg, #0DDE7E 0%, rgba(4, 205, 124, 0) 100%)",
opacity: 0.2,
}, },
lineStyle: { lineStyle: {
color: '#0BDB7E' color: "#0BDB7E",
} },
}], },
],
tooltip: { tooltip: {
trigger: 'axis', trigger: "axis",
axisPointer: { axisPointer: {
type: 'shadow', type: "shadow",
shadowStyle: { shadowStyle: {
color: 'transparent' color: "transparent",
} },
}, },
extraCssText: `width:109px;height:55px;line-height:33rpx;background: no-repeat center/100% url(./static/images/consumeTrendbgm.png); extraCssText: `width:109px;height:55px;line-height:33rpx;background: no-repeat center/100% url(./static/images/consumeTrendbgm.png);
font-size:24rpx;font-family: PingFangSC-Medium, PingFang SC;font-weight: 500; font-size:24rpx;font-family: PingFangSC-Medium, PingFang SC;font-weight: 500;
color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
confine: true, confine: true,
position: function(pt) { position: function (pt) {
return [pt[0] - 27, pt[1] - 73]; return [pt[0] - 27, pt[1] - 73];
}, },
formatter: function(data) { formatter: function (data) {
let desp = ['', '消费金额偏高', '消费金额偏低'][data[0].data.isException - 1] let desp = ["", "消费金额偏高", "消费金额偏低"][
return data[0].name + '消费' + data[0].value + '' + '<br>' + desp; data[0].data.isException - 1
} ];
return data[0].name + "消费" + data[0].value + "" + "<br>" + desp;
},
}, },
}; };
option && myChart.setOption(option); option && myChart.setOption(option);
window.addEventListener('resize', function() { window.addEventListener("resize", function () {
myChart.resize(); myChart.resize();
}) });
}, },
// 查询学生信息 // 查询学生信息
async queryCampusStudentInfo() { async queryCampusStudentInfo() {
try { try {
let data = await this.$http.get({ let data = await this.$http.get(
url: gHost + '/report-push/campus-consumer-report/queryCampusStudentInfo' {
}, { url:
schoolId: getQueryParams('schoolId'), gHost +
userId: getQueryParams('userId'), "/report-push/campus-consumer-report/queryCampusStudentInfo",
}) },
{
schoolId: getQueryParams("schoolId"),
userId: getQueryParams("userId"),
}
);
if (data.code != 200) { if (data.code != 200) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: data.msg title: data.msg,
}) });
return return;
} }
this.userInfo = data.obj; this.userInfo = data.obj;
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception
console.log(e); console.log(e);
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: e.message title: e.message,
}) });
} }
}, },
// 查询就餐情况 // 查询就餐情况
async queryNotRepastDetails(startDate, endDate) { async queryNotRepastDetails(startDate, endDate) {
try { try {
let data = await this.$http.get({ let data = await this.$http.get(
url: gHost +'/report-push/campus-consumer-report/queryNotRepastDetails' {
}, { url:
schoolId: getQueryParams('schoolId'), gHost +
userId: getQueryParams('userId'), "/report-push/campus-consumer-report/queryNotRepastDetails",
},
{
schoolId: getQueryParams("schoolId"),
userId: getQueryParams("userId"),
startDate, startDate,
endDate endDate,
}) }
);
if (data.code != 200) { if (data.code != 200) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: data.msg title: data.msg,
}) });
return return;
} }
this.diningSituations.notRepastDay = data.obj.notRepastDay; this.diningSituations.notRepastDay = data.obj.notRepastDay;
this.diningSituations.notRepastDetailsDTOS = data.obj.notRepastDetailsDTOS; this.diningSituations.notRepastDetailsDTOS =
data.obj.notRepastDetailsDTOS;
this.diningSituations.cateringLevel = data.obj.cateringLevel; this.diningSituations.cateringLevel = data.obj.cateringLevel;
this.diningSituations.notCateringNumber = data.obj.notCateringNumber; this.diningSituations.notCateringNumber = data.obj.notCateringNumber;
this.diningSituations.notCateringType = this.diningSituations this.diningSituations.notCateringType = this.diningSituations
.cateringLevel ? ['早餐', '午餐', .cateringLevel
'晚餐' ? ["早餐", "午餐", "晚餐"][this.diningSituations.cateringLevel - 1]
][this.diningSituations.cateringLevel - 1] : ''; : "";
this.diningSituations.clues = this.diningSituations.cateringLevel ? [ this.diningSituations.clues = this.diningSituations.cateringLevel
'早餐吃好,一天才能活力满满哦', ? [
'及时补充能量,下午才能集中精神学习哦', '晚餐好好吃,身体才能更健康' "早餐吃好,一天才能活力满满哦",
][this.diningSituations.cateringLevel - 1] : ''; "及时补充能量,下午才能集中精神学习哦",
"晚餐好好吃,身体才能更健康",
][this.diningSituations.cateringLevel - 1]
: "";
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception
console.log(e); console.log(e);
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: e.message title: e.message,
}) });
} }
}, },
// 查询学生消费偏好类型 // 查询学生消费偏好类型
async queryStudentConsumerPreference(num) { async queryStudentConsumerPreference(num) {
try { try {
let data = await this.$http.get({ let data = await this.$http.get(
url: gHost + {
'/report-push/campus-consumer-report/queryStudentConsumerPreference' url:
}, { gHost +
schoolId: getQueryParams('schoolId'), "/report-push/campus-consumer-report/queryStudentConsumerPreference",
userId: getQueryParams('userId'), },
{
schoolId: getQueryParams("schoolId"),
userId: getQueryParams("userId"),
startDate: this.dataRangeArr[this.dataRangeIndex].startDate, startDate: this.dataRangeArr[this.dataRangeIndex].startDate,
endDate: this.dataRangeArr[this.dataRangeIndex].endDate, endDate: this.dataRangeArr[this.dataRangeIndex].endDate,
}) }
);
if (data.code != 200) { if (data.code != 200) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: data.msg title: data.msg,
}) });
return return;
} }
const tmpObj = data.obj; const tmpObj = data.obj;
this.isEatLow = tmpObj.canteenAmount / tmpObj.grossAmount < 0.5 ? true : false; this.isEatLow =
tmpObj.canteenAmount / tmpObj.grossAmount < 0.5 ? true : false;
if (num) { if (num) {
this.pieDatas = [ this.pieDatas = [
[{ [
name: '食堂', {
value: tmpObj.canteenAmount name: "食堂",
}, { value: tmpObj.canteenAmount,
name: '超市', },
value: tmpObj.supermarketAmount {
}, { name: "超市",
name: '其他', value: tmpObj.supermarketAmount,
value: tmpObj.otherAmount },
}] {
] name: "其他",
value: tmpObj.otherAmount,
},
],
];
} }
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception
...@@ -944,88 +1239,109 @@ ...@@ -944,88 +1239,109 @@
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: e.message title: e.message,
}) });
} }
}, },
// 查询消费总额 // 查询消费总额
async queryConsumerTrend() { async queryConsumerTrend() {
try { try {
let data = await this.$http.get({ let data = await this.$http.get(
url: gHost + {
'/report-push/campus-consumer-report/queryConsumerTrend' url:
}, { gHost + "/report-push/campus-consumer-report/queryConsumerTrend",
schoolId: getQueryParams('schoolId'), },
userId: getQueryParams('userId'), {
schoolId: getQueryParams("schoolId"),
userId: getQueryParams("userId"),
startDate: this.dataRangeArr[this.dataRangeIndex].startDate, startDate: this.dataRangeArr[this.dataRangeIndex].startDate,
endDate: this.dataRangeArr[this.dataRangeIndex].endDate, endDate: this.dataRangeArr[this.dataRangeIndex].endDate,
}) }
);
if (data.code != 200) { if (data.code != 200) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: data.msg title: data.msg,
}) });
return return;
} }
this.consumerAmountObj = data.obj; this.consumerAmountObj = data.obj;
this.isReasonable = this.consumerAmountObj.exceedRate >= 40 && this this.isReasonable =
.consumerAmountObj.exceedRate <= this.consumerAmountObj.exceedRate >= 40 &&
60 ? false : true; this.consumerAmountObj.exceedRate <= 60
this.schoolAverageHeight = this.consumerAmountObj.schoolAmount <= this ? false
.consumerAmountObj : true;
.consumerAmount ? 139 : 192; this.schoolAverageHeight =
this.userConsumeHeight = this.consumerAmountObj.consumerAmount <= this this.consumerAmountObj.schoolAmount <=
.consumerAmountObj this.consumerAmountObj.consumerAmount
.schoolAmount ? 139 : 192; ? 139
: 192;
this.userConsumeHeight =
this.consumerAmountObj.consumerAmount <=
this.consumerAmountObj.schoolAmount
? 139
: 192;
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception
console.log(e); console.log(e);
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: e.message title: e.message,
}) });
} }
}, },
// 日消费趋势 // 日消费趋势
async queryDayConsumerTrend(num) { async queryDayConsumerTrend(num) {
try { try {
let data = await this.$http.get({ let data = await this.$http.get(
url: gHost + {
'/report-push/campus-consumer-report/queryDayConsumerTrend' url:
}, { gHost +
schoolId: getQueryParams('schoolId'), "/report-push/campus-consumer-report/queryDayConsumerTrend",
userId: getQueryParams('userId'), },
startDate: this.dataRangeArr[this.dataRangeIndex] {
.startDate, schoolId: getQueryParams("schoolId"),
userId: getQueryParams("userId"),
startDate: this.dataRangeArr[this.dataRangeIndex].startDate,
endDate: this.dataRangeArr[this.dataRangeIndex].endDate, endDate: this.dataRangeArr[this.dataRangeIndex].endDate,
}) }
);
if (data.code != 200) { if (data.code != 200) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: data.msg title: data.msg,
}) });
return return;
} }
var exceptionDate = data.obj.exceptionDate; var exceptionDate = data.obj.exceptionDate;
this.isAbnormal = exceptionDate.length ? true : false; this.isAbnormal = exceptionDate.length ? true : false;
var clues = ''; var clues = "";
exceptionDate.forEach((item, index) => item.slice(5, 6) == '0' ? ( exceptionDate.forEach((item, index) =>
clues += item.slice(6, 7) + '' + item.slice(5, 6) == "0"
item.slice(8, 10) + '' + (index == exceptionDate.length - ? (clues +=
1 ? '' : '')) : (clues += item.slice(6, 7) +
item.slice(5, 7) + '' + item.slice(8, 10) + '' + ( "" +
index == exceptionDate.length - 1 ? item.slice(8, 10) +
'' : ''))) "" +
(index == exceptionDate.length - 1 ? "" : ""))
: (clues +=
item.slice(5, 7) +
"" +
item.slice(8, 10) +
"" +
(index == exceptionDate.length - 1 ? "" : ""))
);
this.consumerTrend.clues = clues; this.consumerTrend.clues = clues;
if (num) { if (num) {
var lineDatas = data.obj.dayConsumerAmount.map(item => Object var lineDatas = data.obj.dayConsumerAmount.map((item) =>
.assign(item, { Object.assign(item, {
value: item.consumerAmount, value: item.consumerAmount,
name: item.date.slice(5) name: item.date.slice(5),
})); })
);
this.lineDatas = lineDatas; this.lineDatas = lineDatas;
} }
} catch (e) { } catch (e) {
...@@ -1034,28 +1350,30 @@ ...@@ -1034,28 +1350,30 @@
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: e.message title: e.message,
}) });
} }
}, },
// 是否开通消费报告 // 是否开通消费报告
async queryIsDredgeMember(num) { async queryIsDredgeMember(num) {
try { try {
let data = await this.$http.get({ let data = await this.$http.get(
url: gHost + {
'/report-push/member-info/queryIsDredgeMember' url: gHost + "/report-push/member-info/queryIsDredgeMember",
}, { },
schoolId: getQueryParams('schoolId'), {
userId: getQueryParams('userId'), schoolId: getQueryParams("schoolId"),
serviceItemCode: 4001 userId: getQueryParams("userId"),
}) serviceItemCode: 4001,
}
);
if (data.code != 200) { if (data.code != 200) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: data.msg title: data.msg,
}) });
return return;
} }
this.isOpen = data.obj.status; this.isOpen = data.obj.status;
if (num == 1) { if (num == 1) {
...@@ -1073,28 +1391,30 @@ ...@@ -1073,28 +1391,30 @@
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: e.message title: e.message,
}) });
} }
}, },
// 查询会员消费金额 // 查询会员消费金额
async queryMemberConsumerAmount() { async queryMemberConsumerAmount() {
try { try {
let data = await this.$http.get({ let data = await this.$http.get(
url: gHost + {
'/report-push/member-info/queryMemberConsumerAmount' url: gHost + "/report-push/member-info/queryMemberConsumerAmount",
}, { },
schoolId: getQueryParams('schoolId'), {
userId: getQueryParams('userId'), schoolId: getQueryParams("schoolId"),
serviceItemCode: 4001 userId: getQueryParams("userId"),
}) serviceItemCode: 4001,
}
);
if (data.code != 200) { if (data.code != 200) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: data.msg title: data.msg,
}) });
return return;
} }
this.memberInfo.leastAmount = data.obj.leastAmount; this.memberInfo.leastAmount = data.obj.leastAmount;
} catch (e) { } catch (e) {
...@@ -1103,69 +1423,94 @@ ...@@ -1103,69 +1423,94 @@
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: e.message title: e.message,
}) });
} }
}, },
// 查询会员有效期 // 查询会员有效期
async queryMemberValidTime() { async queryMemberValidTime() {
try { try {
let data = await this.$http.get({ let data = await this.$http.get(
url: gHost + {
'/report-push/member-info/queryMemberValidTime' url: gHost + "/report-push/member-info/queryMemberValidTime",
}, { },
schoolId: getQueryParams('schoolId'), {
userId: getQueryParams('userId'), schoolId: getQueryParams("schoolId"),
serviceItemCode: 4001 userId: getQueryParams("userId"),
}) serviceItemCode: 4001,
}
);
if (data.code != 200) { if (data.code != 200) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: data.msg title: data.msg,
}) });
return return;
} }
this.memberInfo.differDay = data.obj.differDay; this.memberInfo.differDay = data.obj.differDay;
this.memberInfo.invalidDate = data.obj.invalidDate; this.memberInfo.invalidDate = data.obj.invalidDate;
let month = data.obj.invalidDate.slice(5, 6) == 0 ? data let month =
.obj.invalidDate.slice(6, 7) : data.obj data.obj.invalidDate.slice(5, 6) == 0
.invalidDate.slice(5, 7); ? data.obj.invalidDate.slice(6, 7)
let date = data.obj.invalidDate.slice(8, 9) == 0 ? data.obj : data.obj.invalidDate.slice(5, 7);
.invalidDate.slice(9) : data.obj let date =
.invalidDate.slice(8); data.obj.invalidDate.slice(8, 9) == 0
this.memberInfo.invalidDateStr = data.obj.invalidDate ? data.obj.invalidDate.slice(9)
.slice(0, 4) + '' + month + '' + date + ''; : data.obj.invalidDate.slice(8);
this.memberInfo.invalidDateStr =
data.obj.invalidDate.slice(0, 4) + "" + month + "" + date + "";
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception
console.log(e); console.log(e);
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
title: e.message title: e.message,
}) });
} }
}, },
equityPay: function() { equityPay: function () {
jWeixin.miniProgram.switchTab({ jWeixin.miniProgram.switchTab({
url: `/pages/Member/main`, url: `/pages/Member/main`,
success: function success() { success: function success() {
console.log('skip success') console.log("skip success");
}, },
fail: function fail(_fail) { fail: function fail(_fail) {
console.warn(_fail); console.warn(_fail);
uni.showModal({ uni.showModal({
content: JSON.stringify(_fail) content: JSON.stringify(_fail),
}); });
} },
}); });
}, },
}, },
} };
</script> </script>
<style lang="scss" scope> <style lang="scss" scope>
.tainer { .nodata {
position: absolute;
left: 50%;
top: 30%;
width: 100%;
transform: translate(-50%, 0);
.nodataImg {
width: 100%;
text-align: center;
}
.nodataTxt {
margin-top: 10rpx;
display: flex;
justify-content: center;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
}
}
.tainer {
.school-report-header { .school-report-header {
height: 88rpx; height: 88rpx;
margin: 72rpx 0 48rpx 40rpx; margin: 72rpx 0 48rpx 40rpx;
...@@ -1192,7 +1537,7 @@ ...@@ -1192,7 +1537,7 @@
font-size: 34rpx; font-size: 34rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #1B1B1B; color: #1b1b1b;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -1223,18 +1568,18 @@ ...@@ -1223,18 +1568,18 @@
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #1B1B1B; color: #1b1b1b;
margin-right: 12rpx; margin-right: 12rpx;
} }
.triangle { .triangle {
width: 21rpx; width: 21rpx;
height: 10rpx; height: 10rpx;
background: no-repeat center/100% url(../../static/images/grayTriangle.png); background: no-repeat center/100%
url(../../static/images/grayTriangle.png);
} }
} }
.school-report-screen-item-two { .school-report-screen-item-two {
width: 270rpx; width: 270rpx;
display: flex; display: flex;
...@@ -1245,14 +1590,15 @@ ...@@ -1245,14 +1590,15 @@
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #1B1B1B; color: #1b1b1b;
margin-right: 17rpx; margin-right: 17rpx;
} }
.triangle { .triangle {
width: 21rpx; width: 21rpx;
height: 10rpx; height: 10rpx;
background: no-repeat center/100% url(../../static/images/grayTriangle.png); background: no-repeat center/100%
url(../../static/images/grayTriangle.png);
} }
} }
} }
...@@ -1272,7 +1618,7 @@ ...@@ -1272,7 +1618,7 @@
.school-report-context-tab-item-one { .school-report-context-tab-item-one {
width: 172rpx; width: 172rpx;
background: #F9F9F9; background: #f9f9f9;
border-radius: 20rpx 20rpx 0rpx 0rpx; border-radius: 20rpx 20rpx 0rpx 0rpx;
font-size: 30rpx; font-size: 30rpx;
font-family: PingFangSC-Semibold, PingFang SC; font-family: PingFangSC-Semibold, PingFang SC;
...@@ -1283,7 +1629,7 @@ ...@@ -1283,7 +1629,7 @@
align-items: center; align-items: center;
&.active { &.active {
background: #E4F9F2; background: #e4f9f2;
} }
} }
} }
...@@ -1295,7 +1641,7 @@ ...@@ -1295,7 +1641,7 @@
.share-button { .share-button {
width: 155rpx; width: 155rpx;
height: 64rpx; height: 64rpx;
background: rgba(4, 184, 113, .13); background: rgba(4, 184, 113, 0.13);
border-radius: 32rpx 0rpx 0rpx 32rpx; border-radius: 32rpx 0rpx 0rpx 32rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -1312,7 +1658,7 @@ ...@@ -1312,7 +1658,7 @@
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC; font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600; font-weight: 600;
color: #04B871; color: #04b871;
} }
} }
} }
...@@ -1321,12 +1667,13 @@ ...@@ -1321,12 +1667,13 @@
.school-report-context-bgImg { .school-report-context-bgImg {
width: 100%; width: 100%;
height: 452rpx; height: 452rpx;
background: no-repeat center/100% url(../../static/images/consumeReportBg.png); background: no-repeat center/100%
url(../../static/images/consumeReportBg.png);
} }
.school-report-context-card { .school-report-context-card {
width: 100%; width: 100%;
background: #E5F8F1; background: #e5f8f1;
padding: 0 30rpx; padding: 0 30rpx;
position: absolute; position: absolute;
top: 650rpx; top: 650rpx;
...@@ -1335,14 +1682,15 @@ ...@@ -1335,14 +1682,15 @@
.school-report-context-card-one { .school-report-context-card-one {
width: 100%; width: 100%;
height: 598rpx; height: 598rpx;
background: #FFFFFF; background: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
.school-report-context-card-one-img { .school-report-context-card-one-img {
width: 428rpx; width: 428rpx;
height: 428rpx; height: 428rpx;
background: no-repeat center/100% url(../../static/images/consumeReport.png); background: no-repeat center/100%
url(../../static/images/consumeReport.png);
position: absolute; position: absolute;
top: -172rpx; top: -172rpx;
left: 160rpx; left: 160rpx;
...@@ -1366,7 +1714,7 @@ ...@@ -1366,7 +1714,7 @@
.school-report-context-card-one-context-dot-item { .school-report-context-card-one-context-dot-item {
width: 10rpx; width: 10rpx;
height: 10rpx; height: 10rpx;
background: #04B871; background: #04b871;
border-radius: 10rpx; border-radius: 10rpx;
margin-right: 16rpx; margin-right: 16rpx;
} }
...@@ -1376,12 +1724,12 @@ ...@@ -1376,12 +1724,12 @@
line-height: 40rpx; line-height: 40rpx;
.txt-important { .txt-important {
color: #04B871; color: #04b871;
margin: 0 4rpx; margin: 0 4rpx;
} }
.txt-important-two { .txt-important-two {
color: #04B871; color: #04b871;
} }
} }
...@@ -1413,7 +1761,7 @@ ...@@ -1413,7 +1761,7 @@
.school-report-context-card-two { .school-report-context-card-two {
height: 876rpx; height: 876rpx;
background: #FFFFFF; background: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
...@@ -1431,7 +1779,7 @@ ...@@ -1431,7 +1779,7 @@
.school-report-context-card-two-conclusion-txt { .school-report-context-card-two-conclusion-txt {
.abnormal-days { .abnormal-days {
color: #F9793F; color: #f9793f;
margin: 0 5rpx; margin: 0 5rpx;
} }
} }
...@@ -1443,14 +1791,14 @@ ...@@ -1443,14 +1791,14 @@
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #F9793F; color: #f9793f;
display: flex; display: flex;
align-items: center; align-items: center;
.school-report-context-card-two-conclusion-logo-item-dot { .school-report-context-card-two-conclusion-logo-item-dot {
width: 12rpx; width: 12rpx;
height: 12rpx; height: 12rpx;
background: #F9793F; background: #f9793f;
border-radius: 12rpx; border-radius: 12rpx;
} }
...@@ -1466,7 +1814,7 @@ ...@@ -1466,7 +1814,7 @@
width: 690rpx; width: 690rpx;
/deep/ .van-calendar__weekdays { /deep/ .van-calendar__weekdays {
background: #F7FAF8; background: #f7faf8;
} }
/deep/ .van-calendar__weekday { /deep/ .van-calendar__weekday {
...@@ -1499,8 +1847,8 @@ ...@@ -1499,8 +1847,8 @@
} }
/deep/ .van-calendar__selected-day { /deep/ .van-calendar__selected-day {
background: rgba(0, 0, 0, .1); background: rgba(0, 0, 0, 0.1);
color: #F9793F; color: #f9793f;
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
border-radius: 22rpx; border-radius: 22rpx;
...@@ -1513,14 +1861,14 @@ ...@@ -1513,14 +1861,14 @@
font-size: 20rpx; font-size: 20rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #F9793F; color: #f9793f;
line-height: 28rpx; line-height: 28rpx;
margin: 12rpx 0 4rpx; margin: 12rpx 0 4rpx;
} }
/deep/ .notice-day { /deep/ .notice-day {
color: #F9793F; color: #f9793f;
background: rgba(249, 121, 63, .1); background: rgba(249, 121, 63, 0.1);
border-radius: 22rpx; border-radius: 22rpx;
width: 88rpx; width: 88rpx;
height: 88rpx; height: 88rpx;
...@@ -1532,7 +1880,8 @@ ...@@ -1532,7 +1880,8 @@
.school-report-context-card-two-details { .school-report-context-card-two-details {
height: 132rpx; height: 132rpx;
background: no-repeat center/100% url(../../static/images/diningSituations.png); background: no-repeat center/100%
url(../../static/images/diningSituations.png);
padding: 55rpx 42rpx 30rpx 29rpx; padding: 55rpx 42rpx 30rpx 29rpx;
box-sizing: border-box; box-sizing: border-box;
border-radius: 0 0 16rpx 16rpx; border-radius: 0 0 16rpx 16rpx;
...@@ -1545,12 +1894,12 @@ ...@@ -1545,12 +1894,12 @@
width: 130rpx; width: 130rpx;
height: 43rpx; height: 43rpx;
border-radius: 8rpx; border-radius: 8rpx;
border: 1rpx solid #04B871; border: 1rpx solid #04b871;
font-size: 28rpx; font-size: 28rpx;
font-family: FontName; font-family: FontName;
font-weight: 600; font-weight: 600;
font-style: italic; font-style: italic;
color: #04B871; color: #04b871;
margin-right: 65rpx; margin-right: 65rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -1602,14 +1951,12 @@ ...@@ -1602,14 +1951,12 @@
font-size: 24rpx; font-size: 24rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #F9793F; color: #f9793f;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
} }
} }
} }
} }
...@@ -1617,7 +1964,7 @@ ...@@ -1617,7 +1964,7 @@
.school-report-context-card-three { .school-report-context-card-three {
height: 526rpx; height: 526rpx;
background: #FFFFFF; background: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
...@@ -1634,7 +1981,7 @@ ...@@ -1634,7 +1981,7 @@
margin-left: 30rpx; margin-left: 30rpx;
.school-report-context-card-three-conclusion-item-describe { .school-report-context-card-three-conclusion-item-describe {
color: #04B871; color: #04b871;
} }
} }
} }
...@@ -1648,7 +1995,7 @@ ...@@ -1648,7 +1995,7 @@
.school-report-context-card-four { .school-report-context-card-four {
height: 536rpx; height: 536rpx;
background: #FFFFFF; background: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
...@@ -1665,7 +2012,7 @@ ...@@ -1665,7 +2012,7 @@
margin: 0 40rpx 0 30rpx; margin: 0 40rpx 0 30rpx;
.consume-total { .consume-total {
color: #04B871; color: #04b871;
margin: 0 6rpx; margin: 0 6rpx;
} }
} }
...@@ -1679,12 +2026,12 @@ ...@@ -1679,12 +2026,12 @@
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC; font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600; font-weight: 600;
color: #FFFFFF; color: #ffffff;
line-height: 40rpx; line-height: 40rpx;
.school-average { .school-average {
width: 110rpx; width: 110rpx;
background: linear-gradient(360deg, #04B871 0%, #07D66A 100%); background: linear-gradient(360deg, #04b871 0%, #07d66a 100%);
border-radius: 16rpx 16rpx 0 0; border-radius: 16rpx 16rpx 0 0;
margin-right: 74rpx; margin-right: 74rpx;
display: flex; display: flex;
...@@ -1709,7 +2056,7 @@ ...@@ -1709,7 +2056,7 @@
.user-consume { .user-consume {
width: 110rpx; width: 110rpx;
background: linear-gradient(360deg, #F0662B 0%, #FF8646 100%); background: linear-gradient(360deg, #f0662b 0%, #ff8646 100%);
border-radius: 16rpx 16rpx 0 0; border-radius: 16rpx 16rpx 0 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -1754,7 +2101,7 @@ ...@@ -1754,7 +2101,7 @@
.school-report-context-card-five { .school-report-context-card-five {
height: 634rpx; height: 634rpx;
background: #FFFFFF; background: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
margin-bottom: 37rpx; margin-bottom: 37rpx;
position: relative; position: relative;
...@@ -1772,7 +2119,7 @@ ...@@ -1772,7 +2119,7 @@
line-height: 40rpx; line-height: 40rpx;
.abnormal-date { .abnormal-date {
color: #04B871; color: #04b871;
} }
} }
} }
...@@ -1802,14 +2149,14 @@ ...@@ -1802,14 +2149,14 @@
.consumer-trend-line-icon-logo-right { .consumer-trend-line-icon-logo-right {
width: 8rpx; width: 8rpx;
height: 1rpx; height: 1rpx;
background: #0BDA7D; background: #0bda7d;
} }
.consumer-trend-line-icon-logo-middle { .consumer-trend-line-icon-logo-middle {
width: 12rpx; width: 12rpx;
height: 12rpx; height: 12rpx;
background: #FFFFFF; background: #ffffff;
border: 3rpx solid #0BDB7E; border: 3rpx solid #0bdb7e;
border-radius: 12rpx; border-radius: 12rpx;
} }
} }
...@@ -1818,12 +2165,10 @@ ...@@ -1818,12 +2165,10 @@
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #8C8C8C; color: #8c8c8c;
line-height: 40rpx; line-height: 40rpx;
} }
} }
} }
} }
...@@ -1832,7 +2177,8 @@ ...@@ -1832,7 +2177,8 @@
margin: 0 0 43rpx; margin: 0 0 43rpx;
padding: 33rpx 34rpx 42rpx 42rpx; padding: 33rpx 34rpx 42rpx 42rpx;
box-sizing: border-box; box-sizing: border-box;
background: no-repeat center/100% url(../../static/images/extendPermissionsBg.png); background: no-repeat center/100%
url(../../static/images/extendPermissionsBg.png);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -1855,7 +2201,7 @@ ...@@ -1855,7 +2201,7 @@
color: rgba(123, 80, 53, 0.85); color: rgba(123, 80, 53, 0.85);
.validity-date { .validity-date {
color: #F9793F; color: #f9793f;
} }
} }
} }
...@@ -1867,12 +2213,12 @@ ...@@ -1867,12 +2213,12 @@
.school-report-footer-item-btn { .school-report-footer-item-btn {
width: 180rpx; width: 180rpx;
height: 61rpx; height: 61rpx;
background: linear-gradient(360deg, #F0662B 0%, #FF8646 100%); background: linear-gradient(360deg, #f0662b 0%, #ff8646 100%);
border-radius: 49rpx; border-radius: 49rpx;
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC; font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600; font-weight: 600;
color: #FFFFFF; color: #ffffff;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
...@@ -1885,7 +2231,12 @@ ...@@ -1885,7 +2231,12 @@
.no-open { .no-open {
width: 100%; width: 100%;
height: 915rpx; height: 915rpx;
background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.97) 38%, #FFFFFF 100%); background: linear-gradient(
180deg,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 0.97) 38%,
#ffffff 100%
);
position: absolute; position: absolute;
top: 1425rpx; top: 1425rpx;
padding: 309rpx 30rpx 63rpx; padding: 309rpx 30rpx 63rpx;
...@@ -1903,14 +2254,15 @@ ...@@ -1903,14 +2254,15 @@
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #04B871; color: #04b871;
line-height: 40rpx; line-height: 40rpx;
} }
.no-open-solution-item { .no-open-solution-item {
width: 15rpx; width: 15rpx;
height: 20rpx; height: 20rpx;
background: no-repeat center/100% url(../../static/images/rightArrow.png); background: no-repeat center/100%
url(../../static/images/rightArrow.png);
} }
} }
...@@ -1925,7 +2277,7 @@ ...@@ -1925,7 +2277,7 @@
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #21775C; color: #21775c;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
...@@ -1934,7 +2286,7 @@ ...@@ -1934,7 +2286,7 @@
.open-results-items { .open-results-items {
width: 100%; width: 100%;
height: 379rpx; height: 379rpx;
background: #F6FAF9; background: #f6faf9;
border-radius: 16rpx; border-radius: 16rpx;
padding: 32rpx 0 43rpx 73rpx; padding: 32rpx 0 43rpx 73rpx;
box-sizing: border-box; box-sizing: border-box;
...@@ -1972,49 +2324,55 @@ ...@@ -1972,49 +2324,55 @@
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #13664C; color: #13664c;
line-height: 40rpx; line-height: 40rpx;
} }
.dining-situations-img { .dining-situations-img {
width: 34rpx; width: 34rpx;
height: 27rpx; height: 27rpx;
background: no-repeat center/100% url(../../static/images/repast.png); background: no-repeat center/100%
url(../../static/images/repast.png);
margin-right: 22rpx; margin-right: 22rpx;
} }
.consumer-rationality-img { .consumer-rationality-img {
width: 34rpx; width: 34rpx;
height: 34rpx; height: 34rpx;
background: no-repeat center/100% url(../../static/images/consumerRationality.png); background: no-repeat center/100%
url(../../static/images/consumerRationality.png);
margin: 0 22rpx 0 108rpx; margin: 0 22rpx 0 108rpx;
} }
.consumer-preference-img { .consumer-preference-img {
width: 30rpx; width: 30rpx;
height: 27rpx; height: 27rpx;
background: no-repeat center/100% url(../../static/images/consumerPreference.png); background: no-repeat center/100%
url(../../static/images/consumerPreference.png);
margin-right: 24rpx; margin-right: 24rpx;
} }
.consumer-advice-img { .consumer-advice-img {
width: 31rpx; width: 31rpx;
height: 31rpx; height: 31rpx;
background: no-repeat center/100% url(../../static/images/consumerAdvice.png); background: no-repeat center/100%
url(../../static/images/consumerAdvice.png);
margin: 0 24rpx 0 112rpx; margin: 0 24rpx 0 112rpx;
} }
.consumer-num-img { .consumer-num-img {
width: 30rpx; width: 30rpx;
height: 34rpx; height: 34rpx;
background: no-repeat center/100% url(../../static/images/consumerNum.png); background: no-repeat center/100%
url(../../static/images/consumerNum.png);
margin-right: 24rpx; margin-right: 24rpx;
} }
.consumer-trend-img { .consumer-trend-img {
width: 28rpx; width: 28rpx;
height: 25rpx; height: 25rpx;
background: no-repeat center/100% url(../../static/images/consumerTrend.png); background: no-repeat center/100%
url(../../static/images/consumerTrend.png);
margin-right: 25rpx; margin-right: 25rpx;
} }
} }
...@@ -2022,6 +2380,5 @@ ...@@ -2022,6 +2380,5 @@
} }
} }
} }
}
}
</style> </style>
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