Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
596c30ac
Commit
596c30ac
authored
Nov 24, 2022
by
kyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
学习统计
parent
a725c271
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
219 additions
and
29 deletions
+219
-29
pages/learningStatistics/learningStatistics.vue
+179
-23
static/font/demo_index.html
+26
-3
static/font/iconfont.css
+7
-3
static/font/iconfont.js
+0
-0
static/font/iconfont.json
+7
-0
static/font/iconfont.ttf
+0
-0
static/font/iconfont.woff
+0
-0
static/font/iconfont.woff2
+0
-0
No files found.
pages/learningStatistics/learningStatistics.vue
View file @
596c30ac
...
...
@@ -22,11 +22,74 @@
<view
class=
"progressBox"
>
<text>
0
</text>
<view
class=
"progressLine"
>
<view
class=
"bgLine"
:style=
"
{width:userStudyCountList.progressBarTotal+'%'}">
{{
userStudyCountList
.
progressBarTotal
}}
%
</view>
<view
class=
"bgLine"
:style=
"
{width:userStudyCountList.progressBarTotal+'%'}">
<text
v-if=
"userStudyCountList.progressBarTotal > 50"
>
{{
userStudyCountList
.
progressBarTotal
}}
%
</text>
</view>
<view
class=
"blankBox"
:style=
"
{width:(100- userStudyCountList.progressBarTotal)+'%'}" v-if="userStudyCountList.progressBarTotal
<
=
50
"
>
{{
userStudyCountList
.
progressBarTotal
}}
%
</view>
</view>
<text>
100%
</text>
</view>
</view>
<!-- 进度明细 -->
<view
class=
"progressDetailBox"
>
<view
class=
"progressTitleBox"
>
<h4><i
class=
"iconfont icon-shalou"
></i>
进度明细
</h4>
<i
class=
"iconfont icon-youjiantou"
@
click=
"state.package=!state.package"
:style=
"
{transform: state.package ? 'rotate(90deg)' : 'rotate(-90deg)' }">
</i>
</view>
<template
v-if=
"state.package"
>
<view
class=
"progressItemBox"
v-for=
"(item,index) in userStudyCountList.barInfos"
:key=
"index"
>
<!-- 课程大类 -->
<view
class=
"packageItem"
>
<view
class=
"progressTopBox"
>
<view
class=
"no"
>
{{
index
+
1
}}
.
</view>
<view
class=
"progressBox"
>
<text>
0
</text>
<view
class=
"progressLine"
>
<view
class=
"bgLine"
:style=
"
{width:item.progressBar+'%'}">
<text
v-if=
"parseFloat(item.progressBar) > 50"
>
{{
item
.
progressBar
}}
%
</text>
</view>
<view
class=
"blankBox"
:style=
"
{width:(100- parseFloat(item.progressBar))+'%'}" v-if="parseFloat(item.progressBar)
<
=
50
"
>
{{
parseFloat
(
item
.
progressBar
)
}}
%
</view>
</view>
<text>
100%
</text>
</view>
</view>
<view
class=
"progressBottomBox"
>
<text>
{{
item
.
fileTitle
}}
</text>
<i
class=
"iconfont icon-youjiantou"
@
click=
"item['state']=!item['state'];userCoursePackBar(item['state'],item.packFileId,item.orderId)"
:style=
"
{transform: item['state'] ? 'rotate(90deg)' : 'rotate(-90deg)' }">
</i>
</view>
</view>
<!-- 小课 -->
<view
class=
"fileItemBox"
v-if=
"item['state']"
>
<view
class=
"fileItem"
v-for=
"subItem in userCoursePackBarList"
>
<view
class=
"topBox progressBox"
>
<text
class=
"no"
>
0
</text>
<view
class=
"progressLine"
>
<view
class=
"bgLine"
:style=
"
{width:subItem.progressBar+'%'}">
<text
v-if=
"parseFloat(subItem.progressBar) > 50"
>
{{
subItem
.
progressBar
}}
%
</text>
</view>
<view
class=
"blankBox"
:style=
"
{width:(100- parseFloat(subItem.progressBar))+'%'}" v-if="parseFloat(subItem.progressBar)
<
=
50
"
>
{{
subItem
.
progressBar
}}
%
</view>
</view>
<text>
100%
</text>
</view>
<view
class=
"bottomBox"
>
{{
subItem
.
fileTitle
}}
</view>
</view>
</view>
</view>
</
template
>
</view>
<!-- 学习明细 -->
<view
class=
"studyDetailBox"
>
<h4>
学习明细
</h4>
<view
class=
"lineChartBox"
>
</view>
<view
class=
"calendarBox"
>
</view>
</view>
</view>
</template>
...
...
@@ -39,9 +102,11 @@
userStudyCountList
:{},
userCoursePackBarList
:{},
userStudyTimeList
:{},
packFileId
:
''
,
orderId
:
''
,
month
:
''
month
:
''
,
state
:{
package
:
false
,
file
:
false
}
};
},
methods
:{
...
...
@@ -52,10 +117,13 @@
}
})
},
userCoursePackBar
(){
api
.
userCoursePackBar
({
userId
:
this
.
userId
,
packFileId
:
this
.
packFileId
,
orderId
:
this
.
orderId
}).
then
(
res
=>
{
userCoursePackBar
(
state
,
packFileId
,
orderId
){
if
(
!
packFileId
||
!
state
){
return
false
;
}
api
.
userCoursePackBar
({
userId
:
this
.
userId
,
packFileId
:
packFileId
,
orderId
:
orderId
}).
then
(
res
=>
{
if
(
res
[
'success'
]){
this
.
userCoursePackBarList
=
res
[
'data'
];
this
.
userCoursePackBarList
=
res
[
'data'
]
[
'barInfos'
]
;
}
})
},
...
...
@@ -97,7 +165,7 @@
border-right
:
1px
solid
#F4F4F4
;
}
}
.studyProgressBox
{
.studyProgressBox
,
.studyDetailBox
{
h4{
position
:
relative
;
font-size
:
36
rpx
;
...
...
@@ -117,26 +185,114 @@
border-radius
:
4
rpx
;
}
}
.progressBox
{
}
.progressDetailBox
{
.progressTitleBox{
display
:
flex
;
align-items
:
center
;
padding
:
0
40
rpx
;
.progressLine{
width
:
90%
;
height
:
60
rpx
;
border-radius
:
36
rpx
;
border
:
4
rpx
solid
#0867F5
;
margin
:
0
20
rpx
;
.bgLine{
height
:
100%
;
background-color
:
#0867F5
;
border-top-left-radius
:
36
rpx
;
border-bottom-left-radius
:
36
rpx
;
justify-content
:
space-between
;
padding
:
16
rpx
36
rpx
;
font-size
:
36
rpx
;
background-color
:
#fff
;
color
:
#333
;
.iconfont{
color
:
#666
;
transform
:
rotate
(
90deg
);
}
h4
{
.iconfont{
color
:
#0A2F99
;
margin-right
:
16
rpx
;
}
}
}
.progressItemBox
{
padding
:
18
rpx
10
rpx
;
box-shadow
:
0px
0px
8px
0px
rgba
(
0
,
0
,
0
,
0.25
);
border-radius
:
10
rpx
;
margin
:
20
rpx
36
rpx
;
.packageItem{
.progressTopBox{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
color
:
#fff
;
.no{
max-width
:
3ch
;
margin-right
:
10
rpx
;
color
:
#000
;
font-size
:
30
rpx
;
}
.progressBox
{
width
:
calc
(
100%
-
3ch
);
padding
:
0
;
}
}
.progressBottomBox
{
color
:
#333
;
text-align
:
center
;
margin
:
10
rpx
auto
;
.iconfont{
display
:
inline-block
;
;
color
:
#666
;
transform
:
rotate
(
-90deg
);
}
}
}
.fileItemBox
{
border-radius
:
10
rpx
;
margin
:
10
rpx
;
.fileItem{
padding
:
20
rpx
0
;
box-shadow
:
0px
0px
8px
0px
rgba
(
0
,
0
,
0
,
0.25
);
margin-bottom
:
20
rpx
;
.topBox{
display
:
flex
;
justify-content
:
flex-start
;
.no{
max-width
:
3ch
;
}
.progressLine
{
height
:
40
rpx
;
}
}
.bottomBox
{
text-align
:
center
;
color
:
#666
;
font-size
:
24
rpx
;
margin-top
:
10
rpx
;
}
}
}
}
}
.progressBox
{
display
:
flex
;
align-items
:
center
;
padding
:
0
40
rpx
;
color
:
#666
;
.progressLine{
position
:
relative
;
width
:
90%
;
height
:
60
rpx
;
border-radius
:
36
rpx
;
border
:
4
rpx
solid
#0867F5
;
margin
:
0
20
rpx
;
display
:
flex
;
align-items
:
center
;
overflow
:
hidden
;
.bgLine{
height
:
100%
;
background-color
:
#0867F5
;
border-top-left-radius
:
36
rpx
;
border-bottom-left-radius
:
36
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
color
:
#fff
;
position
:
relative
;
}
.blankBox
{
}
}
}
...
...
static/font/demo_index.html
View file @
596c30ac
...
...
@@ -55,6 +55,12 @@
<ul
class=
"icon_lists dib-box"
>
<li
class=
"dib"
>
<span
class=
"icon iconfont"
>

</span>
<div
class=
"name"
>
沙漏
</div>
<div
class=
"code-name"
>
&
#xe62e;
</div>
</li>
<li
class=
"dib"
>
<span
class=
"icon iconfont"
>

</span>
<div
class=
"name"
>
24gf-playCircle
</div>
<div
class=
"code-name"
>
&
#xea82;
</div>
...
...
@@ -294,9 +300,9 @@
<pre><code
class=
"language-css"
>
@font-face {
font-family: 'iconfont';
src: url('iconfont.woff2?t=1669
109385781
') format('woff2'),
url('iconfont.woff?t=1669
109385781
') format('woff'),
url('iconfont.ttf?t=1669
109385781
') format('truetype');
src: url('iconfont.woff2?t=1669
254238919
') format('woff2'),
url('iconfont.woff?t=1669
254238919
') format('woff'),
url('iconfont.ttf?t=1669
254238919
') format('truetype');
}
</code></pre>
<h3
id=
"-iconfont-"
>
第二步:定义使用 iconfont 的样式
</h3>
...
...
@@ -323,6 +329,15 @@
<ul
class=
"icon_lists dib-box"
>
<li
class=
"dib"
>
<span
class=
"icon iconfont icon-shalou"
></span>
<div
class=
"name"
>
沙漏
</div>
<div
class=
"code-name"
>
.icon-shalou
</div>
</li>
<li
class=
"dib"
>
<span
class=
"icon iconfont icon-24gf-playCircle"
></span>
<div
class=
"name"
>
24gf-playCircle
...
...
@@ -684,6 +699,14 @@
<li
class=
"dib"
>
<svg
class=
"icon svg-icon"
aria-hidden=
"true"
>
<use
xlink:href=
"#icon-shalou"
></use>
</svg>
<div
class=
"name"
>
沙漏
</div>
<div
class=
"code-name"
>
#icon-shalou
</div>
</li>
<li
class=
"dib"
>
<svg
class=
"icon svg-icon"
aria-hidden=
"true"
>
<use
xlink:href=
"#icon-24gf-playCircle"
></use>
</svg>
<div
class=
"name"
>
24gf-playCircle
</div>
...
...
static/font/iconfont.css
View file @
596c30ac
@font-face
{
font-family
:
"iconfont"
;
/* Project id 3749283 */
src
:
url('iconfont.woff2?t=1669
109385781
')
format
(
'woff2'
),
url('iconfont.woff?t=1669
109385781
')
format
(
'woff'
),
url('iconfont.ttf?t=1669
109385781
')
format
(
'truetype'
);
src
:
url('iconfont.woff2?t=1669
254238919
')
format
(
'woff2'
),
url('iconfont.woff?t=1669
254238919
')
format
(
'woff'
),
url('iconfont.ttf?t=1669
254238919
')
format
(
'truetype'
);
}
.iconfont
{
...
...
@@ -13,6 +13,10 @@
-moz-osx-font-smoothing
:
grayscale
;
}
.icon-shalou
:before
{
content
:
"\e62e"
;
}
.icon-24gf-playCircle
:before
{
content
:
"\ea82"
;
}
...
...
static/font/iconfont.js
View file @
596c30ac
This diff is collapsed.
Click to expand it.
static/font/iconfont.json
View file @
596c30ac
...
...
@@ -6,6 +6,13 @@
"description"
:
""
,
"glyphs"
:
[
{
"icon_id"
:
"2023263"
,
"name"
:
"沙漏"
,
"font_class"
:
"shalou"
,
"unicode"
:
"e62e"
,
"unicode_decimal"
:
58926
},
{
"icon_id"
:
"7594157"
,
"name"
:
"24gf-playCircle"
,
"font_class"
:
"24gf-playCircle"
,
...
...
static/font/iconfont.ttf
View file @
596c30ac
No preview for this file type
static/font/iconfont.woff
View file @
596c30ac
No preview for this file type
static/font/iconfont.woff2
View file @
596c30ac
No preview for this file type
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