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
1cec4b9b
Commit
1cec4b9b
authored
Sep 15, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
405b4c18
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
616 additions
and
617 deletions
+616
-617
Calculation.vue
src/components/subject/Calculation.vue
+8
-3
Cloze.vue
src/components/subject/Cloze.vue
+26
-19
Dataquestion.vue
src/components/subject/Dataquestion.vue
+8
-3
EntryProblem.vue
src/components/subject/EntryProblem.vue
+9
-4
FillInTheBlanks.vue
src/components/subject/FillInTheBlanks.vue
+8
-3
ListenTopic.vue
src/components/subject/ListenTopic.vue
+5
-0
MultipleChoice.vue
src/components/subject/MultipleChoice.vue
+8
-3
Other.vue
src/components/subject/Other.vue
+8
-3
SharingChoose.vue
src/components/subject/SharingChoose.vue
+10
-13
SingleChoice.vue
src/components/subject/SingleChoice.vue
+9
-3
SingleChoiceNumber.vue
src/components/subject/SingleChoiceNumber.vue
+9
-3
SortingProblem.vue
src/components/subject/SortingProblem.vue
+8
-3
Spoken.vue
src/components/subject/Spoken.vue
+7
-2
easyQuestion.vue
src/components/subject/easyQuestion.vue
+8
-3
judge.vue
src/components/subject/judge.vue
+8
-3
nounExplanation.vue
src/components/subject/nounExplanation.vue
+8
-3
readingCompre.vue
src/components/subject/readingCompre.vue
+448
-532
shortAnswer.vue
src/components/subject/shortAnswer.vue
+8
-3
examPaper.vue
src/pages/exam/examPaper.vue
+13
-11
No files found.
src/components/subject/Calculation.vue
View file @
1cec4b9b
...
...
@@ -27,9 +27,9 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex
flex_start_center
"
>
<view
class=
"flex"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
(
{{
item1
.
Score
}}
)
</view>
<template
v-if=
"isOperate"
>
<view
class=
"chooseName"
>
...
...
@@ -61,7 +61,12 @@
{{ item1.StundetAnswer }}
</view>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<view
style=
"margin:20rpx 0;"
v-if=
"item1.StudentScore"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.StudentScore>0"
>
{{item1.StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.StudentScore}}
</text>
</view>
<view
style=
"word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
...
...
src/components/subject/Cloze.vue
View file @
1cec4b9b
...
...
@@ -18,9 +18,9 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex
flex_start_center
"
>
<view
class=
"flex"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
(
{{
item1
.
Score
}}
)
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
style=
"border-bottom: 1px solid #d1d1d1"
>
...
...
@@ -42,23 +42,30 @@
</view>
<
template
v-if=
"!isOperate"
>
<view
class=
"AnswerContent"
style=
"margin-bottom:20px;"
>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
item1
.
QuestionAnswerList
[
index2
].
SubAnswer
}}
</text>
,
<text>
您的答案:
<template
v-if=
"item1.AnswerList&&item1.AnswerList.length>0&&item1.AnswerList[index2].SubAnswer != ''"
>
<text
v-if=
"item1.QuestionAnswerList[index2].SubAnswer==item1.AnswerList[index2].SubAnswer"
class=
"isTrueAnswer"
>
{{
item1
.
AnswerList
[
index2
].
SubAnswer
}}
,回答正确
</text>
<text
v-else
class=
"isNotAnswer"
>
<template
v-if=
"item1.AnswerList[index2].SubAnswer"
>
{{
item1
.
AnswerList
[
index2
].
SubAnswer
}}
,回答错误
</
template
>
<
template
v-else
>
未作答
</
template
>
</text>
</template>
</text>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
item1
.
QuestionAnswerList
[
index2
].
SubAnswer
}}
</text>
,
<text>
您的答案:
<template
v-if=
"item1.AnswerList&&item1.AnswerList.length>0&&item1.AnswerList[index2].SubAnswer != ''"
>
<text
v-if=
"item1.QuestionAnswerList[index2].SubAnswer==item1.AnswerList[index2].SubAnswer"
class=
"isTrueAnswer"
>
{{
item1
.
AnswerList
[
index2
].
SubAnswer
}}
,回答正确
</text>
<text
v-else
class=
"isNotAnswer"
>
<template
v-if=
"item1.AnswerList[index2].SubAnswer"
>
{{
item1
.
AnswerList
[
index2
].
SubAnswer
}}
,回答错误
</
template
>
<
template
v-else
>
未作答
</
template
>
</text>
</template>
</text>
</view>
<view
style=
"margin:20rpx 0;"
v-if=
"item1.AnswerList[index2].StudentScore"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.AnswerList[index2].StudentScore>0"
>
{{item1.AnswerList[index2].StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.AnswerList[index2].StudentScore}}
</text>
</view>
</view>
</template>
</view>
...
...
src/components/subject/Dataquestion.vue
View file @
1cec4b9b
...
...
@@ -27,9 +27,9 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex
flex_start_center
"
>
<view
class=
"flex"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
(
{{
item1
.
Score
}}
)
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
...
...
@@ -69,7 +69,12 @@
</view>
</
template
>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<view
style=
"margin:20rpx 0;"
v-if=
"item1.StudentScore"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.StudentScore>0"
>
{{item1.StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.StudentScore}}
</text>
</view>
<view
style=
"word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
...
...
src/components/subject/EntryProblem.vue
View file @
1cec4b9b
...
...
@@ -27,9 +27,9 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex
flex_start_center
"
>
<view
class=
"flex"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
(
{{
item1
.
Score
}}
)
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
...
...
@@ -69,8 +69,13 @@
</view>
</
template
>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word;"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94;"
>
解析:
</text>
<view
style=
"margin:20rpx 0;"
v-if=
"item1.StudentScore"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.StudentScore>0"
>
{{item1.StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.StudentScore}}
</text>
</view>
<view
style=
"word-wrap: break-word;"
class=
"flex"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94;flex-shrink: 0;"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
v-html=
"item1.AnswerParse"
...
...
src/components/subject/FillInTheBlanks.vue
View file @
1cec4b9b
...
...
@@ -21,9 +21,9 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex
flex_start_center
"
>
<view
class=
"flex"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
(
{{
item1
.
Score
}}
)
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
...
...
@@ -63,7 +63,12 @@
</view>
</
template
>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<view
style=
"margin:25rpx 0;"
v-if=
"item1.StudentScore"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.StudentScore>0"
>
{{item1.StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.StudentScore}}
</text>
</view>
<view
style=
"word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
...
...
src/components/subject/ListenTopic.vue
View file @
1cec4b9b
...
...
@@ -115,6 +115,11 @@
</template>
</text>
</view>
<view
style=
"margin:20rpx 0;"
v-if=
"item1.AnswerList[index2].StudentScore"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.AnswerList[index2].StudentScore>0"
>
{{item1.AnswerList[index2].StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.AnswerList[index2].StudentScore}}
</text>
</view>
</view>
</template>
</view>
...
...
src/components/subject/MultipleChoice.vue
View file @
1cec4b9b
...
...
@@ -18,8 +18,8 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex
flex_start_center
"
>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"flex"
>
<view
class=
"num"
v-html=
"item1.Title"
></view>
(
{{
item1
.
Score
}}
)
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"item2 flex flex_start_center"
>
...
...
@@ -55,7 +55,12 @@
</
template
>
</text>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<view
style=
"margin:20rpx 0;"
v-if=
"item1.StudentScore"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.StudentScore>0"
>
{{item1.StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.StudentScore}}
</text>
</view>
<view
style=
"word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
v-html=
"item1.AnswerParse"
></view>
</view>
...
...
src/components/subject/Other.vue
View file @
1cec4b9b
...
...
@@ -18,9 +18,9 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex
flex_start_center
"
>
<view
class=
"flex"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
(
{{
item1
.
Score
}}
)
</view>
<template
v-if=
"isOperate"
>
<view
class=
"chooseName"
>
...
...
@@ -49,7 +49,12 @@
</
template
>
</text>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<view
style=
"margin:20rpx 0;"
v-if=
"item1.StudentScore!=''"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.StudentScore>0"
>
{{item1.StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.StudentScore}}
</text>
</view>
<view
style=
"word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
v-html=
"item1.AnswerParse"
></view>
</view>
...
...
src/components/subject/SharingChoose.vue
View file @
1cec4b9b
...
...
@@ -18,21 +18,13 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
style=
"padding: 0 20px"
>
<view
class=
"flex flex_start_center"
>
<template
v-if=
"
item1.QuestionContentObj[1] &&
item1.QuestionContentObj[1].length > 0
"
>
<view
class=
"flex"
>
<template
v-if=
"item1.QuestionContentObj[1] && item1.QuestionContentObj[1].length > 0"
>
<view
class=
"num"
>
(1)
</view>
<view
class=
"num"
>
-(
{{
item1
.
QuestionContentObj
[
1
].
length
}}
)题共用备选答案:
</view>
<view
class=
"num"
>
-(
{{
item1
.
QuestionContentObj
[
1
].
length
}}
)题共用备选答案:
</view>
(
{{
item1
.
Score
}}
)
</
template
>
</view>
<
template
v-if=
"
item1.QuestionContentObj[0] &&
item1.QuestionContentObj[0].length > 0
"
>
<
template
v-if=
"item1.QuestionContentObj[0] && item1.QuestionContentObj[0].length > 0"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj[0]"
:key=
"index2"
>
<view
class=
"flex item2 flex_start_center"
>
<view
class=
"chooseNum"
>
{{
item2
.
Name
}}
</view>
...
...
@@ -74,7 +66,12 @@
</
template
>
</text>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<view
style=
"margin:20rpx 0;"
v-if=
"item1.StudentScore!=''"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.StudentScore>0"
>
{{item1.StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.StudentScore}}
</text>
</view>
<view
style=
"word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
v-html=
"item1.AnswerParse"
></view>
</view>
...
...
src/components/subject/SingleChoice.vue
View file @
1cec4b9b
...
...
@@ -19,8 +19,8 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex
flex_start_center
"
>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"flex"
>
<view
class=
"num"
v-html=
"item1.Title"
></view>
(
{{
item1
.
Score
}}
)
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
...
...
@@ -56,7 +56,12 @@
</
template
>
</text>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<view
style=
"margin:20rpx 0;"
v-if=
"item1.StudentScore!=''"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.StudentScore>0"
>
{{item1.StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.StudentScore}}
</text>
</view>
<view
style=
"word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<text
style=
"color: #000"
>
{{ item1.AnswerParse }}
</text>
</view>
...
...
@@ -276,6 +281,7 @@
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
flex-shrink
:
0
;
}
.chooseName
{
...
...
src/components/subject/SingleChoiceNumber.vue
View file @
1cec4b9b
...
...
@@ -18,8 +18,8 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex
flex_start_center
"
>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"flex"
>
<view
class=
"num"
v-html=
"item1.Title"
></view>
(
{{
item1
.
Score
}}
)
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"flex item2 flex_start_center"
>
...
...
@@ -55,7 +55,12 @@
</
template
>
</text>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<view
style=
"margin:20rpx 0;"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.StudentScore>0"
>
{{item1.StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.StudentScore}}
</text>
</view>
<view
style=
"word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<text
style=
"color: #000"
>
{{ item1.AnswerParse }}
</text>
</view>
...
...
@@ -264,6 +269,7 @@
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
flex-shrink
:
0
;
}
.chooseName
{
...
...
src/components/subject/SortingProblem.vue
View file @
1cec4b9b
...
...
@@ -27,9 +27,9 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex
flex_start_center
"
>
<view
class=
"flex"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
(
{{
item1
.
Score
}}
)
</view>
<template
v-if=
"
...
...
@@ -103,7 +103,12 @@
</
template
>
</text>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<view
style=
"margin:20rpx 0;"
v-if=
"item1.StudentScore"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.StudentScore>0"
>
{{item1.StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.StudentScore}}
</text>
</view>
<view
style=
"word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
...
...
src/components/subject/Spoken.vue
View file @
1cec4b9b
...
...
@@ -27,9 +27,9 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex
flex_start_center
"
>
<view
class=
"flex"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
(
{{
item1
.
Score
}}
)
</view>
<template
v-if=
"isOperate"
>
<view
class=
"chooseName"
>
...
...
@@ -55,6 +55,11 @@
{{ item1.StundetAnswer }}
</view>
</view>
<view
style=
"margin:20rpx 0;"
v-if=
"item1.StudentScore"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.StudentScore>0"
>
{{item1.StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.StudentScore}}
</text>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
...
...
src/components/subject/easyQuestion.vue
View file @
1cec4b9b
...
...
@@ -27,9 +27,9 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex
flex_start_center
"
>
<view
class=
"flex"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
(
{{
item1
.
Score
}}
)
</view>
<template
v-if=
"isOperate"
>
<view
class=
"chooseName"
>
...
...
@@ -61,7 +61,12 @@
{{ item1.StundetAnswer }}
</view>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<view
style=
"margin:20rpx 0;"
v-if=
"item1.StudentScore"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.StudentScore>0"
>
{{item1.StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.StudentScore}}
</text>
</view>
<view
style=
"word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
...
...
src/components/subject/judge.vue
View file @
1cec4b9b
...
...
@@ -18,8 +18,8 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex
flex_start_center
"
>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"flex"
>
<view
class=
"num"
v-html=
"item1.Title"
></view>
(
{{
item1
.
Score
}}
)
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"flex item2 flex_start_center"
>
...
...
@@ -54,7 +54,12 @@
</
template
>
</text>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<view
style=
"margin:20rpx 0;"
v-if=
"item1.StudentScore"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.StudentScore>0"
>
{{item1.StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.StudentScore}}
</text>
</view>
<view
style=
"word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
v-html=
"item1.AnswerParse"
></view>
</view>
...
...
src/components/subject/nounExplanation.vue
View file @
1cec4b9b
...
...
@@ -27,9 +27,9 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex
flex_start_center
"
>
<view
class=
"flex"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
(
{{
item1
.
Score
}}
)
</view>
<template
v-if=
"isOperate"
>
<view
class=
"chooseName"
>
...
...
@@ -59,7 +59,12 @@
{{ item1.StundetAnswer }}
</view>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<view
style=
"margin:20rpx 0;"
v-if=
"item1.StudentScore"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.StudentScore>0"
>
{{item1.StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.StudentScore}}
</text>
</view>
<view
style=
"word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
...
...
src/components/subject/readingCompre.vue
View file @
1cec4b9b
<
template
>
<!-- 阅读理解 -->
<view>
<view
class=
"item"
>
<view
class=
"name"
>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
</view>
<view
class=
"ExamIndex_Box"
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text
>
/
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
<swiper
class=
"swiper-box"
:style=
"
{
<!-- 阅读理解 -->
<view>
<view
class=
"item"
>
<view
class=
"name"
>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
</view>
<view
class=
"ExamIndex_Box"
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
<swiper
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 200rpx - ${statusBarHeight}px)`,
}"
:autoplay="autoplay"
:current="current"
@change="onchange"
>
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view
class=
"num readTitle"
:style=
"
{ paddingBottom: `${questionH}rpx` }"
v-html="item1.Title"
>
</view>
</view>
<view
class=
"questionBox"
:style=
"
{ height: `${questionH}rpx` }">
<view
class=
"questionTotal"
@
touchstart=
"touchstart"
@
touchmove=
"touchmove"
@
touchend=
"touchend"
>
本阅读理解共5小题
</view
>
<template
v-if=
"isOperate"
>
<view
class=
"questionView"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"item2"
>
<view
class=
"flex questionTitle"
>
<view
style=
"white-space: nowrap"
>
{{
index2
+
1
}}
、(
{{
}" :autoplay="autoplay" :current="current" @change="onchange">
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex"
>
<view
class=
"num readTitle"
:style=
"
{ paddingBottom: `${questionH}rpx` }"
v-html="item1.Title">
</view>
(
{{
item1
.
Score
}}
)
</view>
<view
class=
"questionBox"
:style=
"
{ height: `${questionH}rpx` }">
<view
class=
"questionTotal"
@
touchstart=
"touchstart"
@
touchmove=
"touchmove"
@
touchend=
"touchend"
>
本阅读理解共5小题
</view>
<template
v-if=
"isOperate"
>
<view
class=
"questionView"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"item2"
>
<view
class=
"flex questionTitle"
>
<view
style=
"white-space: nowrap"
>
{{
index2
+
1
}}
、(
{{
item2
.
QuestionName
.
slice
(
0
,
2
)
}}
)
</view
>
<view
v-html=
"item2.SubTitle"
class=
"grow"
></view>
</view>
<view
v-for=
"(item3, index3) in item2.SubAnwser"
:key=
"index3"
>
<!-- 单选 、判断-->
<view
class=
"flex flex_start_center item3"
v-if=
"
}}
)
</view>
<view
v-html=
"item2.SubTitle"
class=
"grow"
></view>
</view>
<view
v-for=
"(item3, index3) in item2.SubAnwser"
:key=
"index3"
>
<!-- 单选 、判断-->
<view
class=
"flex flex_start_center item3"
v-if=
"
item2.QuestionKey === 'single' ||
item2.QuestionKey === 'judge'
"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item3.IsAnswer }"
@click="singerChange(item2, item3)"
>
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
@
click=
"singerChange(item2, item3)"
v-html=
"item3.Content"
></view>
</view>
<!-- 多选 -->
<view
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'multiple'"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item3.IsAnswer }"
@click="multipleChange(item2, item3)"
>
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
@
click=
"multipleChange(item2, item3)"
v-html=
"item3.Content"
></view>
</view>
<!-- 填空 -->
<view
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'fill-in'"
>
<view
class=
"chooseNum"
>
{{
index3
+
1
}}
</view>
<input
type=
"text"
v-model=
"item3.Content"
class=
"chooseName chooseName2"
placeholder=
"请填写答案"
@
input=
"AnswerChange(item2)"
/>
</view>
<!-- 简答 -->
<view
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'short-answer'"
>
<textarea
type=
"text"
v-model=
"item3.Content"
class=
"chooseName chooseName2"
placeholder=
"请填写答案"
@
input=
"AnswerChange(item2)"
/>
</view>
</view>
</view>
</view>
</
template
>
<
template
v-else
>
<view
class=
"questionView"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"item2"
>
<view
class=
"flex questionTitle"
>
<view
style=
"white-space: nowrap"
>
{{
index2
+
1
}}
、(
{{
item2
.
QuestionName
.
slice
(
0
,
2
)
}}
)
</view
>
<view
v-html=
"item2.SubTitle"
></view>
</view>
<view
v-for=
"(item3, index3) in item2.SubAnwser"
:key=
"index3"
>
<!-- 单选 、判断-->
<view
class=
"flex flex_start_center item3"
v-if=
"
item2.QuestionKey === 'single' ||
item2.QuestionKey === 'judge'
"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item3.IsAnswer }"
>
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ myAnswerText: item3.IsAnswer }"
v-html="item3.Content"
>
</view>
</view>
"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item3.IsAnswer }"
@click="singerChange(item2, item3)">
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
@
click=
"singerChange(item2, item3)"
v-html=
"item3.Content"
></view>
</view>
<!-- 多选 -->
<view
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'multiple'"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item3.IsAnswer }"
@click="multipleChange(item2, item3)">
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
@
click=
"multipleChange(item2, item3)"
v-html=
"item3.Content"
></view>
</view>
<!-- 填空 -->
<view
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'fill-in'"
>
<view
class=
"chooseNum"
>
{{
index3
+
1
}}
</view>
<input
type=
"text"
v-model=
"item3.Content"
class=
"chooseName chooseName2"
placeholder=
"请填写答案"
@
input=
"AnswerChange(item2)"
/>
</view>
<!-- 简答 -->
<view
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'short-answer'"
>
<textarea
type=
"text"
v-model=
"item3.Content"
class=
"chooseName chooseName2"
placeholder=
"请填写答案"
@
input=
"AnswerChange(item2)"
/>
</view>
</view>
</view>
</view>
</
template
>
<
template
v-else
>
<view
class=
"questionView"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"item2"
>
<view
class=
"flex questionTitle"
>
<view
style=
"white-space: nowrap"
>
{{
index2
+
1
}}
、(
{{
item2
.
QuestionName
.
slice
(
0
,
2
)
}}
)
</view>
<view
v-html=
"item2.SubTitle"
></view>
(
{{
item2
.
SubScore
}}
)
</view>
<view
v-for=
"(item3, index3) in item2.SubAnwser"
:key=
"index3"
>
<!-- 单选 、判断-->
<view
class=
"flex item3"
v-if=
"item2.QuestionKey === 'single' || item2.QuestionKey === 'judge'"
>
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item3.IsAnswer }">
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item3.IsAnswer }"
v-html="item3.Content">
</view>
</view>
<!-- 多选 -->
<view
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'multiple'"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item3.IsAnswer }"
>
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ myAnswerText: item3.IsAnswer }"
v-html="item3.Content"
>
</view>
</view>
<!-- 填空 -->
<view
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'fill-in'"
>
<view
class=
"chooseNum"
>
{{
index3
+
1
}}
</view>
<!--
<input
type=
"text"
v-model=
"item3.Content"
class=
"chooseName chooseName2"
placeholder=
"请填写答案"
disabled
/>
-->
<view
v-html=
"item3.Content"
class=
"chooseName"
></view>
</view>
<!-- 简答 -->
<view
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'short-answer'"
>
<!--
<textarea
type=
"text"
v-model=
"item3.Content"
class=
"chooseName chooseName2"
placeholder=
"请填写答案"
disabled
/>
-->
<view
v-html=
"item3.Content"
class=
"chooseName"
></view>
</view>
</view>
<view
class=
"AnswerContent"
>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
item1
.
QuestionAnswerList
[
index2
].
SubAnswer
}}
</text
>
,
<text
>
您的答案:
<template
v-if=
"item2.StundetAnswer != ''"
>
<text
v-if=
"
item1.QuestionAnswerList[index2].SubAnswer ==
item1.AnswerList[index2].SubAnswer
"
class=
"isTrueAnswer"
>
{{
item1
.
AnswerList
[
index2
].
SubAnswer
}}
</text>
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
AnswerList
[
index2
].
SubAnswer
}}
,回答错误
</text
>
</
template
>
<
template
v-else
>
<text>
未作答
</text>
</
template
>
</text>
</view>
</view>
</view>
<view
style=
"word-wrap: break-word; margin: 0 30rpx 30rpx 30rpx"
class=
"AnswerContent"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<text
style=
"color: #000"
>
{{ item1.AnswerParse }}
</text>
</view>
</view>
</template>
</view>
</view>
</swiper-item>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
</swiper>
</view>
<van-toast
id=
"van-toast"
/>
</view>
<!-- 多选 -->
<view
class=
"flex item3"
v-if=
"item2.QuestionKey === 'multiple'"
>
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item3.IsAnswer }">
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item3.IsAnswer }"
v-html="item3.Content">
</view>
</view>
<!-- 填空 -->
<view
class=
"flex item3"
v-if=
"item2.QuestionKey === 'fill-in'"
>
<view
class=
"chooseNum"
>
{{
index3
+
1
}}
</view>
<view
v-html=
"item3.Content"
class=
"chooseName"
></view>
</view>
<!-- 简答 -->
<view
class=
"flex item3"
v-if=
"item2.QuestionKey === 'short-answer'"
>
<view
v-html=
"item3.Content"
class=
"chooseName"
></view>
</view>
</view>
<view
class=
"AnswerContent"
>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
item1
.
QuestionAnswerList
[
index2
].
SubAnswer
}}
</text>
,
<text>
您的答案:
<template
v-if=
"item2.StundetAnswer != ''"
>
<text
v-if=
"item1.QuestionAnswerList[index2].SubAnswer == item1.AnswerList[index2].SubAnswer"
class=
"isTrueAnswer"
>
{{
item1
.
AnswerList
[
index2
].
SubAnswer
}}
</text>
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
AnswerList
[
index2
].
SubAnswer
}}
,回答错误
</text>
</
template
>
<
template
v-else
>
<text>
未作答
</text>
</
template
>
</text>
</view>
<view
style=
"margin-top:20rpx;"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.AnswerList[index2].StudentScore>0"
>
{{item1.AnswerList[index2].StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.AnswerList[index2].StudentScore}}
</text>
</view>
</view>
</view>
<view
style=
"word-wrap: break-word; margin: 0 30rpx 30rpx 30rpx"
class=
"AnswerContent"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<text
style=
"color: #000"
>
{{ item1.AnswerParse }}
</text>
</view>
</view>
</template>
</view>
</view>
</swiper-item>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
</swiper>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</template>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
paperData
:
Object
,
sort
:
Number
,
sortTotal
:
Number
,
isLast
:
Boolean
,
startIndex
:
Number
,
isOperate
:
Boolean
,
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
autoplay
:
false
,
sortIndex
:
props
.
sort
+
1
,
sortTotal
:
props
.
sortTotal
,
//总共多少道大题
data
:
props
.
paperData
,
Score
:
0
,
//总分
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
questionH
:
500
,
//问题区域高度
timer
:
null
,
timeOutEvent
:
false
,
statusBarHeight
:
0
,
isOperate
:
props
.
isOperate
,
});
//判断是否是第一大题
if
(
data
.
sortIndex
===
1
)
{
data
.
current
=
0
;
//从答题卡进入
if
(
props
.
startIndex
)
{
data
.
current
=
props
.
startIndex
-
1
;
data
.
ExamIndex
=
props
.
startIndex
;
}
}
else
{
if
(
props
.
startIndex
)
{
data
.
current
=
props
.
startIndex
;
data
.
ExamIndex
=
props
.
startIndex
;
}
}
watch
(
data
.
data
,
(
newVal
,
oldVal
)
=>
{
if
(
newVal
)
{
context
.
emit
(
"answerChange"
,
newVal
);
}
});
let
methods
=
{
changeNumToHan
,
jumpPage
()
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
},
back
()
{
uni
.
navigateBack
();
},
//----------------------------------------选题----------------------------------
// 单选or判断
singerChange
(
item2
,
item3
)
{
item2
.
SubAnwser
.
map
((
e
)
=>
{
if
(
e
.
Name
==
item3
.
Name
)
{
e
.
IsAnswer
=
true
;
item2
.
IsRes
=
true
;
//答题标记
}
else
{
e
.
IsAnswer
=
false
;
}
});
},
// 多选
multipleChange
(
item2
,
item3
)
{
item3
.
IsAnswer
=
!
item3
.
IsAnswer
;
//标记已回答
item2
.
IsRes
=
item2
.
SubAnwser
.
some
((
e
)
=>
{
return
e
.
IsAnswer
;
});
},
onchange
(
e
)
{
data
.
ExamIndex
=
e
.
detail
.
current
;
if
(
data
.
ExamIndex
===
data
.
data
.
DetailsList
.
length
+
1
)
{
this
.
$emit
(
"getAfterTopic"
);
}
if
(
e
.
detail
.
current
==
0
)
{
this
.
$emit
(
"getBeforeTopic"
);
}
},
AnswerChange
(
item
)
{
item
.
IsRes
=
item
.
SubAnwser
.
some
((
e
)
=>
{
console
.
log
(
217
,
e
.
Content
&&
e
.
Content
!=
""
);
return
e
.
Content
&&
e
.
Content
!=
""
;
});
console
.
log
(
218
,
item
.
IsRes
);
},
//触摸事件
touchstart
(
e
)
{
clearTimeout
(
data
.
timer
);
data
.
timer
=
setTimeout
(()
=>
{
data
.
timeOutEvent
=
true
;
},
100
);
},
touchmove
(
e
)
{
if
(
data
.
timeOutEvent
)
{
let
touches
=
e
.
touches
[
0
];
let
startTy
=
touches
.
clientY
;
let
screenHeight
=
uni
.
getSystemInfoSync
().
screenHeight
;
data
.
questionH
=
(
screenHeight
-
startTy
)
*
2
;
}
},
touchend
()
{
data
.
timeOutEvent
=
false
;
clearTimeout
(
data
.
timer
);
},
};
onMounted
(()
=>
{
console
.
log
(
361
,
data
.
data
);
if
(
props
.
isLast
)
{
if
(
data
.
sortIndex
===
1
)
{
data
.
current
=
props
.
paperData
.
DetailsList
.
length
-
1
;
}
else
{
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
}
}
data
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
;
});
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
},
};
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
paperData
:
Object
,
sort
:
Number
,
sortTotal
:
Number
,
isLast
:
Boolean
,
startIndex
:
Number
,
isOperate
:
Boolean
,
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
autoplay
:
false
,
sortIndex
:
props
.
sort
+
1
,
sortTotal
:
props
.
sortTotal
,
//总共多少道大题
data
:
props
.
paperData
,
Score
:
0
,
//总分
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
questionH
:
500
,
//问题区域高度
timer
:
null
,
timeOutEvent
:
false
,
statusBarHeight
:
0
,
isOperate
:
props
.
isOperate
,
});
//判断是否是第一大题
if
(
data
.
sortIndex
===
1
)
{
data
.
current
=
0
;
//从答题卡进入
if
(
props
.
startIndex
)
{
data
.
current
=
props
.
startIndex
-
1
;
data
.
ExamIndex
=
props
.
startIndex
;
}
}
else
{
if
(
props
.
startIndex
)
{
data
.
current
=
props
.
startIndex
;
data
.
ExamIndex
=
props
.
startIndex
;
}
}
watch
(
data
.
data
,
(
newVal
,
oldVal
)
=>
{
if
(
newVal
)
{
context
.
emit
(
"answerChange"
,
newVal
);
}
});
let
methods
=
{
changeNumToHan
,
jumpPage
()
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
},
back
()
{
uni
.
navigateBack
();
},
//----------------------------------------选题----------------------------------
// 单选or判断
singerChange
(
item2
,
item3
)
{
item2
.
SubAnwser
.
map
((
e
)
=>
{
if
(
e
.
Name
==
item3
.
Name
)
{
e
.
IsAnswer
=
true
;
item2
.
IsRes
=
true
;
//答题标记
}
else
{
e
.
IsAnswer
=
false
;
}
});
},
// 多选
multipleChange
(
item2
,
item3
)
{
item3
.
IsAnswer
=
!
item3
.
IsAnswer
;
//标记已回答
item2
.
IsRes
=
item2
.
SubAnwser
.
some
((
e
)
=>
{
return
e
.
IsAnswer
;
});
},
onchange
(
e
)
{
data
.
ExamIndex
=
e
.
detail
.
current
;
if
(
data
.
ExamIndex
===
data
.
data
.
DetailsList
.
length
+
1
)
{
this
.
$emit
(
"getAfterTopic"
);
}
if
(
e
.
detail
.
current
==
0
)
{
this
.
$emit
(
"getBeforeTopic"
);
}
},
AnswerChange
(
item
)
{
item
.
IsRes
=
item
.
SubAnwser
.
some
((
e
)
=>
{
console
.
log
(
217
,
e
.
Content
&&
e
.
Content
!=
""
);
return
e
.
Content
&&
e
.
Content
!=
""
;
});
console
.
log
(
218
,
item
.
IsRes
);
},
//触摸事件
touchstart
(
e
)
{
clearTimeout
(
data
.
timer
);
data
.
timer
=
setTimeout
(()
=>
{
data
.
timeOutEvent
=
true
;
},
100
);
},
touchmove
(
e
)
{
if
(
data
.
timeOutEvent
)
{
let
touches
=
e
.
touches
[
0
];
let
startTy
=
touches
.
clientY
;
let
screenHeight
=
uni
.
getSystemInfoSync
().
screenHeight
;
data
.
questionH
=
(
screenHeight
-
startTy
)
*
2
;
}
},
touchend
()
{
data
.
timeOutEvent
=
false
;
clearTimeout
(
data
.
timer
);
},
};
onMounted
(()
=>
{
console
.
log
(
361
,
data
.
data
);
if
(
props
.
isLast
)
{
if
(
data
.
sortIndex
===
1
)
{
data
.
current
=
props
.
paperData
.
DetailsList
.
length
-
1
;
}
else
{
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
}
}
data
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
;
});
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
},
};
</
script
>
<
style
scoped
>
.item
{
/* margin-bottom: 40rpx; */
position
:
relative
;
}
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
box-sizing
:
border-box
;
padding
:
0
30
rpx
;
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.Single_Before
{
font-size
:
28
rpx
;
font-weight
:
bold
;
color
:
#da7878
;
}
.item
{
/* margin-bottom: 40rpx; */
position
:
relative
;
}
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
box-sizing
:
border-box
;
padding
:
0
30
rpx
;
}
.isTrueAnswer
{
color
:
green
!important
;
}
.isNotAnswer
{
color
:
red
!important
;
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.Single_Before
{
font-size
:
28
rpx
;
font-weight
:
bold
;
color
:
#da7878
;
}
.Exam_Total
{
font-size
:
25
rpx
;
color
:
gray
;
}
.swiper-box
{
height
:
calc
(
100vh
-
230
rpx
);
box-sizing
:
border-box
;
overflow
:
auto
;
}
.num
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
box-sizing
:
border-box
;
}
.readTitle
img
{
max-width
:
100%
;
}
.item1
{
height
:
100%
;
/* margin: 25rpx 0; */
align-items
:
center
;
overflow-y
:
auto
;
box-sizing
:
border-box
;
padding
:
0
30
rpx
;
}
.questionBox
{
width
:
100%
;
min-height
:
500
rpx
!important
;
max-height
:
800
rpx
!important
;
/* background-color: #eee; */
position
:
absolute
;
left
:
0
rpx
;
bottom
:
0
rpx
;
z-index
:
9
;
color
:
#000000
;
transition
:
all
0.5
;
box-shadow
:
0
rpx
10
rpx
30
rpx
0
rpx
rgba
(
36
,
36
,
36
,
0.2
);
}
.questionView
{
height
:
100%
;
overflow-y
:
auto
;
box-sizing
:
border-box
;
padding-bottom
:
80
rpx
;
}
.questionTotal
{
text-align
:
center
;
font-size
:
22
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#888888
;
padding
:
30
rpx
0
;
}
.questionTitle
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.item2
{
box-sizing
:
border-box
;
margin-bottom
:
60
rpx
;
padding
:
0
30
rpx
;
}
.myAnswer
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.Exam_Total
{
font-size
:
25
rpx
;
color
:
gray
;
}
.myAnswerText
{
color
:
#00acf9
!important
;
}
.swiper-box
{
height
:
calc
(
100vh
-
230
rpx
);
box-sizing
:
border-box
;
overflow
:
auto
;
}
.item3
{
padding-left
:
25
rpx
;
margin
:
20
rpx
0
;
}
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
box-sizing
:
border-box
;
}
.readTitle
img
{
max-width
:
100%
;
}
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.item1
{
height
:
100%
;
/* margin: 25rpx 0; */
align-items
:
center
;
overflow-y
:
auto
;
box-sizing
:
border-box
;
padding
:
0
30
rpx
;
}
.questionBox
{
width
:
100%
;
min-height
:
500
rpx
!important
;
max-height
:
800
rpx
!important
;
/* background-color: #eee; */
position
:
absolute
;
left
:
0
rpx
;
bottom
:
0
rpx
;
z-index
:
9
;
color
:
#000000
;
transition
:
all
0.5
;
box-shadow
:
0
rpx
10
rpx
30
rpx
0
rpx
rgba
(
36
,
36
,
36
,
0.2
);
}
.questionView
{
height
:
100%
;
overflow-y
:
auto
;
box-sizing
:
border-box
;
padding-bottom
:
80
rpx
;
}
.questionTotal
{
text-align
:
center
;
font-size
:
22
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#888888
;
padding
:
30
rpx
0
;
}
.questionTitle
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.item2
{
box-sizing
:
border-box
;
margin-bottom
:
60
rpx
;
padding
:
0
30
rpx
;
}
.chooseName
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
}
.myAnswer
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.myAnswerText
{
color
:
#00acf9
!important
;
}
.item3
{
padding-left
:
25
rpx
;
margin
:
20
rpx
0
;
}
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.chooseName2
{
flex-grow
:
1
;
border-bottom
:
1px
solid
#111
;
color
:
#111111
;
}
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
}
.chooseName2
{
flex-grow
:
1
;
border-bottom
:
1px
solid
#111
;
color
:
#111111
;
}
.isTrueAnswer
{
color
:
green
!important
;
}
.isTrueAnswer
{
color
:
green
!important
;
}
.isNotAnswer
{
color
:
red
!important
;
}
.isNotAnswer
{
color
:
red
!important
;
}
.AnswerContent
{
font-size
:
30
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
border-radius
:
10
rpx
;
}
.AnswerContent
{
font-size
:
30
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
border-radius
:
10
rpx
;
font-size
:
28
rpx
;
}
</
style
>
src/components/subject/shortAnswer.vue
View file @
1cec4b9b
...
...
@@ -27,9 +27,9 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex
flex_start_center
"
>
<view
class=
"flex"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
(
{{
item1
.
Score
}}
)
</view>
<template
v-if=
"isOperate"
>
<view
class=
"chooseName"
>
...
...
@@ -58,7 +58,12 @@
{{ item1.StundetAnswer }}
</view>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<view
style=
"margin:20rpx 0;"
v-if=
"item1.StudentScore"
>
<text
style=
"color:#8c8a94"
>
您的得分:
</text>
<text
class=
"isTrueAnswer"
v-if=
"item1.StudentScore>0"
>
{{item1.StudentScore}}
</text>
<text
class=
"isNotAnswer"
v-else
>
{{item1.StudentScore}}
</text>
</view>
<view
style=
"word-wrap: break-word"
v-if=
"item1.AnswerParse"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
...
...
src/pages/exam/examPaper.vue
View file @
1cec4b9b
...
...
@@ -380,7 +380,9 @@ export default {
let
data
=
reactive
({
time
:
999
,
statusBarHeight
:
0
,
msg
:
{
GuestId
:
0
,
PaperId
:
0
,
PublishId
:
0
},
// msg: { GuestId: 0, PaperId: 0, PublishId: 0},
msg
:
{
GuestId
:
20
,
PaperId
:
9
,
PublishId
:
1
,
isShowAnswer
:
true
},
peaperDetail
:
{},
changeIndex
:
0
,
//大题序号
isLast
:
false
,
//用于判断是否从后往前翻
...
...
@@ -461,19 +463,19 @@ export default {
};
},
onLoad
(
options
)
{
if
(
options
.
GuestId
){
this
.
msg
.
GuestId
=
options
.
GuestId
;
}
if
(
options
.
PaperId
)
{
this
.
msg
.
PaperId
=
options
.
PaperId
;
}
if
(
options
.
Id
)
{
this
.
msg
.
PublishId
=
options
.
Id
;
}
//
if(options.GuestId){
//
this.msg.GuestId = options.GuestId;
//
}
//
if (options.PaperId) {
//
this.msg.PaperId = options.PaperId;
//
}
//
if (options.Id) {
//
this.msg.PublishId = options.Id;
//
}
if
(
options
.
Exam_Student_Id
)
{
this
.
Exam_Student_Id
=
options
.
Exam_Student_Id
;
}
if
(
options
.
ExamStatus
&&
options
.
ExamStatus
==
1
)
{
if
(
options
.
ExamStatus
&&
(
options
.
ExamStatus
==
1
||
options
.
ExamStatus
==
2
)
)
{
this
.
isOperate
=
false
;
this
.
msg
.
isShowAnswer
=
true
;
this
.
isAutoTime
=
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