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
005a3fa5
Commit
005a3fa5
authored
Sep 16, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
3a011d37
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
13 deletions
+27
-13
answer.vue
src/components/subject/answer.vue
+13
-5
examPaper.vue
src/pages/exam/examPaper.vue
+14
-8
No files found.
src/components/subject/answer.vue
View file @
005a3fa5
...
...
@@ -72,7 +72,7 @@
</view>
</view>
<view
class=
"submitBox"
>
<view
class=
"submit"
@
click=
"savePaper"
>
立即提交
</view>
<view
class=
"submit"
@
click=
"savePaper"
>
立即提交
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
...
...
@@ -96,14 +96,23 @@ export default {
paperData
:
Object
,
ExamStuId
:
Number
,
SubmitTimes
:
Number
,
StartTime
:
String
StartTime
:
String
,
isExamOver
:
Boolean
},
setup
(
props
,
ctx
)
{
let
Gid
=
uni
.
getStorageSync
(
"userInfo"
).
Id
;
let
data
=
reactive
({
msg
:
{
GuestId
:
Gid
,
PaperId
:
5
,
PublishId
:
1
},
questionList
:
props
.
paperData
.
Paper
.
GroupList
,
isExamOver
:
props
.
isExamOver
});
watch
(()
=>
props
.
isExamOver
,
(
newVal
,
oldVal
)
=>
{
console
.
log
(
oldVal
,
'oldValoldVal'
);
console
.
log
(
newVal
,
'newVal'
);
if
(
newVal
){
methods
.
savePaper
();
}
});
let
methods
=
{
changeNumToHan
,
chooseTopic
(
index
,
index1
,
index2
)
{
...
...
@@ -132,9 +141,6 @@ export default {
dateTime
=
yy
+
'-'
+
mm
+
'-'
+
dd
+
' '
+
hh
+
':'
+
mf
+
':'
+
ss
;
return
dateTime
},
getCeshi
(){
console
.
log
(
'测试来了'
);
},
//交卷
async
savePaper
()
{
let
obj
=
JSON
.
parse
(
JSON
.
stringify
(
props
.
paperData
.
Paper
));
...
...
@@ -154,6 +160,8 @@ export default {
});
return
}
console
.
log
(
'自动交卷了'
);
return
;
let
res
=
await
submitPaper
(
obj
);
if
(
res
)
{
console
.
log
(
119
,
res
);
...
...
src/pages/exam/examPaper.vue
View file @
005a3fa5
...
...
@@ -324,11 +324,12 @@
</view>
</view>
<view
class=
"answer-con"
v-if=
"isShowAnswer"
>
<
A
nswer
<
a
nswer
:paperData=
"peaperDetail"
:ExamStuId=
"Exam_Student_Id"
:StartTime=
"StartTime"
:SubmitTimes=
"SubmitTimes"
:isExamOver=
"isExamOver"
@
hideAnswer=
"hideAnswerSheet"
@
chooseTopic=
"jumpTopic"
ref=
"answer"
...
...
@@ -371,7 +372,7 @@ import Dataquestion from "../../components/subject/Dataquestion.vue";
import
SortingProblem
from
"../../components/subject/SortingProblem.vue"
;
import
Connect
from
"../../components/subject/Connect.vue"
;
//"连线题"
import
SharingChoose
from
"../../components/subject/SharingChoose.vue"
;
import
A
nswer
from
"../../components/subject/answer.vue"
;
//答题卡
import
a
nswer
from
"../../components/subject/answer.vue"
;
//答题卡
export
default
{
components
:
{
SingleChoiceNumber
,
...
...
@@ -393,7 +394,7 @@ export default {
EntryProblem
,
SharingChoose
,
Connect
,
A
nswer
,
a
nswer
,
},
setup
(
props
,
context
)
{
let
{
refs
}
=
getCurrentInstance
();
...
...
@@ -413,7 +414,8 @@ export default {
isAutoTime
:
false
,
ExamStatus
:
-
2
,
StartTime
:
''
,
//页面加载后的时间
SubmitTimes
:
0
//后台设置几分钟后可提交
SubmitTimes
:
0
,
//后台设置几分钟后可提交
isExamOver
:
false
});
let
methods
=
{
changeNumToHan
,
...
...
@@ -441,7 +443,7 @@ export default {
this
.
isOperate
=
true
;
data
.
autoTimeStart
=
true
;
// data.time = res.Data.Publish.ExamTimes * 60 * 1000;
data
.
time
=
60
000
data
.
time
=
5
000
}
}
}
...
...
@@ -476,10 +478,14 @@ export default {
data
.
isShowAnswer
=
false
;
data
.
isLast
=
false
;
},
//考试结束
//
倒计时完成
考试结束
examFinish
()
{
console
.
log
(
'进入'
);
this
.
$refs
.
answer
.
getCeshi
();
uni
.
showToast
({
title
:
'考试时间已到,系统将自动保存'
,
icon
:
"none"
,
});
data
.
isShowAnswer
=
true
;
data
.
isExamOver
=
true
;
},
};
onMounted
(()
=>
{
...
...
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