Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-qa
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-qa
Commits
d5c0a18a
提交
d5c0a18a
authored
5月 12, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 修复试卷批阅不显示已提交数据的问题
上级
45ad9dcf
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
5 行增加
和
15 行删除
+5
-15
QuestionItem.vue
src/modules/exam/components/QuestionItem.vue
+2
-2
MarkingPaper.vue
src/modules/exam/views/MarkingPaper.vue
+3
-13
没有找到文件。
src/modules/exam/components/QuestionItem.vue
浏览文件 @
d5c0a18a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"question-item"
>
<div
class=
"question-item"
>
<div
class=
"question-item-title"
v-html=
"questionData.content"
></div>
<div
class=
"question-item-title"
v-html=
"questionData.content"
></div>
<template
v-if=
"questionType === 1 || questionType === 6"
>
<template
v-if=
"questionType === 1 || questionType === 6"
>
<el-radio-group
v-model=
"questionData.user_answer"
:disabled=
"true"
class=
"question-item-content"
>
<el-radio-group
v-model=
"questionData.user_answer
[0]
"
:disabled=
"true"
class=
"question-item-content"
>
<div
class=
"question-item-option"
v-for=
"subItem in questionData.options"
:key=
"subItem.id"
>
<div
class=
"question-item-option"
v-for=
"subItem in questionData.options"
:key=
"subItem.id"
>
<el-radio
:label=
"subItem.id"
>
{{
subItem
.
option
}}
</el-radio>
<el-radio
:label=
"subItem.id"
>
{{
subItem
.
option
}}
</el-radio>
</div>
</div>
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
</el-checkbox-group>
</el-checkbox-group>
</
template
>
</
template
>
<
template
v-if=
"questionType === 3"
>
<
template
v-if=
"questionType === 3"
>
<div
class=
"SAQ"
>
{{
questionData
.
user_answer
}}
</div>
<div
class=
"SAQ"
>
{{
questionData
.
user_answer
[
0
]
||
''
}}
</div>
<div
style=
"text-align: right"
>
<div
style=
"text-align: right"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
...
...
src/modules/exam/views/MarkingPaper.vue
浏览文件 @
d5c0a18a
...
@@ -39,24 +39,19 @@ export default {
...
@@ -39,24 +39,19 @@ export default {
getDetail
()
{
getDetail
()
{
getPaperDetails
({
exam_id
:
this
.
eid
,
student_id
:
this
.
sid
}).
then
(
res
=>
{
getPaperDetails
({
exam_id
:
this
.
eid
,
student_id
:
this
.
sid
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
// console.log(res.data)
this
.
questionData
=
res
.
data
.
sheet
this
.
questionData
=
res
.
data
.
sheet
// console.log(this.questionData, 'this.questionData111')
this
.
assembleData
()
this
.
assembleData
()
}
}
})
})
},
},
assembleData
()
{
assembleData
()
{
this
.
questionList
=
this
.
questionData
.
questions
.
question_items
this
.
questionList
=
this
.
questionData
.
questions
.
question_items
// console.log(this.questionList, '2222')
this
.
questionList
.
forEach
(
item
=>
{
this
.
questionList
.
forEach
(
item
=>
{
const
score
=
this
.
questionData
.
score_item
[
item
.
question_item_id
]
const
score
=
this
.
questionData
.
score_item
[
item
.
question_item_id
]
// 用户答案
// 用户答案
const
answer
=
this
.
questionData
.
answers
[
item
.
question_item_id
]
||
[]
const
answer
=
this
.
questionData
.
answers
[
item
.
question_item_id
]
||
{}
console
.
log
(
answer
,
'answwer'
)
item
.
question_list
.
forEach
(
subItem
=>
{
item
.
question_list
.
forEach
(
subItem
=>
{
console
.
log
(
subItem
,
'subItem'
)
if
(
subItem
.
group_id
)
{
if
(
subItem
.
group_id
)
{
subItem
.
list
.
forEach
(
it
=>
{
subItem
.
list
.
forEach
(
it
=>
{
const
obj
=
score
[
it
.
id
]
const
obj
=
score
[
it
.
id
]
...
@@ -65,9 +60,7 @@ export default {
...
@@ -65,9 +60,7 @@ export default {
if
(
obj
.
comment
)
it
.
comment
=
obj
.
comment
if
(
obj
.
comment
)
it
.
comment
=
obj
.
comment
if
(
it
.
answer
)
it
.
answer
=
JSON
.
parse
(
it
.
answer
)
if
(
it
.
answer
)
it
.
answer
=
JSON
.
parse
(
it
.
answer
)
if
(
it
.
options
)
it
.
options
=
JSON
.
parse
(
it
.
options
)
if
(
it
.
options
)
it
.
options
=
JSON
.
parse
(
it
.
options
)
if
(
answer
.
length
)
{
it
.
user_answer
=
answer
[
it
.
id
]?.
answer
||
[]
it
.
user_answer
=
answer
[
it
.
id
].
answer
||
[]
}
})
})
}
else
{
}
else
{
const
obj
=
score
[
subItem
.
id
]
const
obj
=
score
[
subItem
.
id
]
...
@@ -76,13 +69,10 @@ export default {
...
@@ -76,13 +69,10 @@ export default {
if
(
obj
.
comment
)
subItem
.
comment
=
obj
.
comment
if
(
obj
.
comment
)
subItem
.
comment
=
obj
.
comment
if
(
subItem
.
answer
)
subItem
.
answer
=
JSON
.
parse
(
subItem
.
answer
)
if
(
subItem
.
answer
)
subItem
.
answer
=
JSON
.
parse
(
subItem
.
answer
)
if
(
subItem
.
options
)
subItem
.
options
=
JSON
.
parse
(
subItem
.
options
)
if
(
subItem
.
options
)
subItem
.
options
=
JSON
.
parse
(
subItem
.
options
)
if
(
answer
.
length
)
{
subItem
.
user_answer
=
answer
[
subItem
.
id
]?.
answer
||
[]
subItem
.
user_answer
=
answer
[
subItem
].
answer
||
[]
}
}
}
})
})
})
})
// console.log(this.questionList)
}
}
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论