Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
b58fc428
提交
b58fc428
authored
12月 03, 2021
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:新增学员学习进度页面
上级
ec8ec9cb
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
118 行增加
和
27 行删除
+118
-27
api.js
src/modules/teacher/data/course/api.js
+15
-0
index.js
src/modules/teacher/data/course/index.js
+2
-1
ClassLIst.vue
src/modules/teacher/data/course/views/ClassLIst.vue
+24
-5
Process.vue
src/modules/teacher/data/course/views/Process.vue
+67
-0
processDetail.vue
src/modules/teacher/data/course/views/processDetail.vue
+10
-21
没有找到文件。
src/modules/teacher/data/course/api.js
浏览文件 @
b58fc428
...
...
@@ -29,3 +29,18 @@ export function getClassList(params) {
export
function
getStuList
(
params
)
{
return
httpRequest
.
get
(
`/api/zy/v3-teacher/course/students/
${
params
.
course_id
}
`
,
{
params
})
}
/**
* 导出班级统计数据
*/
export
function
exportClass
(
params
)
{
return
httpRequest
.
get
(
`/api/zy/v3-teacher/course/classes-export/
${
params
}
`
,
{
params
,
responseType
:
'blob'
})
}
/**
* 获取学员详情
*/
export
function
getStudentDetail
(
params
)
{
return
httpRequest
.
get
(
'/api/zy/v3-school/student/view'
,
{
params
})
}
src/modules/teacher/data/course/index.js
浏览文件 @
b58fc428
...
...
@@ -6,7 +6,8 @@ const routes = [
{
path
:
'/teacher/data/course'
,
component
:
()
=>
import
(
'./views/List.vue'
)
},
{
path
:
'/teacher/data/course/classDatas'
,
component
:
()
=>
import
(
'./views/ClassList.vue'
)
},
{
path
:
'/teacher/data/course/personal'
,
component
:
()
=>
import
(
'./views/PersonalList.vue'
)
},
{
path
:
'/teacher/data/course/detail'
,
component
:
()
=>
import
(
'./views/CourseProcessList.vue'
)
}
{
path
:
'/teacher/data/course/detail'
,
component
:
()
=>
import
(
'./views/Process.vue'
)
},
{
path
:
'/teacher/data/course/processDetail'
,
component
:
()
=>
import
(
'./views/ProcessDetail.vue'
)
}
]
}
]
...
...
src/modules/teacher/data/course/views/ClassLIst.vue
浏览文件 @
b58fc428
...
...
@@ -2,14 +2,16 @@
<app-container>
<app-list
v-bind=
"tableOptions"
ref=
"list"
>
<template
#
header-aside
>
<el-button
type=
"text"
>
导出
</el-button>
<el-button
type=
"text"
@
click=
"exportClass"
>
导出
</el-button>
</
template
>
</app-list>
</app-container>
</template>
<
script
>
import
{
getClassList
}
from
'../api'
import
{
getClassList
,
exportClass
}
from
'../api'
// import queryString from 'query-string'
export
default
{
computed
:
{
id
()
{
...
...
@@ -21,9 +23,7 @@ export default {
remote
:
{
httpRequest
:
getClassList
,
params
:
{
course_id
:
this
.
id
,
class_name
:
''
,
id
:
''
course_id
:
this
.
id
}
},
filters
:
[{
type
:
'input'
,
prop
:
'class_name'
,
placeholder
:
'班级名称'
,
label
:
'班级名称'
}],
...
...
@@ -37,6 +37,25 @@ export default {
]
}
}
},
methods
:
{
exportClass
()
{
const
params
=
this
.
id
exportClass
(
params
).
then
(
r
=>
{
const
content
=
r
const
blob
=
new
Blob
([
content
],
{
type
:
'application/vnd.ms-excel'
})
if
(
'download'
in
document
.
createElement
(
'a'
))
{
const
elink
=
document
.
createElement
(
'a'
)
elink
.
download
=
'班级数据.xlsx'
elink
.
style
.
display
=
'none'
elink
.
href
=
URL
.
createObjectURL
(
blob
)
document
.
body
.
appendChild
(
elink
)
elink
.
click
()
URL
.
revokeObjectURL
(
elink
.
href
)
document
.
body
.
removeChild
(
elink
)
}
})
}
}
}
</
script
>
src/modules/teacher/data/course/views/Process.vue
0 → 100644
浏览文件 @
b58fc428
<
template
>
<app-card>
<app-list
v-bind=
"tableOptions"
ref=
"list"
>
<template
v-slot:course_picture=
"
{ row }">
<el-image
:src=
"row.course_picture"
></el-image>
</
template
>
<
template
v-slot:progress=
"{ row }"
>
<el-progress
:percentage=
"row.progress"
></el-progress>
</
template
>
<
template
v-slot:table-x=
"{ row }"
>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"toDetail(row)"
>
查看详情
</el-button>
</
template
>
</app-list>
</app-card>
</template>
<
script
>
// 接口
import
{
getStudentDetail
}
from
'../api'
export
default
{
data
()
{
return
{
list
:
[],
data
:
[]
}
},
computed
:
{
id
()
{
return
this
.
$route
.
query
.
id
},
// 列表配置
tableOptions
()
{
return
{
data
:
this
.
list
,
columns
:
[
{
label
:
'课程ID'
,
align
:
'center'
,
prop
:
'id'
},
{
label
:
'课程名称'
,
align
:
'center'
,
prop
:
'course_name'
},
{
label
:
'课程图片'
,
align
:
'center'
,
prop
:
'course_picture'
,
slots
:
'course_picture'
},
{
label
:
'总进度'
,
align
:
'center'
,
prop
:
'progress'
,
slots
:
'progress'
},
{
label
:
'总时长'
,
align
:
'center'
,
prop
:
'max_length'
},
{
label
:
'操作'
,
slots
:
'table-x'
,
align
:
'center'
,
fixed
:
'right'
}
]
}
}
},
mounted
()
{
this
.
getDetail
()
},
methods
:
{
getDetail
()
{
getStudentDetail
({
id
:
this
.
id
}).
then
(
res
=>
{
this
.
list
=
res
.
data
.
courses
})
},
toDetail
(
row
)
{
// console.log(row)
this
.
$router
.
push
({
path
:
'/teacher/data/course/processDetail'
,
query
:
{
row
:
row
.
data
}
})
}
}
}
</
script
>
src/modules/teacher/data/course/views/
CourseProcessList
.vue
→
src/modules/teacher/data/course/views/
processDetail
.vue
浏览文件 @
b58fc428
<
template
>
<app-c
ontainer
>
<app-c
ard
>
<app-list
v-bind=
"tableOptions"
ref=
"list"
>
<template
v-slot:progress=
"
{ row }">
<el-progress
:percentage=
"row.progress"
></el-progress>
</
template
>
</app-list>
</app-c
ontainer
>
</app-c
ard
>
</template>
<
script
>
export
default
{
data
()
{
return
{
}
},
computed
:
{
// 列表配置
tableOptions
()
{
return
{
remote
:
{
},
data
:
this
.
$route
.
query
.
row
,
columns
:
[
{
label
:
'章节名称'
,
prop
:
'paper_title'
,
align
:
'center'
},
{
label
:
'章节类型'
,
prop
:
'class_name'
,
align
:
'center'
},
{
label
:
'学习进度'
,
prop
:
'progress'
,
align
:
'center'
,
slots
:
'progress'
},
{
label
:
'是否标记完成'
,
prop
:
'hfsdhf'
,
align
:
'center'
},
{
label
:
'最大学习时点'
,
prop
:
'saferg'
,
align
:
'center'
},
{
label
:
'最后学习时点'
,
prop
:
'greghe'
,
align
:
'center'
},
{
label
:
'累计学习时长'
,
prop
:
'ehrth'
,
align
:
'center'
}
],
data
:
[
{
paper_title
:
'ewfwf'
,
progress
:
90
}
{
label
:
'章节名称'
,
align
:
'center'
,
prop
:
'name'
},
{
label
:
'章节类型'
,
align
:
'center'
,
prop
:
'type'
},
{
label
:
'学习进度'
,
align
:
'center'
,
prop
:
'progress'
,
slots
:
'progress'
},
{
label
:
'是否标记完成'
,
align
:
'center'
,
prop
:
'sign'
},
{
label
:
'最大学习时点'
,
align
:
'center'
,
prop
:
'mpt'
},
{
label
:
'最后学习时点'
,
align
:
'center'
,
prop
:
'cpt'
},
{
label
:
'累计学习时长'
,
align
:
'center'
,
prop
:
'pt'
}
]
}
}
},
methods
:
{
}
}
</
script
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论