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
5852cafc
Commit
5852cafc
authored
Sep 16, 2021
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/xiangwei/educationstu
into master
parents
9aec26d1
29afecb6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
19 deletions
+66
-19
ListenTopic.vue
src/components/subject/ListenTopic.vue
+4
-2
examNotice.vue
src/components/subject/examNotice.vue
+62
-17
No files found.
src/components/subject/ListenTopic.vue
View file @
5852cafc
...
...
@@ -141,8 +141,9 @@
<view
class=
"chooseNum"
>
{{ index3 + 1 }}
</view>
<
template
v-if=
"isOperate"
>
<input
v-for=
"cItem in item2.SubAnwser"
type=
"text"
v-model=
"
item2.myAnswer
"
v-model=
"
cItem.Content
"
class=
"chooseName chooseName2"
placeholder=
"请填写答案"
@
input=
"AnswerChange(item2)"
...
...
@@ -150,8 +151,9 @@
</
template
>
<
template
v-else
>
<view
v-for=
"cItem in item2.SubAnwser"
class=
"viewAnswerContent"
v-html=
"
item2.myAnswer
"
v-html=
"
cItem.Content
"
></view>
</
template
>
</view>
...
...
src/components/subject/examNotice.vue
View file @
5852cafc
...
...
@@ -20,18 +20,26 @@
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>
<
template
v-if=
"!isShowLate"
>
<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>
</
template
>
<
template
v-else
>
<view
style=
"text-align: center;"
>
对不起,您本次考试迟到
{{
paperData
.
Publish
.
EnterTimes
}}
分钟,不能参加考试
</view>
</
template
>
</view>
</view>
<view
class=
"submitBox"
>
<view
class=
"submit"
:class=
"{disabled: !canClick}"
@
click=
"back"
>
<view
class=
"submit"
:class=
"{disabled: !canClick}"
v-if=
"!isShowLate"
@
click=
"back"
>
我已知晓
<text
v-if=
"totalTime>0"
>
({{totalTime}}s)
</text>
</view>
<view
class=
"submit"
v-else
@
click=
"backToIndex"
>
我已知晓
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
...
...
@@ -57,7 +65,8 @@
let
data
=
reactive
({
paperData
:
props
.
paperData
,
totalTime
:
5
,
canClick
:
true
//添加canClick
canClick
:
true
,
//添加canClick
isShowLate
:
false
});
let
methods
=
{
//隐藏答题卡
...
...
@@ -65,17 +74,53 @@
if
(
!
data
.
canClick
)
return
ctx
.
emit
(
"hideNotice"
);
},
getNowTime
()
{
let
dateTime
;
let
yy
=
new
Date
().
getFullYear
();
let
mm
=
new
Date
().
getMonth
()
+
1
;
let
dd
=
new
Date
().
getDate
();
let
hh
=
new
Date
().
getHours
();
let
mf
=
new
Date
().
getMinutes
()
<
10
?
"0"
+
new
Date
().
getMinutes
()
:
new
Date
().
getMinutes
();
let
ss
=
new
Date
().
getSeconds
()
<
10
?
"0"
+
new
Date
().
getSeconds
()
:
new
Date
().
getSeconds
();
dateTime
=
yy
+
"-"
+
mm
+
"-"
+
dd
+
" "
+
hh
+
":"
+
mf
+
":"
+
ss
;
return
dateTime
;
},
//返回首页
backToIndex
(){
uni
.
navigateBack
();
}
};
onMounted
(()
=>
{
data
.
canClick
=
false
let
clock
=
setInterval
(()
=>
{
data
.
totalTime
--
if
(
data
.
totalTime
==
0
)
{
clearInterval
(
clock
)
// this.totalTime = 5
data
.
canClick
=
true
//这里重新开启
if
(
data
.
paperData
.
Publish
.
EnterTimes
&&
data
.
paperData
.
Publish
.
EnterTimes
>
0
){
let
time1
=
data
.
paperData
.
Publish
.
ExamStartTime
;
let
time2
=
methods
.
getNowTime
();
console
.
log
(
time1
,
'time1'
);
console
.
log
(
time2
,
'time2'
);
var
d1
=
new
Date
(
time1
);
var
d2
=
new
Date
(
time2
);
let
TimeDis
=
parseInt
(
d2
-
d1
)
/
1000
/
60
;
console
.
log
(
TimeDis
,
'分钟'
);
if
(
TimeDis
>
data
.
paperData
.
Publish
.
EnterTimes
)
{
data
.
isShowLate
=
true
}
},
1000
)
}
if
(
!
data
.
isShowLate
){
data
.
canClick
=
false
let
clock
=
setInterval
(()
=>
{
data
.
totalTime
--
if
(
data
.
totalTime
==
0
)
{
clearInterval
(
clock
)
// this.totalTime = 5
data
.
canClick
=
true
//这里重新开启
}
},
1000
);
}
});
return
{
...
toRefs
(
data
),
...
...
@@ -98,7 +143,7 @@
.examContent
{
margin-top
:
20px
;
font-family
:
PingFang
SC
;
font-size
:
28
rpx
;
font-size
:
30
rpx
;
}
.submitBox
{
...
...
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