Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
X
xzf_uniapp-wechat-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李智书
xzf_uniapp-wechat-web
Commits
846f596e
Commit
846f596e
authored
Nov 15, 2022
by
李智书
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
parents
625a979e
cb2ed2be
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1057 additions
and
185 deletions
+1057
-185
src/pages.json
src/pages.json
+9
-0
src/pages/SchoolReport/SchoolReport.vue
src/pages/SchoolReport/SchoolReport.vue
+792
-185
src/pages/socialmailbox/socialmailbox.vue
src/pages/socialmailbox/socialmailbox.vue
+256
-0
No files found.
src/pages.json
View file @
846f596e
...
...
@@ -451,6 +451,15 @@
}
}
,{
"path"
:
"pages/socialmailbox/socialmailbox"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"匿名投递故事"
}
}
],
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
...
...
src/pages/SchoolReport/SchoolReport.vue
View file @
846f596e
...
...
@@ -79,12 +79,13 @@
</view>
<view
class=
"school-report-context-card"
>
<view
class=
"school-report-context-card-one"
:style=
"
{height:[
612
,256,pubTalkSummaryHeight][tabIndex-1]+'rpx'}">
:style=
"
{height:[
consumerDetailCalculateObj.totalData>0?496:598
,256,pubTalkSummaryHeight][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
v-show=
"tabIndex==1&&consumerDetailCalculateObj.totalData>0"
class=
"school-report-context-card-one-context"
>
<!--
<view
class=
"school-report-context-card-one-context-item"
>
<view
class=
"school-report-context-card-one-context-dot"
>
<view
class=
"school-report-context-card-one-context-dot-item"
>
</view>
...
...
@@ -97,6 +98,19 @@
<text
v-else
>
恭喜
<text
class=
"txt-important"
>
{{
userInfo
.
userName
}}
</text>
荣获“快乐干饭人”称号,快乐要和家人一起分享哦
</text>
</view>
</view>
-->
<view
class=
"school-report-context-card-one-context-item"
>
<view
class=
"school-report-context-card-one-context-dot"
>
<view
class=
"school-report-context-card-one-context-dot-item"
>
</view>
</view>
<view
class=
"school-report-context-card-one-context-txt"
>
本
{{
[
'
月
'
,
'
周
'
][
reportTypeIndex
]
}}
就餐
<text
class=
"txt-important"
>
{{
consumerDetailCalculateObj
.
cateringNumber
}}
</text>
次,未就餐
<text
class=
"txt-important"
>
{{
consumerDetailCalculateObj
.
notCateringNumber
}}
</text>
次。食堂总消费
<text
class=
"txt-important"
>
{{
consumerDetailCalculateObj
.
canteenData
}}
</text>
元,生活费总花费
<text
class=
"txt-important"
>
{{
consumerDetailCalculateObj
.
totalData
}}
</text>
元
</view>
</view>
<view
class=
"school-report-context-card-one-context-item"
>
<view
class=
"school-report-context-card-one-context-dot"
>
...
...
@@ -109,7 +123,7 @@
<text
v-else
>
饮食较
<text
class=
"txt-important-two"
>
均衡
</text>
,继续保持哦
</text>
</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-item"
>
</view>
...
...
@@ -120,7 +134,7 @@
<text
class=
"txt-important"
>
{{
consumerAmountObj
.
gtgraderate
}}
%
</text>
的同学
<text
v-if=
"isReasonable"
>
,请及时评估生活费是否合理
</text>
</view>
</view>
</view>
-->
<view
class=
"school-report-context-card-one-context-item"
>
<view
class=
"school-report-context-card-one-context-dot"
>
<view
class=
"school-report-context-card-one-context-dot-item"
>
...
...
@@ -162,6 +176,18 @@
</view>
</view>
-->
</view>
<view
v-show=
"tabIndex==1&&consumerDetailCalculateObj.totalData
<
=
0
"
class=
"school-report-context-card-one-context"
>
<view
class=
"school-report-context-card-one-context-nodata"
>
<view
class=
"card-one-nodata-img"
>
<image
:src=
"ImgUrl+'SchoolReport/noConsumption.png'"
mode=
""
></image>
</view>
<view
class=
"card-one-nodata-txt"
>
<text>
所选日期内暂无消费
</text>
</view>
</view>
</view>
<!-- 出入校报告 -->
<view
v-show=
"tabIndex==2"
class=
"attendance-report-context-card-one-context"
>
<view
class=
"attendance-report-context-card-one-context-item"
>
...
...
@@ -221,15 +247,102 @@
</view>
</view>
<!-- 消费报告 -->
<view
v-show=
"tabIndex==1"
class=
"school-report-context-card-two"
>
<view
v-show=
"tabIndex==1"
class=
"school-report-context-card-eight"
:style=
"
{height:isOpen?'1431rpx':'882rpx'}">
<view
class=
"school-report-context-card-title"
>
<view
class=
"school-report-context-card-title-img"
>
<text>
消费明细
</text>
</view>
</view>
<view
class=
"school-report-context-card-eight-conclusion"
>
<view
v-if=
"consumerDetailCalculateObj.totalData>0"
class=
"school-report-context-card-eight-conclusion-item"
>
<text>
本
{{
[
'
月
'
,
'
周
'
][
reportTypeIndex
]
}}
食堂
<text
class=
"txt-important"
>
{{
consumerDetailCalculateObj
.
canteenData
}}
</text>
元,总消费
<text
class=
"txt-important"
>
{{
consumerDetailCalculateObj
.
totalData
}}
</text>
元
</text>
</view>
<view
v-else
class=
"school-report-context-card-eight-conclusion-item eight-conclusion-nodata"
>
<text>
所选日期内暂无消费
</text>
</view>
</view>
<view
class=
"school-report-context-card-eight-details"
>
<view
class=
"consumer-details-header"
>
<view
v-for=
"(item,index) in consumerDetailsHeaderList"
:key=
"index"
class=
"consumer-details-header-item"
>
<text>
{{
item
}}
</text>
</view>
</view>
<view
v-if=
"isOpen"
class=
"consumer-details-body-box"
>
<view
v-for=
"(item,index) in campusConsumerDetailObj.campusConsumerDetailList"
:key=
"index"
class=
"consumer-details-body"
:style=
"
{background:Number.isInteger(index/2)?'#FFFFFF':'#F8F8F7'}">
<view
class=
"consumer-details-body-item"
v-for=
"(e,i) in item.consumerDetailsArr"
:class=
"i?'':'consumer-details-body-data'"
>
<text>
{{
e
}}
</text>
</view>
</view>
</view>
<view
v-else
class=
"consumer-details-body-box"
>
<view
class=
"consumer-details-body"
style=
"background: #FFFFFF;"
>
<view
class=
"consumer-details-body-item"
v-for=
"(e,i) in campusConsumerDetailObj.campusConsumerDetailList[0].consumerDetailsArr"
:key=
"i"
:class=
"i?'':'consumer-details-body-data'"
>
<text>
{{
e
}}
</text>
</view>
</view>
<view
class=
"consumer-details-body"
style=
"background: #F8F8F7;"
>
<view
class=
"consumer-details-body-item"
v-for=
"(e,i) in campusConsumerDetailObj.campusConsumerDetailList[1].consumerDetailsArr"
:key=
"i"
:class=
"i?'':'consumer-details-body-data'"
>
<text>
{{
e
}}
</text>
</view>
</view>
</view>
<view
v-if=
"isOpen&&campusConsumerDetailObj.campusConsumerDetailList.length>7"
class=
"consumer-details-body-notice-box"
>
<view
class=
"consumer-details-body-notice"
>
<view
class=
"consumer-details-body-notice-txt"
>
<text>
滑动查看更多
</text>
</view>
<view
class=
"consumer-details-body-notice-icon"
>
<image
:src=
"ImgUrl+'SchoolReport/slide.png'"
mode=
""
></image>
</view>
</view>
</view>
<view
style=
"height: 40rpx;"
v-if=
"isOpen&&campusConsumerDetailObj.campusConsumerDetailList.length
<
=
7
"
>
</view>
<view
v-if=
"isOpen"
v-for=
"(item,index) in campusConsumerDetailObj.campusConsumerDetailCalculateList"
:key=
"index"
class=
"consumer-details-sum"
>
<view
v-for=
"(e,i) in item.consumerDetailsSumArr"
class=
"consumer-details-sum-item"
:key=
"i"
:class=
"i?'':'consumer-details-sum-type'"
>
<text
:style=
"
{color:item.calculateType=='较上'?trendColorList[i]:''}">
{{
e
}}
</text>
<template
v-if=
"item.calculateType=='较上'&&i == 0"
>
<span>
{{
[
'
月
'
,
'
周
'
][
reportTypeIndex
]
}}
</span>
</
template
>
<
template
v-if=
"i == 0"
><span
class=
"type-unit"
>
{{
unitTypeList
[
index
]
}}
</span></
template
>
</view>
</view>
</view>
</view>
<view
v-show=
"tabIndex==1&&isOpen"
class=
"school-report-context-card-two"
:style=
"{height:consumerDetailCalculateObj.totalData>0?'876rpx':'916rpx'}"
>
<view
class=
"school-report-context-card-title"
>
<view
class=
"school-report-context-card-title-img"
>
<text>
就餐情况
</text>
</view>
</view>
<view
class=
"school-report-context-card-two-conclusion"
>
<view
v-if=
"consumerDetailCalculateObj.totalData<=0"
class=
"school-report-context-card-nodata"
>
<text>
所选日期内暂无消费
</text>
</view>
<view
class=
"school-report-context-card-two-conclusion"
:style=
"{'margin-top': consumerDetailCalculateObj.totalData>0?'40rpx':''}"
>
<view
class=
"school-report-context-card-two-conclusion-txt"
>
<text>
本
{{
[
'
月
'
,
'
周
'
][
reportTypeIndex
]
}}
共
<text
<text
v-show=
"consumerDetailCalculateObj.totalData>0"
>
本{{['月','周'][reportTypeIndex]}}共
<text
class=
"abnormal-days"
>
{{diningSituations.notRepastDay}}
</text>
天未就餐
</text>
</view>
<view
class=
"school-report-context-card-two-conclusion-logo"
>
...
...
@@ -261,7 +374,7 @@
<view
class=
"school-report-context-card-two-details-meal-logo"
>
<view
v-if=
"diningSituations.notRepastDetails.breakfastStatus==1"
class=
"school-report-context-card-two-details-meal-img"
>
<image
src=
"../../static/images/eatted.png
"
mode=
""
></image>
<image
:src=
"ImgUrl+'SchoolReport/eatted.png'
"
mode=
""
></image>
</view>
<view
v-else-if=
"diningSituations.notRepastDetails.breakfastStatus==0"
class=
"school-report-context-card-two-details-meal-noeat"
>
...
...
@@ -275,7 +388,7 @@
class=
"school-report-context-card-two-details-meal-logo school-report-context-card-two-details-meal-logo-two"
>
<view
v-if=
"diningSituations.notRepastDetails.lunchStatus==1"
class=
"school-report-context-card-two-details-meal-img"
>
<image
src=
"../../static/images/eatted.png
"
mode=
""
></image>
<image
:src=
"ImgUrl+'SchoolReport/eatted.png'
"
mode=
""
></image>
</view>
<view
v-else-if=
"diningSituations.notRepastDetails.lunchStatus==0"
class=
"school-report-context-card-two-details-meal-noeat"
>
...
...
@@ -289,7 +402,7 @@
class=
"school-report-context-card-two-details-meal-logo school-report-context-card-two-details-meal-logo-three"
>
<view
v-if=
"diningSituations.notRepastDetails.supperStatus==1"
class=
"school-report-context-card-two-details-meal-img"
>
<image
src=
"../../static/images/eatted.png
"
mode=
""
></image>
<image
:src=
"ImgUrl+'SchoolReport/eatted.png'
"
mode=
""
></image>
</view>
<view
v-else-if=
"diningSituations.notRepastDetails.supperStatus==0"
class=
"school-report-context-card-two-details-meal-noeat"
>
...
...
@@ -307,11 +420,17 @@
</view>
</view>
<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"
:class=
"consumerDetailCalculateObj.totalData>0?'':'card-three-conclusion-nodata'"
>
<text
v-if=
"consumerDetailCalculateObj.totalData>0"
>
<text
v-if=
"isEatLow"
>
正餐消费占比
<text
class=
"school-report-context-card-three-conclusion-item-describe"
>
过低
</text>
,请及时调整饮食习惯
</text>
<text
v-else
>
饮食较
<text
class=
"school-report-context-card-three-conclusion-item-describe"
>
均衡
</text>
,继续保持哦
</text>
</text>
<text
v-else
>
所选日期内暂无消费
</text>
</view>
</view>
<view
id=
"consumer-preferences-pie"
>
...
...
@@ -324,48 +443,61 @@
</view>
</view>
<view
class=
"school-report-context-card-four-conclusion"
>
<view
class=
"school-report-context-card-four-conclusion-item"
>
<text>
消费
<text
<view
class=
"school-report-context-card-four-conclusion-item"
:class=
"consumerDetailCalculateObj.totalData>0?'':'card-four-conclusion-nodata'"
>
<!-- <text>消费<text
class="consume-total">{{consumerAmountObj.consumergrossamount}}</text>元,超过同年级<text
class="consume-total">{{consumerAmountObj.gtgraderate}}%</text>的同学<text
v-if=
"isReasonable"
>
,请及时评估生活费是否合理
</text></text>
v-if="isReasonable">,请及时评估生活费是否合理</text></text> -->
<text
v-if=
"consumerDetailCalculateObj.totalData>0"
>
消费总额
<text
class=
"consume-total"
>
{{livingExpensesAllowance.userConsumeAmount}}
</text>
元
<text
v-if=
"livingExpensesAllowance.gradeAverageAmount>0"
>
,同比上{{['月','周'][reportTypeIndex]}}
<text
class=
"consume-total"
>
{{livingExpensesAllowance.lastMonthRateStr}}
<van-icon
:class=
"livingExpensesAllowance.lastMonthRate>0?'livingCostUp':''"
name=
"down"
/>
</text>
</text>
</text>
<text
v-else
>
所选日期内暂无消费
</text>
</view>
</view>
<view
class=
"consume-total-img"
>
<view
class=
"school-average"
:style=
"{height:schoolAverageHeight+'rpx'}"
>
<view
class=
"school-average-num"
>
<text>
{{
consumerAmountObj
.
schoolavga
mount
}}
</text>
<text>
{{
livingExpensesAllowance.schoolAverageA
mount}}
</text>
</view>
<view
class=
"school-average-img"
>
<image
src=
"../../static/images/greenArrow.png
"
mode=
""
></image>
<image
:src=
"ImgUrl+'SchoolReport/greenArrow.png'
"
mode=
""
></image>
</view>
</view>
<view
class=
"
user-consume"
:style=
"
{height:userConsum
eHeight+'rpx'}">
<view
class=
"
user-consum
e-num"
>
<text>
{{
consumerAmountObj
.
consumergrossa
mount
}}
</text>
<view
class=
"
school-average last-month"
:style=
"{height:gradeAverag
eHeight+'rpx'}"
>
<view
class=
"
school-averag
e-num"
>
<text>
{{
livingExpensesAllowance.gradeAverageA
mount}}
</text>
</view>
<view
class=
"
user-consum
e-img"
>
<image
src=
"../../static/images/yellowArrow.png
"
mode=
""
></image>
<view
class=
"
school-averag
e-img"
>
<image
:src=
"ImgUrl+'SchoolReport/greenArrow.png'
"
mode=
""
></image>
</view>
</view>
<view
class=
"
school-average"
:style=
"
{height:gradeAverag
eHeight+'rpx'}">
<view
class=
"
school-averag
e-num"
>
<text>
{{
consumerAmountObj
.
gradeavga
mount
}}
</text>
<view
class=
"
user-consume"
:style=
"{height:userConsum
eHeight+'rpx'}"
>
<view
class=
"
user-consum
e-num"
>
<text>
{{
livingExpensesAllowance.userConsumeA
mount}}
</text>
</view>
<view
class=
"
school-averag
e-img"
>
<image
src=
"../../static/images/greenArrow.png
"
mode=
""
></image>
<view
class=
"
user-consum
e-img"
>
<image
:src=
"ImgUrl+'SchoolReport/yellowArrow.png'
"
mode=
""
></image>
</view>
</view>
</view>
<view
class=
"consume-total-img-des"
>
<view
class=
"consume-total-img-des-item"
>
<text>
全校平均
</text>
<view
class=
"consume-total-img-des-item"
style=
"margin-left: 20rpx;"
>
<text>
上上{{['月','周'][reportTypeIndex]}}
</text>
</view>
<view
class=
"consume-total-img-des-item consume-des"
>
<text>
本人消费
</text>
<text>
上{{['月','周'][reportTypeIndex]}}
</text>
</view>
<view
class=
"consume-total-img-des-item"
>
<text>
全年级平均
</text>
<text>
本{{['月','周'][reportTypeIndex]}}
</text>
</view>
</view>
</view>
...
...
@@ -376,11 +508,16 @@
</view>
</view>
<view
class=
"school-report-context-card-five-conclusion"
>
<view
class=
"school-report-context-card-five-conclusion-item"
>
<view
v-if=
"consumerDetailCalculateObj.totalData>0"
class=
"school-report-context-card-five-conclusion-item"
>
<text
v-if=
"isAbnormal"
><text
class=
"abnormal-date"
>
{{consumerTrend.clues}}
</text>
的消费金额存在异常,请及时关注
</text>
<text
v-else
>
每日消费金额较稳定,继续保持哦
</text>
</view>
<view
v-else
class=
"school-report-context-card-five-conclusion-item card-five-conclusion-nodata"
>
<text>
所选日期内暂无消费
</text>
</view>
</view>
<view
id=
"consumer-trend-line"
>
</view>
...
...
@@ -794,7 +931,7 @@
</view>
</view>
<view
v-if=
"tabIndex&&flag==tabIndex"
class=
"no-open"
:style=
"{height:[860,845,891][tabIndex-1]+'rpx',top:[1
620
,1099,pubTalkNoopenHeight][tabIndex-1]+'rpx'}"
>
:style=
"{height:[860,845,891][tabIndex-1]+'rpx',top:[1
426
,1099,pubTalkNoopenHeight][tabIndex-1]+'rpx'}"
>
<view
class=
"no-open-solution"
@
tap=
"equityPay"
>
<view
class=
"no-open-solution-txt"
>
<text>
最低{{memberInfo.leastAmount}}元/天开通,查看完整{{['消费','出入校','公话'][tabIndex-1]}}报告
</text>
...
...
@@ -820,7 +957,7 @@
<text>
+
</text>
</view>
<view
class=
"summary-item"
>
<text>
{{['月
度出入校报告','月
度公话报告'][tabIndex-2]}}
</text>
<text>
{{['月
','周'][reportTypeIndex]}}{{['度出入校报告','
度公话报告'][tabIndex-2]}}
</text>
</view>
</view>
<!-- 消费报告 -->
...
...
@@ -840,13 +977,13 @@
</view>
<view
class=
"details-item-left"
>
<view
class=
"details-item-up"
>
<text>
担心孩子被迫高额消费
?
</text>
<text>
钱花哪里了
?
</text>
</view>
<view
class=
"details-item-down"
>
<view
class=
"consumer-trend-img"
>
</view>
<view
class=
"details-item-down-txt"
>
<text>
【消费
趋势
】告诉你
</text>
<text>
【消费
明细
】告诉你
</text>
</view>
</view>
</view>
...
...
@@ -1004,8 +1141,7 @@
</view>
<view
v-else
class=
"nodata"
@
click=
"nodataClick"
>
<view
class=
"nodataImg"
>
<img
style=
"width: 100%"
src=
"https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/images/purchaseChart.gif"
/>
<img
style=
"width: 100%"
:src=
"ImgUrl+'images/purchaseChart.gif'"
/>
</view>
<view
class=
"nodataTxt"
>
<text>
当前为使用高峰期,请稍后再试
</text>
...
...
@@ -1056,6 +1192,7 @@
name
:
'
SchoolReport
'
,
data
()
{
return
{
ImgUrl
:
this
.
$ImgUrl
,
showReport
:
true
,
nodataImgUrl
:
this
.
$ImgUrl
,
userInfo
:
{},
...
...
@@ -1073,6 +1210,20 @@
imgUrl
:
''
,
// 存储base64图片
dialogShow
:
false
,
tabIndex
:
0
,
// 消费明细
campusConsumerDetailObj
:
{
campusConsumerDetailList
:
[],
campusConsumerDetailCalculateList
:
[]
},
consumerDetailsHeaderList
:
[
'
日期
'
,
'
早餐
'
,
'
午餐
'
,
'
晚餐
'
,
'
其他
'
,
'
合计
'
],
consumerDetailCalculateObj
:
{
canteenData
:
''
,
// 食堂消费
totalData
:
''
,
// 总消费
cateringNumber
:
''
,
// 就餐次数
notCateringNumber
:
''
,
//未就餐次数
},
trendColorList
:
[],
unitTypeList
:
[
'
(次)
'
,
'
(次)
'
,
'
(元)
'
,
''
,
'
(元)
'
],
// 就餐情况
diningSituations
:
{
diningSituationsDate
:
''
,
...
...
@@ -1088,7 +1239,14 @@
pieDatas
:
[],
isEatLow
:
false
,
// 生活费额度
consumerAmountObj
:
{},
livingExpensesAllowance
:
{
lastMonthRateStr
:
''
,
lastMonthRate
:
''
,
userConsumeAmount
:
''
,
//本月
gradeAverageAmount
:
''
,
//上月
schoolAverageAmount
:
''
//上上月
},
consumerAmountObj
:
[],
isReasonable
:
false
,
schoolAverageHeight
:
''
,
userConsumeHeight
:
''
,
...
...
@@ -1208,34 +1366,10 @@
this
.
memberInfo
.
invalidDateStr
=
'
2022年6月30日
'
;
this
.
memberInfo
.
differDay
=
dayjs
(
'
2022/06/30
'
).
diff
(
dayjs
(),
'
day
'
)
+
1
;
this
.
containerHeight
=
4200
;
this
.
queryConsumerSummaryAmount
(
1
).
then
(
e
=>
this
.
piechart
());
this
.
queryDayConsumerTrend
(
1
).
then
(
e
=>
this
.
linechart
(
this
.
reportTypeIndex
));
// this.queryMealPalAnalyse().then(() => this.mealPalBarchart());
// this.queryRepastTimeTrend().then(() => {
// if (this.mealtypeArr.indexOf(1) != -1) {
// this.breakfastTimeLinechart(this.reportTypeIndex,
// 'breakfast-time-line',
// 1);
// }
// if (this.mealtypeArr.indexOf(2) != -1) {
// this.breakfastTimeLinechart(this.reportTypeIndex,
// 'lunch-time-line',
// 2);
// }
// if (this.mealtypeArr.indexOf(3) != -1) {
// this.breakfastTimeLinechart(this.reportTypeIndex,
// 'dinner-time-line',
// 3);
// }
// })
}
else
{
this
.
tabIndex
=
1
;
this
.
queryIsDredgeMember
(
1002
,
1
).
then
(()
=>
{
this
.
queryConsumerSummaryAmount
(
1
).
then
(
e
=>
this
.
piechart
());
this
.
queryDayConsumerTrend
(
1
).
then
(
e
=>
this
.
linechart
(
this
.
reportTypeIndex
));
this
.
queryIsDredgeMember
(
1002
,
1
)
}
// this.queryMealPalAnalyse().then(() => this.mealPalBarchart());
// this.queryRepastTimeTrend().then(() => {
// if (this.mealtypeArr.indexOf(1) != -1) {
...
...
@@ -1255,8 +1389,24 @@
// 3);
// }
// })
});
this
.
queryConsumerSummaryAmount
(
1
).
then
(
e
=>
this
.
piechart
());
this
.
queryLivingCostsAmount
();
this
.
queryDayConsumerTrend
(
1
).
then
(
e
=>
this
.
linechart
(
this
.
reportTypeIndex
));
this
.
queryNotRepastDetails
(
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
,
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
endDate
).
then
(()
=>
{
if
(
this
.
diningSituations
.
notRepastDetailsDTOS
)
{
let
today
=
this
.
diningSituations
.
notRepastDetailsDTOS
.
filter
(
e
=>
e
.
repastDate
===
tmpDate
)[
0
];
this
.
diningSituations
.
notRepastDetails
=
today
;
}
else
{
this
.
diningSituations
.
notRepastDetails
=
{};
}
});
})
}
else
{
if
(
new
Date
().
getTime
()
<=
new
Date
(
'
2022/06/30
'
).
getTime
())
{
...
...
@@ -1267,6 +1417,7 @@
this
.
memberInfo
.
differDay
=
dayjs
(
'
2022/06/30
'
).
diff
(
dayjs
(),
'
day
'
)
+
1
;
this
.
containerHeight
=
4200
;
this
.
queryConsumerSummaryAmount
(
1
).
then
(
e
=>
this
.
piechart
());
this
.
queryLivingCostsAmount
();
this
.
queryDayConsumerTrend
(
1
).
then
(
e
=>
this
.
linechart
(
this
.
reportTypeIndex
));
// this.queryMealPalAnalyse().then(() => this.mealPalBarchart());
// this.queryRepastTimeTrend().then(() => {
...
...
@@ -1316,17 +1467,8 @@
this
.
attendanceSituations
.
attendanceDate
=
this
.
formatDate
(
this
.
minDate
);
this
.
queryCampusStudentInfo
();
let
tmpDate
=
this
.
formatDateTwo
(
this
.
minDate
);
this
.
queryNotRepastDetails
(
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
,
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
endDate
).
then
(()
=>
{
if
(
this
.
diningSituations
.
notRepastDetailsDTOS
)
{
let
today
=
this
.
diningSituations
.
notRepastDetailsDTOS
.
filter
(
e
=>
e
.
repastDate
===
tmpDate
)[
0
];
this
.
diningSituations
.
notRepastDetails
=
today
;
}
else
{
this
.
diningSituations
.
notRepastDetails
=
{};
}
});
this
.
queryConsumerDetail
(
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
,
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
endDate
);
if
(
this
.
isPubTalkService
)
{
this
.
getPubTalkReport
();
}
...
...
@@ -1363,10 +1505,21 @@
this
.
diningSituations
.
diningSituationsRequestDate
=
this
.
dataRangeArr
[
this
.
dataRangeIndex
]
.
startDate
;
let
tmpDate
=
this
.
formatDateTwo
(
this
.
minDate
);
this
.
queryNotRepastDetails
(
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
,
this
.
dataRangeArr
[
this
this
.
queryConsumerDetail
(
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
,
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
endDate
);
this
.
queryConsumerSummaryAmount
();
this
.
queryIsDredgeMember
(
1002
,
1
).
then
(()
=>
{
if
(
this
.
isOpen
)
{
this
.
queryConsumerSummaryAmount
(
1
).
then
(
e
=>
this
.
piechart
());
this
.
queryLivingCostsAmount
();
this
.
queryDayConsumerTrend
(
1
).
then
(
e
=>
this
.
linechart
(
this
.
reportTypeIndex
));
this
.
queryNotRepastDetails
(
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
,
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
endDate
).
then
(()
=>
{
if
(
this
.
diningSituations
.
notRepastDetailsDTOS
)
{
let
today
=
this
.
diningSituations
.
notRepastDetailsDTOS
.
filter
(
e
=>
e
.
repastDate
===
let
today
=
this
.
diningSituations
.
notRepastDetailsDTOS
.
filter
(
e
=>
e
.
repastDate
===
tmpDate
)[
0
];
this
.
diningSituations
.
notRepastDetails
=
today
;
...
...
@@ -1374,12 +1527,6 @@
this
.
diningSituations
.
notRepastDetails
=
{};
}
});
this
.
queryConsumerSummaryAmount
();
this
.
queryIsDredgeMember
(
1002
,
1
).
then
(()
=>
{
if
(
this
.
isOpen
)
{
this
.
queryConsumerSummaryAmount
(
1
).
then
(
e
=>
this
.
piechart
());
this
.
queryDayConsumerTrend
(
1
).
then
(
e
=>
this
.
linechart
(
this
.
reportTypeIndex
));
// this.queryMealPalAnalyse().then(() => this.mealPalBarchart());
// this.queryRepastTimeTrend().then(() => {
// if (this.mealtypeArr.indexOf(1) != -1) {
...
...
@@ -1606,6 +1753,9 @@
formatDateTwo
(
date
)
{
return
`
${
date
.
getFullYear
()}
-
${
date
.
getMonth
()
<
9
?
'
0
'
+
(
date
.
getMonth
()
+
1
):
date
.
getMonth
()
+
1
}
-
${
date
.
getDate
()
<
10
?
'
0
'
+
date
.
getDate
():
date
.
getDate
()}
`
;
},
formatDateThree
(
date
)
{
return
date
.
slice
(
5
,
7
)
+
'
/
'
+
date
.
slice
(
8
);
},
dateSelect
(
date
)
{
this
.
diningSituations
.
diningSituationsDate
=
this
.
formatDate
(
date
);
var
dateStr
=
...
...
@@ -2385,6 +2535,162 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
})
}
},
sortCalculateType
:
function
(
a
,
b
)
{
return
a
.
calculateType
-
b
.
calculateType
;
},
// 获取日期数组
enumerateDaysBetweenDates
:
function
(
startDate
,
endDate
)
{
// startDate必须小于endDate,且二者不相等
let
daysList
=
[];
let
SDate
=
moment
(
startDate
);
let
EDate
=
moment
(
endDate
);
let
xt
;
daysList
.
push
(
SDate
.
format
(
"
MM/DD
"
));
while
(
SDate
.
add
(
1
,
"
days
"
).
isBefore
(
EDate
))
{
// 注意这里add方法处理后SDate对象已经改变。
daysList
.
push
(
SDate
.
format
(
"
MM/DD
"
));
}
daysList
.
push
(
EDate
.
format
(
"
MM/DD
"
));
return
daysList
;
},
// 查询消费明细
async
queryConsumerDetail
(
startDate
,
endDate
)
{
try
{
let
data
=
await
this
.
$http
.
get
({
url
:
gHost
+
'
/report-push/campus-consumer-report/queryConsumerDetail
'
},
{
schoolId
:
getQueryParams
(
'
schoolId
'
),
userId
:
getQueryParams
(
'
userId
'
),
startDate
,
endDate
,
timeType
:
this
.
reportTypeIndex
==
0
?
2
:
1
})
if
(
data
.
code
==
200
)
{
if
(
data
.
obj
&&
data
.
obj
.
campusConsumerDetailList
&&
Array
.
isArray
(
data
.
obj
.
campusConsumerDetailList
)
&&
data
.
obj
.
campusConsumerDetailList
.
length
&&
data
.
obj
.
campusConsumerDetailCalculateList
&&
Array
.
isArray
(
data
.
obj
.
campusConsumerDetailCalculateList
)
&&
data
.
obj
.
campusConsumerDetailCalculateList
.
length
)
{
this
.
campusConsumerDetailObj
=
data
.
obj
;
this
.
campusConsumerDetailObj
.
campusConsumerDetailList
.
forEach
(
e
=>
{
e
.
currentDate
=
this
.
formatDateThree
(
e
.
currentDate
);
e
.
consumerDetailsArr
=
Object
.
values
(
e
);
})
this
.
campusConsumerDetailObj
.
campusConsumerDetailCalculateList
.
sort
(
this
.
sortCalculateType
);
let
tmpColorList
=
[
''
];
this
.
campusConsumerDetailObj
.
campusConsumerDetailCalculateList
.
forEach
((
e
,
index
)
=>
{
e
.
calculateType
=
[
'
就餐
'
,
'
未就餐
'
,
'
均值
'
,
'
较上
'
,
'
总计
'
][
e
.
calculateType
-
1
];
if
(
e
.
calculateType
==
'
较上
'
)
{
for
(
let
item
in
e
)
{
if
(
item
!=
'
calculateType
'
)
{
if
(
e
[
item
]
>
0
)
{
tmpColorList
.
push
(
'
#FA2B00
'
);
}
else
if
(
e
[
item
]
>
0
)
{
tmpColorList
.
push
(
'
#00A367
'
);
}
else
{
tmpColorList
.
push
(
''
);
}
e
[
item
]
=
e
[
item
]
>
0
?
e
[
item
]
+
'
%↑
'
:
(
e
[
item
]
<
0
?
e
[
item
].
toString
().
slice
(
1
)
+
'
%↓
'
:
'
-
'
);
}
}
}
this
.
trendColorList
=
JSON
.
parse
(
JSON
.
stringify
(
tmpColorList
));
e
.
consumerDetailsSumArr
=
Object
.
values
(
e
);
})
if
(
this
.
campusConsumerDetailObj
.
campusConsumerDetailCalculateList
[
4
])
{
// 食堂消费=总消费-其他消费
this
.
consumerDetailCalculateObj
.
canteenData
=
this
.
campusConsumerDetailObj
.
campusConsumerDetailCalculateList
[
4
].
totalAmount
-
this
.
campusConsumerDetailObj
.
campusConsumerDetailCalculateList
[
4
].
otherAmount
;
// 总消费
this
.
consumerDetailCalculateObj
.
totalData
=
this
.
campusConsumerDetailObj
.
campusConsumerDetailCalculateList
[
4
].
totalAmount
;
}
if
(
this
.
campusConsumerDetailObj
.
campusConsumerDetailCalculateList
[
0
])
{
// 就餐次数
this
.
consumerDetailCalculateObj
.
cateringNumber
=
this
.
campusConsumerDetailObj
.
campusConsumerDetailCalculateList
[
0
].
totalAmount
;
}
if
(
this
.
campusConsumerDetailObj
.
campusConsumerDetailCalculateList
[
1
])
{
// 未就餐次数
this
.
consumerDetailCalculateObj
.
notCateringNumber
=
this
.
campusConsumerDetailObj
.
campusConsumerDetailCalculateList
[
1
].
totalAmount
;
}
}
}
else
if
(
data
.
code
==
500
)
{
// 暂无消费数据
let
tmpDetailList
=
[];
let
dateList
=
this
.
enumerateDaysBetweenDates
(
startDate
,
endDate
);
dateList
.
forEach
(
e
=>
{
tmpDetailList
.
push
({
"
currentDate
"
:
e
,
"
breakfastAmount
"
:
0
,
"
lunchAmount
"
:
0
,
"
supperAmount
"
:
0
,
"
otherAmount
"
:
0
,
"
totalAmount
"
:
0
,
"
consumerDetailsArr
"
:
[
e
,
0
,
0
,
0
,
0
,
0
]
})
});
this
.
campusConsumerDetailObj
.
campusConsumerDetailList
=
JSON
.
parse
(
JSON
.
stringify
(
tmpDetailList
));
let
tmpCalculatList
=
[];
let
calculateTypeList
=
[
'
就餐
'
,
'
未就餐
'
,
'
均值
'
,
'
较上
'
,
'
总计
'
];
calculateTypeList
.
forEach
(
e
=>
{
if
(
e
==
'
较上
'
)
{
tmpCalculatList
.
push
({
"
calculateType
"
:
e
,
"
breakfastAmount
"
:
'
-
'
,
"
lunchAmount
"
:
'
-
'
,
"
supperAmount
"
:
'
-
'
,
"
otherAmount
"
:
'
-
'
,
"
totalAmount
"
:
'
-
'
,
"
consumerDetailsSumArr
"
:
[
e
,
'
-
'
,
'
-
'
,
'
-
'
,
'
-
'
,
'
-
'
]
})
}
else
{
tmpCalculatList
.
push
({
"
calculateType
"
:
e
,
"
breakfastAmount
"
:
0
,
"
lunchAmount
"
:
0
,
"
supperAmount
"
:
0
,
"
otherAmount
"
:
0
,
"
totalAmount
"
:
0
,
"
consumerDetailsSumArr
"
:
[
e
,
0
,
0
,
0
,
0
,
0
]
})
}
});
this
.
campusConsumerDetailObj
.
campusConsumerDetailCalculateList
=
JSON
.
parse
(
JSON
.
stringify
(
tmpCalculatList
));
this
.
trendColorList
=
[
''
,
''
,
''
,
''
,
''
,
''
];
this
.
consumerDetailCalculateObj
=
{
canteenData
:
''
,
// 食堂消费
totalData
:
''
,
// 总消费
cateringNumber
:
''
,
// 就餐次数
notCateringNumber
:
''
,
//未就餐次数
};
}
else
{
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
data
.
msg
})
return
}
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
// 查询就餐情况
async
queryNotRepastDetails
(
startDate
,
endDate
)
{
try
{
...
...
@@ -2396,7 +2702,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
userId
:
getQueryParams
(
'
userId
'
),
startDate
,
endDate
,
timeType
:
this
.
dataRang
eIndex
==
0
?
2
:
1
timeType
:
this
.
reportTyp
eIndex
==
0
?
2
:
1
})
if
(
data
.
code
!=
200
)
{
uni
.
showToast
({
...
...
@@ -2438,7 +2744,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
if
(
obj1
.
num
>
obj2
.
num
)
{
temp
=
JSON
.
parse
(
JSON
.
stringify
(
obj1
));
obj1
=
JSON
.
parse
(
JSON
.
stringify
(
obj2
));
obj2
.
num
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
obj2
=
JSON
.
parse
(
JSON
.
stringify
(
temp
));
}
if
(
obj2
.
num
>
obj3
.
num
)
{
temp
=
JSON
.
parse
(
JSON
.
stringify
(
obj2
));
...
...
@@ -2487,7 +2793,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
userId
:
getQueryParams
(
'
userId
'
),
startDate
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
,
endDate
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
endDate
,
timeType
:
this
.
dataRang
eIndex
==
0
?
2
:
1
timeType
:
this
.
reportTyp
eIndex
==
0
?
2
:
1
})
if
(
data
.
code
!=
200
)
{
uni
.
showToast
({
...
...
@@ -2496,7 +2802,6 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
title
:
data
.
msg
})
return
}
if
(
!
data
.
obj
)
return
;
if
(
data
.
obj
.
length
)
{
...
...
@@ -2517,24 +2822,86 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
}]
]
}
this
.
consumerAmountObj
=
tmpObj
;
this
.
isReasonable
=
this
.
consumerAmountObj
.
gtgraderate
>=
40
&&
this
.
consumerAmountObj
.
gtgraderate
<=
60
?
false
:
true
;
// this.consumerAmountObj = tmpObj;
// this.isReasonable = this.consumerAmountObj.gtgraderate >= 40 && this
// .consumerAmountObj.gtgraderate
<=
// 60 ? false : true;
// const sortArr = this.numsort({
// name: 'schoolAverageHeight',
// num: this.consumerAmountObj.schoolavgamount
// }, {
// name: 'userConsumeHeight',
// num: this.consumerAmountObj.consumergrossamount
// }, {
// name: 'gradeAverageHeight',
// num: this.consumerAmountObj.gradeavgamount
// });
// const tempArr = [this.consumerAmountObj.schoolavgamount, this
// .consumerAmountObj
// .consumergrossamount,
// this.consumerAmountObj.gradeavgamount
// ];
// const heightArr = Object.keys(this.counterArray(tempArr)).length == 1 ? [
// 139, 139, 139
// ] : (
// Object.keys(this.counterArray(tempArr)).length == 2 ? [139, 139,
// 160
// ] : [139, 160, 192]
// );
// sortArr.forEach(e => {
// this[e.name] = heightArr[e.tag]
// })
}
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
livingCostType
:
function
(
a
,
b
)
{
return
a
.
livingCostType
-
b
.
livingCostType
;
},
// 查询生活费额度
async
queryLivingCostsAmount
()
{
try
{
let
data
=
await
this
.
$http
.
get
({
url
:
gHost
+
'
/report-push/campus-consumer-report/queryLivingCostsAmount
'
},
{
schoolId
:
getQueryParams
(
'
schoolId
'
),
userId
:
getQueryParams
(
'
userId
'
),
startDate
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
,
endDate
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
endDate
,
timeType
:
this
.
reportTypeIndex
==
0
?
2
:
1
})
if
(
data
.
code
!=
200
)
{
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
data
.
msg
})
return
}
if
(
!
data
.
obj
)
return
;
if
(
data
.
obj
.
length
)
{
this
.
consumerAmountObj
=
data
.
obj
;
this
.
consumerAmountObj
.
sort
(
this
.
livingCostType
);
const
sortArr
=
this
.
numsort
({
name
:
'
schoolAverageHeight
'
,
num
:
this
.
consumerAmountObj
.
schoolavgamount
},
{
name
:
'
userConsumeHeight
'
,
num
:
this
.
consumerAmountObj
.
consumergrossamount
num
:
this
.
consumerAmountObj
[
2
].
livingCostAmount
},
{
name
:
'
gradeAverageHeight
'
,
num
:
this
.
consumerAmountObj
.
gradeavgamount
num
:
this
.
consumerAmountObj
[
1
].
livingCostAmount
},
{
name
:
'
userConsumeHeight
'
,
num
:
this
.
consumerAmountObj
[
0
].
livingCostAmount
});
const
tempArr
=
[
this
.
consumerAmountObj
.
schoolavgamount
,
this
.
consumerAmountObj
.
consumergrossamount
,
this
.
consumerAmountObj
.
gradeavgamount
const
tempArr
=
[
this
.
consumerAmountObj
[
2
].
livingCostAmount
,
this
.
consumerAmountObj
[
1
]
.
livingCostAmount
,
this
.
consumerAmountObj
[
0
].
livingCostAmount
];
const
heightArr
=
Object
.
keys
(
this
.
counterArray
(
tempArr
)).
length
==
1
?
[
139
,
139
,
139
...
...
@@ -2546,6 +2913,23 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
sortArr
.
forEach
(
e
=>
{
this
[
e
.
name
]
=
heightArr
[
e
.
tag
]
})
if
(
this
.
consumerAmountObj
[
0
])
{
this
.
livingExpensesAllowance
.
userConsumeAmount
=
this
.
consumerAmountObj
[
0
]
.
livingCostAmount
;
//本月
this
.
livingExpensesAllowance
.
lastMonthRate
=
this
.
consumerAmountObj
[
0
].
rate
;
this
.
livingExpensesAllowance
.
lastMonthRateStr
=
this
.
consumerAmountObj
[
0
].
rate
>
0
?
this
.
consumerAmountObj
[
0
].
rate
+
'
%
'
:
(
this
.
consumerAmountObj
[
0
].
rate
<
0
?
this
.
consumerAmountObj
[
0
].
rate
.
toString
()
.
slice
(
1
)
+
'
%
'
:
0
+
'
%
'
);
}
if
(
this
.
consumerAmountObj
[
1
])
{
this
.
livingExpensesAllowance
.
gradeAverageAmount
=
this
.
consumerAmountObj
[
1
]
.
livingCostAmount
;
//上月
}
if
(
this
.
consumerAmountObj
[
2
])
{
this
.
livingExpensesAllowance
.
schoolAverageAmount
=
this
.
consumerAmountObj
[
2
]
.
livingCostAmount
;
//上上月
}
}
}
catch
(
e
)
{
//TODO handle the exception
...
...
@@ -2569,7 +2953,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
startDate
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
]
.
startDate
,
endDate
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
endDate
,
timeType
:
this
.
dataRang
eIndex
==
0
?
2
:
1
timeType
:
this
.
reportTyp
eIndex
==
0
?
2
:
1
})
if
(
data
.
code
!=
200
)
{
uni
.
showToast
({
...
...
@@ -2621,7 +3005,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
studentId
:
getQueryParams
(
'
userId
'
),
startDate
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
,
endDate
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
endDate
,
timeType
:
this
.
dataRang
eIndex
==
0
?
2
:
1
timeType
:
this
.
reportTyp
eIndex
==
0
?
2
:
1
})
if
(
data
.
code
!=
200
)
{
uni
.
showToast
({
...
...
@@ -2632,7 +3016,8 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
return
}
this
.
mealPalData
=
data
.
obj
||
[];
this
.
mealPalArr
=
this
.
mealPalData
.
length
?
this
.
mealPalData
.
map
(
v
=>
v
.
mealpalname
.
slice
(
0
,
1
)
+
this
.
mealPalArr
=
this
.
mealPalData
.
length
?
this
.
mealPalData
.
map
(
v
=>
v
.
mealpalname
.
slice
(
0
,
1
)
+
'
**
'
)
:
[];
this
.
mealPalStr
=
this
.
mealPalArr
.
length
?
this
.
mealPalArr
.
join
(
'
、
'
)
:
''
;
}
catch
(
e
)
{
...
...
@@ -2651,15 +3036,19 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
var
breakfastAbnormalArr
=
[];
var
breakfastAbnormalStr
=
''
;
if
(
breakfastArr
.
length
&&
breakfastArr
[
0
].
cateringList
)
{
breakfastAbnormalArr
=
breakfastArr
[
0
].
cateringList
.
filter
(
e
=>
e
.
repastType
==
2
||
e
.
repastType
==
3
)
.
map
(
e
=>
e
.
repasttime
.
slice
(
8
,
9
)
?
e
.
repasttime
.
slice
(
8
)
:
e
.
repasttime
.
slice
(
8
,
9
))
breakfastAbnormalArr
=
breakfastArr
[
0
].
cateringList
.
filter
(
e
=>
e
.
repastType
==
2
||
e
.
repastType
==
3
)
.
map
(
e
=>
e
.
repasttime
.
slice
(
8
,
9
)
?
e
.
repasttime
.
slice
(
8
)
:
e
.
repasttime
.
slice
(
8
,
9
))
if
(
breakfastAbnormalArr
.
length
>
1
)
{
for
(
var
i
=
0
;
i
<
breakfastAbnormalArr
.
length
-
1
;
i
++
)
{
breakfastAbnormalStr
+=
breakfastAbnormalArr
[
i
]
+
'
日、
'
;
}
breakfastAbnormalStr
+=
breakfastAbnormalArr
[
breakfastAbnormalArr
.
length
-
1
]
+
'
日
'
;
breakfastAbnormalStr
+=
breakfastAbnormalArr
[
breakfastAbnormalArr
.
length
-
1
]
+
'
日
'
;
}
else
if
(
breakfastAbnormalArr
.
length
==
1
)
{
breakfastAbnormalStr
+=
breakfastAbnormalArr
[
breakfastAbnormalArr
.
length
-
1
]
+
'
日
'
;
breakfastAbnormalStr
+=
breakfastAbnormalArr
[
breakfastAbnormalArr
.
length
-
1
]
+
'
日
'
;
}
}
return
breakfastAbnormalStr
;
...
...
@@ -2675,7 +3064,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
userId
:
getQueryParams
(
'
userId
'
),
startDate
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
,
endDate
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
endDate
,
timeType
:
this
.
dataRang
eIndex
==
0
?
2
:
1
timeType
:
this
.
reportTyp
eIndex
==
0
?
2
:
1
})
if
(
data
.
code
!=
200
)
{
uni
.
showToast
({
...
...
@@ -2684,20 +3073,26 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
title
:
data
.
message
})
return
}
if
(
data
.
obj
)
{
this
.
mealtimeTrendsData
=
data
.
obj
}
if
(
data
.
obj
&&
data
.
obj
.
filter
(
e
=>
e
.
mealtype
==
1
).
length
&&
data
.
obj
.
filter
(
e
=>
e
.
mealtype
==
if
(
data
.
obj
&&
data
.
obj
.
filter
(
e
=>
e
.
mealtype
==
1
).
length
&&
data
.
obj
.
filter
(
e
=>
e
.
mealtype
==
1
)[
0
].
cateringList
)
{
this
.
mealtypeArr
.
push
(
1
)
}
if
(
data
.
obj
&&
data
.
obj
.
filter
(
e
=>
e
.
mealtype
==
2
).
length
&&
data
.
obj
.
filter
(
e
=>
e
.
mealtype
==
if
(
data
.
obj
&&
data
.
obj
.
filter
(
e
=>
e
.
mealtype
==
2
).
length
&&
data
.
obj
.
filter
(
e
=>
e
.
mealtype
==
2
)[
0
]
.
cateringList
)
{
this
.
mealtypeArr
.
push
(
2
)
}
if
(
data
.
obj
&&
data
.
obj
.
filter
(
e
=>
e
.
mealtype
==
3
).
length
&&
data
.
obj
.
filter
(
e
=>
e
.
mealtype
==
if
(
data
.
obj
&&
data
.
obj
.
filter
(
e
=>
e
.
mealtype
==
3
).
length
&&
data
.
obj
.
filter
(
e
=>
e
.
mealtype
==
3
)[
0
]
.
cateringList
)
{
this
.
mealtypeArr
.
push
(
3
)
...
...
@@ -2733,6 +3128,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
title
:
data
.
message
})
return
}
this
.
pubTalkReport
=
data
.
data
||
{};
if
(
!
this
.
pubTalkReport
.
talkText5
&&
!
this
.
pubTalkReport
...
...
@@ -2823,6 +3219,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
'
4rpx solid #F9793F
'
:
'
4rpx solid rgba(0, 0, 0, 0.25)
'
})
}
})
this
.
attendanceReportDatail
=
tempList
||
[];
...
...
@@ -3148,7 +3545,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.user-avatar
{
width
:
88rpx
;
height
:
88rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/avatar.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/avatar.png)
;
}
.user-info
{
...
...
@@ -3200,7 +3597,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.triangle
{
width
:
21rpx
;
height
:
10rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/grayTriangle.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/grayTriangle.png)
;
}
}
...
...
@@ -3221,7 +3618,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.triangle
{
width
:
21rpx
;
height
:
10rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/grayTriangle.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/grayTriangle.png)
;
}
}
}
...
...
@@ -3282,7 +3679,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.share-button-img
{
width
:
26rpx
;
height
:
26rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/share.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/share.png)
;
margin-right
:
11rpx
;
}
...
...
@@ -3302,19 +3699,19 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.consumer-report-bgImg
{
width
:
100%
;
height
:
452rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/consumeReportBg.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/consumeReportBg.png)
;
}
.attendance-report-bgImg
{
width
:
100%
;
height
:
452rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/attendanceReportBg.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/attendanceReportBg.png)
;
}
.pubTalk-report-bgImg
{
width
:
100%
;
height
:
452rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/pubTalkReportBg.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/pubTalkReportBg.png)
;
}
.school-report-context-card-title
{
...
...
@@ -3324,7 +3721,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.school-report-context-card-title-img
{
width
:
318rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/cardBg.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/cardBg.png)
;
font-size
:
32rpx
;
font-family
:
PingFangSC-Semibold
,
PingFang
SC
;
font-weight
:
600
;
...
...
@@ -3353,7 +3750,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.consumer-report-img
{
width
:
428rpx
;
height
:
428rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/consumeReport.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/consumeReport.png)
;
position
:
absolute
;
top
:
-172rpx
;
left
:
160rpx
;
...
...
@@ -3362,7 +3759,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.attendance-report-img
{
width
:
428rpx
;
height
:
428rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/attendanceReport.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/attendanceReport.png)
;
position
:
absolute
;
top
:
-172rpx
;
left
:
160rpx
;
...
...
@@ -3371,7 +3768,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.pubTalk-report-img
{
width
:
428rpx
;
height
:
428rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/pubTalkReport.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/pubTalkReport.png)
;
position
:
absolute
;
top
:
-172rpx
;
left
:
160rpx
;
...
...
@@ -3383,6 +3780,34 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
position
:
absolute
;
top
:
163rpx
;
.school-report-context-card-one-context-nodata
{
box-sizing
:
border-box
;
display
:
flex
;
align-items
:
center
;
flex-direction
:
column
;
padding
:
80rpx
0
0
;
box-sizing
:
border-box
;
.card-one-nodata-img
{
width
:
500rpx
;
height
:
232rpx
;
image
{
width
:
100%
;
height
:
100%
;
}
}
.card-one-nodata-txt
{
height
:
40rpx
;
font-size
:
28rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
rgba
(
0
,
0
,
0
,
0
.45
);
line-height
:
40rpx
;
}
}
.school-report-context-card-one-context-item
{
margin
:
0
0
32rpx
;
display
:
flex
;
...
...
@@ -3485,16 +3910,26 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
}
.school-report-context-card-two
{
height
:
876rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
margin-bottom
:
40rpx
;
.school-report-context-card-nodata
{
height
:
40rpx
;
font-size
:
28rpx
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
text-align
:
center
;
color
:
orangered
;
line-height
:
40rpx
;
margin
:
40rpx
0
0
;
}
.school-report-context-card-two-conclusion
{
height
:
40rpx
;
padding
:
0
40rpx
0
30rpx
;
box-sizing
:
border-box
;
margin
:
40rpx
0
32rpx
;
margin
:
0
0
32rpx
;
display
:
flex
;
justify-content
:
space-between
;
font-size
:
28rpx
;
...
...
@@ -3603,7 +4038,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.school-report-context-card-two-details
{
height
:
132rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/diningSituations.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/diningSituations.png)
;
padding
:
55rpx
42rpx
30rpx
29rpx
;
box-sizing
:
border-box
;
border-radius
:
0
0
16rpx
16rpx
;
...
...
@@ -3829,7 +4264,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
/
deep
/
.champion-day
{
color
:
#DAA000
;
background
:
url(
../../static/images
/champion.png)
no-repeat
-4rpx
center
/
100%
;
background
:
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/champion.png)
no-repeat
-4rpx
center
/
100%
;
border-radius
:
22rpx
;
width
:
88rpx
;
height
:
88rpx
;
...
...
@@ -3838,7 +4273,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
/
deep
/
.progress-day
{
color
:
#DAA000
;
background
:
url(
../../static/images
/progress.png)
no-repeat
-2rpx
center
/
100%
;
background
:
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/progress.png)
no-repeat
-2rpx
center
/
100%
;
border-radius
:
22rpx
;
width
:
88rpx
;
height
:
88rpx
;
...
...
@@ -3868,7 +4303,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.attendance-report-context-card-two-details-time-img
{
width
:
25rpx
;
height
:
25rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/attendanceTime.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/attendanceTime.png)
;
}
.attendance-report-context-card-two-details-time-txt
{
...
...
@@ -3999,14 +4434,14 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.early-champions-img
{
width
:
32rpx
;
height
:
29rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/champions.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/champions.png)
;
margin-right
:
2rpx
;
}
.progress-img
{
width
:
30rpx
;
height
:
29rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/progressIcon.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/progressIcon.png)
;
margin-right
:
2rpx
;
}
...
...
@@ -4041,7 +4476,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.attendance-report-time-details-icon
{
width
:
21rpx
;
height
:
12rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/arrowUp.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/arrowUp.png)
;
// margin-left: 30rpx;
}
}
...
...
@@ -4079,7 +4514,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
margin
:
78rpx
0
0
107rpx
;
width
:
474rpx
;
height
:
235rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/noAttendanceReportDatailData.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/noAttendanceReportDatailData.png)
;
}
}
...
...
@@ -4203,6 +4638,12 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
line-height
:
40rpx
;
margin-left
:
30rpx
;
&
.card-three-conclusion-nodata
{
text-align
:
center
;
margin
:
0
;
color
:
orangered
;
}
.school-report-context-card-three-conclusion-item-describe
{
color
:
#04B871
;
}
...
...
@@ -4234,10 +4675,20 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
line-height
:
40rpx
;
margin
:
0
40rpx
0
30rpx
;
&
.card-four-conclusion-nodata
{
margin
:
0
;
text-align
:
center
;
color
:
orangered
;
}
.consume-total
{
color
:
#04B871
;
margin
:
0
6rpx
;
}
.livingCostUp
{
transform
:
rotate
(
180deg
);
}
}
}
...
...
@@ -4274,6 +4725,10 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
max-height
:
100%
;
}
}
&
.last-month
{
margin
:
0
74rpx
0
;
}
}
.user-consume
{
...
...
@@ -4285,7 +4740,6 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
align-items
:
center
;
padding
:
14rpx
0
0
;
box-sizing
:
border-box
;
margin
:
0
74rpx
0
;
.user-consume-img
{
width
:
52rpx
;
...
...
@@ -4316,7 +4770,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
line-height
:
40rpx
;
&
.consume-des
{
margin
:
0
64rpx
0
74
rpx
;
margin
:
0
128rpx
0
116
rpx
;
}
}
}
...
...
@@ -4341,6 +4795,12 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
color
:
rgba
(
0
,
0
,
0
,
0
.85
);
line-height
:
40rpx
;
&
.card-five-conclusion-nodata
{
margin
:
0
;
text-align
:
center
;
color
:
orangered
;
}
.abnormal-date
{
color
:
#04B871
;
}
...
...
@@ -4562,12 +5022,159 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
}
}
.school-report-context-card-eight
{
background
:
#FFFFFF
;
border-radius
:
16rpx
;
margin
:
0
0
40rpx
;
.school-report-context-card-eight-conclusion
{
margin
:
40rpx
0
30rpx
;
.school-report-context-card-eight-conclusion-item
{
height
:
40rpx
;
font-size
:
28rpx
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
rgba
(
0
,
0
,
0
,
0
.85
);
line-height
:
40rpx
;
padding-left
:
30rpx
;
box-sizing
:
border-box
;
&
.eight-conclusion-nodata
{
text-align
:
center
;
color
:
orangered
;
padding
:
0
;
}
.txt-important
{
color
:
#04B871
;
margin
:
0
4rpx
;
}
}
}
.school-report-context-card-eight-details
{
.consumer-details-header
{
height
:
74rpx
;
background
:
#F0F0F0
;
padding
:
19rpx
0
;
box-sizing
:
border-box
;
display
:
flex
;
justify-content
:
space-around
;
align-items
:
center
;
.consumer-details-header-item
{
font-size
:
26rpx
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
rgba
(
0
,
0
,
0
,
0
.85
);
}
}
.consumer-details-body-box
{
max-height
:
630rpx
;
overflow
:
auto
;
.consumer-details-body
{
height
:
74rpx
;
border-radius
:
47rpx
;
display
:
flex
;
margin
:
16rpx
0
0
;
.consumer-details-body-item
{
width
:
calc
(
17%
);
text-align
:
center
;
font-size
:
26rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
rgba
(
0
,
0
,
0
,
0
.75
);
line-height
:
74rpx
;
&
.consumer-details-body-data
{
font-family
:
DINPro-Medium
,
DINPro
;
font-weight
:
500
;
color
:
rgba
(
0
,
0
,
0
,
0
.85
);
}
}
}
}
.consumer-details-body-notice-box
{
margin
:
16rpx
0
23rpx
;
height
:
40rpx
;
display
:
flex
;
justify-content
:
center
;
.consumer-details-body-notice
{
width
:
225rpx
;
display
:
flex
;
justify-content
:
space-between
;
.consumer-details-body-notice-txt
{
font-size
:
28rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
rgba
(
0
,
0
,
0
,
0
.31
);
line-height
:
40rpx
;
}
.consumer-details-body-notice-icon
{
width
:
38rpx
;
height
:
29rpx
;
image
{
width
:
100%
;
height
:
100%
;
}
}
}
}
.consumer-details-sum
{
height
:
74rpx
;
display
:
flex
;
margin
:
0
0
16rpx
;
.consumer-details-sum-item
{
width
:
calc
(
16
.4%
);
text-align
:
center
;
font-size
:
26rpx
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
rgba
(
0
,
0
,
0
,
0
.65
);
line-height
:
74rpx
;
&
.consumer-details-sum-type
{
font-size
:
24rpx
;
color
:
rgba
(
0
,
0
,
0
,
0
.85
);
text-align
:
left
;
padding-left
:
12rpx
;
box-sizing
:
border-box
;
}
.type-unit
{
font-size
:
20rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
rgba
(
0
,
0
,
0
,
0
.45
);
display
:
inline-block
;
position
:
absolute
;
}
}
.consumer-details-sum-item
:first-of-type
{
width
:
calc
(
18%
);
}
}
}
}
.school-report-footer
{
height
:
169rpx
;
margin
:
40rpx
0
43rpx
;
padding
:
33rpx
34rpx
42rpx
42rpx
;
box-sizing
:
border-box
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/extendPermissionsBg.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/extendPermissionsBg.png)
;
display
:
flex
;
justify-content
:
space-between
;
...
...
@@ -4646,7 +5253,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.no-open-solution-item
{
width
:
15rpx
;
height
:
20rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/rightArrow.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/rightArrow.png)
;
}
}
...
...
@@ -4656,7 +5263,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.open-results-title
{
width
:
100%
;
height
:
83rpx
;
background
:
url(
../../static/images
/openbgm.png)
center
/
100%
no-repeat
;
background
:
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/openbgm.png)
center
/
100%
no-repeat
;
border-radius
:
16rpx
16rpx
0
0
;
font-size
:
28rpx
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
...
...
@@ -4667,7 +5274,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
align-items
:
center
;
&
.consume-open-results-title
{
background
:
url(
../../static/images
/consumeOpenbgm.png)
center
/
100%
no-repeat
;
background
:
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/consumeOpenbgm.png)
center
/
100%
no-repeat
;
}
}
...
...
@@ -4746,37 +5353,37 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.dining-situations-img
{
width
:
26rpx
;
height
:
21rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/repast.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/repast.png)
;
}
.meal-pal-img
{
width
:
26rpx
;
height
:
22rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/mealPal.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/mealPal.png)
;
}
.consumer-num-img
{
width
:
22rpx
;
height
:
25rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/consumerNum.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/consumerNum.png)
;
}
.consumer-preference-img
{
width
:
25rpx
;
height
:
23rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/consumerPreference.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/consumerPreference.png)
;
}
.consumer-trend-img
{
width
:
24rpx
;
height
:
2
1
rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/consumerTrend.png)
;
height
:
2
4
rpx
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/consumerTrend.png)
;
}
.time-trends-img
{
width
:
25rpx
;
height
:
25rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/timeTrends.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/timeTrends.png)
;
}
}
}
...
...
@@ -4803,28 +5410,28 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.admission-notice-img
{
width
:
30rpx
;
height
:
27rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/admissionNotice.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/admissionNotice.png)
;
margin-right
:
23rpx
;
}
.admission-analysis-img
{
width
:
30rpx
;
height
:
32rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/admissionAnalysis.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/admissionAnalysis.png)
;
margin
:
0
25rpx
0
135rpx
;
}
.admission-record-img
{
width
:
29rpx
;
height
:
31rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/admissionRecord.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/admissionRecord.png)
;
margin-right
:
24rpx
;
}
.admission-image-img
{
width
:
29rpx
;
height
:
29rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/admissionImage.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/admissionImage.png)
;
margin-right
:
24rpx
;
}
...
...
@@ -4832,56 +5439,56 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.video-call-img
{
width
:
31rpx
;
height
:
24rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/videoCall.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/videoCall.png)
;
margin-right
:
21rpx
;
}
.communication-advice-img
{
width
:
38rpx
;
height
:
31rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/communicationAdvice.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/communicationAdvice.png)
;
margin
:
0
24rpx
0
165rpx
;
}
.voice-call-img
{
width
:
25rpx
;
height
:
34rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/voiceCall.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/voiceCall.png)
;
margin-right
:
26rpx
;
}
.call-count-img
{
width
:
30rpx
;
height
:
30rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/callCount.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/callCount.png)
;
margin
:
0
31rpx
0
165rpx
;
}
.leave-word-img
{
width
:
30rpx
;
height
:
28rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/leaveWord.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/leaveWord.png)
;
margin-right
:
22rpx
;
}
.call-duration-img
{
width
:
31rpx
;
height
:
35rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/callDuration.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/callDuration.png)
;
margin
:
0
23rpx
0
165rpx
;
}
.face-call-img
{
width
:
32rpx
;
height
:
31rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/faceCall.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/faceCall.png)
;
margin-right
:
21rpx
;
}
.leave-word-analysis-img
{
width
:
31rpx
;
height
:
31rpx
;
background
:
no-repeat
center
/
100%
url(
../../static/images
/leaveWordAnalysis.png)
;
background
:
no-repeat
center
/
100%
url(
https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport
/leaveWordAnalysis.png)
;
margin
:
0
23rpx
0
165rpx
;
}
}
...
...
src/pages/socialmailbox/socialmailbox.vue
0 → 100644
View file @
846f596e
<
template
>
<view
class=
"content"
:style=
"'background-image: url('+ImgUrl2+'background.png);'"
>
<view
class=
"textareabox"
>
<textarea
v-model=
"SubmitInfo.messageContent"
maxlength=
"500"
:placeholder=
"placeholder"
placeholder-class=
"textareaplace"
/>
</view>
<view
class=
"textareabox2"
>
<view
class=
"title"
v-if=
"!keyword"
>
<image
:src=
"ImgUrl2+'remarks.png'"
mode=
"aspectFit"
></image>
<text>
您可在此备注部分信息
</text>
</view>
<view
class=
"title2"
v-if=
"keyword"
>
<image
:src=
"ImgUrl2+'shuru.png'"
mode=
"aspectFit"
></image>
<text>
{{
keyword
}}
</text>
</view>
<textarea
v-model=
"SubmitInfo.remark"
:placeholder=
"placeholder2"
placeholder-class=
"textareaplace"
/>
</view>
<view
class=
"envelope"
:style=
"'background-image: url('+ImgUrl2+'envelope2.png);'"
>
<image
class=
"toudibtn"
@
tap=
"saveOrUpdateMessage"
:src=
"ImgUrl2+'toudi.png'"
mode=
"aspectFit"
></image>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
ImgUrl2
:
this
.
$ImgUrl
+
'
social_front/
'
,
ImgUrl
:
this
.
$ImgUrl
,
placeholder
:
"
写下您想对孩子说的话,或者分享您与孩子之间发生的真实故事。无论对错,您的故事将被认真倾听和尊重,请避免广告、迷信等违规或不适内容。
"
,
placeholder2
:
"
如:父亲/母亲等、孩子就读学校、您的所在地
"
,
// 提交信息
SubmitInfo
:
{
"
bindPhone
"
:
""
,
//微信绑定电话
"
classId
"
:
0
,
//班级id
"
className
"
:
""
,
//班级名称
"
gradeId
"
:
0
,
//年级id
"
gradeName
"
:
""
,
//年级名称
"
messageContent
"
:
""
,
//投稿内容
"
openId
"
:
""
,
//微信openid
"
remark
"
:
""
,
//投稿备注
"
sourceType
"
:
3
,
//数据来源:0未知、1公众号、2小程序、3H5页面
"
studentId
"
:
0
,
//学生id
"
studentName
"
:
""
,
//学生名
"
wechatName
"
:
""
// 微信名
},
// keyword
keyword
:
''
}
},
onLoad
()
{
},
computed
:
{
keywordMessageContent
:
function
()
{
console
.
log
(
this
.
SubmitInfo
.
messageContent
);
return
this
.
SubmitInfo
.
messageContent
.
split
(
''
).
reverse
().
join
(
''
)
}
},
methods
:
{
// 投递信箱
async
saveOrUpdateMessage
()
{
try
{
if
(
!
this
.
SubmitInfo
.
messageContent
)
{
uni
.
showModal
({
title
:
"
温馨提示
"
,
showCancel
:
false
,
content
:
"
请写下您对孩子说的话...
"
,
})
return
}
uni
.
showLoading
({
title
:
"
请稍后
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
})
await
new
Promise
((
res
,
rej
)
=>
{
setTimeout
(()
=>
{
res
()
},
300
);
})
let
url
=
`https://dev-az-cloud-api.xiaopay.net`
if
(
window
.
location
.
hostname
.
includes
(
'
uat.xiaopay.net
'
))
{
url
=
`https://test-az-cloud-api.xiaopay.net`
}
if
(
window
.
location
.
hostname
.
includes
(
'
pay.xiaopay.net
'
))
{
url
=
`https://az-cloud-api.xiaopay.net`
}
let
[
err
,
respes
]
=
await
uni
.
request
({
url
:
url
+
'
/cloud-gateway/social-web/openApi/bmailboxinfo/saveOrUpdateMessage
'
,
method
:
"
POST
"
,
dataType
:
"
json
"
,
data
:
this
.
SubmitInfo
})
if
(
err
)
{
uni
.
showToast
({
icon
:
"
none
"
,
title
:
err
.
errMsg
})
return
}
uni
.
hideLoading
()
if
(
respes
.
data
.
code
!=
"
10000
"
)
{
uni
.
showToast
({
icon
:
"
none
"
,
title
:
respes
.
data
.
message
})
return
}
uni
.
showModal
({
title
:
"
温馨提示
"
,
showCancel
:
false
,
content
:
"
投递成功!
"
,
success
:
()
=>
{
this
.
SubmitInfo
=
{
"
bindPhone
"
:
""
,
//微信绑定电话
"
classId
"
:
0
,
//班级id
"
className
"
:
""
,
//班级名称
"
gradeId
"
:
0
,
//年级id
"
gradeName
"
:
""
,
//年级名称
"
messageContent
"
:
""
,
//投稿内容
"
openId
"
:
""
,
//微信openid
"
remark
"
:
""
,
//投稿备注
"
sourceType
"
:
0
,
//数据来源:0未知、1公众号、2小程序、3H5页面
"
studentId
"
:
0
,
//学生id
"
studentName
"
:
""
,
//学生名
"
wechatName
"
:
""
// 微信名
}
}
})
}
catch
(
error
)
{
uni
.
showToast
({
icon
:
"
error
"
,
title
:
error
.
message
})
}
}
}
}
</
script
>
<
style
scoped
>
.content
{
width
:
100%
;
/* height: 100vh; */
height
:
1624
rpx
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
}
.envelope
{
width
:
100%
;
height
:
330
rpx
;
background-repeat
:
no-repeat
;
background-size
:
110%
110%
;
position
:
fixed
;
/* margin-bottom: 60rpx; */
background-position
:
center
;
text-align
:
center
;
bottom
:
0
;
}
.toudibtn
{
width
:
194
rpx
;
height
:
194
rpx
;
position
:
relative
;
top
:
40
rpx
;
}
.textareabox
,
.textareabox2
{
width
:
613
rpx
;
font-size
:
32
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
margin
:
0
auto
;
}
.textareabox2
image
{
width
:
28
rpx
;
height
:
28
rpx
;
position
:
relative
;
}
.textareabox
{
width
:
613
rpx
;
font-size
:
32
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
margin
:
0
auto
;
/* position: absolute;
left: 0;
right: 0;
top: 15%; */
height
:
840
rpx
;
padding-top
:
250
rpx
;
}
.textareabox2
{
width
:
613
rpx
;
font-size
:
32
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
margin
:
0
auto
;
height
:
200
rpx
;
/* height: 10vh; */
margin-top
:
30
rpx
;
}
.textareabox2
.title
{
display
:
flex
;
align-items
:
center
;
}
.textareabox2
.title2
{
display
:
flex
;
align-items
:
center
;
background-color
:
rgba
(
255
,
95
,
11
,
0.1
);
border-radius
:
24
rpx
;
padding-left
:
18
rpx
;
}
.title2
text
{
font-size
:
32
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#FF5F0B
!important
;
}
.textareabox2
text
{
display
:
inline-block
;
margin-left
:
13
rpx
;
font-size
:
32
rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
rgba
(
0
,
0
,
0
,
0.15
);
}
textarea
{
line-height
:
60
rpx
;
height
:
100%
;
width
:
100%
;
}
.textareaplace
{
color
:
rgba
(
0
,
0
,
0
,
0.15
);
line-height
:
60
rpx
;
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment