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
eda2056c
Commit
eda2056c
authored
Sep 14, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9188ae8f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
2365 additions
and
2406 deletions
+2365
-2406
Cloze.vue
src/components/subject/Cloze.vue
+280
-258
ListenTopic.vue
src/components/subject/ListenTopic.vue
+444
-410
MultipleChoice.vue
src/components/subject/MultipleChoice.vue
+240
-288
Other.vue
src/components/subject/Other.vue
+273
-231
SharingChoose.vue
src/components/subject/SharingChoose.vue
+317
-320
SingleChoice.vue
src/components/subject/SingleChoice.vue
+263
-306
SingleChoiceNumber.vue
src/components/subject/SingleChoiceNumber.vue
+251
-295
Spoken.vue
src/components/subject/Spoken.vue
+53
-11
judge.vue
src/components/subject/judge.vue
+241
-287
examPaper.vue
src/pages/exam/examPaper.vue
+3
-0
No files found.
src/components/subject/Cloze.vue
View file @
eda2056c
...
...
@@ -5,25 +5,16 @@
<view
class=
"name"
>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
</view>
<view
class=
"ExamIndex_Box"
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text
>
/
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
<swiper
class=
"swiper-box"
:style=
"
{
<swiper
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
}"
:autoplay="autoplay"
:current="current"
@change="onchange"
>
}" :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"
>
...
...
@@ -31,22 +22,47 @@
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
style=
"border-bottom: 1px solid #d1d1d1"
>
<view
v-for=
"(item3, index3) in item2.OptionList"
:key=
"index3"
class=
"flex item2 flex_start_center"
@
click=
"getAnswer(item2.OptionList, item3, item1)"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
style=
"border-bottom: 1px solid #d1d1d1"
>
<view
v-for=
"(item3, index3) in item2.OptionList"
:key=
"index3"
class=
"flex item2 flex_start_center"
>
<template
v-if=
"isOperate"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item3.IsAnswer }"
>
{{
item3
.
Name
}}
@click="getAnswer(item2.OptionList, item3, item1)"
>
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
v-html=
"item3.Content"
></view>
<view
class=
"chooseName"
v-html=
"item3.Content"
@
click=
"getAnswer(item2.OptionList, item3, item1)"
></view>
</
template
>
<
template
v-else
>
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item3.IsAnswer }">
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item3.IsAnswer }"
v-html="item3.Content">
</view>
</
template
>
</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[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"
>
{{
item1
.
AnswerList
[
index2
].
SubAnswer
}}
,回答错误
</text>
</
template
>
<
template
v-else
>
<text>
未作答
</text>
</
template
>
</text>
</view>
</template>
</view>
</view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
style=
"margin-top:20px;"
>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<text
style=
"color: #000"
>
{{ item1.AnswerParse }}
</text>
</view>
</view>
</swiper-item>
...
...
@@ -58,7 +74,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -67,9 +83,11 @@ import {
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
paperData
:
Object
,
sort
:
Number
,
...
...
@@ -79,7 +97,9 @@ export default {
isOperate
:
Boolean
,
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
data
:
props
.
paperData
,
autoplay
:
false
,
...
...
@@ -139,7 +159,7 @@ export default {
}
});
});
},
}
};
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
...
...
@@ -157,10 +177,10 @@ export default {
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -169,78 +189,80 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
}
.ExamIndex_Box
{
.ExamIndex_Box
{
margin-right
:
20px
;
}
}
.Exam_Total
{
.Exam_Total
{
font-size
:
25
rpx
;
color
:
gray
;
}
.isTrueAnswer
{
}
.isTrueAnswer
{
color
:
green
!important
;
}
}
.isNotAnswer
{
.isNotAnswer
{
color
:
red
!important
;
}
}
.AnswerContent
{
.AnswerContent
{
font-size
:
30
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
}
}
.viewAnswerContent
{
.viewAnswerContent
{
width
:
100%
;
border-bottom
:
1px
solid
#d1d1d1
;
padding-bottom
:
5px
;
}
.myAnswer
{
}
.myAnswer
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-weight
:
bold
;
color
:
#da7878
;
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
}
.item
{
.item
{
margin-bottom
:
40
rpx
;
}
}
.item1
{
.item1
{
align-items
:
center
;
}
}
.item2
{
.item2
{
/* padding-left: 25rpx; */
margin
:
30
rpx
0
;
}
}
.choose
{
.choose
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
...
...
@@ -252,32 +274,32 @@ export default {
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
}
.input
{
.input
{
box-sizing
:
border-box
;
width
:
690
rpx
;
border-bottom
:
2
rpx
solid
#000
;
color
:
#000
;
font-size
:
22
rpx
;
}
}
.textarea
{
.textarea
{
box-sizing
:
border-box
;
padding
:
20
rpx
0
;
}
}
/
deep
/
.textarea-placeholder
{
/
deep
/
.textarea-placeholder
{
font-size
:
20
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#cccccc
;
}
}
</
style
>
src/components/subject/ListenTopic.vue
View file @
eda2056c
This diff is collapsed.
Click to expand it.
src/components/subject/MultipleChoice.vue
View file @
eda2056c
...
...
@@ -5,59 +5,35 @@
<view
class=
"name"
>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
<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>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
<
text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
<swiper
class=
"swiper-box"
:style=
"
{
<swiper
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
}"
:autoplay="autoplay"
:current="current"
@change="onchange"
>
}" :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"
v-html=
"item1.Title"
></view>
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"item2 flex flex_start_center"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"item2 flex flex_start_center"
>
<template
v-if=
"isOperate"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)"
>
{{
item2
.
ShowName
}}
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)">
{{
item2
.
ShowName
}}
</view>
<view
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
<view
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
</
template
>
<
template
v-else
>
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
>
{{
item2
.
Name
}}
</view
>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
v-html="item2.Content"
>
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item2.IsAnswer }">
{{
item2
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
v-html="item2.Content">
</view>
</
template
>
</view>
...
...
@@ -65,25 +41,14 @@
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
getTrueAnswer(item1.QuestionContentObj)
}}
</text
>
,
<text
class=
"isTrueAnswer"
>
{{item1.Answer}}
</text>
,
<text>
您的答案:
<
template
v-if=
"item1.StundetAnswer != ''"
>
<text
v-if=
"
getTrueAnswer(item1.QuestionContentObj) ==
item1.StundetAnswer
"
class=
"isTrueAnswer"
>
<text
v-if=
"item1.Answer ==item1.StundetAnswer"
class=
"isTrueAnswer"
>
{{
item1
.
StundetAnswer
}}
</text>
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text
>
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text>
</
template
>
<
template
v-else
>
<text>
未作答
</text>
...
...
@@ -92,10 +57,7 @@
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
v-html=
"item1.AnswerParse"
></view>
<view
style=
"color: #000; display: inline-block"
v-html=
"item1.AnswerParse"
></view>
</view>
</view>
</swiper-item>
...
...
@@ -107,7 +69,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -116,9 +78,11 @@ import {
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
paperData
:
Object
,
isLast
:
Boolean
,
...
...
@@ -182,19 +146,7 @@ export default {
this
.
$emit
(
"getBeforeTopic"
);
console
.
log
(
"多选返回"
,
e
);
}
},
//获取正确答案
getTrueAnswer
(
item
)
{
let
AnSwer
=
[];
if
(
item
&&
item
.
length
>
0
)
{
item
.
forEach
((
x
)
=>
{
if
(
x
.
IsAnswer
)
{
AnSwer
.
push
(
x
.
Name
);
}
});
}
return
AnSwer
.
toString
();
},
};
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
...
...
@@ -213,10 +165,10 @@ export default {
};
},
onLoad
()
{},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -225,70 +177,70 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
}
.ExamIndex_Box
{
.ExamIndex_Box
{
margin-right
:
20px
;
}
}
.isTrueAnswer
{
.isTrueAnswer
{
color
:
green
!important
;
}
}
.isNotAnswer
{
.isNotAnswer
{
color
:
red
!important
;
}
}
.AnswerContent
{
.AnswerContent
{
font-size
:
30
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-weight
:
bold
;
color
:
#da7878
;
}
}
.Exam_Total
{
.Exam_Total
{
font-size
:
25
rpx
;
color
:
gray
;
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
}
.item
{
.item
{
margin-bottom
:
40
rpx
;
}
}
.item1
{
.item1
{
/* margin: 25rpx 0; */
align-items
:
center
;
}
}
.item2
{
.item2
{
padding-left
:
25
rpx
;
margin
:
30
rpx
0
;
}
}
.myAnswer
{
.myAnswer
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
...
...
@@ -300,12 +252,12 @@ export default {
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
}
</
style
>
src/components/subject/Other.vue
View file @
eda2056c
...
...
@@ -5,25 +5,16 @@
<view
class=
"name"
>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
</view>
<view
class=
"ExamIndex_Box"
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text
>
/
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
<swiper
class=
"swiper-box"
:style=
"
{
<swiper
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
}"
:autoplay="autoplay"
:current="current"
@change="onchange"
>
}" :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"
>
...
...
@@ -31,16 +22,36 @@
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
<template
v-if=
"isOperate"
>
<view
class=
"chooseName"
>
<textarea
type=
"text"
v-model=
"item1.Answer"
class=
"input textarea"
placeholder=
"请填写答案"
@
input=
"sendData(item1)"
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
<textarea
type=
"text"
v-model=
"item1.Answer"
class=
"input textarea"
placeholder=
"请填写答案"
@
input=
"sendData(item1)"
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
</view>
</
template
>
<
template
v-else
>
<view
class=
"viewAnswerContent"
style=
"margin-top:20px;"
v-html=
"item1.Answer"
></view>
</
template
>
</view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{ item1.Answer }}
</text>
,
<text>
您的答案:
<
template
v-if=
"item1.StundetAnswer != ''"
>
<text
v-if=
"item1.Answer == item1.StundetAnswer"
class=
"isTrueAnswer"
>
{{
item1
.
StundetAnswer
}}
</text>
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text>
</
template
>
<
template
v-else
>
<text>
未作答
</text>
</
template
>
</text>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
v-html=
"item1.AnswerParse"
></view>
</view>
</view>
</swiper-item>
...
...
@@ -52,7 +63,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -61,18 +72,23 @@ import {
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
}
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
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
data
:
props
.
paperData
,
autoplay
:
false
,
...
...
@@ -81,6 +97,7 @@ export default {
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
statusBarHeight
:
0
,
isOperate
:
props
.
isOperate
});
//判断是否是第一大题
if
(
data
.
sortIndex
===
1
)
{
...
...
@@ -141,10 +158,10 @@ export default {
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -153,50 +170,75 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.Exam_Total
{
}
.Exam_Total
{
font-size
:
25
rpx
;
color
:
gray
;
}
.ExamIndex_Box
{
}
.isTrueAnswer
{
color
:
green
!important
;
}
.isNotAnswer
{
color
:
red
!important
;
}
.AnswerContent
{
font-size
:
30
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
}
.viewAnswerContent
{
width
:
100%
;
border-bottom
:
1px
solid
#d1d1d1
;
padding-bottom
:
5px
;
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.Single_Before
{
}
.Single_Before
{
font-size
:
28
rpx
;
font-weight
:
bold
;
color
:
#da7878
;
}
.swiper-box
{
}
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
}
.num
{
}
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
}
.item
{
.item
{
margin-bottom
:
40
rpx
;
}
}
.item1
{
.item1
{
margin
:
25
rpx
0
;
align-items
:
center
;
}
}
.item2
{
.item2
{
/* padding-left: 25rpx; */
margin
:
30
rpx
0
;
}
}
.choose
{
.choose
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
...
...
@@ -208,32 +250,32 @@ export default {
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
}
.input
{
.input
{
box-sizing
:
border-box
;
width
:
690
rpx
;
border-bottom
:
2
rpx
solid
#000
;
color
:
#000
;
font-size
:
22
rpx
;
}
}
.textarea
{
.textarea
{
box-sizing
:
border-box
;
padding
:
20
rpx
0
;
}
}
/
deep
/
.textarea-placeholder
{
/
deep
/
.textarea-placeholder
{
font-size
:
20
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#cccccc
;
}
}
</
style
>
src/components/subject/SharingChoose.vue
View file @
eda2056c
...
...
@@ -5,94 +5,81 @@
<view
class=
"name"
style=
"padding: 0 20px"
>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
</view>
<view
class=
"ExamIndex_Box"
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text
>
/
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
<swiper
class=
"swiper-box"
:style=
"
{
<swiper
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
}"
:autoplay="autoplay"
:current="current"
@change="onchange"
>
}" :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"
style=
"padding: 0 20px"
>
<view
class=
"flex flex_start_center"
>
<template
v-if=
"
<template
v-if=
"
item1.QuestionContentObj[1] &&
item1.QuestionContentObj[1].length > 0
"
>
"
>
<view
class=
"num"
>
(1)
</view>
<view
class=
"num"
>
-(
{{
<view
class=
"num"
>
-(
{{
item1
.
QuestionContentObj
[
1
].
length
}}
)题共用备选答案:
</view
>
}}
)题共用备选答案:
</view>
</
template
>
</view>
<
template
v-if=
"
<
template
v-if=
"
item1.QuestionContentObj[0] &&
item1.QuestionContentObj[0].length > 0
"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj[0]"
:key=
"index2"
>
"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj[0]"
:key=
"index2"
>
<view
class=
"flex item2 flex_start_center"
>
<view
class=
"num"
>
{{
item2
.
Name
}}
</view>
<view
style=
"margin-left: 5px"
class=
"chooseName"
v-html=
"item2.Content"
></view>
<view
style=
"margin-left: 5px"
class=
"chooseName"
v-html=
"item2.Content"
></view>
</view>
</view>
</
template
>
<
template
v-if=
"isOperate"
>
<template
v-if=
"
item1.QuestionContentObj[1] &&
item1.QuestionContentObj[1].length > 0
"
>
<view
v-for=
"(item3, index3) in item1.QuestionContentObj[1]"
:key=
"index3"
>
<template
v-if=
"item1.QuestionContentObj[1] && item1.QuestionContentObj[1].length > 0"
>
<view
v-for=
"(item3, index3) in item1.QuestionContentObj[1]"
:key=
"index3"
>
<view
class=
"flex item2 flex_start_center"
>
<view
class=
"num"
>
{{
index3
+
1
}}
.
</view>
<view
class=
"chooseName"
v-html=
"item3.Content"
></view>
</view>
<van-button
type=
"primary"
size=
"small"
@
click=
"alertMenu(item3)"
>
<van-button
type=
"primary"
size=
"small"
@
click=
"alertMenu(item3)"
>
{{
item3
.
Name
==
""
?
"请选择"
:
item3
.
Name
}}
</van-button>
<van-action-sheet
:show=
"item3.isShow"
@
click-overlay=
"hideVan(item3)"
<van-action-sheet
:show=
"item3.isShow"
@
click-overlay=
"hideVan(item3)"
:actions=
"getSelect(item1.QuestionContentObj[0])"
@
select=
"onSelect($event, item3, item1)"
/>
@
select=
"onSelect($event, item3, item1)"
/>
</view>
</
template
>
</template>
<
template
v-else
>
<view
class=
"AnswerContent"
>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
item1
.
Answer
}}
</text>
,
<text>
您的答案:
<template
v-if=
"item1.StundetAnswer != ''"
>
<text
v-if=
"item1.Answer == item1.StundetAnswer"
class=
"isTrueAnswer"
>
{{
item1
.
StundetAnswer
}}
</text>
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text>
</
template
>
<
template
v-else
>
<text>
未作答
</text>
</
template
>
</text>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
v-html=
"item1.AnswerParse"
></view>
</view>
</view>
</template>
</view>
</swiper-item>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
...
...
@@ -103,7 +90,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -112,9 +99,11 @@ import {
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
paperData
:
Object
,
sort
:
Number
,
...
...
@@ -124,7 +113,9 @@ export default {
startIndex
:
Number
,
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
{
ctx
}
=
getCurrentInstance
();
if
(
props
.
paperData
.
DetailsList
&&
props
.
paperData
.
DetailsList
.
length
>
0
)
{
props
.
paperData
.
DetailsList
[
0
].
QuestionContentObj
[
1
].
forEach
(
(
item
,
index
)
=>
{
...
...
@@ -228,10 +219,10 @@ export default {
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -240,69 +231,75 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.isTrueAnswer
{
}
.isTrueAnswer
{
color
:
green
!important
;
}
}
.isNotAnswer
{
.isNotAnswer
{
color
:
red
!important
;
}
}
.AnswerContent
{
.AnswerContent
{
font-size
:
30
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
}
}
.viewAnswerContent
{
.viewAnswerContent
{
width
:
100%
;
border-bottom
:
1px
solid
#d1d1d1
;
padding-bottom
:
5px
;
}
.Exam_Total
{
}
.Exam_Total
{
font-size
:
25
rpx
;
color
:
gray
;
}
.ExamIndex_Box
{
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.Single_Before
{
}
.Single_Before
{
font-size
:
28
rpx
;
font-weight
:
bold
;
color
:
#da7878
;
}
.swiper-box
{
}
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
}
.num
{
}
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
}
.item
{
.item
{
margin-bottom
:
40
rpx
;
}
}
.item1
{
.item1
{
align-items
:
center
;
}
}
.item2
{
.item2
{
/* padding-left: 25rpx; */
margin
:
30
rpx
0
;
}
}
.choose
{
.choose
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
...
...
@@ -314,32 +311,32 @@ export default {
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
}
.input
{
.input
{
box-sizing
:
border-box
;
width
:
690
rpx
;
border-bottom
:
2
rpx
solid
#000
;
color
:
#000
;
font-size
:
22
rpx
;
}
}
.textarea
{
.textarea
{
box-sizing
:
border-box
;
padding
:
20
rpx
0
;
}
}
/
deep
/
.textarea-placeholder
{
/
deep
/
.textarea-placeholder
{
font-size
:
20
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#cccccc
;
}
}
</
style
>
src/components/subject/SingleChoice.vue
View file @
eda2056c
...
...
@@ -5,26 +5,17 @@
<view
class=
"name"
>
<view
class=
"grow"
>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
<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>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
<
text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
<swiper
class=
"swiper-box"
:style=
"
{
<swiper
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
}"
:autoplay="autoplay"
:current="current"
@change="onchange"
:skip-hidden-item-layout="true"
:disable-programmatic-animation="true"
>
}" :autoplay="autoplay" :current="current" @change="onchange" :skip-hidden-item-layout="true"
:disable-programmatic-animation="true">
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
...
...
@@ -32,35 +23,19 @@
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"flex item2 flex_start_center"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"flex item2 flex_start_center"
>
<template
v-if=
"isOperate"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)"
>
{{
item2
.
ShowName
}}
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)">
{{
item2
.
ShowName
}}
</view>
<view
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
<view
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
</
template
>
<
template
v-else
>
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
>
{{
item2
.
Name
}}
</view
>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
v-html="item2.Content"
>
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item2.IsAnswer }">
{{
item2
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
v-html="item2.Content">
</view>
</
template
>
</view>
...
...
@@ -68,25 +43,13 @@
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
getTrueAnswer(item1.QuestionContentObj)
}}
</text
>
,
<text>
您的答案:
<text
class=
"isTrueAnswer"
>
{{item1.Answer}}
</text>
,
<text>
您的答案:
<
template
v-if=
"item1.StundetAnswer != ''"
>
<text
v-if=
"
getTrueAnswer(item1.QuestionContentObj) ==
item1.StundetAnswer
"
class=
"isTrueAnswer"
>
<text
v-if=
"item1.Answer == item1.StundetAnswer"
class=
"isTrueAnswer"
>
{{
item1
.
StundetAnswer
}}
</text>
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text
>
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text>
</
template
>
<
template
v-else
>
<text>
未作答
</text>
...
...
@@ -109,7 +72,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -118,9 +81,11 @@ import {
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
paperData
:
Object
,
sort
:
Number
,
...
...
@@ -130,7 +95,9 @@ export default {
isOperate
:
Boolean
,
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
autoplay
:
false
,
sortIndex
:
props
.
sort
+
1
,
//大题序号
...
...
@@ -198,19 +165,7 @@ export default {
uni
.
navigateTo
({
url
:
"/pages/exam/answerSheet"
,
});
},
//获取正确答案
getTrueAnswer
(
item
)
{
let
AnSwer
=
""
;
if
(
item
&&
item
.
length
>
0
)
{
item
.
forEach
((
x
)
=>
{
if
(
x
.
IsAnswer
)
{
AnSwer
=
x
.
Name
;
}
});
}
return
AnSwer
;
},
};
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
...
...
@@ -228,10 +183,10 @@ export default {
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -240,74 +195,76 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
}
.isTrueAnswer
{
.isTrueAnswer
{
color
:
green
!important
;
}
}
.isNotAnswer
{
.isNotAnswer
{
color
:
red
!important
;
}
.AnswerContent
{
}
.AnswerContent
{
font-size
:
30
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
}
.Single_Before
{
}
.Single_Before
{
font-size
:
28
rpx
;
font-weight
:
bold
;
color
:
#da7878
;
}
}
.ExamIndex_Box
{
.ExamIndex_Box
{
margin-right
:
20px
;
}
}
.Exam_Total
{
.Exam_Total
{
font-size
:
25
rpx
;
color
:
gray
;
}
}
.answerSheet
{
.answerSheet
{
font-size
:
30
rpx
;
margin-left
:
20
rpx
;
color
:
#000
;
}
}
.swiper-box
{
.swiper-box
{
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
}
.item
{
.item
{
/* margin-bottom: 40rpx; */
position
:
relative
;
}
}
.item1
{
.item1
{
/* margin: 25rpx 0; */
align-items
:
center
;
}
}
.item2
{
.item2
{
padding-left
:
25
rpx
;
margin
:
30
rpx
0
;
}
}
.myAnswer
{
.myAnswer
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
...
...
@@ -319,12 +276,12 @@ export default {
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
}
</
style
>
src/components/subject/SingleChoiceNumber.vue
View file @
eda2056c
...
...
@@ -5,60 +5,35 @@
<view
class=
"name"
>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
<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>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
<
text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
<swiper
class=
"swiper-box"
:style=
"
{
<swiper
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
}"
:autoplay="autoplay"
:current="current"
@change="onchange"
:skip-hidden-item-layout="true"
>
}" :autoplay="autoplay" :current="current" @change="onchange" :skip-hidden-item-layout="true">
<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>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"flex item2 flex_start_center"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"flex item2 flex_start_center"
>
<template
v-if=
"isOperate"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)"
>
{{
item2
.
ShowName
}}
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)">
{{
item2
.
ShowName
}}
</view>
<view
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
<view
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
</
template
>
<
template
v-else
>
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
>
{{
item2
.
Name
}}
</view
>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
v-html="item2.Content"
>
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item2.IsAnswer }">
{{
item2
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
v-html="item2.Content">
</view>
</
template
>
</view>
...
...
@@ -66,25 +41,14 @@
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
getTrueAnswer(item1.QuestionContentObj)
}}
</text
>
,
<text
class=
"isTrueAnswer"
>
{{item1.Answer}}
</text>
,
<text>
您的答案:
<
template
v-if=
"item1.StundetAnswer != ''"
>
<text
v-if=
"
getTrueAnswer(item1.QuestionContentObj) ==
item1.StundetAnswer
"
class=
"isTrueAnswer"
>
<text
v-if=
"item1.Answer == item1.StundetAnswer"
class=
"isTrueAnswer"
>
{{
item1
.
StundetAnswer
}}
</text>
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text
>
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text>
</
template
>
<
template
v-else
>
<text>
未作答
</text>
...
...
@@ -107,7 +71,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -116,9 +80,11 @@ import {
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
paperData
:
Object
,
sort
:
Number
,
...
...
@@ -129,7 +95,9 @@ export default {
isOperate
:
Boolean
,
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
autoplay
:
false
,
sortIndex
:
props
.
sort
+
1
,
//大题序号
...
...
@@ -186,19 +154,7 @@ export default {
if
(
e
.
detail
.
current
==
0
&&
data
.
sortIndex
!=
1
)
{
this
.
$emit
(
"getBeforeTopic"
);
}
},
//获取正确答案
getTrueAnswer
(
item
)
{
let
AnSwer
=
""
;
if
(
item
&&
item
.
length
>
0
)
{
item
.
forEach
((
x
)
=>
{
if
(
x
.
IsAnswer
)
{
AnSwer
=
x
.
Name
;
}
});
}
return
AnSwer
;
},
};
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
...
...
@@ -216,10 +172,10 @@ export default {
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -228,75 +184,75 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
}
.swiper-box
{
.swiper-box
{
box-sizing
:
border-box
;
}
}
.isTrueAnswer
{
.isTrueAnswer
{
color
:
green
!important
;
}
}
.isNotAnswer
{
.isNotAnswer
{
color
:
red
!important
;
}
}
.AnswerContent
{
.AnswerContent
{
font-size
:
30
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-weight
:
bold
;
color
:
#da7878
;
}
}
.ExamIndex_Box
{
.ExamIndex_Box
{
margin-right
:
20px
;
}
}
.Exam_Total
{
.Exam_Total
{
font-size
:
25
rpx
;
color
:
gray
;
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
}
.item
{
.item
{
/* margin-bottom: 40rpx; */
position
:
relative
;
}
}
.item1
{
.item1
{
/* margin: 25rpx 0; */
align-items
:
center
;
}
}
.item2
{
.item2
{
padding-left
:
25
rpx
;
margin
:
30
rpx
0
;
}
}
.myAnswer
{
.myAnswer
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
...
...
@@ -308,12 +264,12 @@ export default {
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
}
</
style
>
src/components/subject/Spoken.vue
View file @
eda2056c
...
...
@@ -31,6 +31,7 @@
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
<template
v-if=
"isOperate"
>
<view
class=
"chooseName"
>
<textarea
type=
"text"
...
...
@@ -42,6 +43,25 @@
:maxlength=
"-1"
/>
</view>
</
template
>
<
template
v-else
>
<view
class=
"viewAnswerContent"
style=
"margin-top:15px;"
v-html=
"item1.Answer"
></view>
</
template
>
</view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
您的答案:
<view
class=
"viewAnswerContent"
style=
"margin-top: 10px"
>
{{ item1.StundetAnswer }}
</view>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
v-html=
"item1.AnswerParse"
></view>
</view>
</view>
</swiper-item>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
...
...
@@ -70,6 +90,7 @@ export default {
sortTotal
:
Number
,
isLast
:
Boolean
,
startIndex
:
Number
,
isOperate
:
Boolean
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
...
...
@@ -81,6 +102,7 @@ export default {
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
statusBarHeight
:
0
,
isOperate
:
props
.
isOperate
});
//判断是否是第一大题
if
(
data
.
sortIndex
===
1
)
{
...
...
@@ -161,6 +183,26 @@ export default {
.ExamIndex_Box
{
margin-right
:
20px
;
}
.isTrueAnswer
{
color
:
green
!important
;
}
.isNotAnswer
{
color
:
red
!important
;
}
.AnswerContent
{
font-size
:
30
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
}
.viewAnswerContent
{
width
:
100%
;
border-bottom
:
1px
solid
#d1d1d1
;
padding-bottom
:
5px
;
}
.Single_Before
{
font-size
:
28
rpx
;
font-weight
:
bold
;
...
...
src/components/subject/judge.vue
View file @
eda2056c
...
...
@@ -5,84 +5,49 @@
<view
class=
"name"
>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
<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>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
<
text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
<swiper
class=
"swiper-box"
:style=
"
{
<swiper
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
}"
:autoplay="autoplay"
:current="current"
@change="onchange"
>
}" :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"
v-html=
"item1.Title"
></view>
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"flex item2 flex_start_center"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"flex item2 flex_start_center"
>
<template
v-if=
"isOperate"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)"
>
{{
item2
.
ShowName
}}
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)">
{{
item2
.
ShowName
}}
</view>
<view
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
<view
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
</
template
>
<
template
v-else
>
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
>
{{
item2
.
Name
}}
</view
>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
>
{{
item2
.
Content
}}
</view
>
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item2.IsAnswer }">
{{
item2
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }">
{{
item2
.
Content
}}
</view>
</
template
>
</view>
</view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
getTrueAnswer(item1.QuestionContentObj)
}}
</text
>
,
<text
class=
"isTrueAnswer"
>
{{item1.Answer}}
</text>
,
<text>
您的答案:
<
template
v-if=
"item1.StundetAnswer != ''"
>
<text
v-if=
"
getTrueAnswer(item1.QuestionContentObj) ==
item1.StundetAnswer
"
class=
"isTrueAnswer"
>
<text
v-if=
"item1.Answer == item1.StundetAnswer"
class=
"isTrueAnswer"
>
{{
item1
.
StundetAnswer
}}
</text>
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text
>
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text>
</
template
>
<
template
v-else
>
<text>
未作答
</text>
...
...
@@ -91,10 +56,7 @@
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
style=
"color: #000; display: inline-block"
v-html=
"item1.AnswerParse"
></view>
<view
style=
"color: #000; display: inline-block"
v-html=
"item1.AnswerParse"
></view>
</view>
</view>
</swiper-item>
...
...
@@ -106,7 +68,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -115,9 +77,11 @@ import {
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
paperData
:
Object
,
sort
:
Number
,
...
...
@@ -127,7 +91,9 @@ export default {
isOperate
:
Boolean
,
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
autoplay
:
false
,
sortIndex
:
props
.
sort
+
1
,
...
...
@@ -182,19 +148,7 @@ export default {
if
(
e
.
detail
.
current
==
0
)
{
this
.
$emit
(
"getBeforeTopic"
);
}
},
//获取正确答案
getTrueAnswer
(
item
)
{
let
AnSwer
=
""
;
if
(
item
&&
item
.
length
>
0
)
{
item
.
forEach
((
x
)
=>
{
if
(
x
.
IsAnswer
)
{
AnSwer
=
x
.
Name
;
}
});
}
return
AnSwer
;
},
};
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
...
...
@@ -212,10 +166,10 @@ export default {
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -224,69 +178,69 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
}
.ExamIndex_Box
{
.ExamIndex_Box
{
margin-right
:
20px
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-weight
:
bold
;
color
:
#da7878
;
}
}
.isTrueAnswer
{
.isTrueAnswer
{
color
:
green
!important
;
}
}
.isNotAnswer
{
.isNotAnswer
{
color
:
red
!important
;
}
}
.AnswerContent
{
.AnswerContent
{
font-size
:
30
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
}
}
.Exam_Total
{
.Exam_Total
{
font-size
:
25
rpx
;
color
:
gray
;
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
}
.item
{
.item
{
margin-bottom
:
40
rpx
;
}
}
.item1
{
.item1
{
align-items
:
center
;
}
}
.item2
{
.item2
{
padding-left
:
25
rpx
;
margin
:
30
rpx
0
;
}
}
.myAnswer
{
.myAnswer
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
...
...
@@ -298,12 +252,12 @@ export default {
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
}
</
style
>
src/pages/exam/examPaper.vue
View file @
eda2056c
...
...
@@ -85,6 +85,7 @@
:isLast=
"isLast"
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isOperate=
"isOperate"
@
getBeforeTopic=
"getBeforeTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
answerChange=
"getAnswerChange($event, index)"
...
...
@@ -212,6 +213,7 @@
:isLast=
"isLast"
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isOperate=
"isOperate"
@
getAfterTopic=
"getAfterTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
answerChange=
"getAnswerChange($event, index)"
...
...
@@ -224,6 +226,7 @@
:isLast=
"isLast"
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isOperate=
"isOperate"
@
getAfterTopic=
"getAfterTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
answerChange=
"getAnswerChange($event, index)"
...
...
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