Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
84d5b50f
提交
84d5b50f
authored
12月 24, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改bug
上级
ae46a57d
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
34 行增加
和
18 行删除
+34
-18
resultCard.vue
src/pages/exam/components/resultCard.vue
+6
-5
question.vue
src/pages/exam/myExam/components/question.vue
+28
-13
没有找到文件。
src/pages/exam/components/resultCard.vue
浏览文件 @
84d5b50f
...
...
@@ -46,12 +46,13 @@ export default {
},
computed
:
{
isClass
()
{
return
(
id
,
cId
)
=>
{
return
(
ids
,
cId
)
=>
{
const
id
=
parseInt
(
ids
)
const
findItems
=
this
.
data
.
answers
[
id
]
const
scoreItems
=
this
.
data
.
score_item
?
this
.
data
.
score_item
[
id
]
?
this
.
data
.
score_item
[
id
][
cId
]
?
this
.
data
.
score_item
[
id
][
cId
]
const
scoreItems
=
this
.
data
.
score_item
s
?
this
.
data
.
score_item
s
[
id
]
?
this
.
data
.
score_item
s
[
id
][
cId
]
?
this
.
data
.
score_item
s
[
id
][
cId
]
:
[]
:
[]
:
[]
...
...
src/pages/exam/myExam/components/question.vue
浏览文件 @
84d5b50f
...
...
@@ -108,20 +108,35 @@ export default {
},
// 自己选择的答案
myAnswer
()
{
const
selectAnswer
=
this
.
questionParams
.
answerRecord
const
currentData
=
this
.
questionData
return
selectAnswer
[
currentData
.
id
]
?
selectAnswer
[
currentData
.
id
]
?
(()
=>
{
const
arr
=
[]
selectAnswer
[
currentData
.
id
].
answer
.
map
(
i
=>
{
const
findIndex
=
currentData
.
options
.
findIndex
(
d
=>
{
return
i
===
d
.
id
})
arr
.
push
(
this
.
A_Z
()[
findIndex
])
})
return
arr
.
sort
().
toString
().
replace
(
new
RegExp
(
','
,
'g'
),
''
)
})()
if
(
parseInt
(
this
.
$route
.
query
.
type
)
===
3
)
{
const
arr
=
[]
this
.
questionParams
.
question
.
user_answer
.
map
(
item
=>
{
const
index
=
this
.
questionData
.
options
.
findIndex
(
d
=>
{
return
item
===
d
.
id
})
arr
.
push
(
this
.
A_Z
()[
index
])
})
return
arr
.
sort
().
toString
().
replace
(
new
RegExp
(
','
,
'g'
),
''
)
// const arr = []
// this.questionParams.question.user_answer.map(item => {
// const findInde = item.findIndex(d => { return item === d.id })
// arr.push(this.A_Z()[findIndex])
// })
// return arr.sort().toString().replace(new RegExp(',', 'g'), '')
}
else
{
const
selectAnswer
=
this
.
questionParams
.
answerRecord
const
currentData
=
this
.
questionData
return
selectAnswer
[
currentData
.
id
]
?
selectAnswer
[
currentData
.
id
]
?
(()
=>
{
const
arr
=
[]
selectAnswer
[
currentData
.
id
].
answer
.
map
(
i
=>
{
const
findIndex
=
currentData
.
options
.
findIndex
(
d
=>
{
return
i
===
d
.
id
})
arr
.
push
(
this
.
A_Z
()[
findIndex
])
})
return
arr
.
sort
().
toString
().
replace
(
new
RegExp
(
','
,
'g'
),
''
)
})()
:
''
:
''
:
''
}
},
// 选项选择
changeOptions
(
type
,
pId
,
optId
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论