Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
5c5754ea
提交
5c5754ea
authored
10月 22, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 修改倒计时
上级
d3dd8fc4
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
27 行增加
和
19 行删除
+27
-19
examCard.vue
src/components/exam/examCard.vue
+5
-4
resultCard.vue
src/pages/exam/components/resultCard.vue
+3
-3
result.vue
src/pages/exam/courseExam/chapter/result.vue
+9
-4
index.vue
src/pages/exam/testExam/exam/index.vue
+1
-2
result.vue
src/pages/exam/testExam/exam/result.vue
+9
-6
没有找到文件。
src/components/exam/examCard.vue
浏览文件 @
5c5754ea
...
@@ -93,7 +93,8 @@ export default {
...
@@ -93,7 +93,8 @@ export default {
countdownText
:
''
,
// 倒计时显示时间
countdownText
:
''
,
// 倒计时显示时间
questionGroups
:
this
.
groups
,
// 所有试题分组,一组一页
questionGroups
:
this
.
groups
,
// 所有试题分组,一组一页
currentGroupPage
:
this
.
groupPage
,
// 大题页码
currentGroupPage
:
this
.
groupPage
,
// 大题页码
currentGroupCount
:
this
.
groupPageCount
// 大题总页数
currentGroupCount
:
this
.
groupPageCount
,
// 大题总页数
isCountDownEnd
:
false
}
}
},
},
computed
:
{
computed
:
{
...
@@ -161,13 +162,13 @@ export default {
...
@@ -161,13 +162,13 @@ export default {
methods
:
{
methods
:
{
// 倒计时
// 倒计时
countDown
(
time
)
{
countDown
(
time
)
{
console
.
log
(
time
,
'time'
)
let
sec
=
parseInt
(
10
)
let
sec
=
parseInt
(
time
)
clearInterval
(
this
.
countdownTimer
)
clearInterval
(
this
.
countdownTimer
)
this
.
countdownTimer
=
setInterval
(()
=>
{
this
.
countdownTimer
=
setInterval
(()
=>
{
sec
--
sec
--
if
(
sec
===
0
)
{
if
(
sec
===
0
)
{
clearInterval
(
this
.
time
.
clearTime
)
clearInterval
(
this
.
countdownTimer
)
this
.
isCountDownEnd
=
true
this
.
$alert
(
'考试时间结束,自动提交试卷'
,
''
,
{
this
.
$alert
(
'考试时间结束,自动提交试卷'
,
''
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
callback
:
action
=>
{
callback
:
action
=>
{
...
...
src/pages/exam/components/resultCard.vue
浏览文件 @
5c5754ea
...
@@ -154,10 +154,10 @@ export default {
...
@@ -154,10 +154,10 @@ export default {
}
}
}
}
.order-num
{
.order-num
{
height
:
420px
;
//
height: 420px;
overflow-y
:
scroll
;
//
overflow-y: scroll;
padding-left
:
30px
;
padding-left
:
30px
;
scrollbar-width
:
none
;
//
scrollbar-width: none;
&
:
:-
webkit-scrollbar
{
&
:
:-
webkit-scrollbar
{
display
:
none
;
display
:
none
;
}
}
...
...
src/pages/exam/courseExam/chapter/result.vue
浏览文件 @
5c5754ea
...
@@ -95,10 +95,14 @@ export default {
...
@@ -95,10 +95,14 @@ export default {
return
a
.
concat
(
b
)
return
a
.
concat
(
b
)
},
[])
},
[])
list
.
question_list
.
forEach
(
item
=>
{
list
.
question_list
.
forEach
(
item
=>
{
const
currentItem
=
data
.
sheet
.
score_items
[
list
.
question_item_id
][
item
.
id
]
if
(
currentItem
.
checked_flag
)
{
totalNum
++
if
(
currentItem
.
is_right
)
rightNum
++
}
else
{
if
(
item
.
question_options
)
{
if
(
item
.
question_options
)
{
totalNum
++
totalNum
++
if
(
data
.
sheet
.
score_items
[
list
.
question_item_id
][
item
.
id
].
is_right
)
{
if
(
currentItem
.
is_right
)
rightNum
++
rightNum
++
}
}
}
}
})
})
...
@@ -119,6 +123,7 @@ export default {
...
@@ -119,6 +123,7 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.result-box
{
.result-box
{
width
:
100%
;
width
:
100%
;
// height: 100%;
display
:
flex
;
display
:
flex
;
.card-left
{
.card-left
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -126,7 +131,7 @@ export default {
...
@@ -126,7 +131,7 @@ export default {
flex
:
1
;
flex
:
1
;
background
:
#fff
;
background
:
#fff
;
margin-right
:
10px
;
margin-right
:
10px
;
height
:
560px
;
//
height: 560px;
border-radius
:
8px
;
border-radius
:
8px
;
.title
{
.title
{
font-size
:
18px
;
font-size
:
18px
;
...
@@ -205,7 +210,7 @@ export default {
...
@@ -205,7 +210,7 @@ export default {
box-sizing
:
border-box
;
box-sizing
:
border-box
;
flex
:
1
;
flex
:
1
;
background
:
#fff
;
background
:
#fff
;
height
:
560px
;
//
height: 560px;
border-radius
:
8px
;
border-radius
:
8px
;
margin-left
:
10px
;
margin-left
:
10px
;
padding
:
10px
30px
0
;
padding
:
10px
30px
0
;
...
...
src/pages/exam/testExam/exam/index.vue
浏览文件 @
5c5754ea
...
@@ -89,7 +89,7 @@ export default {
...
@@ -89,7 +89,7 @@ export default {
})
})
})
})
if
(
isCache
)
{
if
(
isCache
)
{
if
(
answerNum
!==
0
)
{
if
(
answerNum
!==
0
&&
!
this
.
$refs
.
exam
.
isCountDownEnd
)
{
this
.
$confirm
(
`您还有
${
answerNum
}
道题没有作答`
,
'请确认'
,
{
this
.
$confirm
(
`您还有
${
answerNum
}
道题没有作答`
,
'请确认'
,
{
confirmButtonText
:
'确认提交'
,
confirmButtonText
:
'确认提交'
,
cancelButtonText
:
'继续作答'
,
cancelButtonText
:
'继续作答'
,
...
@@ -104,7 +104,6 @@ export default {
...
@@ -104,7 +104,6 @@ export default {
}
else
{
}
else
{
this
.
submitApi
(
id
,
isCache
,
answer
,
refData
.
duration
)
this
.
submitApi
(
id
,
isCache
,
answer
,
refData
.
duration
)
}
}
console
.
log
(
answerNum
,
'num'
)
},
},
submitApi
(
id
,
isCache
,
answer
,
duration
)
{
submitApi
(
id
,
isCache
,
answer
,
duration
)
{
const
param
=
{
const
param
=
{
...
...
src/pages/exam/testExam/exam/result.vue
浏览文件 @
5c5754ea
...
@@ -86,17 +86,19 @@ export default {
...
@@ -86,17 +86,19 @@ export default {
const
data
=
JSON
.
parse
(
response
.
data
)
const
data
=
JSON
.
parse
(
response
.
data
)
let
rightNum
=
0
let
rightNum
=
0
let
totalNum
=
0
let
totalNum
=
0
const
arr
=
[]
data
.
sheet
.
questions
.
question_items
.
forEach
(
list
=>
{
data
.
sheet
.
questions
.
question_items
.
forEach
(
list
=>
{
list
.
question_list
=
list
.
question_list
.
reduce
((
a
,
b
)
=>
{
list
.
question_list
=
list
.
question_list
.
reduce
((
a
,
b
)
=>
{
return
a
.
concat
(
b
)
return
a
.
concat
(
b
)
},
[])
},
[])
list
.
question_list
.
forEach
(
item
=>
{
list
.
question_list
.
forEach
(
item
=>
{
const
currentItem
=
data
.
sheet
.
score_items
[
list
.
question_item_id
][
item
.
id
]
if
(
currentItem
.
checked_flag
)
{
totalNum
++
if
(
currentItem
.
is_right
)
rightNum
++
}
else
{
if
(
item
.
question_options
)
{
if
(
item
.
question_options
)
{
arr
.
push
(
item
)
totalNum
++
totalNum
++
if
(
data
.
sheet
.
score_items
[
list
.
question_item_id
][
item
.
id
].
is_right
)
{
if
(
currentItem
.
is_right
)
rightNum
++
rightNum
++
}
}
}
}
})
})
...
@@ -117,6 +119,7 @@ export default {
...
@@ -117,6 +119,7 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.result-box
{
.result-box
{
width
:
100%
;
width
:
100%
;
// height: 100%;
display
:
flex
;
display
:
flex
;
.card-left
{
.card-left
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -124,7 +127,7 @@ export default {
...
@@ -124,7 +127,7 @@ export default {
flex
:
1
;
flex
:
1
;
background
:
#fff
;
background
:
#fff
;
margin-right
:
10px
;
margin-right
:
10px
;
height
:
560px
;
//
height: 560px;
border-radius
:
8px
;
border-radius
:
8px
;
.title
{
.title
{
font-size
:
18px
;
font-size
:
18px
;
...
@@ -203,7 +206,7 @@ export default {
...
@@ -203,7 +206,7 @@ export default {
box-sizing
:
border-box
;
box-sizing
:
border-box
;
flex
:
1
;
flex
:
1
;
background
:
#fff
;
background
:
#fff
;
height
:
560px
;
//
height: 560px;
border-radius
:
8px
;
border-radius
:
8px
;
margin-left
:
10px
;
margin-left
:
10px
;
padding
:
10px
30px
0
;
padding
:
10px
30px
0
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论