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
acd253b5
Commit
acd253b5
authored
Sep 10, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
08570063
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
9 deletions
+25
-9
exam.js
src/api/exam.js
+12
-0
answer.vue
src/components/subject/answer.vue
+7
-3
examPaper.vue
src/pages/exam/examPaper.vue
+6
-6
No files found.
src/api/exam.js
View file @
acd253b5
...
@@ -22,4 +22,16 @@ export function getPaperDetail(data) {
...
@@ -22,4 +22,16 @@ export function getPaperDetail(data) {
method
:
'post'
,
method
:
'post'
,
data
data
})
})
}
/**
* 提交试卷
* @param {JSON参数} data
*/
export
function
submitPaper
(
data
)
{
return
request
({
url
:
'/AppletIndex/GetSetStudentPaperDetails'
,
method
:
'post'
,
data
})
}
}
\ No newline at end of file
src/components/subject/answer.vue
View file @
acd253b5
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
item1.QuestionTypeKey === 'reading-comprehensio' ||
item1.QuestionTypeKey === 'reading-comprehensio' ||
item1.QuestionTypeKey === 'listening'
item1.QuestionTypeKey === 'listening'
"
"
@
click=
"chooseTopic(index, index1)"
>
{{ index1 + 1 }}.
</view
>
{{ index1 + 1 }}.
</view
>
>
<view
<view
...
@@ -66,7 +67,7 @@
...
@@ -66,7 +67,7 @@
</view>
</view>
</view>
</view>
<view
class=
"submitBox"
>
<view
class=
"submitBox"
>
<view
class=
"submit"
>
立即提交
</view>
<view
class=
"submit"
@
click=
"savePaper"
>
立即提交
</view>
</view>
</view>
<van-toast
id=
"van-toast"
/>
<van-toast
id=
"van-toast"
/>
</view>
</view>
...
@@ -84,12 +85,12 @@ import {
...
@@ -84,12 +85,12 @@ import {
onMounted
,
onMounted
,
}
from
"vue"
;
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
// import { submitPaper } from "../../utils/exam";
export
default
{
export
default
{
props
:
{
props
:
{
paperData
:
Object
,
paperData
:
Object
,
},
},
setup
(
props
,
ctx
)
{
setup
(
props
,
ctx
)
{
console
.
log
(
84
,
ctx
);
let
Gid
=
uni
.
getStorageSync
(
"userInfo"
).
Id
;
let
Gid
=
uni
.
getStorageSync
(
"userInfo"
).
Id
;
let
data
=
reactive
({
let
data
=
reactive
({
msg
:
{
GuestId
:
Gid
,
PaperId
:
5
,
PublishId
:
1
},
msg
:
{
GuestId
:
Gid
,
PaperId
:
5
,
PublishId
:
1
},
...
@@ -112,8 +113,11 @@ export default {
...
@@ -112,8 +113,11 @@ export default {
back
()
{
back
()
{
ctx
.
emit
(
"hideAnswer"
);
ctx
.
emit
(
"hideAnswer"
);
},
},
//交卷
savePaper
()
{
console
.
log
(
"答题卡"
,
props
.
paperData
);
},
};
};
console
.
log
(
"答题卡"
,
props
.
paperData
);
return
{
return
{
...
toRefs
(
data
),
...
toRefs
(
data
),
...
methods
,
...
methods
,
...
...
src/pages/exam/examPaper.vue
View file @
acd253b5
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
@
getBeforeTopic=
"getBeforeTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
answerChange=
"getAnswerChange($event, index)"
@
answerChange=
"getAnswerChange($event, index)"
v-if=
"item.QuestionTypeKey === 'multiple' && index === changeIndex"
v-if=
"item.QuestionTypeKey === 'multiple' && index === changeIndex"
/>
/>
<!-- 单选题 -->
<!-- 单选题 -->
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
@
getBeforeTopic=
"getBeforeTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
answerChange=
"getAnswerChange($event, index)"
@
answerChange=
"getAnswerChange($event, index)"
v-if=
"item.QuestionTypeKey === 'fill-in' && index === changeIndex"
v-if=
"item.QuestionTypeKey === 'fill-in' && index === changeIndex"
/>
/>
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
@
getAfterTopic=
"getAfterTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
answerChange=
"getAnswerChange($event, index)"
@
answerChange=
"getAnswerChange($event, index)"
v-if=
"
v-if=
"
item.QuestionTypeKey === 'reading-comprehensio' &&
item.QuestionTypeKey === 'reading-comprehensio' &&
index === changeIndex
index === changeIndex
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
@
getAfterTopic=
"getAfterTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
answerChange=
"getAnswerChange($event, index)"
@
answerChange=
"getAnswerChange($event, index)"
v-if=
"item.QuestionTypeKey === 'judge' && index === changeIndex"
v-if=
"item.QuestionTypeKey === 'judge' && index === changeIndex"
/>
/>
<!-- 简答题 -->
<!-- 简答题 -->
...
@@ -127,7 +127,7 @@
...
@@ -127,7 +127,7 @@
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
@
getAfterTopic=
"getAfterTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
answerChange=
"getAnswerChange($event, index)"
@
answerChange=
"getAnswerChange($event, index)"
v-if=
"
v-if=
"
item.QuestionTypeKey === 'short-answer' && index === changeIndex
item.QuestionTypeKey === 'short-answer' && index === changeIndex
"
"
...
@@ -346,7 +346,6 @@ export default {
...
@@ -346,7 +346,6 @@ export default {
msg
:
{
GuestId
:
Gid
,
PaperId
:
5
,
PublishId
:
1
},
msg
:
{
GuestId
:
Gid
,
PaperId
:
5
,
PublishId
:
1
},
peaperDetail
:
{},
peaperDetail
:
{},
changeIndex
:
0
,
//大题序号
changeIndex
:
0
,
//大题序号
changeIndexSub
:
1
,
//小题序号
isLast
:
false
,
//用于判断是否从后往前翻
isLast
:
false
,
//用于判断是否从后往前翻
isShowAnswer
:
false
,
//是否显示答题卡
isShowAnswer
:
false
,
//是否显示答题卡
});
});
...
@@ -394,6 +393,7 @@ export default {
...
@@ -394,6 +393,7 @@ export default {
},
},
//跳转到指定题目
//跳转到指定题目
jumpTopic
(
val
)
{
jumpTopic
(
val
)
{
this
.
changeIndex
=
val
.
index
;
data
.
peaperDetail
.
Paper
.
GroupList
[
val
.
index
].
startIndex
=
data
.
peaperDetail
.
Paper
.
GroupList
[
val
.
index
].
startIndex
=
val
.
index1
+
1
;
val
.
index1
+
1
;
data
.
isShowAnswer
=
false
;
data
.
isShowAnswer
=
false
;
...
...
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