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
a8c2053c
Commit
a8c2053c
authored
Nov 24, 2022
by
kyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
学习进度图标
parent
3003ad85
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
32 deletions
+61
-32
components/charts/charts.vue
+12
-16
pages/announcement/announcement_detail.vue
+4
-0
pages/courseDetail/courseDetail.vue
+13
-0
pages/learningStatistics/learningStatistics.vue
+32
-16
No files found.
components/charts/charts.vue
View file @
a8c2053c
...
@@ -4,30 +4,28 @@
...
@@ -4,30 +4,28 @@
type=
"column"
type=
"column"
:opts=
"opts"
:opts=
"opts"
:chartData=
"chartData"
:chartData=
"chartData"
@
getIndex=
"tap"
/>
/>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
ref
}
from
"vue"
;
export
default
{
export
default
{
// props:{chartData}
,
props
:[
'chartData'
]
,
data
()
{
data
()
{
return
{
return
{
chartData
:
{
categories
:
[
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
],
series
:
[
{
name
:
"学习时间"
,
data
:
[
35
,
36
,
31
,
33
,
13
,
34
]
}
]
},
//您可以通过修改 config-ucharts.js 文件中下标为 ['column'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
//您可以通过修改 config-ucharts.js 文件中下标为 ['column'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
opts
:
{
opts
:
{
}
}
};
};
},
},
setup
(
props
,
content
)
{
const
chartData
=
ref
(
props
.
chartData
);
const
tap
=
function
(
e
){
content
.
emit
(
'tap'
,
e
)
}
return
{
chartData
,
tap
}
},
mounted
()
{
mounted
()
{
this
.
opts
=
{
this
.
opts
=
{
color
:[
'#5F83FF'
],
color
:[
'#5F83FF'
],
...
@@ -61,9 +59,7 @@ export default {
...
@@ -61,9 +59,7 @@ export default {
}
}
};
};
},
},
methods
:
{
methods
:
{}
}
};
};
</
script
>
</
script
>
...
...
pages/announcement/announcement_detail.vue
View file @
a8c2053c
...
@@ -34,8 +34,12 @@
...
@@ -34,8 +34,12 @@
name
:
'announcement_detail'
,
name
:
'announcement_detail'
,
components
:{
components
:{
},
},
<<<<<<<
Updated
upstream
onLoad
(
options
){
onLoad
(
options
){
this
.
id
=
options
.
id
;
this
.
id
=
options
.
id
;
=======
onLoad
(
option
){
>>>>>>>
Stashed
changes
this
.
getAnnouncementDetail
();
this
.
getAnnouncementDetail
();
},
},
methods
:{
methods
:{
...
...
pages/courseDetail/courseDetail.vue
View file @
a8c2053c
...
@@ -44,10 +44,14 @@
...
@@ -44,10 +44,14 @@
</view>
</view>
<!-- 相关课程列表 -->
<!-- 相关课程列表 -->
<view
class=
"relationCourseListsContent"
v-show=
"tabType===2"
>
<view
class=
"relationCourseListsContent"
v-show=
"tabType===2"
>
<<<<<<<
Updated
upstream
<view
class=
"totalCourseCount"
>
<view
class=
"totalCourseCount"
>
<text
v-if=
"requiredCount"
>
{{
requiredCount
}}
节必修
</text>
<text
v-if=
"requiredCount"
>
{{
requiredCount
}}
节必修
</text>
<text
v-if=
"nonRequiredCount"
>
+
{{
nonRequiredCount
}}
节必修
</text>
<text
v-if=
"nonRequiredCount"
>
+
{{
nonRequiredCount
}}
节必修
</text>
</view>
</view>
=======
<view
class=
"totalCourseCount"
>
{{
requiredCount
}}
节必修 +
{{
nonRequiredCount
}}
节选修
</view>
>>>>>>> Stashed changes
<view
class=
"courseItemContent"
v-for=
"(item,index) in relatedCoursesLists"
:key=
"item.fileId"
>
<view
class=
"courseItemContent"
v-for=
"(item,index) in relatedCoursesLists"
:key=
"item.fileId"
>
<view
class=
"courseInfoContent"
>
<view
class=
"courseInfoContent"
>
<h4>
{{
index
+
1
}}
.
{{
item
.
fileTitle
}}
<text
class=
"courseType"
>
{{
item
.
fileType
==
'1'
?
'必修'
:
'选修'
}}
</text></h4>
<h4>
{{
index
+
1
}}
.
{{
item
.
fileTitle
}}
<text
class=
"courseType"
>
{{
item
.
fileType
==
'1'
?
'必修'
:
'选修'
}}
</text></h4>
...
@@ -106,6 +110,7 @@
...
@@ -106,6 +110,7 @@
shareCode
:
''
,
shareCode
:
''
,
shareReadId
:
''
,
shareReadId
:
''
,
dataSource
:
'1'
,
dataSource
:
'1'
,
<<<<<<<
Updated
upstream
requiredCount
:
0
,
requiredCount
:
0
,
nonRequiredCount
:
0
,
nonRequiredCount
:
0
,
videoPlaybackInfo
:{},
videoPlaybackInfo
:{},
...
@@ -115,6 +120,10 @@
...
@@ -115,6 +120,10 @@
viewTime
:
0
,
viewTime
:
0
,
timer
:
null
,
timer
:
null
,
loginType
:
''
loginType
:
''
=======
nonRequiredCount
:
0
,
requiredCount
:
0
>>>>>>>
Stashed
changes
};
};
},
},
methods
:{
methods
:{
...
@@ -197,8 +206,12 @@
...
@@ -197,8 +206,12 @@
console
.
log
(
'相关课程详情'
,
res
);
console
.
log
(
'相关课程详情'
,
res
);
if
(
res
[
'success'
]){
if
(
res
[
'success'
]){
this
.
relatedCoursesLists
=
res
[
'data'
][
'data'
][
'relatedCourseList'
];
this
.
relatedCoursesLists
=
res
[
'data'
][
'data'
][
'relatedCourseList'
];
<<<<<<<
Updated
upstream
this
.
nonRequiredCount
=
res
[
'data'
][
'data'
][
'nonRequiredCount'
];
this
.
nonRequiredCount
=
res
[
'data'
][
'data'
][
'nonRequiredCount'
];
this
.
requiredCount
=
res
[
'data'
][
'data'
][
'requiredCount'
];
this
.
requiredCount
=
res
[
'data'
][
'data'
][
'requiredCount'
];
=======
console
.
log
(
this
.
relatedCoursesLists
)
>>>>>>>
Stashed
changes
}
}
})
})
},
},
...
...
pages/learningStatistics/learningStatistics.vue
View file @
a8c2053c
...
@@ -84,8 +84,8 @@
...
@@ -84,8 +84,8 @@
<view
class=
"studyDetailBox"
>
<view
class=
"studyDetailBox"
>
<h4>
学习明细
</h4>
<h4>
学习明细
</h4>
<view
class=
"lineChartBox"
>
<view
class=
"lineChartBox"
>
<view
v-if=
"studyInfos"
>
<view
v-if=
"studyInfos
&& chartData
"
>
<charts></charts>
<charts
:chartData=
"chartData"
@
tap=
"tap"
></charts>
<view
class=
"chartTips"
>
<view
class=
"chartTips"
>
<view
class=
"imgBox"
>
<view
class=
"imgBox"
>
<image
src=
"../../static/point.png"
mode=
"widthFix"
></image>
<image
src=
"../../static/point.png"
mode=
"widthFix"
></image>
...
@@ -98,7 +98,14 @@
...
@@ -98,7 +98,14 @@
</view>
</view>
</view>
</view>
<view
class=
"calendarBox"
>
<view
class=
"calendarBox"
>
<uni-calendar
:insert=
"true"
:lunar=
"true"
:start-date=
"'2019-3-2'"
:end-date=
"'2019-5-20'"
:selected=
"calendarSelected"
@
change=
"calendarChange"
/>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -120,7 +127,8 @@
...
@@ -120,7 +127,8 @@
package
:
false
package
:
false
},
},
chartData
:{},
chartData
:{},
studyInfos
:[]
studyInfos
:[],
calendarSelected
:[]
};
};
},
},
methods
:{
methods
:{
...
@@ -140,18 +148,19 @@
...
@@ -140,18 +148,19 @@
for
(
let
n
=
first
;
n
<=
end
;
n
++
){
for
(
let
n
=
first
;
n
<=
end
;
n
++
){
categories
.
push
(
n
);
categories
.
push
(
n
);
}
}
for
(
let
j
=
0
;
j
<=
this
.
studyInfos
.
length
;
j
++
){
data
=
categories
.
map
(
item
=>
item
*
0
);
for
(
let
i
=
0
;
i
<=
categories
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
studyInfos
.
length
;
j
++
){
if
(
this
.
studyInfos
[
i
]
&&
(
parseInt
(
this
.
studyInfos
[
i
].
month
.
split
(
'-'
)[
1
])
==
categories
[
i
])){
for
(
let
i
=
0
;
i
<
categories
.
length
;
i
++
){
data
.
push
(
this
.
studyInfos
[
i
].
studyTime
)
if
(
this
.
studyInfos
[
j
].
month
.
split
(
'-'
)[
1
]
==
categories
[
i
]){
}
else
{
data
[
i
]
=
this
.
studyInfos
[
j
].
studyTime
;
data
.
push
(
'0'
)
break
;
}
else
{
data
[
i
]
=
data
[
i
]
?
data
[
i
]
:
'0'
;
}
}
}
}
}
}
this
.
chartData
.
categories
=
categories
;
this
.
chartData
.
categories
=
categories
;
// this.chartData.series[0].data = data;
this
.
chartData
.
series
=
[{
name
:
'月'
,
data
:
data
}];
console
.
log
(
data
)
}
}
})
})
},
},
...
@@ -168,10 +177,18 @@
...
@@ -168,10 +177,18 @@
userStudyTime
(){
userStudyTime
(){
api
.
userStudyTime
({
userId
:
this
.
userId
,
month
:
this
.
month
}).
then
(
res
=>
{
api
.
userStudyTime
({
userId
:
this
.
userId
,
month
:
this
.
month
}).
then
(
res
=>
{
if
(
res
[
'success'
]){
if
(
res
[
'success'
]){
this
.
userStudyTimeList
=
res
[
'data'
];
this
.
userStudyTimeList
=
res
[
'data'
][
'studyInfos'
];
console
.
log
(
this
.
userStudyTimeList
)
}
}
})
})
},
calendarChange
(){
},
tap
(
e
){
// console.log(e.currentIndex.index)
}
}
},
},
mounted
()
{
mounted
()
{
this
.
userStudyCount
()
this
.
userStudyCount
()
...
@@ -338,13 +355,12 @@
...
@@ -338,13 +355,12 @@
background-color
:
#fff
;
background-color
:
#fff
;
margin-top
:
20
rpx
;
margin-top
:
20
rpx
;
.calendarBox{
.calendarBox{
margin
:
0
20
rpx
;
margin
:
20
rpx
;
box-shadow
:
0px
0px
22px
0px
rgba
(
0
,
0
,
0
,
0.1
);
box-shadow
:
0px
0px
22px
0px
rgba
(
0
,
0
,
0
,
0.1
);
border-radius
:
10
rpx
;
border-radius
:
10
rpx
;
}
}
.lineChartBox
{
.lineChartBox
{
width
:
100%
;
width
:
100%
;
height
:
600
rpx
;
.chartTips{
.chartTips{
text-align
:
center
;
text-align
:
center
;
font-size
:
20
rpx
;
font-size
:
20
rpx
;
...
...
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