Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
向伟
educationStu
Commits
8f4aeaa5
Commit
8f4aeaa5
authored
Sep 16, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加
parent
7f3fe2ab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
141 additions
and
1 deletion
+141
-1
examNotice.vue
src/components/subject/examNotice.vue
+128
-0
examPaper.vue
src/pages/exam/examPaper.vue
+13
-1
No files found.
src/components/subject/examNotice.vue
0 → 100644
View file @
8f4aeaa5
<
template
>
<view>
<van-nav-bar
fixed
>
<template
#
left
>
<van-icon
name=
"cross"
style=
"font-size: 32rpx; color: #111"
@
click=
"back"
/>
</
template
>
<
template
#
title
>
<view
style=
"
font-size: 32rpx;
color: #111;
font-family: PingFang SC;
font-weight: 800;
"
>
考试须知
</view>
</
template
>
</van-nav-bar>
<view
class=
"answer-Notice"
>
<view
style=
"width:100%;text-align:center;"
>
<img
style=
"width:169px;height:134px;"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/examNotice.png"
alt=
""
/>
</view>
<view
class=
"examContent"
>
<view>
1.本场考试满分{{paperData.Publish.ExamScore}}分
</view>
<view
style=
"margin:18rpx 0"
>
2.考试时长{{paperData.Publish.ExamTimes}}分钟,开考后{{paperData.Publish.SubmitTimes}}分钟内禁止交卷
</view>
<view
v-if=
"paperData.Publish.ExamNotice"
>
3.
<view
v-html=
"paperData.Publish.ExamNotice"
></view>
</view>
</view>
</view>
<view
class=
"submitBox"
>
<view
class=
"submit"
:class=
"{disabled: !canClick}"
@
click=
"back"
>
我已知晓
<text
v-if=
"totalTime>0"
>
({{totalTime}}s)
</text>
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</template>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
export
default
{
props
:
{
paperData
:
Object
},
setup
(
props
,
ctx
)
{
let
Gid
=
uni
.
getStorageSync
(
"userInfo"
).
Id
;
let
data
=
reactive
({
paperData
:
props
.
paperData
,
totalTime
:
5
,
canClick
:
true
//添加canClick
});
let
methods
=
{
//隐藏答题卡
back
()
{
if
(
!
data
.
canClick
)
return
ctx
.
emit
(
"hideNotice"
);
},
};
onMounted
(()
=>
{
data
.
canClick
=
false
let
clock
=
setInterval
(()
=>
{
data
.
totalTime
--
if
(
data
.
totalTime
==
0
)
{
clearInterval
(
clock
)
// this.totalTime = 5
data
.
canClick
=
true
//这里重新开启
}
},
1000
)
});
return
{
...
toRefs
(
data
),
...
methods
,
};
},
};
</
script
>
<
style
scoped
>
.answer-Notice
{
box-sizing
:
border-box
;
padding
:
30
rpx
;
height
:
calc
(
100vh
-
300
rpx
);
overflow-y
:
auto
;
}
.disabled
{
background-color
:
rgba
(
0
,
172
,
249
,
0.5
)
!important
;
}
.examContent
{
margin-top
:
20px
;
font-family
:
PingFang
SC
;
font-size
:
28
rpx
;
}
.submitBox
{
width
:
750
rpx
;
height
:
150
rpx
;
position
:
fixed
;
left
:
0
;
bottom
:
0
;
box-sizing
:
border-box
;
padding-top
:
40
rpx
;
}
.submit
{
width
:
600
rpx
;
height
:
70
rpx
;
border-radius
:
35
rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#00acf9
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#fff
;
margin
:
0
auto
;
}
</
style
>
src/pages/exam/examPaper.vue
View file @
8f4aeaa5
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</view>
</view>
</
template
>
</
template
>
</van-nav-bar>
</van-nav-bar>
<view
class=
"exam-con"
v-if=
"!isShowAnswer"
>
<view
class=
"exam-con"
v-if=
"!isShowAnswer
&&!isShowNotice
"
>
<i
class=
"iconfont icon-caidanzu answerSheet"
style=
"
<i
class=
"iconfont icon-caidanzu answerSheet"
style=
"
position: absolute;
position: absolute;
right: 30rpx;
right: 30rpx;
...
@@ -153,6 +153,9 @@
...
@@ -153,6 +153,9 @@
<answer
:paperData=
"peaperDetail"
:ExamStuId=
"Exam_Student_Id"
:StartTime=
"StartTime"
<answer
:paperData=
"peaperDetail"
:ExamStuId=
"Exam_Student_Id"
:StartTime=
"StartTime"
:SubmitTimes=
"SubmitTimes"
@
hideAnswer=
"hideAnswerSheet"
@
chooseTopic=
"jumpTopic"
ref=
"answer"
/>
:SubmitTimes=
"SubmitTimes"
@
hideAnswer=
"hideAnswerSheet"
@
chooseTopic=
"jumpTopic"
ref=
"answer"
/>
</view>
</view>
<view
class=
"answer-con"
v-if=
"isShowNotice"
>
<examNotice
:paperData=
"peaperDetail"
@
hideNotice=
"hideNotice"
/>
</view>
<van-toast
id=
"van-toast"
/>
<van-toast
id=
"van-toast"
/>
</view>
</view>
</template>
</template>
...
@@ -199,6 +202,7 @@
...
@@ -199,6 +202,7 @@
import
Connect
from
"../../components/subject/Connect.vue"
;
//"连线题"
import
Connect
from
"../../components/subject/Connect.vue"
;
//"连线题"
import
SharingChoose
from
"../../components/subject/SharingChoose.vue"
;
import
SharingChoose
from
"../../components/subject/SharingChoose.vue"
;
import
answer
from
"../../components/subject/answer.vue"
;
//答题卡
import
answer
from
"../../components/subject/answer.vue"
;
//答题卡
import
examNotice
from
"../../components/subject/examNotice.vue"
;
//考前须知
export
default
{
export
default
{
components
:
{
components
:
{
SingleChoiceNumber
,
SingleChoiceNumber
,
...
@@ -221,6 +225,7 @@
...
@@ -221,6 +225,7 @@
SharingChoose
,
SharingChoose
,
Connect
,
Connect
,
answer
,
answer
,
examNotice
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
let
{
let
{
...
@@ -247,6 +252,7 @@
...
@@ -247,6 +252,7 @@
ExamStatus
:
-
2
,
ExamStatus
:
-
2
,
StartTime
:
''
,
//页面加载后的时间
StartTime
:
''
,
//页面加载后的时间
SubmitTimes
:
0
,
//后台设置几分钟后可提交
SubmitTimes
:
0
,
//后台设置几分钟后可提交
isShowNotice
:
false
//是否显示考前须知
});
});
let
methods
=
{
let
methods
=
{
changeNumToHan
,
changeNumToHan
,
...
@@ -271,6 +277,7 @@
...
@@ -271,6 +277,7 @@
this
.
SubmitTimes
=
res
.
Data
.
Publish
.
SubmitTimes
;
this
.
SubmitTimes
=
res
.
Data
.
Publish
.
SubmitTimes
;
//判断是答卷
//判断是答卷
if
(
res
.
Data
.
ExamStatusTemp
==
1
)
{
if
(
res
.
Data
.
ExamStatusTemp
==
1
)
{
this
.
isShowNotice
=
true
;
this
.
isOperate
=
true
;
this
.
isOperate
=
true
;
data
.
autoTimeStart
=
true
;
data
.
autoTimeStart
=
true
;
data
.
time
=
res
.
Data
.
Publish
.
ExamTimes
*
60
*
1000
;
data
.
time
=
res
.
Data
.
Publish
.
ExamTimes
*
60
*
1000
;
...
@@ -296,6 +303,11 @@
...
@@ -296,6 +303,11 @@
hideAnswerSheet
()
{
hideAnswerSheet
()
{
data
.
isShowAnswer
=
false
;
data
.
isShowAnswer
=
false
;
},
},
//隐藏考前提示
hideNotice
(){
console
.
log
(
'进入'
);
data
.
isShowNotice
=
false
;
},
//获取答案改变后的数据
//获取答案改变后的数据
getAnswerChange
(
val
,
index
)
{
getAnswerChange
(
val
,
index
)
{
data
.
peaperDetail
.
Paper
.
GroupList
[
index
]
=
val
;
data
.
peaperDetail
.
Paper
.
GroupList
[
index
]
=
val
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment