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
4dddf400
Commit
4dddf400
authored
Jul 01, 2022
by
aifen@azjy1.onexmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
校园报告优化提交更新
parent
592be792
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
876 additions
and
54 deletions
+876
-54
src/pages/SchoolReport/SchoolReport.vue
src/pages/SchoolReport/SchoolReport.vue
+876
-54
No files found.
src/pages/SchoolReport/SchoolReport.vue
View file @
4dddf400
...
...
@@ -74,12 +74,12 @@
</view>
</view>
</view>
<view
class=
"school-report-context"
>
<view
v-if=
"tabIndex"
class=
"school-report-context"
>
<view
:class=
"['consumer-report-bgImg','attendance-report-bgImg','pubTalk-report-bgImg'][tabIndex-1]"
>
</view>
<view
class=
"school-report-context-card"
>
<view
class=
"school-report-context-card-one"
:style=
"
{height:[
598
,256,pubTalkSummaryHeight][tabIndex-1]+'rpx'}">
:style=
"
{height:[
804
,256,pubTalkSummaryHeight][tabIndex-1]+'rpx'}">
<view
:class=
"['consumer-report-img','attendance-report-img','pubTalk-report-img'][tabIndex-1]"
>
</view>
<!-- 消费报告 -->
...
...
@@ -121,8 +121,7 @@
的同学
<text
v-if=
"isReasonable"
>
,请及时评估生活费是否合理
</text>
</view>
</view>
<view
class=
"school-report-context-card-one-context-item school-report-context-card-one-context-item-last"
>
<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>
...
...
@@ -133,6 +132,35 @@
<text
v-else
>
每日消费金额较稳定,继续保持哦
</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"
>
早、中、晚餐就餐时间较稳定,按时吃饭,自律如昔,你就赢了大多数人
</view>
<!--
<view
class=
"school-report-context-card-one-context-txt"
>
<text
class=
"txt-important"
>
12日、17日早餐、22日、28日中餐、25日晚餐
</text>
的就餐时间跟同班同学相差超20分钟,如果快乐很难,那么按时吃饭
</view>
-->
</view>
<view
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-item"
>
</view>
</view>
<view
v-if=
"!mealPalArr.length"
class=
"school-report-context-card-one-context-txt"
>
独立的
<text
class=
"txt-important"
>
{{
userInfo
.
userName
}}
</text>
很棒,偶尔也可以叫上朋友一起吃饭哦
</text>
</view>
<view
v-else-if=
"mealPalArr.length==1"
class=
"school-report-context-card-one-context-txt"
>
最佳饭友非
<text
class=
"txt-important"
>
{{
mealPalStr
}}
</text>
莫属,有饭友吃嘛嘛香
</text>
</view>
<view
v-else
class=
"school-report-context-card-one-context-txt"
>
最佳干饭组合,赶快叫上
<text
class=
"txt-important"
>
{{
mealPalStr
}}
</text>
一起吃饭吧
</text>
</view>
</view>
</view>
<!-- 出入校报告 -->
<view
v-show=
"tabIndex==2"
class=
"attendance-report-context-card-one-context"
>
...
...
@@ -372,6 +400,88 @@
</view>
</view>
</view>
<view
v-show=
"tabIndex==1&&isOpen"
class=
"school-report-context-card-six"
>
<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-six-conclusion"
>
<view
class=
"school-report-context-card-six-conclusion-item"
>
<text>
早、中、晚餐就餐时间较稳定,按时吃饭,自律如昔,你就赢了大多数人
</text>
<!--
<text>
<text
class=
"abnormal-date"
>
12日、17日早餐、22日、28日中餐、25日晚餐
</text>
的就餐时间跟同班同学相差超20分钟,如果快乐很难,那么按时吃饭
</text>
-->
</view>
</view>
<view
class=
"mealtime-trends"
>
<view
class=
"mealtime-trends-theme"
>
<view
class=
"meal-type"
>
<text>
早餐
</text>
</view>
<view
class=
"user-meal-time"
>
<view
class=
"user-meal-time-logo"
>
<view
class=
"user-meal-time-logo-left"
>
</view>
<view
class=
"user-meal-time-logo-middle"
>
</view>
<view
class=
"user-meal-time-logo-right"
>
</view>
</view>
<view
class=
"user-meal-time-txt"
>
<text>
就餐时间
</text>
</view>
</view>
<view
class=
"class-meal-time"
>
<view
class=
"user-meal-time-logo"
>
<view
class=
"user-meal-time-logo-left"
style=
"background: rgba(0, 0, 0, 0.5)"
>
</view>
<view
class=
"user-meal-time-logo-middle"
style=
"border: 3rpx solid rgba(0, 0, 0, 0.5)"
>
</view>
<view
class=
"user-meal-time-logo-right"
style=
"background: rgba(0, 0, 0, 0.5)"
>
</view>
</view>
<view
class=
"user-meal-time-txt"
>
<text>
班级集中就餐时间
</text>
</view>
</view>
</view>
</view>
<view
id=
"breakfast-time-line"
>
</view>
</view>
<view
v-show=
"tabIndex==1&&isOpen"
class=
"school-report-context-card-seven"
>
<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-seven-conclusion"
>
<view
class=
"school-report-context-card-seven-conclusion-item"
>
<text
v-if=
"!mealPalArr.length"
>
独立的
<text
class=
"abnormal-date"
>
{{
userInfo
.
userName
}}
</text>
很棒,偶尔也可以叫上朋友一起吃饭哦
</text>
</text>
<text
v-else-if=
"mealPalArr.length==1"
>
最佳饭友非
<text
class=
"abnormal-date"
>
{{
mealPalStr
}}
</text>
莫属,有饭友吃嘛嘛香
</text>
</text>
<text
v-else
>
最佳干饭组合,赶快叫上
<text
class=
"abnormal-date"
>
{{
mealPalStr
}}
</text>
一起吃饭吧
</text>
</text>
</view>
</view>
<view
class=
"meal-pal-bar-unit"
>
<view
class=
"meal-pal-bar-unit-item"
>
<view
class=
"meal-pal-bar-icon"
>
</view>
<view
class=
"meal-pal-bar-txt"
>
<text>
一起就餐天数
</text>
</view>
</view>
</view>
<view
id=
"meal-pal-bar"
>
</view>
</view>
<!-- 出入校报告 -->
<view
v-show=
"tabIndex==2"
class=
"attendance-report-context-card-two"
>
<view
class=
"school-report-context-card-title"
>
...
...
@@ -591,7 +701,7 @@
<view
id=
"leave-message-bar"
>
</view>
</view>
<view
v-if=
"flag!=tabIndex"
class=
"school-report-footer"
>
<view
v-if=
"
tabIndex&&
flag!=tabIndex"
class=
"school-report-footer"
>
<view
class=
"school-report-footer-item"
>
<view
class=
"school-report-footer-item-txt"
>
<text>
到期后将无法查看完整报告
</text>
...
...
@@ -609,8 +719,8 @@
</view>
</view>
</view>
<view
v-if=
"flag==tabIndex"
class=
"no-open"
:style=
"{height:[9
15,845,891][tabIndex-1]+'rpx',top:[1425
,1099,pubTalkNoopenHeight][tabIndex-1]+'rpx'}"
>
<view
v-if=
"
tabIndex&&
flag==tabIndex"
class=
"no-open"
:style=
"{height:[9
92,845,891][tabIndex-1]+'rpx',top:[1620
,1099,pubTalkNoopenHeight][tabIndex-1]+'rpx'}"
>
<view
class=
"no-open-solution"
@
tap=
"equityPay"
>
<view
class=
"no-open-solution-txt"
>
<text>
最低{{memberInfo.leastAmount}}元/天开通,查看完整{{['消费','出入校','公话'][tabIndex-1]}}报告
</text>
...
...
@@ -876,6 +986,7 @@
maxDate
:
new
Date
(),
imgUrl
:
''
,
// 存储base64图片
dialogShow
:
false
,
// tabIndex: 0,
tabIndex
:
1
,
// 就餐情况
diningSituations
:
{
...
...
@@ -901,6 +1012,10 @@
consumerTrend
:
{},
isAbnormal
:
false
,
lineDatas
:
[],
// 饭友分析
mealPalData
:
[],
mealPalArr
:
[],
mealPalStr
:
''
,
// 出入校报告数据
attendanceSituations
:
{
attendanceDate
:
''
,
...
...
@@ -941,9 +1056,152 @@
differDay
:
''
},
containerHeight
:
''
,
pubTalkSummaryHeight
:
52
5
,
pubTalkSummaryHeight
:
27
5
,
pubTalkNoopenHeight
:
1260
,
isnodataClick
:
false
isnodataClick
:
false
,
mealtimeTrendsData
:
[{
userId
:
4018927
,
mealtype
:
1
,
cateringList
:
[{
classmealtime
:
"
05:25
"
,
repasttime
:
"
2022-05-01
"
,
usermealtime
:
"
07:00
"
,
repastType
:
2
},
{
classmealtime
:
"
05:45
"
,
repasttime
:
"
2022-05-02
"
,
usermealtime
:
"
06:00
"
,
repastType
:
1
},
{
classmealtime
:
"
06:00
"
,
repasttime
:
"
2022-05-03
"
,
usermealtime
:
"
05:55
"
,
repastType
:
1
},
{
classmealtime
:
"
06:05
"
,
repasttime
:
"
2022-05-04
"
,
usermealtime
:
"
06:00
"
,
repastType
:
1
},
{
classmealtime
:
"
05:25
"
,
repasttime
:
"
2022-05-05
"
,
usermealtime
:
"
05:35
"
,
repastType
:
2
},
{
classmealtime
:
"
05:35
"
,
repasttime
:
"
2022-05-06
"
,
usermealtime
:
"
05:35
"
,
repastType
:
2
},
{
classmealtime
:
"
05:55
"
,
repasttime
:
"
2022-05-07
"
,
usermealtime
:
"
05:55
"
,
repastType
:
1
}
],
earliestTime
:
"
05:25
"
},
{
userId
:
4018927
,
mealtype
:
2
,
cateringList
:
[{
classmealtime
:
"
11:25
"
,
repasttime
:
"
2022-05-01
"
,
usermealtime
:
"
11:00
"
,
repastType
:
2
,
},
{
classmealtime
:
"
11:45
"
,
repasttime
:
"
2022-05-02
"
,
usermealtime
:
"
12:00
"
,
repastType
:
1
},
{
classmealtime
:
"
12:00
"
,
repasttime
:
"
2022-05-03
"
,
usermealtime
:
"
11:55
"
,
repastType
:
1
},
{
classmealtime
:
"
12:05
"
,
repasttime
:
"
2022-05-04
"
,
usermealtime
:
"
12:00
"
,
repastType
:
1
},
{
classmealtime
:
"
11:25
"
,
repasttime
:
"
2022-05-05
"
,
usermealtime
:
"
11:35
"
,
repastType
:
2
},
{
classmealtime
:
"
11:35
"
,
repasttime
:
"
2022-05-06
"
,
usermealtime
:
"
11:35
"
,
repastType
:
2
},
{
classmealtime
:
"
11:55
"
,
repasttime
:
"
2022-05-07
"
,
usermealtime
:
"
11:55
"
,
repastType
:
1
}
],
earliestTime
:
"
11:25
"
},
{
userId
:
4018927
,
mealtype
:
3
,
cateringList
:
[{
classmealtime
:
"
17:00
"
,
repasttime
:
"
2022-05-01
"
,
usermealtime
:
"
17:05
"
,
repastType
:
2
},
{
classmealtime
:
"
17:45
"
,
repasttime
:
"
2022-05-02
"
,
usermealtime
:
"
18:00
"
,
repastType
:
1
},
{
classmealtime
:
"
18:00
"
,
repasttime
:
"
2022-05-03
"
,
usermealtime
:
"
17:55
"
,
repastType
:
1
},
{
classmealtime
:
"
18:05
"
,
repasttime
:
"
2022-05-04
"
,
usermealtime
:
"
18:00
"
,
repastType
:
1
},
{
classmealtime
:
"
11:25
"
,
repasttime
:
"
2022-05-05
"
,
usermealtime
:
"
11:35
"
,
repastType
:
2
},
{
classmealtime
:
"
17:35
"
,
repasttime
:
"
2022-05-06
"
,
usermealtime
:
"
17:35
"
,
repastType
:
2
},
{
classmealtime
:
"
17:55
"
,
repasttime
:
"
2022-05-07
"
,
usermealtime
:
"
17:55
"
,
repastType
:
1
}
],
earliestTime
:
"
17:00
"
}]
}
},
mounted
()
{
...
...
@@ -982,18 +1240,22 @@
.
getTime
())
{
this
.
isOpen
=
true
;
this
.
flag
=
0
;
// this.tabIndex = 1;
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
());
}
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
.
queryMealPalAnalyse
().
then
(()
=>
this
.
mealPalBarchart
());
});
}
})
...
...
@@ -1001,16 +1263,22 @@
if
(
new
Date
().
getTime
()
<=
new
Date
(
'
2022/06/30
'
).
getTime
())
{
this
.
isOpen
=
true
;
this
.
flag
=
0
;
// this.tabIndex = 1;
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
));
}
else
{
this
.
queryIsDredgeMember
(
1002
,
1
).
then
(()
=>
{
this
.
queryConsumerSummaryAmount
();
this
.
queryDayConsumerTrend
();
});
this
.
queryMealPalAnalyse
().
then
(()
=>
this
.
mealPalBarchart
());
}
// 删除
else
{
this
.
isOpen
=
true
;
this
.
flag
=
0
;
this
.
queryConsumerSummaryAmount
(
1
).
then
(
e
=>
this
.
piechart
());
this
.
queryDayConsumerTrend
(
1
).
then
(
e
=>
this
.
linechart
(
this
.
reportTypeIndex
));
this
.
queryMealPalAnalyse
().
then
(()
=>
this
.
mealPalBarchart
());
this
.
breakfastTimeLinechart
(
this
.
reportTypeIndex
);
}
}
});
...
...
@@ -1046,7 +1314,9 @@
this
.
diningSituations
.
notRepastDetails
=
{};
}
});
this
.
getPubTalkReport
();
if
(
this
.
isPubTalkService
)
{
this
.
getPubTalkReport
();
}
},
// 当天11:00 ~ 13:00属于高峰期
isPeakPeriod
()
{
...
...
@@ -1097,11 +1367,14 @@
this
.
queryConsumerSummaryAmount
(
1
).
then
(
e
=>
this
.
piechart
());
this
.
queryDayConsumerTrend
(
1
).
then
(
e
=>
this
.
linechart
(
this
.
reportTypeIndex
));
this
.
queryMealPalAnalyse
().
then
(()
=>
this
.
mealPalBarchart
());
}
else
{
this
.
queryConsumerSummaryAmount
();
this
.
queryDayConsumerTrend
();
}
})
// 删除
this
.
breakfastTimeLinechart
(
this
.
reportTypeIndex
);
}
else
if
(
num
==
2
)
{
if
(
flag
)
{
this
.
attendanceSituations
.
attendanceDate
=
this
.
formatDate
(
this
.
minDate
);
...
...
@@ -1497,6 +1770,324 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
myLineChart
.
resize
();
})
},
breakfastTimeLinechart
:
function
(
num
)
{
var
mySize
=
document
.
getElementById
(
'
breakfast-time-line
'
);
mySize
.
style
.
width
=
350
+
'
px
'
;
mySize
.
style
.
height
=
280
+
'
px
'
;
var
myBreakfastTimeLineChart
=
echarts
.
init
(
mySize
);
var
breakfastTimeData
=
this
.
mealtimeTrendsData
.
filter
(
e
=>
e
.
mealtype
==
1
)[
0
].
cateringList
;
breakfastTimeData
.
forEach
(
e
=>
{
if
(
'
itemStyle
'
in
e
)
delete
e
.
itemStyle
;
if
(
'
symbol
'
in
e
)
delete
e
.
symbol
;
if
(
'
symbolSize
'
in
e
)
delete
e
.
symbolSize
;
if
(
e
.
classmealtime
.
indexOf
(
'
2022/07/01
'
)
==
-
1
)
{
e
.
classmealtime
=
"
2022/07/01
"
+
e
.
classmealtime
}
e
.
value
=
e
.
classmealtime
;
});
var
breakfastTimeDataTwo
=
this
.
mealtimeTrendsData
.
filter
(
e
=>
e
.
mealtype
==
1
)[
0
].
cateringList
;
breakfastTimeDataTwo
.
forEach
(
e
=>
{
if
(
'
itemStyle
'
in
e
)
delete
e
.
itemStyle
;
if
(
'
symbol
'
in
e
)
delete
e
.
symbol
;
if
(
'
symbolSize
'
in
e
)
delete
e
.
symbolSize
;
if
(
e
.
usermealtime
.
indexOf
(
'
2022/07/01
'
)
==
-
1
)
{
e
.
usermealtime
=
"
2022/07/01
"
+
e
.
usermealtime
}
e
.
value
=
e
.
usermealtime
;
});
var
xInterval
=
this
.
reportTypeIndex
?
0
:
5
;
var
yMidPoint
=
"
2022/07/01
"
+
this
.
mealtimeTrendsData
.
filter
(
e
=>
e
.
mealtype
==
1
)[
0
].
earliestTime
;
var
maxDate
=
new
Date
(
yMidPoint
).
setHours
(
new
Date
(
yMidPoint
).
getHours
()
==
23
?
'
00
'
:
new
Date
(
yMidPoint
).
getHours
()
+
1
);
var
minDate
=
new
Date
(
yMidPoint
).
setHours
(
new
Date
(
yMidPoint
).
getHours
()
==
0
?
23
:
new
Date
(
yMidPoint
).
getHours
()
-
1
);
var
xdata
=
breakfastTimeData
.
map
(
e
=>
e
.
repasttime
.
slice
(
5
));
// var year = this.dataRangeArr[this.dataRangeIndex].startDate.slice(0, 4);
// var month = this.dataRangeArr[this.dataRangeIndex].startDate.slice(5, 7);
var
year
=
'
2022
'
;
var
month
=
'
05
'
;
var
saturdayList
=
this
.
getMonthSaturdayDate
(
year
,
month
);
var
seriesDataOne
=
[];
var
seriesDataTwo
=
[];
switch
(
num
)
{
case
0
:
// 月报
breakfastTimeData
.
map
(
v
=>
{
if
(
v
.
repastType
==
1
)
{
if
(
v
.
repasttime
==
this
.
formatDateTwo
(
new
Date
(
year
,
month
,
0
))
||
saturdayList
.
includes
(
v
.
repasttime
))
{
// 第1/2/3/4周的最后一天+月末最后一天
seriesDataOne
.
push
(
Object
.
assign
(
v
,
{
itemStyle
:
{
color
:
'
rgba(0, 0, 0, 0.5)
'
,
borderWidth
:
1.5
},
symbolSize
:
4
}))
}
else
{
seriesDataOne
.
push
(
Object
.
assign
(
v
,
{
itemStyle
:
{
color
:
'
rgba(0, 0, 0, 0.5)
'
,
borderWidth
:
1.5
},
symbol
:
'
none
'
}))
}
}
else
{
if
(
v
.
repasttime
==
this
.
formatDateTwo
(
new
Date
(
year
,
month
,
0
))
||
saturdayList
.
includes
(
v
.
repasttime
))
{
seriesDataOne
.
push
(
Object
.
assign
(
v
,
{
itemStyle
:
{
color
:
'
rgba(0, 0, 0, 0.5)
'
,
borderWidth
:
1.5
},
symbolSize
:
4
}))
}
else
{
seriesDataOne
.
push
(
Object
.
assign
(
v
,
{
itemStyle
:
{
color
:
'
#FF8646
'
,
borderWidth
:
1.5
},
symbol
:
'
none
'
}))
}
}
});
// breakfastTimeDataTwo.map(v => {
// if (v.repastType == 1) {
// if (v.repasttime == this.formatDateTwo(new Date(year, month, 0)) ||
// saturdayList
// .includes(v.repasttime)) {
// seriesDataTwo.push(Object.assign(v, {
// itemStyle: {
// color: '#0BDB7E',
// borderWidth: 1.5
// },
// symbolSize: 4
// }))
// } else {
// seriesDataTwo.push(Object.assign(v, {
// itemStyle: {
// color: '#0BDB7E',
// borderWidth: 1.5
// },
// symbol: 'none'
// }))
// }
// } else {
// if (v.repasttime == this.formatDateTwo(new Date(year, month, 0)) ||
// saturdayList
// .includes(v.repasttime)) {
// seriesDataTwo.push(Object.assign(v, {
// itemStyle: {
// color: '#0BDB7E',
// borderWidth: 1.5
// },
// symbolSize: 4
// }))
// } else {
// seriesDataTwo.push(Object.assign(v, {
// itemStyle: {
// color: '#FF8646',
// borderWidth: 1.5
// },
// symbol: 'none'
// }))
// }
// }
// });
break
;
case
1
:
// 周报
breakfastTimeData
.
map
(
v
=>
{
if
(
v
.
repastType
==
1
)
{
seriesDataOne
.
push
(
Object
.
assign
(
v
,
{
itemStyle
:
{
color
:
'
rgba(0, 0, 0, 0.5)
'
,
borderWidth
:
1.5
},
symbolSize
:
4
}))
}
else
{
seriesDataOne
.
push
(
Object
.
assign
(
v
,
{
itemStyle
:
{
color
:
'
#FF8646
'
,
borderWidth
:
1.5
},
symbolSize
:
4
}))
}
});
// breakfastTimeDataTwo.map(v => {
// if (v.repastType == 1) {
// seriesDataTwo.push(Object.assign(v, {
// itemStyle: {
// color: '#0BDB7E',
// borderWidth: 1.5
// },
// symbolSize: 4
// }))
// } else {
// seriesDataTwo.push(Object.assign(v, {
// itemStyle: {
// color: '#FF8646',
// borderWidth: 1.5
// },
// symbolSize: 4
// }))
// }
// });
break
;
}
var
option
=
{
xAxis
:
{
type
:
'
category
'
,
data
:
xdata
,
axisLabel
:
{
interval
:
xInterval
},
},
yAxis
:
{
type
:
'
time
'
,
axisLabel
:
{
margin
:
2
,
formatter
:
function
(
value
)
{
return
(
moment
(
value
).
format
(
'
YYYY-MM-DD HH:mm
'
)).
slice
(
11
)
}
},
max
:
function
(
value
)
{
if
(
new
Date
(
maxDate
).
getMinutes
()
>
0
&&
new
Date
(
maxDate
).
getMinutes
()
<
30
)
{
return
new
Date
(
maxDate
).
setMinutes
(
30
);
}
else
{
return
maxDate
;
}
},
min
:
minDate
,
minInterval
:
2400
*
1000
,
maxInterval
:
2400
*
1000
},
series
:
[{
data
:
seriesDataOne
,
type
:
'
line
'
,
smooth
:
true
,
lineStyle
:
{
color
:
'
rgba(0, 0, 0, 0.5)
'
}
},
{
data
:
seriesDataTwo
,
type
:
'
line
'
,
smooth
:
true
,
lineStyle
:
{
color
:
'
#0BDB7E
'
}
}],
tooltip
:
{
trigger
:
'
axis
'
,
axisPointer
:
{
type
:
'
shadow
'
,
shadowStyle
:
{
color
:
'
transparent
'
}
},
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;
color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`
,
confine
:
true
,
position
:
function
(
pt
)
{
return
[
pt
[
0
]
-
27
,
pt
[
1
]
-
73
];
},
formatter
:
function
(
data
)
{
console
.
log
(
data
,
'
2222222222222
'
)
// if(data[0].data.repastType==2){
// desp="晚"
// }
// return data[0]. + desp;
}
},
};
option
&&
myBreakfastTimeLineChart
.
setOption
(
option
);
window
.
addEventListener
(
'
resize
'
,
function
()
{
myBreakfastTimeLineChart
.
resize
();
})
},
mealPalBarchart
:
function
()
{
var
mySize
=
document
.
getElementById
(
'
meal-pal-bar
'
);
mySize
.
style
.
width
=
300
+
'
px
'
;
mySize
.
style
.
height
=
280
+
'
px
'
;
var
myMealPalBarchart
=
echarts
.
init
(
mySize
);
var
ydata
=
this
.
mealPalArr
;
var
seriesData
=
this
.
mealPalData
.
map
(
v
=>
v
.
mealnumber
);
var
seriesDataMax
=
Math
.
max
(...
seriesData
);
var
option
=
{
xAxis
:
{
type
:
'
value
'
,
interval
:
Math
.
ceil
(
seriesDataMax
/
5
),
axisLabel
:
{
formatter
:
'
{value}天
'
},
splitLine
:
{
show
:
true
,
lineStyle
:
{
color
:
[
'
#979797
'
],
width
:
0.5
,
type
:
'
solid
'
}
}
},
yAxis
:
{
type
:
'
category
'
,
data
:
ydata
,
axisLabel
:
{
show
:
true
,
textStyle
:
{
color
:
'
#000000
'
,
fontSize
:
12
},
},
axisLine
:
{
show
:
true
,
lineStyle
:
{
color
:
[
'
#979797
'
],
width
:
0.5
,
type
:
'
solid
'
}
}
},
series
:
[{
data
:
seriesData
,
type
:
'
bar
'
,
itemStyle
:
{
color
:
new
this
.
$echarts
.
graphic
.
LinearGradient
(
0
,
0
,
1
,
0
,
[{
offset
:
0
,
color
:
'
#04B871
'
},
{
offset
:
1
,
color
:
'
#07D66A
'
}
]),
barBorderRadius
:
[
0
,
8
,
8
,
0
],
},
label
:
{
show
:
true
,
position
:
'
right
'
,
color
:
'
#04B871
'
,
fontSize
:
'
14px
'
,
formatter
:
(
params
)
=>
{
return
params
.
value
+
'
天
'
;
}
},
barWidth
:
25
}]
};
option
&&
myMealPalBarchart
.
setOption
(
option
);
window
.
addEventListener
(
'
resize
'
,
function
()
{
myMealPalBarchart
.
resize
();
})
},
callNumberBarchart
:
function
()
{
var
mySize
=
document
.
getElementById
(
'
call-number-bar
'
);
mySize
.
style
.
width
=
350
+
'
px
'
;
...
...
@@ -1876,11 +2467,13 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
title
:
data
.
msg
})
return
}
if
(
!
data
.
obj
)
return
;
if
(
data
.
obj
.
length
)
{
const
tmpObj
=
data
.
obj
[
0
];
this
.
isEatLow
=
tmpObj
.
canteenamount
/
tmpObj
.
consumergrossamount
<
0.5
?
true
:
false
;
this
.
isEatLow
=
tmpObj
.
canteenamount
/
tmpObj
.
consumergrossamount
<
0.5
?
true
:
false
;
if
(
num
)
{
this
.
pieDatas
=
[
[{
...
...
@@ -1909,12 +2502,17 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
name
:
'
gradeAverageHeight
'
,
num
:
this
.
consumerAmountObj
.
gradeavgamount
});
const
tempArr
=
[
this
.
consumerAmountObj
.
schoolavgamount
,
this
.
consumerAmountObj
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
]
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
]
...
...
@@ -1983,6 +2581,44 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
})
}
},
// 饭友分析
async
queryMealPalAnalyse
()
{
try
{
let
data
=
await
this
.
$http
.
get
({
url
:
gHost
+
'
/report-push/campus-consumer-report/queryMealPalAnalyse
'
},
{
schoolId
:
getQueryParams
(
'
schoolId
'
),
studentId
:
getQueryParams
(
'
userId
'
),
startDate
:
'
2022-06-26
'
,
endDate
:
'
2022-07-04
'
,
timeType
:
1
// startDate: this.dataRangeArr[this.dataRangeIndex].startDate,
// endDate: this.dataRangeArr[this.dataRangeIndex].endDate,
// timeType: this.dataRangeIndex == 0 ? 2 : 1
})
if
(
data
.
code
!=
200
)
{
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
data
.
message
})
return
}
this
.
mealPalData
=
data
.
obj
||
[];
this
.
mealPalArr
=
this
.
mealPalData
.
map
(
v
=>
v
.
mealpalname
.
slice
(
0
,
1
)
+
'
**
'
);
this
.
mealPalStr
=
this
.
mealPalArr
.
join
(
'
、
'
);
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
uni
.
showToast
({
icon
:
"
none
"
,
mask
:
true
,
title
:
e
.
message
})
}
},
// 获取公话报告
async
getPubTalkReport
()
{
try
{
...
...
@@ -1992,8 +2628,10 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
},
{
schoolId
:
getQueryParams
(
'
schoolId
'
),
studentId
:
getQueryParams
(
'
userId
'
),
startDate
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
,
endDate
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
endDate
,
startDate
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
]
.
startDate
,
endDate
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
]
.
endDate
,
})
if
(
data
.
code
!=
0
)
{
uni
.
showToast
({
...
...
@@ -2004,9 +2642,11 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
return
}
this
.
pubTalkReport
=
data
.
data
||
{};
if
(
!
this
.
pubTalkReport
.
talkText5
&&
!
this
.
pubTalkReport
.
talkText9
)
{
if
(
!
this
.
pubTalkReport
.
talkText5
&&
!
this
.
pubTalkReport
.
talkText9
)
{
this
.
pubTalkSummaryHeight
=
275
;
}
else
if
(
this
.
pubTalkReport
.
talkText5
&&
!
this
.
pubTalkReport
.
talkText9
)
{
}
else
if
(
this
.
pubTalkReport
.
talkText5
&&
!
this
.
pubTalkReport
.
talkText9
)
{
this
.
pubTalkSummaryHeight
=
387
;
}
else
{
this
.
pubTalkSummaryHeight
=
525
;
...
...
@@ -2031,8 +2671,10 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
},
{
schoolId
:
getQueryParams
(
'
schoolId
'
),
userId
:
getQueryParams
(
'
userId
'
),
startTime
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
,
endTime
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
endDate
,
startTime
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
]
.
startDate
,
endTime
:
this
.
dataRangeArr
[
this
.
dataRangeIndex
]
.
endDate
,
classId
:
this
.
userInfo
.
classId
})
if
(
data
.
code
!=
200
)
{
...
...
@@ -2077,13 +2719,17 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
var
tempList
=
data
.
data
;
if
(
tempList
&&
tempList
.
length
)
{
tempList
.
forEach
(
e
=>
{
if
(
e
.
attendDetailReportDTOList
&&
e
.
attendDetailReportDTOList
.
length
)
{
e
.
attendDetailReportDTOList
.
forEach
(
c
=>
{
c
.
border
=
c
.
describeContent
&&
c
.
describeContent
!=
'
当日早到冠军
'
?
'
4rpx solid #F9793F
'
:
'
4rpx solid rgba(0, 0, 0, 0.25)
'
})
if
(
e
.
attendDetailReportDTOList
&&
e
.
attendDetailReportDTOList
.
length
)
{
e
.
attendDetailReportDTOList
.
forEach
(
c
=>
{
c
.
border
=
c
.
describeContent
&&
c
.
describeContent
!=
'
当日早到冠军
'
?
'
4rpx solid #F9793F
'
:
'
4rpx solid rgba(0, 0, 0, 0.25)
'
})
}
})
this
.
attendanceReportDatail
=
tempList
||
[];
...
...
@@ -2121,32 +2767,40 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
}
switch
(
serviceItemCode
)
{
case
1002
:
this
.
isOpen
=
data
.
obj
&&
data
.
obj
.
status
||
false
;
this
.
isOpen
=
data
.
obj
&&
data
.
obj
.
status
||
false
;
if
(
!
this
.
isOpen
)
{
this
.
flag
=
1
;
}
break
;
case
2002
:
this
.
isPubTalkOpen
=
data
.
obj
&&
data
.
obj
.
status
||
false
;
this
.
isPubTalkOpen
=
data
.
obj
&&
data
.
obj
.
status
||
false
;
if
(
this
.
isPubTalkOpen
)
{
this
.
queryMemberValidTime
(
serviceItemCode
);
this
.
containerHeight
=
2765
+
this
.
pubTalkSummaryHeight
;
this
.
containerHeight
=
2765
+
this
.
pubTalkSummaryHeight
;
this
.
flag
=
0
;
}
else
{
this
.
queryMemberConsumerAmount
(
serviceItemCode
);
this
.
containerHeight
=
1605
+
this
.
pubTalkSummaryHeight
;
this
.
pubTalkNoopenHeight
=
735
+
this
.
pubTalkSummaryHeight
;
this
.
queryMemberConsumerAmount
(
serviceItemCode
);
this
.
containerHeight
=
1605
+
this
.
pubTalkSummaryHeight
;
this
.
pubTalkNoopenHeight
=
735
+
this
.
pubTalkSummaryHeight
;
this
.
flag
=
3
;
}
break
;
case
3002
:
this
.
isAttendanceOpen
=
data
.
obj
&&
data
.
obj
.
status
||
false
;
this
.
isAttendanceOpen
=
data
.
obj
&&
data
.
obj
.
status
||
false
;
if
(
this
.
isAttendanceOpen
)
{
this
.
queryMemberValidTime
(
serviceItemCode
);
this
.
containerHeight
=
2762
;
this
.
flag
=
0
;
}
else
{
this
.
queryMemberConsumerAmount
(
serviceItemCode
);
this
.
queryMemberConsumerAmount
(
serviceItemCode
);
this
.
containerHeight
=
1974
;
this
.
flag
=
2
;
}
...
...
@@ -2158,7 +2812,8 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
this
.
containerHeight
=
4200
;
this
.
flag
=
0
;
}
else
{
this
.
queryMemberConsumerAmount
(
serviceItemCode
);
this
.
queryMemberConsumerAmount
(
serviceItemCode
);
this
.
containerHeight
=
2340
;
}
}
...
...
@@ -2192,7 +2847,8 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
}
const
tempList
=
data
.
obj
||
[];
if
(
tempList
.
length
)
{
this
.
queryMemberServcieItemList
=
tempList
.
map
(
e
=>
e
.
serviceCode
);
this
.
queryMemberServcieItemList
=
tempList
.
map
(
e
=>
e
.
serviceCode
);
}
else
{
this
.
queryMemberServcieItemList
=
[];
}
...
...
@@ -2213,7 +2869,8 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
url
:
gHost
+
'
/report-push/member-info/queryMemberConsumerAmount
'
},
{
schoolId
:
getQueryParams
(
'
schoolId
'
),
schoolId
:
getQueryParams
(
'
schoolId
'
),
userId
:
getQueryParams
(
'
userId
'
),
serviceItemCode
})
...
...
@@ -2225,7 +2882,8 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
})
return
}
this
.
memberInfo
.
leastAmount
=
data
.
obj
.
leastAmount
;
this
.
memberInfo
.
leastAmount
=
data
.
obj
.
leastAmount
;
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
);
...
...
@@ -2243,8 +2901,10 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
url
:
gHost
+
'
/report-push/member-info/queryMemberValidTime
'
},
{
schoolId
:
getQueryParams
(
'
schoolId
'
),
userId
:
getQueryParams
(
'
userId
'
),
schoolId
:
getQueryParams
(
'
schoolId
'
),
userId
:
getQueryParams
(
'
userId
'
),
serviceItemCode
})
if
(
data
.
code
!=
200
)
{
...
...
@@ -2255,17 +2915,24 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
})
return
}
this
.
memberInfo
.
differDay
=
data
.
obj
.
differDay
;
this
.
memberInfo
.
invalidDate
=
data
.
obj
.
invalidDate
;
this
.
memberInfo
.
differDay
=
data
.
obj
.
differDay
;
this
.
memberInfo
.
invalidDate
=
data
.
obj
.
invalidDate
;
if
(
data
.
obj
.
invalidDate
)
{
let
month
=
data
.
obj
.
invalidDate
.
slice
(
5
,
6
)
==
0
?
data
.
obj
.
invalidDate
.
slice
(
6
,
7
)
:
data
.
obj
let
month
=
data
.
obj
.
invalidDate
.
slice
(
5
,
6
)
==
0
?
data
.
obj
.
invalidDate
.
slice
(
6
,
7
)
:
data
.
obj
.
invalidDate
.
slice
(
5
,
7
);
let
date
=
data
.
obj
.
invalidDate
.
slice
(
8
,
9
)
==
0
?
data
.
obj
let
date
=
data
.
obj
.
invalidDate
.
slice
(
8
,
9
)
==
0
?
data
.
obj
.
invalidDate
.
slice
(
9
)
:
data
.
obj
.
invalidDate
.
slice
(
8
);
this
.
memberInfo
.
invalidDateStr
=
data
.
obj
.
invalidDate
.
slice
(
0
,
4
)
+
'
年
'
+
month
+
'
月
'
+
date
+
'
日
'
;
this
.
memberInfo
.
invalidDateStr
=
data
.
obj
.
invalidDate
.
slice
(
0
,
4
)
+
'
年
'
+
month
+
'
月
'
+
date
+
'
日
'
;
}
else
{
this
.
memberInfo
.
invalidDateStr
=
''
;
}
...
...
@@ -2288,7 +2955,9 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
fail
:
function
fail
(
_fail
)
{
console
.
warn
(
_fail
);
uni
.
showModal
({
content
:
JSON
.
stringify
(
_fail
)
content
:
JSON
.
stringify
(
_fail
)
});
}
});
...
...
@@ -3564,6 +4233,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
height
:
634rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
margin
:
0
0
40rpx
;
position
:
relative
;
.school-report-context-card-five-conclusion
{
...
...
@@ -3633,6 +4303,158 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
}
}
.school-report-context-card-six
{
height
:
1590rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
margin
:
0
0
40rpx
;
.school-report-context-card-six-conclusion
{
margin
:
40rpx
0
57rpx
;
.school-report-context-card-six-conclusion-item
{
margin
:
0
40rpx
0
30rpx
;
height
:
120rpx
;
font-size
:
28rpx
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
rgba
(
0
,
0
,
0
,
0
.85
);
line-height
:
40rpx
;
.abnormal-date
{
color
:
#04B871
;
}
}
}
.mealtime-trends
{
.mealtime-trends-theme
{
height
:
42rpx
;
padding
:
0
49rpx
0
30rpx
;
box-sizing
:
border-box
;
display
:
flex
;
.meal-type
{
font-size
:
30rpx
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
rgba
(
0
,
0
,
0
,
0
.85
);
line-height
:
42rpx
;
}
.user-meal-time
{
width
:
144rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin
:
0
32rpx
0
143rpx
;
}
.class-meal-time
{
width
:
234rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.user-meal-time-logo
{
display
:
flex
;
align-items
:
center
;
margin-right
:
10rpx
;
.user-meal-time-logo-left
,
.user-meal-time-logo-right
{
width
:
8rpx
;
height
:
1rpx
;
background
:
#0BDA7D
;
}
.user-meal-time-logo-middle
{
width
:
12rpx
;
height
:
12rpx
;
background
:
#FFFFFF
;
border
:
3rpx
solid
#0BDB7E
;
border-radius
:
12rpx
;
}
}
.user-meal-time-txt
{
font-size
:
24rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#8C8C8C
;
}
}
}
#breakfast-time-line
{
position
:
relative
;
top
:
-106rpx
;
left
:
24rpx
;
z-index
:
100
;
}
}
.school-report-context-card-seven
{
height
:
645rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
margin
:
0
0
40rpx
;
.school-report-context-card-seven-conclusion
{
margin
:
40rpx
0
50rpx
;
.school-report-context-card-seven-conclusion-item
{
margin
:
0
40rpx
0
30rpx
;
height
:
40rpx
;
font-size
:
28rpx
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
rgba
(
0
,
0
,
0
,
0
.85
);
line-height
:
40rpx
;
.abnormal-date
{
color
:
#04B871
;
}
}
}
.meal-pal-bar-unit
{
height
:
33rpx
;
display
:
flex
;
justify-content
:
center
;
.meal-pal-bar-unit-item
{
width
:
180rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.meal-pal-bar-icon
{
width
:
20rpx
;
height
:
20rpx
;
background
:
linear-gradient
(
360deg
,
#04B871
0%
,
#07D66A
100%
);
border-radius
:
4rpx
;
}
.meal-pal-bar-txt
{
font-size
:
24rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#8C8C8C
;
line-height
:
33rpx
;
}
}
}
#meal-pal-bar
{
position
:
relative
;
top
:
-106rpx
;
left
:
18rpx
;
z-index
:
100
;
}
}
.school-report-footer
{
height
:
169rpx
;
margin
:
40rpx
0
43rpx
;
...
...
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