Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
f1833097
提交
f1833097
authored
10月 21, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
dd848f1e
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
52 行增加
和
30 行删除
+52
-30
review.vue
src/pages/teacher/examReview/review.vue
+26
-15
review.vue
src/pages/teacher/testReview/review.vue
+26
-15
没有找到文件。
src/pages/teacher/examReview/review.vue
浏览文件 @
f1833097
...
...
@@ -58,14 +58,14 @@
<div
class=
"stu-list"
>
<div
class=
"title"
>
<span>
学生列表
</span>
<el-select
@
change=
"change"
v-model=
"selectValue"
placeholder=
"请选择"
>
<el-select
v-model=
"selectValue"
placeholder=
"请选择"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</div>
<ul>
<li
:class=
"item.sheet_id ===
(sheetIds || $route.query.sheet_id)
? 'active' : ''"
v-for=
"(item, index) in
s
tudentList"
:class=
"item.sheet_id ===
sheetId
? 'active' : ''"
v-for=
"(item, index) in
currentS
tudentList"
:key=
"index"
@
click=
"selectStudent(item)"
>
...
...
@@ -87,7 +87,7 @@ export default {
data
:
{},
selectValue
:
0
,
studentList
:
[],
sheetId
s
:
''
,
sheetId
:
this
.
$route
.
query
.
sheet_id
,
options
:
[
{
value
:
0
,
label
:
'全部'
},
{
value
:
1
,
label
:
'未批阅'
},
...
...
@@ -98,6 +98,13 @@ export default {
computed
:
{
examId
()
{
return
this
.
$route
.
query
.
exam_id
},
currentStudentList
()
{
if
(
this
.
selectValue
===
0
)
{
return
this
.
studentList
}
else
{
return
this
.
studentList
.
filter
(
item
=>
item
.
status
===
this
.
selectValue
)
}
}
},
created
()
{
...
...
@@ -109,19 +116,13 @@ export default {
},
methods
:
{
selectStudent
(
item
)
{
this
.
sheetId
s
=
item
.
sheet_id
this
.
getTopic
(
item
.
sheet_id
)
this
.
sheetId
=
item
.
sheet_id
this
.
getTopic
()
this
.
$refs
.
exam
.
reset
()
},
change
()
{
this
.
studentList
=
JSON
.
parse
(
window
.
localStorage
.
examStudentsList
)
if
(
this
.
selectValue
!==
0
)
{
this
.
studentList
=
this
.
studentList
.
filter
(
item
=>
parseInt
(
item
.
status
)
===
parseInt
(
this
.
selectValue
))
}
},
// 获取考卷
getTopic
(
sheetId
)
{
api
.
getReviewDetails
({
sheet_id
:
sheetId
||
this
.
$route
.
query
.
sheet_i
d
}).
then
(
response
=>
{
getTopic
()
{
api
.
getReviewDetails
({
sheet_id
:
this
.
sheetI
d
}).
then
(
response
=>
{
this
.
data
=
JSON
.
parse
(
response
.
data
).
sheet
})
},
...
...
@@ -144,7 +145,7 @@ export default {
return
false
}
const
param
=
{
sheet_id
:
this
.
$route
.
query
.
sheet_i
d
,
sheet_id
:
this
.
sheetI
d
,
question_item_id
:
data
.
question_item_id
,
question_id
:
item
.
id
,
comment
:
item
.
comment
,
...
...
@@ -158,8 +159,18 @@ export default {
api
.
submitReviewDetails
(
param
).
then
(
response
=>
{
item
.
checked_flag
=
true
this
.
$message
(
'批阅成功'
)
if
(
response
.
status
===
2
)
{
this
.
updateStudentStatus
(
response
.
status
)
}
})
})
},
updateStudentStatus
(
stauts
)
{
const
index
=
this
.
studentList
.
findIndex
(
item
=>
item
.
sheet_id
===
this
.
sheetId
)
if
(
index
!==
-
1
)
{
this
.
studentList
[
index
].
status
=
stauts
}
window
.
localStorage
.
setItem
(
'examStudentsList'
,
JSON
.
stringify
(
this
.
studentList
))
}
}
}
...
...
src/pages/teacher/testReview/review.vue
浏览文件 @
f1833097
...
...
@@ -58,14 +58,14 @@
<div
class=
"stu-list"
>
<div
class=
"title"
>
<span>
学生列表
</span>
<el-select
@
change=
"change"
v-model=
"selectValue"
placeholder=
"请选择"
>
<el-select
v-model=
"selectValue"
placeholder=
"请选择"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</div>
<ul>
<li
:class=
"item.sheet_id ===
(sheetIds || $route.query.sheet_id)
? 'active' : ''"
v-for=
"(item, index) in
s
tudentList"
:class=
"item.sheet_id ===
sheetId
? 'active' : ''"
v-for=
"(item, index) in
currentS
tudentList"
:key=
"index"
@
click=
"selectStudent(item)"
>
...
...
@@ -86,7 +86,7 @@ export default {
return
{
data
:
{},
selectValue
:
0
,
sheetId
s
:
''
,
sheetId
:
this
.
$route
.
query
.
sheet_id
,
studentList
:
[],
options
:
[
{
value
:
0
,
label
:
'全部'
},
...
...
@@ -98,6 +98,13 @@ export default {
computed
:
{
examId
()
{
return
this
.
$route
.
query
.
exam_id
},
currentStudentList
()
{
if
(
this
.
selectValue
===
0
)
{
return
this
.
studentList
}
else
{
return
this
.
studentList
.
filter
(
item
=>
item
.
status
===
this
.
selectValue
)
}
}
},
created
()
{
...
...
@@ -109,19 +116,13 @@ export default {
},
methods
:
{
selectStudent
(
item
)
{
this
.
sheetId
s
=
item
.
sheet_id
this
.
getTopic
(
item
.
sheet_id
)
this
.
sheetId
=
item
.
sheet_id
this
.
getTopic
()
this
.
$refs
.
exam
.
reset
()
},
change
()
{
this
.
studentList
=
JSON
.
parse
(
window
.
localStorage
.
testStudentsList
)
if
(
this
.
selectValue
!==
0
)
{
this
.
studentList
=
this
.
studentList
.
filter
(
item
=>
parseInt
(
item
.
status
)
===
parseInt
(
this
.
selectValue
))
}
},
// 获取考卷
getTopic
(
sheetId
)
{
api
.
getReviewDetails
({
sheet_id
:
sheetId
||
this
.
$route
.
query
.
sheet_i
d
,
type
:
'chapter'
}).
then
(
response
=>
{
getTopic
()
{
api
.
getReviewDetails
({
sheet_id
:
this
.
sheetI
d
,
type
:
'chapter'
}).
then
(
response
=>
{
this
.
data
=
JSON
.
parse
(
response
.
data
).
sheet
})
},
...
...
@@ -145,7 +146,7 @@ export default {
}
const
param
=
{
type
:
'chapter'
,
sheet_id
:
this
.
$route
.
query
.
sheet_i
d
,
sheet_id
:
this
.
sheetI
d
,
question_item_id
:
data
.
question_item_id
,
question_id
:
item
.
id
,
comment
:
item
.
comment
,
...
...
@@ -159,8 +160,18 @@ export default {
api
.
submitReviewDetails
(
param
).
then
(
response
=>
{
item
.
checked_flag
=
true
this
.
$message
(
'批阅成功'
)
if
(
response
.
status
===
2
)
{
this
.
updateStudentStatus
(
response
.
status
)
}
})
})
},
updateStudentStatus
(
stauts
)
{
const
index
=
this
.
studentList
.
findIndex
(
item
=>
item
.
sheet_id
===
this
.
sheetId
)
if
(
index
!==
-
1
)
{
this
.
studentList
[
index
].
status
=
stauts
}
window
.
localStorage
.
setItem
(
'testStudentsList'
,
JSON
.
stringify
(
this
.
studentList
))
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论