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
3d58f9e3
Commit
3d58f9e3
authored
Nov 25, 2022
by
kyle
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '20221123' into dev
parents
87e265dc
878981fd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
204 additions
and
6 deletions
+204
-6
components/charts/charts.vue
+78
-0
pages/announcement/announcement_detail.vue
+4
-0
pages/courseDetail/courseDetail.vue
+13
-0
pages/learningStatistics/learningStatistics.vue
+108
-6
static/point.png
+0
-0
uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js
+1
-0
No files found.
components/charts/charts.vue
0 → 100644
View file @
3d58f9e3
<
template
>
<view
class=
"charts-box"
>
<qiun-data-charts
type=
"column"
:opts=
"opts"
:chartData=
"chartData"
:ontouch=
"true"
:tooltipShow=
"false"
@
getIndex=
"tap"
/>
</view>
</
template
>
<
script
>
import
{
ref
}
from
"vue"
;
export
default
{
props
:[
'chartData'
],
data
()
{
return
{
opts
:
{
},
};
},
setup
(
props
,
content
)
{
const
chartData
=
ref
(
props
.
chartData
);
const
tap
=
(
e
)
=>
{
const
index
=
e
.
currentIndex
.
index
;
console
.
log
(
e
)
content
.
emit
(
'getIndex'
,
index
)
}
return
{
chartData
,
tap
}
},
mounted
()
{
this
.
opts
=
{
color
:[
'#5F83FF'
],
touchMoveLimit
:
24
,
enableScroll
:
true
,
xAxis
:
{
fontSize
:
10
,
scrollShow
:
true
,
itemCount
:
12
,
format
:
'xAxisDemo3'
,
},
yAxis
:{
showTitle
:
true
,
data
:[{
title
:
'(分钟)'
,
titleFontSize
:
10
,
titleOffsetY
:
-
5
}]
},
legend
:{
show
:
false
},
series
:{
},
extra
:{
tootip
:{
showBox
:
false
,
showArrow
:
false
},
column
:{
barBorderRadius
:[
5
,
5
,
0
,
0
],
width
:
15
,
activeBgColor
:
'#000'
,
activeBgOpacity
:
0.05
}
}
};
},
methods
:
{
}
};
</
script
>
<
style
scoped
>
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-box
{
width
:
100%
;
height
:
600
rpx
;
}
</
style
>
\ No newline at end of file
pages/announcement/announcement_detail.vue
View file @
3d58f9e3
...
...
@@ -34,8 +34,12 @@
name
:
'announcement_detail'
,
components
:{
},
<<<<<<<
Updated
upstream
onLoad
(
options
){
this
.
id
=
options
.
id
;
=======
onLoad
(
option
){
>>>>>>>
Stashed
changes
this
.
getAnnouncementDetail
();
},
methods
:{
...
...
pages/courseDetail/courseDetail.vue
View file @
3d58f9e3
...
...
@@ -44,10 +44,14 @@
</view>
<!-- 相关课程列表 -->
<view
class=
"relationCourseListsContent"
v-show=
"tabType===2"
>
<<<<<<<
Updated
upstream
<view
class=
"totalCourseCount"
>
<text
v-if=
"requiredCount"
>
{{
requiredCount
}}
节必修
</text>
<text
v-if=
"nonRequiredCount"
>
+
{{
nonRequiredCount
}}
节必修
</text>
</view>
=======
<view
class=
"totalCourseCount"
>
{{
requiredCount
}}
节必修 +
{{
nonRequiredCount
}}
节选修
</view>
>>>>>>> Stashed changes
<view
class=
"courseItemContent"
v-for=
"(item,index) in relatedCoursesLists"
:key=
"item.fileId"
>
<view
class=
"courseInfoContent"
>
<h4>
{{
index
+
1
}}
.
{{
item
.
fileTitle
}}
<text
class=
"courseType"
>
{{
item
.
fileType
==
'1'
?
'必修'
:
'选修'
}}
</text></h4>
...
...
@@ -106,6 +110,7 @@
shareCode
:
''
,
shareReadId
:
''
,
dataSource
:
'1'
,
<<<<<<<
Updated
upstream
requiredCount
:
0
,
nonRequiredCount
:
0
,
videoPlaybackInfo
:{},
...
...
@@ -115,6 +120,10 @@
viewTime
:
0
,
timer
:
null
,
loginType
:
''
=======
nonRequiredCount
:
0
,
requiredCount
:
0
>>>>>>>
Stashed
changes
};
},
methods
:{
...
...
@@ -197,8 +206,12 @@
console
.
log
(
'相关课程详情'
,
res
);
if
(
res
[
'success'
]){
this
.
relatedCoursesLists
=
res
[
'data'
][
'data'
][
'relatedCourseList'
];
<<<<<<<
Updated
upstream
this
.
nonRequiredCount
=
res
[
'data'
][
'data'
][
'nonRequiredCount'
];
this
.
requiredCount
=
res
[
'data'
][
'data'
][
'requiredCount'
];
=======
console
.
log
(
this
.
relatedCoursesLists
)
>>>>>>>
Stashed
changes
}
})
},
...
...
pages/learningStatistics/learningStatistics.vue
View file @
3d58f9e3
...
...
@@ -84,10 +84,42 @@
<view
class=
"studyDetailBox"
>
<h4>
学习明细
</h4>
<view
class=
"lineChartBox"
>
<view
v-if=
"studyInfos && chartData"
>
<charts
:chartData=
"chartData"
@
getIndex=
"tap"
></charts>
<view
class=
"chartTips"
>
<view
class=
"imgBox"
>
<image
src=
"../../static/point.png"
mode=
"widthFix"
></image>
</view>
<text>
点击可查看对应数据
</text>
</view>
</view>
<view
class=
"noListTip"
v-if=
"!studyInfos"
>
暂无学习明细
</view>
</view>
<view
class=
"calendarBox"
>
<!-- 以防页面闪烁。日历提示需要刷新dom -->
<
template
v-if=
"showCalendar"
>
<view><uni-calendar
:date=
"currentDate"
:insert=
"true"
:lunar=
"true"
:start-date=
"'2022-01-01'"
:end-date=
"'2099-12-31'"
:selected=
"calendarSelected"
@
monthSwitch=
"monthSwitch"
@
change=
"calendarChange"
/></view>
</
template
>
<
template
v-if=
"!showCalendar"
>
<view><uni-calendar
:date=
"currentDate"
:insert=
"true"
:lunar=
"true"
:start-date=
"'2022-01-01'"
:end-date=
"'2099-12-31'"
/></view>
</
template
>
</view>
</view>
</view>
...
...
@@ -95,7 +127,9 @@
<
script
>
import
api
from
"@/api/api"
;
import
charts
from
"@/components/charts/charts.vue"
;
export
default
{
components
:{
charts
},
data
()
{
return
{
userId
:
'1'
,
...
...
@@ -104,9 +138,15 @@
userStudyTimeList
:{},
month
:
''
,
state
:{
package
:
false
,
file
:
false
}
package
:
false
},
chartData
:{},
studyInfos
:[],
calendarSelected
:[],
index
:
0
,
categoriesArr
:[],
currentDate
:
new
Date
().
toDateString
(),
showCalendar
:
false
};
},
methods
:{
...
...
@@ -114,6 +154,19 @@
api
.
userStudyCount
({
userId
:
this
.
userId
}).
then
(
res
=>
{
if
(
res
[
'success'
]){
this
.
userStudyCountList
=
res
[
'data'
];
this
.
studyInfos
=
res
[
'data'
][
'studyInfos'
];
let
categories
=
[];
let
data
=
[];
if
(
this
.
studyInfos
.
length
>
0
){
for
(
let
j
=
0
;
j
<
this
.
studyInfos
.
length
;
j
++
){
categories
.
push
(
this
.
studyInfos
[
j
].
month
.
split
(
'-'
)[
1
]);
data
.
push
({
value
:
this
.
studyInfos
[
j
][
'studyTime'
],
color
:
'#9EB4FF'
});
}
}
this
.
currentDate
=
this
.
month
=
this
.
studyInfos
[
this
.
studyInfos
.
length
-
1
].
month
;
this
.
chartData
.
categories
=
categories
;
this
.
chartData
.
series
=
[{
name
:
'月'
,
data
:
data
}];
this
.
userStudyTime
()
}
})
},
...
...
@@ -130,9 +183,34 @@
userStudyTime
(){
api
.
userStudyTime
({
userId
:
this
.
userId
,
month
:
this
.
month
}).
then
(
res
=>
{
if
(
res
[
'success'
]){
this
.
userStudyTimeList
=
res
[
'data'
];
this
.
userStudyTimeList
=
res
[
'data'
][
'studyInfos'
];
this
.
$nextTick
(()
=>
{
this
.
showCalendar
=
true
})
if
(
this
.
userStudyTimeList
){
for
(
let
i
=
0
;
i
<
this
.
userStudyTimeList
.
length
;
i
++
){
let
arr
=
{
date
:
''
,
info
:
''
}
arr
.
date
=
this
.
userStudyTimeList
[
i
][
'day'
];
arr
.
info
=
this
.
userStudyTimeList
[
i
][
'studyTime'
]
+
'分'
;
this
.
calendarSelected
.
push
(
arr
)
}
}
}
})
},
monthSwitch
(
e
){
// console.log(e)
},
calendarChange
(
e
){
// console.log(e)
},
tap
(
e
){
this
.
index
=
e
;
this
.
month
=
this
.
studyInfos
[
this
.
index
].
month
;
this
.
calendarSelected
=
[];
this
.
currentDate
=
this
.
month
;
this
.
showCalendar
=
false
;
this
.
userStudyTime
();
}
},
mounted
()
{
...
...
@@ -296,5 +374,29 @@
}
}
}
.studyDetailBox
{
background-color
:
#fff
;
margin-top
:
20
rpx
;
.calendarBox{
margin
:
20
rpx
;
box-shadow
:
0px
0px
22px
0px
rgba
(
0
,
0
,
0
,
0.1
);
border-radius
:
10
rpx
;
}
.lineChartBox
{
width
:
100%
;
.chartTips{
text-align
:
center
;
font-size
:
20
rpx
;
color
:
#c1c1c1
;
display
:
flex
;
justify-content
:
center
;
padding-top
:
10
rpx
;
background
:
#fff
;
.imgBox{
width
:
30
rpx
;
}
}
}
}
}
</
style
>
static/point.png
0 → 100644
View file @
3d58f9e3
664 Bytes
uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js
View file @
3d58f9e3
...
...
@@ -58,6 +58,7 @@ const cfu = {
"yAxisDemo2"
:
function
(
val
,
index
,
opts
){
return
val
.
toFixed
(
2
)},
"xAxisDemo1"
:
function
(
val
,
index
,
opts
){
return
val
+
'年'
;},
"xAxisDemo2"
:
function
(
val
,
index
,
opts
){
return
formatDateTime
(
val
,
'h:m'
)},
"xAxisDemo3"
:
function
(
val
,
index
,
opts
){
return
val
+
'月'
},
"seriesDemo1"
:
function
(
val
,
index
,
series
,
opts
){
return
val
+
'元'
},
"tooltipDemo1"
:
function
(
item
,
category
,
index
,
opts
){
if
(
index
==
0
){
...
...
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