Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
fe34fc16
提交
fe34fc16
authored
10月 21, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitlab.ezijing.com/ezijing/x-learn
上级
d3f01b6c
5847a4fe
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
25 行增加
和
21 行删除
+25
-21
examCard.vue
src/components/exam/examCard.vue
+25
-21
examStudents.vue
src/components/exam/examStudents.vue
+0
-0
没有找到文件。
src/components/exam/examCard.vue
浏览文件 @
fe34fc16
...
@@ -89,7 +89,6 @@ export default {
...
@@ -89,7 +89,6 @@ export default {
countdownTimer
:
null
,
// 倒计时计时器
countdownTimer
:
null
,
// 倒计时计时器
countdownText
:
''
,
// 倒计时显示时间
countdownText
:
''
,
// 倒计时显示时间
questionGroups
:
this
.
groups
,
// 所有试题分组,一组一页
questionGroups
:
this
.
groups
,
// 所有试题分组,一组一页
questionCount
:
0
,
// 小题数量
currentGroupPage
:
this
.
groupPage
,
// 大题页码
currentGroupPage
:
this
.
groupPage
,
// 大题页码
currentGroupCount
:
this
.
groupPageCount
// 大题总页数
currentGroupCount
:
this
.
groupPageCount
// 大题总页数
}
}
...
@@ -131,15 +130,17 @@ export default {
...
@@ -131,15 +130,17 @@ export default {
},
},
watch
:
{
watch
:
{
data
:
{
data
:
{
deep
:
true
,
immediate
:
true
,
handler
(
data
)
{
handler
(
data
)
{
data
&&
this
.
dataInit
(
data
)
data
&&
this
.
dataInit
(
data
)
}
}
},
},
groups
:
{
groups
:
{
immediate
:
true
,
handler
(
groups
)
{
handler
(
groups
)
{
this
.
questionGroups
=
groups
if
(
groups
.
length
)
{
this
.
questionCount
=
groups
.
length
this
.
questionGroups
=
groups
}
}
}
},
},
groupPage
(
value
)
{
groupPage
(
value
)
{
...
@@ -245,7 +246,6 @@ export default {
...
@@ -245,7 +246,6 @@ export default {
const
isSubmited
=
[
'1'
,
'2'
].
includes
(
data
.
status
)
const
isSubmited
=
[
'1'
,
'2'
].
includes
(
data
.
status
)
this
.
disabled
=
isSubmited
this
.
disabled
=
isSubmited
this
.
hasResult
=
isSubmited
this
.
hasResult
=
isSubmited
this
.
questionCount
=
data
.
questions
.
total_question_count
this
.
genQuestions
(
data
)
this
.
genQuestions
(
data
)
this
.
currentGroupCount
=
this
.
questionGroups
.
length
this
.
currentGroupCount
=
this
.
questionGroups
.
length
if
(
this
.
$route
.
query
.
id
)
{
if
(
this
.
$route
.
query
.
id
)
{
...
@@ -262,24 +262,28 @@ export default {
...
@@ -262,24 +262,28 @@ export default {
const
{
questions
,
answers
=
{}
}
=
data
const
{
questions
,
answers
=
{}
}
=
data
if
(
!
questions
)
return
[]
if
(
!
questions
)
return
[]
this
.
questionGroups
=
questions
.
question_items
.
reduce
((
result
,
question
)
=>
{
this
.
questionGroups
=
questions
.
question_items
.
reduce
((
result
,
question
)
=>
{
question
.
question_list
.
forEach
(
list
=>
{
if
(
question
.
question_list
.
length
)
{
list
=
list
.
map
(
item
=>
{
question
.
question_list
.
forEach
(
list
=>
{
let
userAnswers
=
[]
list
=
list
.
map
(
item
=>
{
let
sign
=
false
let
userAnswers
=
[]
if
(
answers
)
{
let
sign
=
false
// 大题答案包含所有小题答案
if
(
answers
)
{
const
bigQuestionAnswer
=
answers
[
question
.
question_item_id
]
// 大题答案包含所有小题答案
if
(
bigQuestionAnswer
)
{
const
bigQuestionAnswer
=
answers
[
question
.
question_item_id
]
// 小题答案
if
(
bigQuestionAnswer
)
{
const
questionAnswer
=
bigQuestionAnswer
[
item
.
id
]
||
{}
// 小题答案
userAnswers
=
questionAnswer
.
answer
||
[]
const
questionAnswer
=
bigQuestionAnswer
[
item
.
id
]
||
{}
sign
=
questionAnswer
.
sign
||
false
userAnswers
=
questionAnswer
.
answer
||
[]
sign
=
questionAnswer
.
sign
||
false
}
}
}
}
return
{
...
item
,
user_answer
:
userAnswers
,
sign
}
return
{
...
item
,
user_answer
:
userAnswers
,
sign
}
})
result
.
push
(
Object
.
assign
({},
question
,
{
question_list
:
list
}))
})
})
result
.
push
(
Object
.
assign
({},
question
,
{
question_list
:
list
}))
}
else
{
})
result
.
push
(
Object
.
assign
({},
question
,
{
question_list
:
[]
}))
}
return
result
return
result
},
[])
},
[])
},
},
...
...
src/components/exam/examStudents.vue
deleted
100644 → 0
浏览文件 @
d3f01b6c
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论