Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
transport-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
transport-show-h5
Commits
509add12
提交
509add12
authored
9月 07, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug修改
上级
512b5473
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
29 行增加
和
27 行删除
+29
-27
ExamTopic.vue
src/modules/exam-module/src/ExamTopic.vue
+3
-1
courseNodeExam.vue
src/pages/courseExam/courseNodeExam.vue
+26
-26
没有找到文件。
src/modules/exam-module/src/ExamTopic.vue
浏览文件 @
509add12
...
@@ -755,7 +755,8 @@ export default {
...
@@ -755,7 +755,8 @@ export default {
// }
// }
Exam
.
getExam
(
param
,
decodeURIComponent
(
this
.
requestParam
.
papersUrl
)).
then
(
res
=>
{
Exam
.
getExam
(
param
,
decodeURIComponent
(
this
.
requestParam
.
papersUrl
)).
then
(
res
=>
{
Toast
.
clear
()
Toast
.
clear
()
const
times
=
this
.
$route
.
query
.
id
===
undefined
?
res
.
sheet
.
remainingTime
?
res
.
sheet
.
remainingTime
:
res
.
sheet
.
duration
:
res
.
sheet
.
duration
let
times
=
this
.
$route
.
query
.
id
===
undefined
?
res
.
sheet
.
remainingTime
?
res
.
sheet
.
remainingTime
:
res
.
sheet
.
duration
:
res
.
sheet
.
duration
times
===
undefined
&&
(
times
=
0
)
parseInt
(
this
.
$route
.
query
.
id
)
===
-
1
?
this
.
errorQuestion
(
res
)
:
this
.
questionsData
=
res
parseInt
(
this
.
$route
.
query
.
id
)
===
-
1
?
this
.
errorQuestion
(
res
)
:
this
.
questionsData
=
res
this
.
questionCount
=
res
.
sheet
.
question_count
this
.
questionCount
=
res
.
sheet
.
question_count
this
.
remainingTime
=
this
.
secondToDate
(
times
)
this
.
remainingTime
=
this
.
secondToDate
(
times
)
...
@@ -850,6 +851,7 @@ export default {
...
@@ -850,6 +851,7 @@ export default {
answers
:
JSON
.
stringify
(
reqData
),
answers
:
JSON
.
stringify
(
reqData
),
duration
:
this
.
questionsData
.
sheet
.
duration
duration
:
this
.
questionsData
.
sheet
.
duration
}
}
parseInt
(
this
.
$route
.
query
.
type
)
===
1
&&
(
param
.
type
=
1
)
param
.
status
=
status
param
.
status
=
status
Exam
.
examSubmit
(
param
,
this
.
requestParam
.
papersUrl
).
then
(
res
=>
{
Exam
.
examSubmit
(
param
,
this
.
requestParam
.
papersUrl
).
then
(
res
=>
{
if
(
res
.
exm_status
===
1
)
{
if
(
res
.
exm_status
===
1
)
{
...
...
src/pages/courseExam/courseNodeExam.vue
浏览文件 @
509add12
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
:class=
"isObjKey(item, cItem)
:class=
"isObjKey(item, cItem)
? cItem.question_answer === opt.id
? cItem.question_answer === opt.id
? 'active2'
? 'active2'
: question.answer
s[item.question_item_id][cItem.id].answers
.find(i =>
{ return i === opt.id })
: question.answer
[item.question_item_id][cItem.id].answer
.find(i =>
{ return i === opt.id })
? 'active'
? 'active'
: ''
: ''
: ''"
: ''"
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
<span>
<span>
{{
{{
isObjKey(item, cItem)
isObjKey(item, cItem)
? changeA_Z(question.answer
s[item.question_item_id][cItem.id].answers
, cItem)
? changeA_Z(question.answer
[item.question_item_id][cItem.id].answer
, cItem)
: ''
: ''
}}
}}
</span>
</span>
...
@@ -146,7 +146,7 @@ export default {
...
@@ -146,7 +146,7 @@ export default {
},
},
question
:
{
question
:
{
list
:
[],
list
:
[],
answer
s
:
{}
answer
:
{}
},
},
time
:
{
time
:
{
count
:
1
,
count
:
1
,
...
@@ -202,9 +202,9 @@ export default {
...
@@ -202,9 +202,9 @@ export default {
},
},
isObjKey
()
{
isObjKey
()
{
return
function
(
item
,
cItem
)
{
return
function
(
item
,
cItem
)
{
return
this
.
question
.
answer
s
return
this
.
question
.
answer
?
this
.
question
.
answer
s
[
item
.
question_item_id
]
?
this
.
question
.
answer
[
item
.
question_item_id
]
?
this
.
question
.
answer
s
[
item
.
question_item_id
][
cItem
.
id
]
?
this
.
question
.
answer
[
item
.
question_item_id
][
cItem
.
id
]
?
1
?
1
:
0
:
0
:
0
:
0
...
@@ -266,15 +266,15 @@ export default {
...
@@ -266,15 +266,15 @@ export default {
init
()
{
init
()
{
api
.
getExam
({
type
:
2
,
tag_id
:
this
.
$route
.
query
.
tag_id
}).
then
(
res
=>
{
api
.
getExam
({
type
:
2
,
tag_id
:
this
.
$route
.
query
.
tag_id
}).
then
(
res
=>
{
const
data
=
JSON
.
parse
(
res
.
data
)
const
data
=
JSON
.
parse
(
res
.
data
)
this
.
question
.
answer
s
=
data
.
sheet
.
answers
this
.
question
.
answer
=
data
.
sheet
.
answer
data
.
sheet
.
questions
.
question_items
.
map
(
item
=>
{
data
.
sheet
.
questions
.
question_items
.
map
(
item
=>
{
return
item
.
question_list
.
map
(
cItem
=>
{
return
item
.
question_list
.
map
(
cItem
=>
{
if
(
parseInt
(
cItem
.
question_type
)
===
2
||
(
parseInt
(
cItem
.
question_type
)
===
5
&&
cItem
.
answer_count
>
1
))
{
if
(
parseInt
(
cItem
.
question_type
)
===
2
||
(
parseInt
(
cItem
.
question_type
)
===
5
&&
cItem
.
answer_count
>
1
))
{
if
(
this
.
question
.
answer
s
)
{
if
(
this
.
question
.
answer
)
{
if
(
this
.
question
.
answer
s
[
item
.
question_item_id
])
{
if
(
this
.
question
.
answer
[
item
.
question_item_id
])
{
if
(
this
.
question
.
answer
s
[
item
.
question_item_id
][
cItem
.
id
])
{
if
(
this
.
question
.
answer
[
item
.
question_item_id
][
cItem
.
id
])
{
cItem
.
isConfirm
=
true
cItem
.
isConfirm
=
true
cItem
.
userAnswer
=
this
.
question
.
answer
s
[
item
.
question_item_id
][
cItem
.
id
].
answers
cItem
.
userAnswer
=
this
.
question
.
answer
[
item
.
question_item_id
][
cItem
.
id
].
answer
return
false
return
false
}
}
}
}
...
@@ -296,21 +296,21 @@ export default {
...
@@ -296,21 +296,21 @@ export default {
return
false
return
false
}
}
cItem
.
isConfirm
=
true
cItem
.
isConfirm
=
true
const
cacheData
=
this
.
question
.
answer
s
const
cacheData
=
this
.
question
.
answer
if
(
cacheData
)
{
if
(
cacheData
)
{
cacheData
[
item
.
question_item_id
]
cacheData
[
item
.
question_item_id
]
?
cacheData
[
item
.
question_item_id
][
cItem
.
id
]
?
cacheData
[
item
.
question_item_id
][
cItem
.
id
]
?
cacheData
[
item
.
question_item_id
][
cItem
.
id
].
answer
s
=
cItem
.
userAnswer
?
cacheData
[
item
.
question_item_id
][
cItem
.
id
].
answer
=
cItem
.
userAnswer
:
cacheData
[
item
.
question_item_id
][
cItem
.
id
]
=
{
answer
s
:
cItem
.
userAnswer
}
:
cacheData
[
item
.
question_item_id
][
cItem
.
id
]
=
{
answer
:
cItem
.
userAnswer
}
:
cacheData
[
item
.
question_item_id
]
=
{
[
cItem
.
id
]:
{
answer
s
:
cItem
.
userAnswer
}
}
:
cacheData
[
item
.
question_item_id
]
=
{
[
cItem
.
id
]:
{
answer
:
cItem
.
userAnswer
}
}
this
.
$forceUpdate
()
this
.
$forceUpdate
()
this
.
cacheRequest
()
this
.
cacheRequest
()
return
false
return
false
}
}
this
.
question
.
answer
s
=
{
this
.
question
.
answer
=
{
[
item
.
question_item_id
]:
{
[
item
.
question_item_id
]:
{
[
cItem
.
id
]:
{
[
cItem
.
id
]:
{
answer
s
:
cItem
.
userAnswer
answer
:
cItem
.
userAnswer
}
}
}
}
}
}
...
@@ -338,21 +338,21 @@ export default {
...
@@ -338,21 +338,21 @@ export default {
if
(
this
.
isObjKey
(
item
,
cItem
))
{
if
(
this
.
isObjKey
(
item
,
cItem
))
{
return
false
return
false
}
}
const
cacheData
=
this
.
question
.
answer
s
const
cacheData
=
this
.
question
.
answer
if
(
cacheData
)
{
if
(
cacheData
)
{
cacheData
[
item
.
question_item_id
]
cacheData
[
item
.
question_item_id
]
?
cacheData
[
item
.
question_item_id
][
cItem
.
id
]
?
cacheData
[
item
.
question_item_id
][
cItem
.
id
]
?
cacheData
[
item
.
question_item_id
][
cItem
.
id
].
answer
s
=
[
opt
.
id
]
?
cacheData
[
item
.
question_item_id
][
cItem
.
id
].
answer
=
[
opt
.
id
]
:
cacheData
[
item
.
question_item_id
][
cItem
.
id
]
=
{
answer
s
:
[
opt
.
id
]
}
:
cacheData
[
item
.
question_item_id
][
cItem
.
id
]
=
{
answer
:
[
opt
.
id
]
}
:
cacheData
[
item
.
question_item_id
]
=
{
[
cItem
.
id
]:
{
answer
s
:
[
opt
.
id
]
}
}
:
cacheData
[
item
.
question_item_id
]
=
{
[
cItem
.
id
]:
{
answer
:
[
opt
.
id
]
}
}
this
.
$forceUpdate
()
this
.
$forceUpdate
()
this
.
cacheRequest
()
this
.
cacheRequest
()
return
false
return
false
}
}
this
.
question
.
answer
s
=
{
this
.
question
.
answer
=
{
[
item
.
question_item_id
]:
{
[
item
.
question_item_id
]:
{
[
cItem
.
id
]:
{
[
cItem
.
id
]:
{
answer
s
:
[
opt
.
id
]
answer
:
[
opt
.
id
]
}
}
}
}
}
}
...
@@ -361,9 +361,9 @@ export default {
...
@@ -361,9 +361,9 @@ export default {
},
},
cacheRequest
()
{
cacheRequest
()
{
let
count
=
0
let
count
=
0
const
fKey
=
Object
.
keys
(
this
.
question
.
answer
s
)
const
fKey
=
Object
.
keys
(
this
.
question
.
answer
)
fKey
.
map
(
item
=>
{
fKey
.
map
(
item
=>
{
const
cKey
=
Object
.
keys
(
this
.
question
.
answer
s
[
item
])
const
cKey
=
Object
.
keys
(
this
.
question
.
answer
[
item
])
for
(
let
i
=
0
;
i
<
cKey
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
cKey
.
length
;
i
++
)
{
count
++
count
++
}
}
...
@@ -372,7 +372,7 @@ export default {
...
@@ -372,7 +372,7 @@ export default {
type
:
2
,
type
:
2
,
sheet_id
:
this
.
other
.
sheetId
,
sheet_id
:
this
.
other
.
sheetId
,
status
:
this
.
other
.
totalQuestionCount
===
count
?
1
:
0
,
status
:
this
.
other
.
totalQuestionCount
===
count
?
1
:
0
,
answers
:
JSON
.
stringify
(
this
.
question
.
answer
s
),
answers
:
JSON
.
stringify
(
this
.
question
.
answer
),
duration
:
this
.
time
.
count
duration
:
this
.
time
.
count
}
}
api
.
cacheExam
(
param
).
then
(
res
=>
{})
api
.
cacheExam
(
param
).
then
(
res
=>
{})
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论