Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-exam-show
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-exam-show
Commits
0a8638a3
提交
0a8638a3
authored
11月 18, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改bug
上级
3ca69622
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
75 行增加
和
22 行删除
+75
-22
examAnswer.vue
src/pages/exam/examAnswer.vue
+46
-11
examEnd.vue
src/pages/exam/examEnd.vue
+2
-4
examTime.vue
src/pages/exam/examTime.vue
+2
-4
confirmInfo.vue
src/pages/login/confirmInfo.vue
+19
-3
index.vue
src/pages/login/index.vue
+6
-0
没有找到文件。
src/pages/exam/examAnswer.vue
浏览文件 @
0a8638a3
...
...
@@ -68,6 +68,7 @@ export default {
},
data
()
{
return
{
isExamEnd
:
false
,
isExamTimeDate
:
true
,
itemSign
:
false
,
examTime
:
'00:00:00 倒计时'
,
...
...
@@ -93,9 +94,15 @@ export default {
mounted
()
{
this
.
setTick
()
this
.
getTopic
()
this
.
contentHeight
=
parseInt
(
document
.
body
.
clientHeight
-
(
this
.
getDom
(
'head-h'
).
offsetHeight
+
this
.
getDom
(
'foot-h'
).
offsetHeight
))
this
.
countHeight
()
window
.
onresize
=
()
=>
{
this
.
countHeight
()
}
},
methods
:
{
countHeight
()
{
this
.
contentHeight
=
parseInt
(
document
.
body
.
clientHeight
-
(
this
.
getDom
(
'head-h'
).
offsetHeight
+
this
.
getDom
(
'foot-h'
).
offsetHeight
))
},
// 标记
signHandle
()
{
this
.
$refs
.
signHandle
.
onSignHandle
()
...
...
@@ -110,13 +117,25 @@ export default {
this
.
$alert
(
'考试时间到'
,
{
confirmButtonText
:
'确定'
,
callback
:
action
=>
{
this
.
endExamRequest
()
this
.
$router
.
replace
({
path
:
'/examEnd'
})
}
})
if
(
!
this
.
isExamEnd
)
{
this
.
endExamRequest
(
1
)
}
}
else
{
const
count
=
parseInt
(
this
.
questionParams
.
question
.
total_question_count
)
-
parseInt
(
this
.
countAnswer
())
if
(
count
===
0
)
{
this
.
$confirm
(
'确定后要结束本次考试?还有作答时间,结束考试后,将不能返回本次考试!'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'关闭'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
endExamRequest
()
}).
catch
(()
=>
{
})
}
else
{
this
.
$confirm
(
`确定要结束本次考试?还有
${
count
}
题未答,结束考试后,将不能返回本次考试`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
...
...
@@ -142,19 +161,22 @@ export default {
}
return
countNum
},
endExamRequest
()
{
endExamRequest
(
n
)
{
const
param
=
{
answer
:
JSON
.
stringify
(
this
.
questionParams
.
answerRecord
)
}
action
.
Exam
.
endExam
(
this
.
$route
.
params
.
examId
,
param
).
then
(
res
=>
{
clearInterval
(
this
.
clearTime
)
if
(
!
n
)
{
this
.
$router
.
replace
({
path
:
'/examEnd'
})
}
window
.
localStorage
.
setItem
(
'showflag'
,
'true'
)
}).
catch
(
err
=>
{
if
(
err
.
message
.
indexOf
(
'error'
)
!==
-
1
)
{
this
.
$confirm
(
'网络异常,请保持网络通畅'
,
'提示'
,
{
distinguishCancelAndClose
:
true
,
confirmButtonText
:
'退出考试'
,
cancelButtonText
:
'重新提交'
,
type
:
'warning'
...
...
@@ -162,8 +184,8 @@ export default {
this
.
$router
.
replace
({
path
:
`/login/
${
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'examInfo'
)).
exam_id
}
`
})
}).
catch
(
()
=>
{
this
.
endExamRequest
(
)
}).
catch
(
action
=>
{
action
===
'cancel'
&&
(
this
.
endExamRequest
()
)
})
}
else
{
this
.
$alert
(
err
.
message
,
{
...
...
@@ -215,9 +237,21 @@ export default {
this
.
questionParams
.
question
=
res
this
.
getCache
()
}).
catch
(
err
=>
{
this
.
$alert
(
err
.
message
,
{
callback
:
action
=>
{}
})
this
.
isExamEnd
=
true
console
.
log
(
err
)
// if (err.message === '考试已结束') {
// this.$alert(err.message, {
// callback: action => {
// this.$router.replace({
// path: '/examEnd'
// })
// }
// })
// } else {
// this.$alert(err.message, {
// callback: action => {}
// })
// }
})
},
getCache
()
{
...
...
@@ -228,9 +262,10 @@ export default {
this
.
getSignStu
()
}
}).
catch
(
err
=>
{
this
.
$alert
(
err
.
message
,
{
callback
:
action
=>
{}
})
console
.
log
(
err
)
// this.$alert(err.message, {
// callback: action => {}
// })
})
},
getSignStu
()
{
...
...
src/pages/exam/examEnd.vue
浏览文件 @
0a8638a3
<
template
>
<div
class=
"end-box"
>
<div
class=
"title"
>
{{
examInfo
.
name
}}
</div>
<div
class=
"text"
>
感谢您完成
测
试
</div>
<div
class=
"text"
>
感谢您完成
考
试
</div>
<img
src=
"../../assets/images/end-bg.png"
alt=
""
>
<div
class=
"pop-progress"
v-if=
"ispop"
>
<div
class=
"pop-con"
>
...
...
@@ -29,13 +29,11 @@ export default {
methods
:
{
getsess
()
{
this
.
ispop
=
Boolean
(
window
.
localStorage
.
getItem
(
'showflag'
))
console
.
log
(
111
+
this
.
ispop
)
}
},
mounted
()
{
setTimeout
(()
=>
{
this
.
width
=
'100%'
// this.ispop = 'true'
},
1000
)
setTimeout
(()
=>
{
// this.ispop = false
...
...
@@ -44,7 +42,7 @@ export default {
this
.
$router
.
replace
({
path
:
'/'
})
},
2
000
)
},
5
000
)
},
4000
)
}
}
...
...
src/pages/exam/examTime.vue
浏览文件 @
0a8638a3
...
...
@@ -48,13 +48,11 @@ export default {
num3
:
'0'
,
num4
:
'0'
}
// this.$router.push({
// path: `/examAnswer/${JSON.parse(window.localStorage.getItem('examInfo')).exam_id}`,
// replace: true
// })
setTimeout
(()
=>
{
this
.
$router
.
replace
({
path
:
`/examAnswer/
${
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'examInfo'
)).
exam_id
}
`
})
},
2000
)
}
const
td
=
`
${
this
.
addZero
(
parseInt
(
lefttime
/
60
%
60
))}${
this
.
addZero
(
parseInt
(
lefttime
%
60
))}
`
const
arr
=
td
.
split
(
''
)
...
...
src/pages/login/confirmInfo.vue
浏览文件 @
0a8638a3
...
...
@@ -48,8 +48,8 @@
<div
class=
"head"
>
{{ examInfo.name }}
</div>
<div
class=
"exp-text"
>
<div
class=
"t"
>
<
div
class=
"fl"
>
为保证本考试的公平性和严肃性,本次考试将会:
</div
>
<div
class=
"fl"
v-html=
"examInfo.config.promise_message"
>
为保证本考试的公平性和严肃性,本次考试将会:
</div>
<
!-- <div class="fl">为保证本考试的公平性和严肃性,本次考试将会:</div> --
>
<div
class=
"fl"
v-html=
"examInfo.config.promise_message"
></div>
</div>
<!-- <p v-html="examInfo.config.promise_message"></p> -->
</div>
...
...
@@ -110,7 +110,7 @@ export default {
computed
:
{
typeInput
()
{
return
(
k
)
=>
{
const
type
=
k
===
'age'
||
k
===
'mobile'
||
k
===
'id_number'
?
'number'
:
'text'
const
type
=
k
===
'age'
||
k
===
'mobile'
?
'number'
:
'text'
return
type
}
}
...
...
@@ -191,6 +191,7 @@ export default {
action
.
Login
.
confirmInfo
(
this
.
examInfo
.
exam_id
,
this
.
form
).
then
(
res
=>
{
if
(
!
res
.
code
)
{
this
.
isTreaty
=
true
window
.
localStorage
.
setItem
(
'studentInfo'
,
JSON
.
stringify
(
res
))
}
}).
catch
(
err
=>
{
this
.
$alert
(
err
.
message
,
{
...
...
@@ -227,6 +228,21 @@ export default {
}
}
}
}
else
{
if
(
this
.
form
[
this
.
allForm
[
i
].
key
]
!==
''
)
{
if
(
this
.
allForm
[
i
].
key
===
'mobile'
)
{
if
(
!
(
/^1
[
3456789
]\d{9}
$/
.
test
(
this
.
form
.
mobile
)))
{
this
.
$alert
(
'手机号不正确'
)
return
false
}
}
if
(
this
.
allForm
[
i
].
key
===
'email'
)
{
if
(
!
(
/^
([
a-zA-Z
\d])(\w)
+@
[
a-zA-Z
\d]
+
\.[
a-zA-Z
]{2,4}
$/
.
test
(
this
.
form
.
email
)))
{
this
.
$alert
(
'邮箱不正确'
)
return
false
}
}
}
}
}
return
true
...
...
src/pages/login/index.vue
浏览文件 @
0a8638a3
...
...
@@ -147,9 +147,15 @@ export default {
}
status
===
1
&&
(
this
.
$alert
(
'已提交考卷'
))
}).
catch
(
err
=>
{
if
(
err
.
message
.
indexOf
(
'error'
)
!==
-
1
)
{
this
.
$alert
(
'网络异常,请保持网络通畅'
,
{
callback
:
action
=>
{}
})
}
else
{
this
.
$alert
(
err
.
message
,
{
callback
:
action
=>
{}
})
}
})
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论