Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
8117a1fd
提交
8117a1fd
authored
12月 03, 2021
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:分数排名和题目数据导出
上级
951710b7
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
47 行增加
和
6 行删除
+47
-6
api.js
src/modules/teacher/data/exam/api.js
+11
-1
ScoreRanking.vue
src/modules/teacher/data/exam/components/ScoreRanking.vue
+30
-3
TitleData.vue
src/modules/teacher/data/exam/components/TitleData.vue
+6
-2
没有找到文件。
src/modules/teacher/data/exam/api.js
浏览文件 @
8117a1fd
...
@@ -35,6 +35,13 @@ export function getExamDataInfo(params) {
...
@@ -35,6 +35,13 @@ export function getExamDataInfo(params) {
export
function
getScoreRanking
(
params
)
{
export
function
getScoreRanking
(
params
)
{
return
httpRequest
.
get
(
'/api/zy/v3-teacher/statistics/sheet-score-ranking'
,
{
params
})
return
httpRequest
.
get
(
'/api/zy/v3-teacher/statistics/sheet-score-ranking'
,
{
params
})
}
}
/**
* 考试数据-看板(分数排名导出)
*/
export
function
exportScoreList
(
params
)
{
return
httpRequest
.
get
(
'/api/zy/v3-teacher/statistics/sheet-score-ranking'
,
{
params
,
responseType
:
'blob'
})
}
/**
/**
* 考试数据-看板(题目数据)
* 考试数据-看板(题目数据)
*/
*/
...
@@ -45,5 +52,8 @@ export function getTitleList(params) {
...
@@ -45,5 +52,8 @@ export function getTitleList(params) {
* 考试数据-看板(题目数据导出)
* 考试数据-看板(题目数据导出)
*/
*/
export
function
exportTitleList
(
params
)
{
export
function
exportTitleList
(
params
)
{
return
httpRequest
.
get
(
'/api/zy/v3-teacher/statistics/sheet-questions/download'
,
{
params
})
return
httpRequest
.
get
(
'/api/zy/v3-teacher/statistics/sheet-questions'
,
{
params
,
responseType
:
'blob'
})
}
}
src/modules/teacher/data/exam/components/ScoreRanking.vue
浏览文件 @
8117a1fd
...
@@ -4,7 +4,12 @@
...
@@ -4,7 +4,12 @@
<h1
style=
"color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px"
>
<h1
style=
"color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px"
>
<span
style=
"color: #c01540"
v-show=
"dataInfo == 0"
>
*
</span>
分数排名
<span
style=
"color: #c01540"
v-show=
"dataInfo == 0"
>
*
</span>
分数排名
</h1>
</h1>
<el-button
type=
"text"
style=
"font-size: 16px; color: #aa1941; float: right; margin-top: -30px"
>
导出
</el-button>
<el-button
type=
"text"
style=
"font-size: 16px; color: #aa1941; float: right; margin-top: -30px"
@
click=
"exportScore"
>
导出
</el-button
>
</div>
</div>
<el-tabs
v-model=
"tabActive"
@
tab-click=
"handleClick"
>
<el-tabs
v-model=
"tabActive"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"已完成"
name=
"finished"
>
<el-tab-pane
label=
"已完成"
name=
"finished"
>
...
@@ -24,7 +29,7 @@
...
@@ -24,7 +29,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getScoreRanking
}
from
'../api'
import
{
getScoreRanking
,
exportScoreList
}
from
'../api'
import
RankingAll
from
'./RankingAll.vue'
import
RankingAll
from
'./RankingAll.vue'
export
default
{
export
default
{
components
:
{
RankingAll
},
components
:
{
RankingAll
},
...
@@ -80,7 +85,6 @@ export default {
...
@@ -80,7 +85,6 @@ export default {
}
}
getScoreRanking
(
params
).
then
(
res
=>
{
getScoreRanking
(
params
).
then
(
res
=>
{
this
.
scoreRanking
=
res
.
data
this
.
scoreRanking
=
res
.
data
console
.
log
(
this
.
scoreRanking
,
'jfdsf'
)
})
})
},
},
handleClick
(
tab
,
event
)
{
handleClick
(
tab
,
event
)
{
...
@@ -95,6 +99,29 @@ export default {
...
@@ -95,6 +99,29 @@ export default {
// 未提交
// 未提交
this
.
getScoreRanking
()
this
.
getScoreRanking
()
}
}
},
// 导出
exportScore
()
{
const
params
=
{
type
:
this
.
type
,
course_id
:
this
.
course_id
,
examination_id
:
this
.
examination_id
,
download
:
'true'
}
exportScoreList
(
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
)
}
})
}
}
}
}
}
}
...
...
src/modules/teacher/data/exam/components/TitleData.vue
浏览文件 @
8117a1fd
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
<el-card
style=
"margin-right: -20px; height: 650px"
>
<el-card
style=
"margin-right: -20px; height: 650px"
>
<div
slot=
"header"
class=
"clearfix"
>
<div
slot=
"header"
class=
"clearfix"
>
<h1
style=
"color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px"
>
<h1
style=
"color: #333; font-size: 16px; border-left: 3px solid #aa1941; padding-left: 7px"
>
{{
dataInfo
}}
<span
style=
"color: #c01540"
v-show=
"dataInfo == 0"
>
*
</span>
题目数据
<span
style=
"color: #c01540"
v-show=
"dataInfo == 0"
>
*
</span>
题目数据
</h1>
</h1>
<el-button
<el-button
...
@@ -75,7 +74,12 @@ export default {
...
@@ -75,7 +74,12 @@ export default {
},
},
methods
:
{
methods
:
{
exportTitleData
()
{
exportTitleData
()
{
const
params
=
this
.
tableOptions
.
remote
.
params
const
params
=
{
type
:
this
.
type
,
course_id
:
this
.
course_id
,
examination_id
:
this
.
examination_id
,
download
:
'true'
}
exportTitleList
(
params
).
then
(
r
=>
{
exportTitleList
(
params
).
then
(
r
=>
{
const
content
=
r
const
content
=
r
const
blob
=
new
Blob
([
content
],
{
type
:
'application/vnd.ms-excel'
})
const
blob
=
new
Blob
([
content
],
{
type
:
'application/vnd.ms-excel'
})
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论