Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
066e845c
提交
066e845c
authored
3月 04, 2022
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加承诺书
上级
c0d423ac
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
46 行增加
和
5 行删除
+46
-5
Index.vue
src/modules/exam/exam/views/Index.vue
+46
-5
没有找到文件。
src/modules/exam/exam/views/Index.vue
浏览文件 @
066e845c
...
...
@@ -14,10 +14,28 @@
</el-card>
</
template
>
</div>
<el-dialog
title=
"考前须知"
:visible
.
sync=
"dialogVisible"
>
<div
v-html=
"acitveItem.config.welcome_message"
v-if=
"acitveItem && acitveItem.config"
></div>
<
template
#
footer
>
<div
style=
"text-align: center"
>
<el-dialog
center
:visible
.
sync=
"dialogVisible"
>
<div
class=
"info"
v-if=
"acitveItem && acitveItem.config"
>
<div
style=
"font-size:20px; text-align: center;"
>
{{ acitveItem.paper_title }}
</div>
<div
style=
"font-size:18px; text-align: center;margin: 10px 0 20px;"
>
考试时间:{{ acitveItem.start_time }} ~ {{ acitveItem.end_time }}
</div>
<div
v-html=
"acitveItem.config.welcome_message"
></div>
</div>
<div
v-if=
"acitveItem && acitveItem.config"
>
<div
v-if=
"acitveItem.config.enabled_promise"
>
<el-dialog
title=
"考前须知"
:visible
.
sync=
"innerVisible"
width=
"70%"
append-to-body
center
>
<div
v-if=
"acitveItem && acitveItem.config"
style=
"font-size: 18px"
v-html=
"acitveItem.config.promise_message"
></div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
:disabled=
"!isRead"
type=
"primary"
@
click=
"enterExam"
>
{{ noticeText }}
</el-button>
</span>
</el-dialog>
</div>
</div>
<
template
#
footer
v-if=
"acitveItem && acitveItem.config"
>
<div
style=
"text-align: center"
v-if=
"acitveItem.config.enabled_promise"
>
<el-button
type=
"primary"
@
click=
"innerVisible = true"
>
考试承诺书
</el-button>
<!--
<el-button
type=
"primary"
@
click=
"enterExam"
>
进入考试
</el-button>
-->
</div>
<div
style=
"text-align: center"
v-else
>
<el-button
type=
"primary"
@
click=
"enterExam"
>
进入考试
</el-button>
</div>
</
template
>
...
...
@@ -30,11 +48,14 @@ import * as api from '@/api/exam.js'
export
default
{
data
()
{
return
{
noticeText
:
'我已阅读,开始考试(20秒)'
,
courseId
:
''
,
courses
:
[],
examList
:
[],
dialogVisible
:
false
,
acitveItem
:
{}
// 当前激活的考试
acitveItem
:
{},
// 当前激活的考试
innerVisible
:
false
,
isRead
:
false
}
},
computed
:
{
...
...
@@ -139,6 +160,26 @@ export default {
query
:
{
exam_id
:
item
.
id
,
type
:
item
.
paper_type
,
is_create
:
0
}
})
}
},
watch
:
{
dialogVisible
:
function
(
newVal
,
oldVal
)
{
console
.
log
(
this
.
dialogVisible
)
let
numTime
=
20
if
(
this
.
dialogVisible
&&
!
this
.
isRead
)
{
clearInterval
(
this
.
noticeTimes
)
this
.
noticeTimes
=
setInterval
(()
=>
{
numTime
--
this
.
noticeText
=
`我已阅读,开始考试(
${
numTime
}
秒)`
if
(
numTime
===
0
)
{
this
.
isRead
=
true
this
.
noticeText
=
'我已阅读,开始考试'
clearInterval
(
this
.
noticeTimes
)
}
},
1000
)
}
else
{
clearInterval
(
this
.
noticeTimes
)
}
}
}
}
</
script
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论