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
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 @@
...
@@ -5,25 +5,16 @@
<view
class=
"name"
>
<view
class=
"name"
>
<view>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
</view>
</view>
<view
class=
"ExamIndex_Box"
>
<view
class=
"ExamIndex_Box"
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
>
/
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
</view>
</view>
<swiper
<swiper
class=
"swiper-box"
:style=
"
{
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
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-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"item1"
>
...
@@ -31,22 +22,47 @@
...
@@ -31,22 +22,47 @@
<view>
{{
index1
+
1
}}
、
</view>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
</view>
<view
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
v-for=
"(item2, index2) in item1.QuestionContentObj"
style=
"border-bottom: 1px solid #d1d1d1"
>
:key=
"index2"
<view
v-for=
"(item3, index3) in item2.OptionList"
:key=
"index3"
style=
"border-bottom: 1px solid #d1d1d1"
class=
"flex item2 flex_start_center"
>
>
<template
v-if=
"isOperate"
>
<view
v-for=
"(item3, index3) in item2.OptionList"
:key=
"index3"
class=
"flex item2 flex_start_center"
@
click=
"getAnswer(item2.OptionList, item3, item1)"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item3.IsAnswer }"
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item3.IsAnswer }"
>
{{
item3
.
Name
}}
@click="getAnswer(item2.OptionList, item3, item1)"
>
{{
item3
.
Name
}}
</view>
</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>
<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>
</view>
</view>
</swiper-item>
</swiper-item>
...
@@ -58,7 +74,7 @@
...
@@ -58,7 +74,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
import
{
ref
,
ref
,
reactive
,
reactive
,
toRefs
,
toRefs
,
...
@@ -67,9 +83,11 @@ import {
...
@@ -67,9 +83,11 @@ import {
watch
,
watch
,
computed
,
computed
,
onMounted
,
onMounted
,
}
from
"vue"
;
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
import
{
export
default
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
props
:
{
paperData
:
Object
,
paperData
:
Object
,
sort
:
Number
,
sort
:
Number
,
...
@@ -79,7 +97,9 @@ export default {
...
@@ -79,7 +97,9 @@ export default {
isOperate
:
Boolean
,
isOperate
:
Boolean
,
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
let
data
=
reactive
({
data
:
props
.
paperData
,
data
:
props
.
paperData
,
autoplay
:
false
,
autoplay
:
false
,
...
@@ -139,7 +159,7 @@ export default {
...
@@ -139,7 +159,7 @@ export default {
}
}
});
});
});
});
},
}
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
if
(
props
.
isLast
)
{
...
@@ -157,10 +177,10 @@ export default {
...
@@ -157,10 +177,10 @@ export default {
...
methods
,
...
methods
,
};
};
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
height
:
90
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
...
@@ -169,78 +189,80 @@ export default {
...
@@ -169,78 +189,80 @@ export default {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.ExamIndex_Box
{
.ExamIndex_Box
{
margin-right
:
20px
;
margin-right
:
20px
;
}
}
.Exam_Total
{
.Exam_Total
{
font-size
:
25
rpx
;
font-size
:
25
rpx
;
color
:
gray
;
color
:
gray
;
}
}
.isTrueAnswer
{
.isTrueAnswer
{
color
:
green
!important
;
color
:
green
!important
;
}
}
.isNotAnswer
{
.isNotAnswer
{
color
:
red
!important
;
color
:
red
!important
;
}
}
.AnswerContent
{
.AnswerContent
{
font-size
:
30
rpx
;
font-size
:
30
rpx
;
padding
:
25
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
border-radius
:
5px
;
}
}
.viewAnswerContent
{
.viewAnswerContent
{
width
:
100%
;
width
:
100%
;
border-bottom
:
1px
solid
#d1d1d1
;
border-bottom
:
1px
solid
#d1d1d1
;
padding-bottom
:
5px
;
padding-bottom
:
5px
;
}
}
.myAnswer
{
.myAnswer
{
background-color
:
#00acf9
!important
;
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
color
:
#ffffff
!important
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#da7878
;
color
:
#da7878
;
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.item
{
.item
{
margin-bottom
:
40
rpx
;
margin-bottom
:
40
rpx
;
}
}
.item1
{
.item1
{
align-items
:
center
;
align-items
:
center
;
}
}
.item2
{
.item2
{
/* padding-left: 25rpx; */
/* padding-left: 25rpx; */
margin
:
30
rpx
0
;
margin
:
30
rpx
0
;
}
}
.choose
{
.choose
{
background-color
:
#00acf9
!important
;
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
text-align
:
center
;
...
@@ -252,32 +274,32 @@ export default {
...
@@ -252,32 +274,32 @@ export default {
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#111111
;
color
:
#111111
;
}
}
.input
{
.input
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
width
:
690
rpx
;
width
:
690
rpx
;
border-bottom
:
2
rpx
solid
#000
;
border-bottom
:
2
rpx
solid
#000
;
color
:
#000
;
color
:
#000
;
font-size
:
22
rpx
;
font-size
:
22
rpx
;
}
}
.textarea
{
.textarea
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
20
rpx
0
;
padding
:
20
rpx
0
;
}
}
/
deep
/
.textarea-placeholder
{
/
deep
/
.textarea-placeholder
{
font-size
:
20
rpx
;
font-size
:
20
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#cccccc
;
color
:
#cccccc
;
}
}
</
style
>
</
style
>
src/components/subject/ListenTopic.vue
View file @
eda2056c
...
@@ -5,130 +5,130 @@
...
@@ -5,130 +5,130 @@
<view
class=
"name"
>
<view
class=
"name"
>
<view>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
</view>
</view>
<view
class=
"ExamIndex_Box"
>
<view
class=
"ExamIndex_Box"
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</
text
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
<
text
>
/
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
</view>
</view>
<swiper
<swiper
class=
"swiper-box"
:style=
"
{
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
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-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view
class=
"flex flex_start_center"
>
<view
<view
class=
"audioBox flex flex_center_center"
@
click=
"audioManage(item1.Src)"
>
class=
"audioBox flex flex_center_center"
<image
style=
"width: 26rpx; height: 22rpx"
@
click=
"audioManage(item1.Src)"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/horn.png"
/>
>
<van-count-down
:time=
"audioTime"
:auto-start=
"false"
class=
"flex flex_center_center"
<image
style=
"color: #00acf9"
ref=
"listenCountdown"
format=
"mm:ss"
/>
style=
"width: 26rpx; height: 22rpx"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/horn.png"
/>
<van-count-down
:time=
"audioTime"
:auto-start=
"false"
class=
"flex flex_center_center"
style=
"color: #00acf9"
ref=
"listenCountdown"
format=
"mm:ss"
/>
</view>
</view>
</view>
</view>
<view
class=
"questionView"
>
<view
class=
"questionView"
>
<view
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"item2"
>
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"item2"
>
<view
class=
"flex questionTitle"
>
<view
class=
"flex questionTitle"
>
<view
<view>
{{
index2
+
1
}}
、(
{{
item2
.
QuestionName
}}
,
{{
item2
.
SubScore
}}
分)
</view>
>
{{
index2
+
1
}}
、(
{{
item2
.
QuestionName
}}
,
{{
item2
.
SubScore
}}
分)
</view
>
<view
v-html=
"item2.SubTitle"
></view>
<view
v-html=
"item2.SubTitle"
></view>
</view>
</view>
<view
v-for=
"(item3, index3) in item2.SubAnwser"
:key=
"index3"
>
<view
v-for=
"(item3, index3) in item2.SubAnwser"
:key=
"index3"
>
<!-- 单选 、判断-->
<!-- 单选 、判断-->
<view
<view
class=
"flex flex_start_center item3"
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'single' || item2.QuestionKey === 'judge'"
>
v-if=
"
<template
v-if=
"isOperate"
>
item2.QuestionKey === 'single' ||
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item3.IsAnswer }"
item2.QuestionKey === 'judge'
@click="singerChange(item2, item3)">
{{
item3
.
Name
}}
"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item3.IsAnswer }"
@click="singerChange(item2, item3)"
>
{{
item3
.
Name
}}
</view>
</view>
<view
<view
class=
"chooseName"
@
click=
"singerChange(item2, item3)"
class=
"chooseName"
v-html=
"item3.Content"
></view>
@
click=
"singerChange(item2, item3)"
</
template
>
v-html=
"item3.Content"
<
template
v-else
>
></view>
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item3.IsAnswer }">
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item3.IsAnswer }"
v-html="item3.Content">
</view>
</
template
>
</view>
</view>
<!-- 多选 -->
<!-- 多选 -->
<view
<view
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'multiple'"
>
class=
"flex flex_start_center item3"
<
template
v-if=
"isOperate"
>
v-if=
"item2.QuestionKey === 'multiple'"
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item3.IsAnswer }"
>
@click="multipleChange(item3)">
{{
item3
.
Name
}}
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item3.IsAnswer }"
@click="multipleChange(item3)"
>
{{
item3
.
Name
}}
</view>
</view>
<view
<view
class=
"chooseName"
@
click=
"multipleChange(item2, item3)"
class=
"chooseName"
v-html=
"item3.Content"
></view>
@
click=
"multipleChange(item2, item3)"
</
template
>
v-html=
"item3.Content"
<
template
v-else
>
></view>
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item3.IsAnswer }">
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item3.IsAnswer }"
v-html="item3.Content">
</view>
</
template
>
</view>
</view>
<!-- 填空 -->
<!-- 填空 -->
<view
<view
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'fill-in'"
>
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'fill-in'"
>
<view
class=
"chooseNum"
>
{{ index3 + 1 }}
</view>
<view
class=
"chooseNum"
>
{{ index3 + 1 }}
</view>
<input
<
template
v-if=
"isOperate"
>
type=
"text
"
<input
type=
"text"
v-model=
"item2.myAnswer"
class=
"chooseName chooseName2
"
v-model=
"item2.myAnswer"
placeholder=
"请填写答案"
@
input=
"AnswerChange(item2)"
/>
class=
"chooseName chooseName2"
</
template
>
placeholder=
"请填写答案"
<
template
v-else
>
@
input=
"AnswerChange(item2)"
<view
class=
"viewAnswerContent"
v-html=
"item2.myAnswer"
></view>
/
>
</
template
>
</view>
</view>
<!-- 简答 -->
<!-- 简答 -->
<view
<view
class=
"flex flex_start_center item3"
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'short-answer'"
>
v-if=
"item2.QuestionKey === 'short-answer'"
<
template
v-if=
"isOperate"
>
>
<textarea
type=
"text"
v-model=
"item2.myAnswer"
<textarea
class=
"chooseName chooseName2"
placeholder=
"请填写答案"
type=
"text"
@
input=
"AnswerChange(item2)"
/>
v-model=
"item2.myAnswer"
</
template
>
class=
"chooseName chooseName2"
<
template
v-else
>
placeholder=
"请填写答案"
<view
class=
"viewAnswerContent"
v-html=
"item2.myAnswer"
></view>
@
input=
"AnswerChange(item2)"
</
template
>
/>
</view>
</view>
<
template
v-if=
"!isOperate"
>
<view
class=
"AnswerContent"
>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
item1
.
QuestionAnswerList
[
index2
].
SubAnswer
}}
</text>
,
<text>
您的答案:
<template
v-if=
"item1.AnswerList && item1.AnswerList.length>0"
>
<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>
</view>
</view>
</template>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<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>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
</swiper>
</swiper>
...
@@ -138,7 +138,7 @@
...
@@ -138,7 +138,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
import
{
ref
,
ref
,
reactive
,
reactive
,
toRefs
,
toRefs
,
...
@@ -148,21 +148,26 @@ import {
...
@@ -148,21 +148,26 @@ import {
computed
,
computed
,
onMounted
,
onMounted
,
onUnmounted
,
onUnmounted
,
}
from
"vue"
;
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
import
{
const
innerAudioContext
=
uni
.
createInnerAudioContext
();
changeNumToHan
innerAudioContext
.
autoplay
=
true
;
}
from
"../../utils/index"
;
export
default
{
const
innerAudioContext
=
uni
.
createInnerAudioContext
();
innerAudioContext
.
autoplay
=
true
;
export
default
{
props
:
{
props
:
{
paperData
:
Object
,
paperData
:
Object
,
sort
:
Number
,
sort
:
Number
,
sortTotal
:
Number
,
sortTotal
:
Number
,
isLast
:
Boolean
,
isLast
:
Boolean
,
startIndex
:
Number
,
startIndex
:
Number
,
isOperate
:
Boolean
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
let
s
=
getCurrentInstance
();
let
s
=
getCurrentInstance
();
let
{
refs
}
=
getCurrentInstance
();
let
{
refs
}
=
getCurrentInstance
();
console
.
log
(
163
,
s
.
$refs
);
console
.
log
(
163
,
s
.
$refs
);
let
data
=
reactive
({
let
data
=
reactive
({
autoplay
:
false
,
autoplay
:
false
,
...
@@ -174,6 +179,7 @@ export default {
...
@@ -174,6 +179,7 @@ export default {
audioTime
:
999
,
audioTime
:
999
,
isPlay
:
true
,
isPlay
:
true
,
statusBarHeight
:
0
,
statusBarHeight
:
0
,
isOperate
:
props
.
isOperate
});
});
data
.
data
.
DetailsList
.
map
((
item
)
=>
{
data
.
data
.
DetailsList
.
map
((
item
)
=>
{
let
arr
=
item
.
Title
.
split
(
" "
);
//按空格分段
let
arr
=
item
.
Title
.
split
(
" "
);
//按空格分段
...
@@ -317,10 +323,10 @@ export default {
...
@@ -317,10 +323,10 @@ export default {
...
methods
,
...
methods
,
};
};
},
},
};
};
</
script
>
</
script
>
<
style
>
<
style
>
.name
{
.name
{
height
:
90
rpx
;
height
:
90
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
...
@@ -329,43 +335,67 @@ export default {
...
@@ -329,43 +335,67 @@ export default {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.ExamIndex_Box
{
.ExamIndex_Box
{
margin-right
:
20px
;
margin-right
:
20px
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#da7878
;
color
:
#da7878
;
}
}
.Exam_Total
{
.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
;
}
.Exam_Total
{
font-size
:
25
rpx
;
font-size
:
25
rpx
;
color
:
gray
;
color
:
gray
;
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.item
{
.item
{
/* margin-bottom: 40rpx; */
/* margin-bottom: 40rpx; */
position
:
relative
;
position
:
relative
;
}
}
.item1
{
.item1
{
/* margin: 25rpx 0; */
/* margin: 25rpx 0; */
align-items
:
center
;
align-items
:
center
;
}
}
.audioBox
{
.audioBox
{
width
:
120
rpx
;
width
:
120
rpx
;
height
:
30
rpx
;
height
:
30
rpx
;
background
:
#b4ddfe
;
background
:
#b4ddfe
;
...
@@ -375,23 +405,25 @@ export default {
...
@@ -375,23 +405,25 @@ export default {
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#00acf9
;
color
:
#00acf9
;
}
}
.item2
{
.item2
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
margin
:
30
rpx
0
;
margin
:
30
rpx
0
;
/* padding: 0 30rpx; */
/* padding: 0 30rpx; */
}
}
.item3
{
.item3
{
padding-left
:
25
rpx
;
padding-left
:
25
rpx
;
margin
:
20
rpx
0
;
margin
:
20
rpx
0
;
}
}
.myAnswer
{
.myAnswer
{
background-color
:
#00acf9
!important
;
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
text-align
:
center
;
...
@@ -403,27 +435,29 @@ export default {
...
@@ -403,27 +435,29 @@ export default {
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#111111
;
color
:
#111111
;
}
}
.chooseName2
{
.chooseName2
{
flex-grow
:
1
;
flex-grow
:
1
;
border-bottom
:
1px
solid
#111
;
border-bottom
:
1px
solid
#111
;
}
}
.questionTitle
{
.questionTitle
{
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.listen
.van-count-down
{
.listen
.van-count-down
{
font-size
:
22
rpx
!important
;
font-size
:
22
rpx
!important
;
color
:
#00acf9
!important
;
color
:
#00acf9
!important
;
}
}
</
style
>
</
style
>
src/components/subject/MultipleChoice.vue
View file @
eda2056c
...
@@ -5,59 +5,35 @@
...
@@ -5,59 +5,35 @@
<view
class=
"name"
>
<view
class=
"name"
>
<view>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
</view>
</view>
<view
class=
"ExamIndex_Box"
>
<view
class=
"ExamIndex_Box"
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</
text
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
<
text
>
/
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
</view>
</view>
<swiper
<swiper
class=
"swiper-box"
:style=
"
{
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
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-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view
class=
"flex flex_start_center"
>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
</view>
<view
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
v-for=
"(item2, index2) in item1.QuestionContentObj"
class=
"item2 flex flex_start_center"
>
:key=
"index2"
class=
"item2 flex flex_start_center"
>
<template
v-if=
"isOperate"
>
<template
v-if=
"isOperate"
>
<view
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item2.IsAnswer }"
class=
"chooseNum"
@click="change(item1, item2)">
{{
item2
.
ShowName
}}
:class=
"
{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)"
>
{{
item2
.
ShowName
}}
</view>
</view>
<view
<view
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<view
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item2.IsAnswer }">
{{
item2
.
Name
}}
class=
"chooseNum"
</view>
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
>
{{
item2
.
Name
}}
</view
v-html="item2.Content">
>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
v-html="item2.Content"
>
</view>
</view>
</
template
>
</
template
>
</view>
</view>
...
@@ -65,25 +41,14 @@
...
@@ -65,25 +41,14 @@
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
<text
class=
"isTrueAnswer"
>
{{item1.Answer}}
</text>
,
getTrueAnswer(item1.QuestionContentObj)
}}
</text
>
,
<text>
<text>
您的答案:
您的答案:
<
template
v-if=
"item1.StundetAnswer != ''"
>
<
template
v-if=
"item1.StundetAnswer != ''"
>
<text
<text
v-if=
"item1.Answer ==item1.StundetAnswer"
class=
"isTrueAnswer"
>
v-if=
"
getTrueAnswer(item1.QuestionContentObj) ==
item1.StundetAnswer
"
class=
"isTrueAnswer"
>
{{
item1
.
StundetAnswer
}}
{{
item1
.
StundetAnswer
}}
</text>
</text>
<text
v-else
class=
"isNotAnswer"
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text>
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text
>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<text>
未作答
</text>
<text>
未作答
</text>
...
@@ -92,10 +57,7 @@
...
@@ -92,10 +57,7 @@
</view>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
<view
style=
"color: #000; display: inline-block"
v-html=
"item1.AnswerParse"
></view>
style=
"color: #000; display: inline-block"
v-html=
"item1.AnswerParse"
></view>
</view>
</view>
</view>
</view>
</swiper-item>
</swiper-item>
...
@@ -107,7 +69,7 @@
...
@@ -107,7 +69,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
import
{
ref
,
ref
,
reactive
,
reactive
,
toRefs
,
toRefs
,
...
@@ -116,9 +78,11 @@ import {
...
@@ -116,9 +78,11 @@ import {
watch
,
watch
,
computed
,
computed
,
onMounted
,
onMounted
,
}
from
"vue"
;
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
import
{
export
default
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
props
:
{
paperData
:
Object
,
paperData
:
Object
,
isLast
:
Boolean
,
isLast
:
Boolean
,
...
@@ -182,19 +146,7 @@ export default {
...
@@ -182,19 +146,7 @@ export default {
this
.
$emit
(
"getBeforeTopic"
);
this
.
$emit
(
"getBeforeTopic"
);
console
.
log
(
"多选返回"
,
e
);
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
(()
=>
{
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
if
(
props
.
isLast
)
{
...
@@ -213,10 +165,10 @@ export default {
...
@@ -213,10 +165,10 @@ export default {
};
};
},
},
onLoad
()
{},
onLoad
()
{},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
height
:
90
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
...
@@ -225,70 +177,70 @@ export default {
...
@@ -225,70 +177,70 @@ export default {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.ExamIndex_Box
{
.ExamIndex_Box
{
margin-right
:
20px
;
margin-right
:
20px
;
}
}
.isTrueAnswer
{
.isTrueAnswer
{
color
:
green
!important
;
color
:
green
!important
;
}
}
.isNotAnswer
{
.isNotAnswer
{
color
:
red
!important
;
color
:
red
!important
;
}
}
.AnswerContent
{
.AnswerContent
{
font-size
:
30
rpx
;
font-size
:
30
rpx
;
padding
:
25
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
border-radius
:
5px
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#da7878
;
color
:
#da7878
;
}
}
.Exam_Total
{
.Exam_Total
{
font-size
:
25
rpx
;
font-size
:
25
rpx
;
color
:
gray
;
color
:
gray
;
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.item
{
.item
{
margin-bottom
:
40
rpx
;
margin-bottom
:
40
rpx
;
}
}
.item1
{
.item1
{
/* margin: 25rpx 0; */
/* margin: 25rpx 0; */
align-items
:
center
;
align-items
:
center
;
}
}
.item2
{
.item2
{
padding-left
:
25
rpx
;
padding-left
:
25
rpx
;
margin
:
30
rpx
0
;
margin
:
30
rpx
0
;
}
}
.myAnswer
{
.myAnswer
{
background-color
:
#00acf9
!important
;
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
text-align
:
center
;
...
@@ -300,12 +252,12 @@ export default {
...
@@ -300,12 +252,12 @@ export default {
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#111111
;
color
:
#111111
;
}
}
</
style
>
</
style
>
src/components/subject/Other.vue
View file @
eda2056c
...
@@ -5,25 +5,16 @@
...
@@ -5,25 +5,16 @@
<view
class=
"name"
>
<view
class=
"name"
>
<view>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
</view>
</view>
<view
class=
"ExamIndex_Box"
>
<view
class=
"ExamIndex_Box"
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
>
/
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
</view>
</view>
<swiper
<swiper
class=
"swiper-box"
:style=
"
{
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
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-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"item1"
>
...
@@ -31,16 +22,36 @@
...
@@ -31,16 +22,36 @@
<view>
{{
index1
+
1
}}
、
</view>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
</view>
<template
v-if=
"isOperate"
>
<view
class=
"chooseName"
>
<view
class=
"chooseName"
>
<textarea
<textarea
type=
"text"
v-model=
"item1.Answer"
class=
"input textarea"
placeholder=
"请填写答案"
type=
"text"
@
input=
"sendData(item1)"
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
v-model=
"item1.Answer"
</view>
class=
"input textarea"
</
template
>
placeholder=
"请填写答案"
<
template
v-else
>
@
input=
"sendData(item1)"
<view
class=
"viewAnswerContent"
style=
"margin-top:20px;"
v-html=
"item1.Answer"
></view>
placeholder-style=
"textarea-placeholder"
</
template
>
:maxlength=
"-1"
</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>
</view>
</view>
</swiper-item>
</swiper-item>
...
@@ -52,7 +63,7 @@
...
@@ -52,7 +63,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
import
{
ref
,
ref
,
reactive
,
reactive
,
toRefs
,
toRefs
,
...
@@ -61,18 +72,23 @@ import {
...
@@ -61,18 +72,23 @@ import {
watch
,
watch
,
computed
,
computed
,
onMounted
,
onMounted
,
}
from
"vue"
;
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
import
{
export
default
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
props
:
{
paperData
:
Object
,
paperData
:
Object
,
sort
:
Number
,
sort
:
Number
,
sortTotal
:
Number
,
sortTotal
:
Number
,
isLast
:
Boolean
,
isLast
:
Boolean
,
startIndex
:
Number
,
startIndex
:
Number
,
isOperate
:
Boolean
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
let
data
=
reactive
({
data
:
props
.
paperData
,
data
:
props
.
paperData
,
autoplay
:
false
,
autoplay
:
false
,
...
@@ -81,6 +97,7 @@ export default {
...
@@ -81,6 +97,7 @@ export default {
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
ExamIndex
:
1
,
//第几题
statusBarHeight
:
0
,
statusBarHeight
:
0
,
isOperate
:
props
.
isOperate
});
});
//判断是否是第一大题
//判断是否是第一大题
if
(
data
.
sortIndex
===
1
)
{
if
(
data
.
sortIndex
===
1
)
{
...
@@ -141,10 +158,10 @@ export default {
...
@@ -141,10 +158,10 @@ export default {
...
methods
,
...
methods
,
};
};
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
height
:
90
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
...
@@ -153,50 +170,75 @@ export default {
...
@@ -153,50 +170,75 @@ export default {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.Exam_Total
{
.Exam_Total
{
font-size
:
25
rpx
;
font-size
:
25
rpx
;
color
:
gray
;
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
;
margin-right
:
20px
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#da7878
;
color
:
#da7878
;
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.item
{
.item
{
margin-bottom
:
40
rpx
;
margin-bottom
:
40
rpx
;
}
}
.item1
{
.item1
{
margin
:
25
rpx
0
;
margin
:
25
rpx
0
;
align-items
:
center
;
align-items
:
center
;
}
}
.item2
{
.item2
{
/* padding-left: 25rpx; */
/* padding-left: 25rpx; */
margin
:
30
rpx
0
;
margin
:
30
rpx
0
;
}
}
.choose
{
.choose
{
background-color
:
#00acf9
!important
;
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
text-align
:
center
;
...
@@ -208,32 +250,32 @@ export default {
...
@@ -208,32 +250,32 @@ export default {
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#111111
;
color
:
#111111
;
}
}
.input
{
.input
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
width
:
690
rpx
;
width
:
690
rpx
;
border-bottom
:
2
rpx
solid
#000
;
border-bottom
:
2
rpx
solid
#000
;
color
:
#000
;
color
:
#000
;
font-size
:
22
rpx
;
font-size
:
22
rpx
;
}
}
.textarea
{
.textarea
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
20
rpx
0
;
padding
:
20
rpx
0
;
}
}
/
deep
/
.textarea-placeholder
{
/
deep
/
.textarea-placeholder
{
font-size
:
20
rpx
;
font-size
:
20
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#cccccc
;
color
:
#cccccc
;
}
}
</
style
>
</
style
>
src/components/subject/SharingChoose.vue
View file @
eda2056c
...
@@ -5,94 +5,81 @@
...
@@ -5,94 +5,81 @@
<view
class=
"name"
style=
"padding: 0 20px"
>
<view
class=
"name"
style=
"padding: 0 20px"
>
<view>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
</view>
</view>
<view
class=
"ExamIndex_Box"
>
<view
class=
"ExamIndex_Box"
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
>
/
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
</view>
</view>
<swiper
<swiper
class=
"swiper-box"
:style=
"
{
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
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-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
style=
"padding: 0 20px"
>
<view
class=
"item1"
style=
"padding: 0 20px"
>
<view
class=
"flex flex_start_center"
>
<view
class=
"flex flex_start_center"
>
<template
<template
v-if=
"
v-if=
"
item1.QuestionContentObj[1] &&
item1.QuestionContentObj[1] &&
item1.QuestionContentObj[1].length > 0
item1.QuestionContentObj[1].length > 0
"
"
>
>
<view
class=
"num"
>
(1)
</view>
<view
class=
"num"
>
(1)
</view>
<view
class=
"num"
<view
class=
"num"
>
-(
{{
>
-(
{{
item1
.
QuestionContentObj
[
1
].
length
item1
.
QuestionContentObj
[
1
].
length
}}
)题共用备选答案:
</view
}}
)题共用备选答案:
</view>
>
</
template
>
</
template
>
</view>
</view>
<
template
<
template
v-if=
"
v-if=
"
item1.QuestionContentObj[0] &&
item1.QuestionContentObj[0] &&
item1.QuestionContentObj[0].length > 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=
"flex item2 flex_start_center"
>
<view
class=
"num"
>
{{
item2
.
Name
}}
</view>
<view
class=
"num"
>
{{
item2
.
Name
}}
</view>
<view
<view
style=
"margin-left: 5px"
class=
"chooseName"
v-html=
"item2.Content"
></view>
style=
"margin-left: 5px"
class=
"chooseName"
v-html=
"item2.Content"
></view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
template
v-if=
"isOperate"
>
<
template
v-if=
"isOperate"
>
<template
<template
v-if=
"item1.QuestionContentObj[1] && item1.QuestionContentObj[1].length > 0"
>
v-if=
"
<view
v-for=
"(item3, index3) in item1.QuestionContentObj[1]"
:key=
"index3"
>
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=
"flex item2 flex_start_center"
>
<view
class=
"num"
>
{{
index3
+
1
}}
.
</view>
<view
class=
"num"
>
{{
index3
+
1
}}
.
</view>
<view
class=
"chooseName"
v-html=
"item3.Content"
></view>
<view
class=
"chooseName"
v-html=
"item3.Content"
></view>
</view>
</view>
<van-button
<van-button
type=
"primary"
size=
"small"
@
click=
"alertMenu(item3)"
>
type=
"primary"
size=
"small"
@
click=
"alertMenu(item3)"
>
{{
item3
.
Name
==
""
?
"请选择"
:
item3
.
Name
}}
{{
item3
.
Name
==
""
?
"请选择"
:
item3
.
Name
}}
</van-button>
</van-button>
<van-action-sheet
<van-action-sheet
:show=
"item3.isShow"
@
click-overlay=
"hideVan(item3)"
:show=
"item3.isShow"
@
click-overlay=
"hideVan(item3)"
:actions=
"getSelect(item1.QuestionContentObj[0])"
:actions=
"getSelect(item1.QuestionContentObj[0])"
@
select=
"onSelect($event, item3, item1)"
@
select=
"onSelect($event, item3, item1)"
/>
/>
</view>
</view>
</
template
>
</
template
>
</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>
</view>
</swiper-item>
</swiper-item>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
...
@@ -103,7 +90,7 @@
...
@@ -103,7 +90,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
import
{
ref
,
ref
,
reactive
,
reactive
,
toRefs
,
toRefs
,
...
@@ -112,9 +99,11 @@ import {
...
@@ -112,9 +99,11 @@ import {
watch
,
watch
,
computed
,
computed
,
onMounted
,
onMounted
,
}
from
"vue"
;
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
import
{
export
default
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
props
:
{
paperData
:
Object
,
paperData
:
Object
,
sort
:
Number
,
sort
:
Number
,
...
@@ -124,7 +113,9 @@ export default {
...
@@ -124,7 +113,9 @@ export default {
startIndex
:
Number
,
startIndex
:
Number
,
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
{
ctx
}
=
getCurrentInstance
();
if
(
props
.
paperData
.
DetailsList
&&
props
.
paperData
.
DetailsList
.
length
>
0
)
{
if
(
props
.
paperData
.
DetailsList
&&
props
.
paperData
.
DetailsList
.
length
>
0
)
{
props
.
paperData
.
DetailsList
[
0
].
QuestionContentObj
[
1
].
forEach
(
props
.
paperData
.
DetailsList
[
0
].
QuestionContentObj
[
1
].
forEach
(
(
item
,
index
)
=>
{
(
item
,
index
)
=>
{
...
@@ -228,10 +219,10 @@ export default {
...
@@ -228,10 +219,10 @@ export default {
...
methods
,
...
methods
,
};
};
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
height
:
90
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
...
@@ -240,69 +231,75 @@ export default {
...
@@ -240,69 +231,75 @@ export default {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.isTrueAnswer
{
.isTrueAnswer
{
color
:
green
!important
;
color
:
green
!important
;
}
}
.isNotAnswer
{
.isNotAnswer
{
color
:
red
!important
;
color
:
red
!important
;
}
}
.AnswerContent
{
.AnswerContent
{
font-size
:
30
rpx
;
font-size
:
30
rpx
;
padding
:
25
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
border-radius
:
5px
;
}
}
.viewAnswerContent
{
.viewAnswerContent
{
width
:
100%
;
width
:
100%
;
border-bottom
:
1px
solid
#d1d1d1
;
border-bottom
:
1px
solid
#d1d1d1
;
padding-bottom
:
5px
;
padding-bottom
:
5px
;
}
}
.Exam_Total
{
.Exam_Total
{
font-size
:
25
rpx
;
font-size
:
25
rpx
;
color
:
gray
;
color
:
gray
;
}
}
.ExamIndex_Box
{
.ExamIndex_Box
{
margin-right
:
20px
;
margin-right
:
20px
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#da7878
;
color
:
#da7878
;
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.item
{
.item
{
margin-bottom
:
40
rpx
;
margin-bottom
:
40
rpx
;
}
}
.item1
{
.item1
{
align-items
:
center
;
align-items
:
center
;
}
}
.item2
{
.item2
{
/* padding-left: 25rpx; */
/* padding-left: 25rpx; */
margin
:
30
rpx
0
;
margin
:
30
rpx
0
;
}
}
.choose
{
.choose
{
background-color
:
#00acf9
!important
;
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
text-align
:
center
;
...
@@ -314,32 +311,32 @@ export default {
...
@@ -314,32 +311,32 @@ export default {
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#111111
;
color
:
#111111
;
}
}
.input
{
.input
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
width
:
690
rpx
;
width
:
690
rpx
;
border-bottom
:
2
rpx
solid
#000
;
border-bottom
:
2
rpx
solid
#000
;
color
:
#000
;
color
:
#000
;
font-size
:
22
rpx
;
font-size
:
22
rpx
;
}
}
.textarea
{
.textarea
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
20
rpx
0
;
padding
:
20
rpx
0
;
}
}
/
deep
/
.textarea-placeholder
{
/
deep
/
.textarea-placeholder
{
font-size
:
20
rpx
;
font-size
:
20
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#cccccc
;
color
:
#cccccc
;
}
}
</
style
>
</
style
>
src/components/subject/SingleChoice.vue
View file @
eda2056c
...
@@ -5,26 +5,17 @@
...
@@ -5,26 +5,17 @@
<view
class=
"name"
>
<view
class=
"name"
>
<view
class=
"grow"
>
<view
class=
"grow"
>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
</view>
</view>
<view
class=
"ExamIndex_Box"
>
<view
class=
"ExamIndex_Box"
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</
text
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
<
text
>
/
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
</view>
</view>
<swiper
<swiper
class=
"swiper-box"
:style=
"
{
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
}"
}" :autoplay="autoplay" :current="current" @change="onchange" :skip-hidden-item-layout="true"
:autoplay="autoplay"
:disable-programmatic-animation="true">
:current="current"
@change="onchange"
:skip-hidden-item-layout="true"
:disable-programmatic-animation="true"
>
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"item1"
>
...
@@ -32,35 +23,19 @@
...
@@ -32,35 +23,19 @@
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
</view>
<view
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
v-for=
"(item2, index2) in item1.QuestionContentObj"
class=
"flex item2 flex_start_center"
>
:key=
"index2"
class=
"flex item2 flex_start_center"
>
<template
v-if=
"isOperate"
>
<template
v-if=
"isOperate"
>
<view
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item2.IsAnswer }"
class=
"chooseNum"
@click="change(item1, item2)">
{{
item2
.
ShowName
}}
:class=
"
{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)"
>
{{
item2
.
ShowName
}}
</view>
</view>
<view
<view
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<view
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item2.IsAnswer }">
{{
item2
.
Name
}}
class=
"chooseNum"
</view>
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
>
{{
item2
.
Name
}}
</view
v-html="item2.Content">
>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
v-html="item2.Content"
>
</view>
</view>
</
template
>
</
template
>
</view>
</view>
...
@@ -68,25 +43,13 @@
...
@@ -68,25 +43,13 @@
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
<text
class=
"isTrueAnswer"
>
{{item1.Answer}}
</text>
,
getTrueAnswer(item1.QuestionContentObj)
<text>
您的答案:
}}
</text
>
,
<text>
您的答案:
<
template
v-if=
"item1.StundetAnswer != ''"
>
<
template
v-if=
"item1.StundetAnswer != ''"
>
<text
<text
v-if=
"item1.Answer == item1.StundetAnswer"
class=
"isTrueAnswer"
>
v-if=
"
getTrueAnswer(item1.QuestionContentObj) ==
item1.StundetAnswer
"
class=
"isTrueAnswer"
>
{{
item1
.
StundetAnswer
}}
{{
item1
.
StundetAnswer
}}
</text>
</text>
<text
v-else
class=
"isNotAnswer"
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text>
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text
>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<text>
未作答
</text>
<text>
未作答
</text>
...
@@ -109,7 +72,7 @@
...
@@ -109,7 +72,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
import
{
ref
,
ref
,
reactive
,
reactive
,
toRefs
,
toRefs
,
...
@@ -118,9 +81,11 @@ import {
...
@@ -118,9 +81,11 @@ import {
watch
,
watch
,
computed
,
computed
,
onMounted
,
onMounted
,
}
from
"vue"
;
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
import
{
export
default
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
props
:
{
paperData
:
Object
,
paperData
:
Object
,
sort
:
Number
,
sort
:
Number
,
...
@@ -130,7 +95,9 @@ export default {
...
@@ -130,7 +95,9 @@ export default {
isOperate
:
Boolean
,
isOperate
:
Boolean
,
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
let
data
=
reactive
({
autoplay
:
false
,
autoplay
:
false
,
sortIndex
:
props
.
sort
+
1
,
//大题序号
sortIndex
:
props
.
sort
+
1
,
//大题序号
...
@@ -198,19 +165,7 @@ export default {
...
@@ -198,19 +165,7 @@ export default {
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/exam/answerSheet"
,
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
(()
=>
{
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
if
(
props
.
isLast
)
{
...
@@ -228,10 +183,10 @@ export default {
...
@@ -228,10 +183,10 @@ export default {
...
methods
,
...
methods
,
};
};
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
height
:
90
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
...
@@ -240,74 +195,76 @@ export default {
...
@@ -240,74 +195,76 @@ export default {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.isTrueAnswer
{
.isTrueAnswer
{
color
:
green
!important
;
color
:
green
!important
;
}
}
.isNotAnswer
{
.isNotAnswer
{
color
:
red
!important
;
color
:
red
!important
;
}
}
.AnswerContent
{
.AnswerContent
{
font-size
:
30
rpx
;
font-size
:
30
rpx
;
padding
:
25
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
border-radius
:
5px
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#da7878
;
color
:
#da7878
;
}
}
.ExamIndex_Box
{
.ExamIndex_Box
{
margin-right
:
20px
;
margin-right
:
20px
;
}
}
.Exam_Total
{
.Exam_Total
{
font-size
:
25
rpx
;
font-size
:
25
rpx
;
color
:
gray
;
color
:
gray
;
}
}
.answerSheet
{
.answerSheet
{
font-size
:
30
rpx
;
font-size
:
30
rpx
;
margin-left
:
20
rpx
;
margin-left
:
20
rpx
;
color
:
#000
;
color
:
#000
;
}
}
.swiper-box
{
.swiper-box
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.item
{
.item
{
/* margin-bottom: 40rpx; */
/* margin-bottom: 40rpx; */
position
:
relative
;
position
:
relative
;
}
}
.item1
{
.item1
{
/* margin: 25rpx 0; */
/* margin: 25rpx 0; */
align-items
:
center
;
align-items
:
center
;
}
}
.item2
{
.item2
{
padding-left
:
25
rpx
;
padding-left
:
25
rpx
;
margin
:
30
rpx
0
;
margin
:
30
rpx
0
;
}
}
.myAnswer
{
.myAnswer
{
background-color
:
#00acf9
!important
;
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
text-align
:
center
;
...
@@ -319,12 +276,12 @@ export default {
...
@@ -319,12 +276,12 @@ export default {
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#111111
;
color
:
#111111
;
}
}
</
style
>
</
style
>
src/components/subject/SingleChoiceNumber.vue
View file @
eda2056c
...
@@ -5,60 +5,35 @@
...
@@ -5,60 +5,35 @@
<view
class=
"name"
>
<view
class=
"name"
>
<view>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
</view>
</view>
<view
class=
"ExamIndex_Box"
>
<view
class=
"ExamIndex_Box"
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</
text
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
<
text
>
/
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
</view>
</view>
<swiper
<swiper
class=
"swiper-box"
:style=
"
{
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
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-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view
class=
"flex flex_start_center"
>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
</view>
<view
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
v-for=
"(item2, index2) in item1.QuestionContentObj"
class=
"flex item2 flex_start_center"
>
:key=
"index2"
class=
"flex item2 flex_start_center"
>
<template
v-if=
"isOperate"
>
<template
v-if=
"isOperate"
>
<view
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item2.IsAnswer }"
class=
"chooseNum"
@click="change(item1, item2)">
{{
item2
.
ShowName
}}
:class=
"
{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)"
>
{{
item2
.
ShowName
}}
</view>
</view>
<view
<view
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<view
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item2.IsAnswer }">
{{
item2
.
Name
}}
class=
"chooseNum"
</view>
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
>
{{
item2
.
Name
}}
</view
v-html="item2.Content">
>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
v-html="item2.Content"
>
</view>
</view>
</
template
>
</
template
>
</view>
</view>
...
@@ -66,25 +41,14 @@
...
@@ -66,25 +41,14 @@
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
<text
class=
"isTrueAnswer"
>
{{item1.Answer}}
</text>
,
getTrueAnswer(item1.QuestionContentObj)
}}
</text
>
,
<text>
<text>
您的答案:
您的答案:
<
template
v-if=
"item1.StundetAnswer != ''"
>
<
template
v-if=
"item1.StundetAnswer != ''"
>
<text
<text
v-if=
"item1.Answer == item1.StundetAnswer"
class=
"isTrueAnswer"
>
v-if=
"
getTrueAnswer(item1.QuestionContentObj) ==
item1.StundetAnswer
"
class=
"isTrueAnswer"
>
{{
item1
.
StundetAnswer
}}
{{
item1
.
StundetAnswer
}}
</text>
</text>
<text
v-else
class=
"isNotAnswer"
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text>
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text
>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<text>
未作答
</text>
<text>
未作答
</text>
...
@@ -107,7 +71,7 @@
...
@@ -107,7 +71,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
import
{
ref
,
ref
,
reactive
,
reactive
,
toRefs
,
toRefs
,
...
@@ -116,9 +80,11 @@ import {
...
@@ -116,9 +80,11 @@ import {
watch
,
watch
,
computed
,
computed
,
onMounted
,
onMounted
,
}
from
"vue"
;
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
import
{
export
default
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
props
:
{
paperData
:
Object
,
paperData
:
Object
,
sort
:
Number
,
sort
:
Number
,
...
@@ -129,7 +95,9 @@ export default {
...
@@ -129,7 +95,9 @@ export default {
isOperate
:
Boolean
,
isOperate
:
Boolean
,
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
let
data
=
reactive
({
autoplay
:
false
,
autoplay
:
false
,
sortIndex
:
props
.
sort
+
1
,
//大题序号
sortIndex
:
props
.
sort
+
1
,
//大题序号
...
@@ -186,19 +154,7 @@ export default {
...
@@ -186,19 +154,7 @@ export default {
if
(
e
.
detail
.
current
==
0
&&
data
.
sortIndex
!=
1
)
{
if
(
e
.
detail
.
current
==
0
&&
data
.
sortIndex
!=
1
)
{
this
.
$emit
(
"getBeforeTopic"
);
this
.
$emit
(
"getBeforeTopic"
);
}
}
},
//获取正确答案
getTrueAnswer
(
item
)
{
let
AnSwer
=
""
;
if
(
item
&&
item
.
length
>
0
)
{
item
.
forEach
((
x
)
=>
{
if
(
x
.
IsAnswer
)
{
AnSwer
=
x
.
Name
;
}
});
}
}
return
AnSwer
;
},
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
if
(
props
.
isLast
)
{
...
@@ -216,10 +172,10 @@ export default {
...
@@ -216,10 +172,10 @@ export default {
...
methods
,
...
methods
,
};
};
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
height
:
90
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
...
@@ -228,75 +184,75 @@ export default {
...
@@ -228,75 +184,75 @@ export default {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.swiper-box
{
.swiper-box
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.isTrueAnswer
{
.isTrueAnswer
{
color
:
green
!important
;
color
:
green
!important
;
}
}
.isNotAnswer
{
.isNotAnswer
{
color
:
red
!important
;
color
:
red
!important
;
}
}
.AnswerContent
{
.AnswerContent
{
font-size
:
30
rpx
;
font-size
:
30
rpx
;
padding
:
25
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
border-radius
:
5px
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#da7878
;
color
:
#da7878
;
}
}
.ExamIndex_Box
{
.ExamIndex_Box
{
margin-right
:
20px
;
margin-right
:
20px
;
}
}
.Exam_Total
{
.Exam_Total
{
font-size
:
25
rpx
;
font-size
:
25
rpx
;
color
:
gray
;
color
:
gray
;
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.item
{
.item
{
/* margin-bottom: 40rpx; */
/* margin-bottom: 40rpx; */
position
:
relative
;
position
:
relative
;
}
}
.item1
{
.item1
{
/* margin: 25rpx 0; */
/* margin: 25rpx 0; */
align-items
:
center
;
align-items
:
center
;
}
}
.item2
{
.item2
{
padding-left
:
25
rpx
;
padding-left
:
25
rpx
;
margin
:
30
rpx
0
;
margin
:
30
rpx
0
;
}
}
.myAnswer
{
.myAnswer
{
background-color
:
#00acf9
!important
;
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
text-align
:
center
;
...
@@ -308,12 +264,12 @@ export default {
...
@@ -308,12 +264,12 @@ export default {
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#111111
;
color
:
#111111
;
}
}
</
style
>
</
style
>
src/components/subject/Spoken.vue
View file @
eda2056c
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
<view>
{{
index1
+
1
}}
、
</view>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
</view>
<template
v-if=
"isOperate"
>
<view
class=
"chooseName"
>
<view
class=
"chooseName"
>
<textarea
<textarea
type=
"text"
type=
"text"
...
@@ -42,6 +43,25 @@
...
@@ -42,6 +43,25 @@
:maxlength=
"-1"
:maxlength=
"-1"
/>
/>
</view>
</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>
</view>
</swiper-item>
</swiper-item>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
...
@@ -70,6 +90,7 @@ export default {
...
@@ -70,6 +90,7 @@ export default {
sortTotal
:
Number
,
sortTotal
:
Number
,
isLast
:
Boolean
,
isLast
:
Boolean
,
startIndex
:
Number
,
startIndex
:
Number
,
isOperate
:
Boolean
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
{
ctx
}
=
getCurrentInstance
();
...
@@ -81,6 +102,7 @@ export default {
...
@@ -81,6 +102,7 @@ export default {
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
ExamIndex
:
1
,
//第几题
statusBarHeight
:
0
,
statusBarHeight
:
0
,
isOperate
:
props
.
isOperate
});
});
//判断是否是第一大题
//判断是否是第一大题
if
(
data
.
sortIndex
===
1
)
{
if
(
data
.
sortIndex
===
1
)
{
...
@@ -161,6 +183,26 @@ export default {
...
@@ -161,6 +183,26 @@ export default {
.ExamIndex_Box
{
.ExamIndex_Box
{
margin-right
:
20px
;
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
{
.Single_Before
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
...
...
src/components/subject/judge.vue
View file @
eda2056c
...
@@ -5,84 +5,49 @@
...
@@ -5,84 +5,49 @@
<view
class=
"name"
>
<view
class=
"name"
>
<view>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color: #999999"
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
</view>
</view>
<view
class=
"ExamIndex_Box"
>
<view
class=
"ExamIndex_Box"
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</
text
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
<
text
>
/
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
</view>
</view>
<swiper
<swiper
class=
"swiper-box"
:style=
"
{
class=
"swiper-box"
:style=
"
{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
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-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view
class=
"flex flex_start_center"
>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
</view>
<view
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
v-for=
"(item2, index2) in item1.QuestionContentObj"
class=
"flex item2 flex_start_center"
>
:key=
"index2"
class=
"flex item2 flex_start_center"
>
<template
v-if=
"isOperate"
>
<template
v-if=
"isOperate"
>
<view
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item2.IsAnswer }"
class=
"chooseNum"
@click="change(item1, item2)">
{{
item2
.
ShowName
}}
:class=
"
{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)"
>
{{
item2
.
ShowName
}}
</view>
</view>
<view
<view
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<view
<view
class=
"chooseNum"
:class=
"
{ isTrueAnswer: item2.IsAnswer }">
{{
item2
.
Name
}}
class=
"chooseNum"
</view>
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }">
{{
item2
.
Content
}}
>
{{
item2
.
Name
}}
</view
</view>
>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item2.IsAnswer }"
>
{{
item2
.
Content
}}
</view
>
</
template
>
</
template
>
</view>
</view>
</view>
</view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
<text
class=
"isTrueAnswer"
>
{{item1.Answer}}
</text>
,
getTrueAnswer(item1.QuestionContentObj)
}}
</text
>
,
<text>
<text>
您的答案:
您的答案:
<
template
v-if=
"item1.StundetAnswer != ''"
>
<
template
v-if=
"item1.StundetAnswer != ''"
>
<text
<text
v-if=
"item1.Answer == item1.StundetAnswer"
class=
"isTrueAnswer"
>
v-if=
"
getTrueAnswer(item1.QuestionContentObj) ==
item1.StundetAnswer
"
class=
"isTrueAnswer"
>
{{
item1
.
StundetAnswer
}}
{{
item1
.
StundetAnswer
}}
</text>
</text>
<text
v-else
class=
"isNotAnswer"
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text>
>
{{
item1
.
StundetAnswer
}}
,回答错误
</text
>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<text>
未作答
</text>
<text>
未作答
</text>
...
@@ -91,10 +56,7 @@
...
@@ -91,10 +56,7 @@
</view>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<view
<view
style=
"color: #000; display: inline-block"
v-html=
"item1.AnswerParse"
></view>
style=
"color: #000; display: inline-block"
v-html=
"item1.AnswerParse"
></view>
</view>
</view>
</view>
</view>
</swiper-item>
</swiper-item>
...
@@ -106,7 +68,7 @@
...
@@ -106,7 +68,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
import
{
ref
,
ref
,
reactive
,
reactive
,
toRefs
,
toRefs
,
...
@@ -115,9 +77,11 @@ import {
...
@@ -115,9 +77,11 @@ import {
watch
,
watch
,
computed
,
computed
,
onMounted
,
onMounted
,
}
from
"vue"
;
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
import
{
export
default
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
props
:
{
paperData
:
Object
,
paperData
:
Object
,
sort
:
Number
,
sort
:
Number
,
...
@@ -127,7 +91,9 @@ export default {
...
@@ -127,7 +91,9 @@ export default {
isOperate
:
Boolean
,
isOperate
:
Boolean
,
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
let
data
=
reactive
({
autoplay
:
false
,
autoplay
:
false
,
sortIndex
:
props
.
sort
+
1
,
sortIndex
:
props
.
sort
+
1
,
...
@@ -182,19 +148,7 @@ export default {
...
@@ -182,19 +148,7 @@ export default {
if
(
e
.
detail
.
current
==
0
)
{
if
(
e
.
detail
.
current
==
0
)
{
this
.
$emit
(
"getBeforeTopic"
);
this
.
$emit
(
"getBeforeTopic"
);
}
}
},
//获取正确答案
getTrueAnswer
(
item
)
{
let
AnSwer
=
""
;
if
(
item
&&
item
.
length
>
0
)
{
item
.
forEach
((
x
)
=>
{
if
(
x
.
IsAnswer
)
{
AnSwer
=
x
.
Name
;
}
});
}
}
return
AnSwer
;
},
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
if
(
props
.
isLast
)
{
...
@@ -212,10 +166,10 @@ export default {
...
@@ -212,10 +166,10 @@ export default {
...
methods
,
...
methods
,
};
};
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
height
:
90
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
...
@@ -224,69 +178,69 @@ export default {
...
@@ -224,69 +178,69 @@ export default {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.ExamIndex_Box
{
.ExamIndex_Box
{
margin-right
:
20px
;
margin-right
:
20px
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#da7878
;
color
:
#da7878
;
}
}
.isTrueAnswer
{
.isTrueAnswer
{
color
:
green
!important
;
color
:
green
!important
;
}
}
.isNotAnswer
{
.isNotAnswer
{
color
:
red
!important
;
color
:
red
!important
;
}
}
.AnswerContent
{
.AnswerContent
{
font-size
:
30
rpx
;
font-size
:
30
rpx
;
padding
:
25
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
border-radius
:
5px
;
}
}
.Exam_Total
{
.Exam_Total
{
font-size
:
25
rpx
;
font-size
:
25
rpx
;
color
:
gray
;
color
:
gray
;
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.item
{
.item
{
margin-bottom
:
40
rpx
;
margin-bottom
:
40
rpx
;
}
}
.item1
{
.item1
{
align-items
:
center
;
align-items
:
center
;
}
}
.item2
{
.item2
{
padding-left
:
25
rpx
;
padding-left
:
25
rpx
;
margin
:
30
rpx
0
;
margin
:
30
rpx
0
;
}
}
.myAnswer
{
.myAnswer
{
background-color
:
#00acf9
!important
;
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
text-align
:
center
;
...
@@ -298,12 +252,12 @@ export default {
...
@@ -298,12 +252,12 @@ export default {
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#111111
;
color
:
#111111
;
}
}
</
style
>
</
style
>
src/pages/exam/examPaper.vue
View file @
eda2056c
...
@@ -85,6 +85,7 @@
...
@@ -85,6 +85,7 @@
:isLast=
"isLast"
:isLast=
"isLast"
:sort=
"index"
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isOperate=
"isOperate"
@
getBeforeTopic=
"getBeforeTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
answerChange=
"getAnswerChange($event, index)"
@
answerChange=
"getAnswerChange($event, index)"
...
@@ -212,6 +213,7 @@
...
@@ -212,6 +213,7 @@
:isLast=
"isLast"
:isLast=
"isLast"
:sort=
"index"
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isOperate=
"isOperate"
@
getAfterTopic=
"getAfterTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
answerChange=
"getAnswerChange($event, index)"
@
answerChange=
"getAnswerChange($event, index)"
...
@@ -224,6 +226,7 @@
...
@@ -224,6 +226,7 @@
:isLast=
"isLast"
:isLast=
"isLast"
:sort=
"index"
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isOperate=
"isOperate"
@
getAfterTopic=
"getAfterTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
answerChange=
"getAnswerChange($event, index)"
@
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