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
9e89deae
Commit
9e89deae
authored
Sep 13, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
c1317f2b
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
2708 additions
and
2337 deletions
+2708
-2337
Calculation.vue
src/components/subject/Calculation.vue
+249
-215
Dataquestion.vue
src/components/subject/Dataquestion.vue
+248
-213
EntryProblem.vue
src/components/subject/EntryProblem.vue
+254
-220
FillInTheBlanks.vue
src/components/subject/FillInTheBlanks.vue
+216
-172
MultipleChoice.vue
src/components/subject/MultipleChoice.vue
+241
-195
SingleChoice.vue
src/components/subject/SingleChoice.vue
+16
-6
SingleChoiceNumber.vue
src/components/subject/SingleChoiceNumber.vue
+263
-215
SortingProblem.vue
src/components/subject/SortingProblem.vue
+246
-275
easyQuestion.vue
src/components/subject/easyQuestion.vue
+249
-215
judge.vue
src/components/subject/judge.vue
+241
-194
nounExplanation.vue
src/components/subject/nounExplanation.vue
+236
-206
shortAnswer.vue
src/components/subject/shortAnswer.vue
+236
-205
examPaper.vue
src/pages/exam/examPaper.vue
+13
-6
No files found.
src/components/subject/Calculation.vue
View file @
9e89deae
...
...
@@ -5,22 +5,14 @@
<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"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper-item></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
...
...
@@ -28,16 +20,26 @@
<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"
@
input=
"sendData(item1)"
placeholder=
"请填写答案"
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
<textarea
type=
"text"
v-model=
"item1.Answer"
class=
"input textarea"
@
input=
"sendData(item1)"
placeholder=
"请填写答案"
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
</view>
</
template
>
<
template
v-else
>
<view
class=
"viewAnswerContent"
style=
"margin-top:20px;"
>
{{
item1
.
Answer
}}
</view>
</
template
>
</view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
style=
"margin-top:30rpx;"
>
<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>
...
...
@@ -49,7 +51,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -58,18 +60,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
{
proxy
}
=
getCurrentInstance
();
let
{
proxy
}
=
getCurrentInstance
();
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
item
.
myAnswer
=
""
;
});
...
...
@@ -80,6 +87,7 @@ export default {
sortTotal
:
props
.
sortTotal
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
isOperate
:
props
.
isOperate
});
if
(
props
.
startIndex
)
{
data
.
current
=
props
.
startIndex
;
...
...
@@ -125,10 +133,10 @@ export default {
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -137,49 +145,75 @@ 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
;
}
.Single_Before
{
}
.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
;
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
;
...
...
@@ -191,32 +225,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/Dataquestion.vue
View file @
9e89deae
...
...
@@ -5,47 +5,50 @@
<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"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper-item></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=
"flex flex_start_center"
>
<view>
{{
index1
+
1
}}
、
</view>
<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"
>
<view
class=
"chooseNum"
>
{{
index2
+
1
}}
</view>
<template
v-if=
"isOperate"
>
<view
class=
"chooseName"
>
<input
type=
"text"
v-model=
"item2.Content"
@
input=
"sendData(item1)"
:placeholder=
"'请填写第 ' + (index2 + 1) + ' 空答案'"
class=
"input"
/>
<input
type=
"text"
v-model=
"item2.Content"
@
input=
"sendData(item1)"
:placeholder=
"'请填写第 ' + (index2 + 1) + ' 空答案'"
class=
"input"
/>
</view>
</
template
>
<
template
v-else
>
<view
class=
"viewAnswerContent"
v-html=
"item2.Content"
></view>
</
template
>
</view>
</view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
您的答案:
<
template
v-if=
"item1.AnswerList&&item1.AnswerList.length>0"
>
<view
v-for=
"(cItem,cIndex) in item1.AnswerList"
class=
"flex"
style=
"margin-top:20rpx;"
>
<view
class=
"chooseNum"
>
{{
cIndex
+
1
}}
</view>
<view
class=
"viewAnswerContent"
>
{{
cItem
==
''
?
'未作答'
:
cItem
}}
</view>
</view>
</
template
>
</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>
...
...
@@ -57,7 +60,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -66,18 +69,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
();
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
item
.
myAnswer
=
""
;
});
...
...
@@ -88,6 +96,7 @@ export default {
sortTotal
:
props
.
sortTotal
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
isOperate
:
props
.
isOperate
});
let
methods
=
{
...
...
@@ -128,10 +137,10 @@ export default {
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -140,81 +149,107 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.Exam_Total
{
}
.Exam_Total
{
font-size
:
25
rpx
;
color
:
gray
;
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.Single_Before
{
}
.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
{
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
:
50
rpx
0
;
}
}
.choose
{
.choose
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
text-align
:
center
;
margin-right
:
25
rpx
;
font-size
:
26
rpx
;
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/EntryProblem.vue
View file @
9e89deae
...
...
@@ -5,22 +5,14 @@
<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"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper-item></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
...
...
@@ -28,21 +20,35 @@
<view>
{{
index1
+
1
}}
、
</view>
<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"
>
<view
class=
"chooseNum"
>
{{
index2
+
1
}}
</view>
<template
v-if=
"isOperate"
>
<view
class=
"chooseName"
>
<input
type=
"text"
v-model=
"item2.Content"
class=
"input"
:placeholder=
"'请填写第 ' + (index2 + 1) + ' 空答案'"
@
input=
"sendData(item1)"
/>
<input
type=
"text"
v-model=
"item2.Content"
class=
"input"
:placeholder=
"'请填写第 ' + (index2 + 1) + ' 空答案'"
@
input=
"sendData(item1)"
/>
</view>
</
template
>
<
template
v-else
>
<view
class=
"viewAnswerContent"
v-html=
"item2.Content"
></view>
</
template
>
</view>
</view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
您的答案:
<
template
v-if=
"item1.AnswerList&&item1.AnswerList.length>0"
>
<view
v-for=
"(cItem,cIndex) in item1.AnswerList"
class=
"flex"
style=
"margin-top:20rpx;"
>
<view
class=
"chooseNum"
>
{{
cIndex
+
1
}}
</view>
<view
class=
"viewAnswerContent"
>
{{
cItem
==
''
?
'未作答'
:
cItem
}}
</view>
</view>
</
template
>
</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>
...
...
@@ -54,7 +60,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -63,18 +69,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
();
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
item
.
myAnswer
=
""
;
});
...
...
@@ -85,13 +96,14 @@ export default {
sortTotal
:
props
.
sortTotal
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
isOperate
:
props
.
isOperate
});
if
(
props
.
startIndex
)
{
data
.
current
=
props
.
startIndex
;
data
.
ExamIndex
=
props
.
startIndex
;
}
watch
(
data
.
data
,
(
newVal
,
oldVal
)
=>
{
if
(
newVal
)
{
if
(
newVal
)
{
context
.
emit
(
"answerChange"
,
newVal
);
}
});
...
...
@@ -133,10 +145,10 @@ export default {
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -145,83 +157,105 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.Exam_Total
{
}
.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
;
}
.Exam_Total
{
font-size
:
25
rpx
;
color
:
gray
;
}
.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
:
50
rpx
0
;
}
}
.choose
{
.choose
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
text-align
:
center
;
margin-right
:
25
rpx
;
font-size
:
26
rpx
;
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/FillInTheBlanks.vue
View file @
9e89deae
...
...
@@ -5,16 +5,11 @@
<view
class=
"name"
>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
</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"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper-item></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
...
...
@@ -22,15 +17,35 @@
<view>
{{
index1
+
1
}}
、
</view>
<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"
>
<view
class=
"chooseNum"
>
{{
index2
+
1
}}
</view>
<template
v-if=
"isOperate"
>
<view
class=
"chooseName"
>
<input
type=
"text"
v-model=
"item2.Content"
@
input=
"getIsRes(item1)"
:placeholder=
"'请填写第 '+(index2+1)+' 空答案'"
class=
"input"
/>
<input
type=
"text"
v-model=
"item2.Content"
@
input=
"getIsRes(item1)"
:placeholder=
"'请填写第 '+(index2+1)+' 空答案'"
class=
"input"
/>
</view>
</
template
>
<
template
v-else
>
<view
class=
"viewAnswerContent"
v-html=
"item2.Content"
></view>
</
template
>
</view>
</view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
您的答案:
<
template
v-if=
"item1.AnswerList&&item1.AnswerList.length>0"
>
<view
v-for=
"(cItem,cIndex) in item1.AnswerList"
class=
"flex"
style=
"margin-top:20rpx;"
>
<view
class=
"chooseNum"
>
{{
cIndex
+
1
}}
</view>
<view
class=
"viewAnswerContent"
>
{{
cItem
==
''
?
'未作答'
:
cItem
}}
</view>
</view>
</
template
>
</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>
...
...
@@ -42,7 +57,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -51,18 +66,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
,
isLast
:
Boolean
,
sort
:
Number
,
sortTotal
:
Number
,
startIndex
:
Number
,
isOperate
:
Boolean
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
{
ctx
}
=
getCurrentInstance
();
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
item
.
myAnswer
=
""
;
});
...
...
@@ -72,6 +92,7 @@ export default {
sortTotal
:
props
.
sortTotal
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
isOperate
:
props
.
isOperate
});
if
(
props
.
startIndex
)
{
data
.
current
=
props
.
startIndex
;
...
...
@@ -95,9 +116,9 @@ export default {
this
.
$emit
(
"getBeforeTopic"
);
}
},
getIsRes
(
item1
)
{
getIsRes
(
item1
)
{
item1
.
IsRes
=
item1
.
QuestionContentObj
.
some
((
e
)
=>
{
return
e
.
Content
!=
''
&&
e
.
Content
;
return
e
.
Content
!=
''
&&
e
.
Content
;
});
}
};
...
...
@@ -106,10 +127,10 @@ export default {
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -118,49 +139,72 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.Single_Before
{
}
.isTrueAnswer
{
color
:
green
!important
;
}
.isNotAnswer
{
color
:
red
!important
;
}
.AnswerContent
{
font-size
:
30
rpx
;
padding
:
25
rpx
;
background-color
:
#F4F4F4
;
border-radius
:
5px
;
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.Single_Before
{
font-size
:
28
rpx
;
font-weight
:
bold
;
color
:
#da7878
;
}
.Exam_Total
{
}
.viewAnswerContent
{
width
:
100%
;
border-bottom
:
1px
solid
#d1d1d1
;
padding-bottom
:
5px
;
}
.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: 25rpx; */
margin
:
30
rpx
0
;
}
}
.choose
{
.choose
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
height
:
40
rpx
;
text-align
:
center
;
line-height
:
40
rpx
;
...
...
@@ -169,18 +213,18 @@ 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
;
}
}
</
style
>
src/components/subject/MultipleChoice.vue
View file @
9e89deae
...
...
@@ -5,45 +5,55 @@
<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"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper-item></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
class=
"chooseNum"
:class=
"
{
myAnswer: item2.IsAnswer,
}"
@click="change(item1, item2)"
>
{{
item2
.
ShowName
}}
<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>
<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>
</
template
>
</view>
</view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
<text
style=
"color:#8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{getTrueAnswer(item1.QuestionContentObj)}}
</text>
,
<text>
您的答案:
<
template
v-if=
"item1.StundetAnswer!=''"
>
<text
v-if=
"getTrueAnswer(item1.QuestionContentObj)==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>
...
...
@@ -55,7 +65,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -64,15 +74,18 @@ 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
,
sort
:
Number
,
sortTotal
:
Number
,
startIndex
:
Number
,
isOperate
:
Boolean
},
setup
(
props
,
context
)
{
let
data
=
reactive
({
...
...
@@ -82,6 +95,7 @@ export default {
autoplay
:
false
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
isOperate
:
props
.
isOperate
});
if
(
props
.
startIndex
)
{
data
.
current
=
props
.
startIndex
;
...
...
@@ -104,7 +118,7 @@ export default {
item1
.
IsRes
=
item1
.
QuestionContentObj
.
some
((
e
)
=>
{
return
e
.
IsAnswer
;
});
console
.
log
(
item1
,
'item1'
);
console
.
log
(
item1
,
'item1'
);
context
.
emit
(
"answerChange"
,
data
.
data
);
},
onchange
(
e
)
{
...
...
@@ -117,6 +131,18 @@ export default {
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
)
{
...
...
@@ -130,10 +156,10 @@ export default {
};
},
onLoad
()
{},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -142,50 +168,70 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.ExamIndex_Box
{
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.Single_Before
{
}
.isTrueAnswer
{
color
:
green
!important
;
}
.isNotAnswer
{
color
:
red
!important
;
}
.AnswerContent
{
font-size
:
30
rpx
;
padding
:
25
rpx
;
background-color
:
#F4F4F4
;
border-radius
:
5px
;
}
.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
;
...
...
@@ -197,12 +243,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/SingleChoice.vue
View file @
9e89deae
...
...
@@ -45,12 +45,23 @@
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
<text
style=
"color:#8c8a94"
>
正确答案:
</text>
<text
style=
"color:green;"
>
{{getTrueAnswer(item1.QuestionContentObj)}}
</text>
,
<text>
您的答案:{{item1.StundetAnswer==''?'未作答':item1.StundetAnswer}}
</text>
<text
class=
"isTrueAnswer"
>
{{getTrueAnswer(item1.QuestionContentObj)}}
</text>
,
<text>
您的答案:
<
template
v-if=
"item1.StundetAnswer!=''"
>
<text
v-if=
"getTrueAnswer(item1.QuestionContentObj)==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>
<text>
{{item1.AnswerParse}}
</text>
<text
style=
"color:#000;"
>
{{item1.AnswerParse}}
</text>
</view>
</view>
</swiper-item>
...
...
@@ -97,8 +108,7 @@
data
:
props
.
paperData
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
isOperate
:
props
.
isOperate
,
TrueAnswer
:
''
isOperate
:
props
.
isOperate
});
if
(
props
.
startIndex
)
{
data
.
current
=
props
.
startIndex
;
...
...
@@ -190,7 +200,7 @@
}
.isNotAnswer
{
color
:
green
!important
;
color
:
red
!important
;
}
.AnswerContent
{
font-size
:
30
rpx
;
...
...
src/components/subject/SingleChoiceNumber.vue
View file @
9e89deae
...
...
@@ -5,22 +5,15 @@
<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"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
:skip-hidden-item-layout=
"true"
>
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
:skip-hidden-item-layout=
"true"
>
<swiper-item>
<!-- 第一页 -->
</swiper-item>
...
...
@@ -29,23 +22,41 @@
<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
class=
"chooseNum"
:class=
"
{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)"
>
{{
item2
.
ShowName
}}
<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>
<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>
</
template
>
</view>
<view
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
</view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
<text
style=
"color:#8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{getTrueAnswer(item1.QuestionContentObj)}}
</text>
,
<text>
您的答案:
<
template
v-if=
"item1.StundetAnswer!=''"
>
<text
v-if=
"getTrueAnswer(item1.QuestionContentObj)==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>
<text
style=
"color:#000;"
>
{{item1.AnswerParse}}
</text>
</view>
</view>
</swiper-item>
...
...
@@ -59,7 +70,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -68,19 +79,24 @@ 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
,
ExamStatus
:
Number
ExamStatus
:
Number
,
isOperate
:
Boolean
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
autoplay
:
false
,
sortIndex
:
props
.
sort
+
1
,
//大题序号
...
...
@@ -88,6 +104,7 @@ export default {
data
:
props
.
paperData
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
isOperate
:
props
.
isOperate
});
if
(
props
.
startIndex
)
{
data
.
current
=
props
.
startIndex
;
...
...
@@ -125,6 +142,18 @@ export default {
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
)
{
...
...
@@ -137,10 +166,10 @@ export default {
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -149,57 +178,76 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.swiper-box
{
}
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
}
.Single_Before
{
}
.isTrueAnswer
{
color
:
green
!important
;
}
.isNotAnswer
{
color
:
red
!important
;
}
.AnswerContent
{
font-size
:
30
rpx
;
padding
:
25
rpx
;
background-color
:
#F4F4F4
;
border-radius
:
5px
;
}
.Single_Before
{
font-size
:
28
rpx
;
font-weight
:
bold
;
color
:
#da7878
;
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.Exam_Total
{
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.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
;
...
...
@@ -211,12 +259,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/SortingProblem.vue
View file @
9e89deae
...
...
@@ -5,76 +5,38 @@
<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"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper-item></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=
"flex flex_start_center"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
<template
v-if=
"
item1.QuestionContentObj[0] &&
item1.QuestionContentObj[0].length > 0
"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj[0]"
:key=
"index2"
>
<template
v-if=
"item1.QuestionContentObj[0] && item1.QuestionContentObj[0].length > 0"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj[0]"
:key=
"index2"
>
<view
class=
"flex item2 flex_start_center"
>
<view
class=
"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=
"
item1.QuestionContentObj[1] &&
item1.QuestionContentObj[1].length > 0
"
>
<view
v-for=
"(item3, index3) in item1.QuestionContentObj[1]"
:key=
"index3"
style=
"margin-bottom: 20px"
>
<van-button
type=
"primary"
size=
"small"
@
click=
"alertMenu(item3)"
>
<
template
v-if=
"item1.QuestionContentObj[1] && item1.QuestionContentObj[1].length > 0"
>
<view
v-for=
"(item3, index3) in item1.QuestionContentObj[1]"
:key=
"index3"
style=
"margin-bottom: 20px"
>
<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
>
</view>
...
...
@@ -87,7 +49,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -96,9 +58,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
,
...
...
@@ -107,7 +71,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
)
=>
{
...
...
@@ -128,7 +94,7 @@ export default {
data
.
ExamIndex
=
props
.
startIndex
;
}
watch
(
data
.
data
,
(
newVal
,
oldVal
)
=>
{
if
(
newVal
)
{
if
(
newVal
)
{
context
.
emit
(
"answerChange"
,
newVal
);
}
});
...
...
@@ -165,7 +131,7 @@ export default {
onSelect
(
e
,
item3
,
item1
)
{
item3
.
isShow
=
false
;
item3
.
Name
=
e
.
detail
.
name
;
if
(
item1
.
QuestionContentObj
&&
item1
.
QuestionContentObj
[
1
].
length
>
0
)
{
if
(
item1
.
QuestionContentObj
&&
item1
.
QuestionContentObj
[
1
].
length
>
0
)
{
item1
.
IsRes
=
item1
.
QuestionContentObj
[
1
].
some
((
e
)
=>
{
return
e
.
Name
&&
e
.
Name
!=
""
;
});
...
...
@@ -195,10 +161,10 @@ export default {
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -207,49 +173,54 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.Exam_Total
{
}
.Exam_Total
{
font-size
:
25
rpx
;
color
:
gray
;
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.Single_Before
{
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.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
;
...
...
@@ -261,32 +232,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/easyQuestion.vue
View file @
9e89deae
...
...
@@ -5,22 +5,14 @@
<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"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper-item></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
...
...
@@ -28,16 +20,26 @@
<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"
@
input=
"sendData(item1)"
placeholder=
"请填写答案"
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
<textarea
type=
"text"
v-model=
"item1.Answer"
class=
"input textarea"
@
input=
"sendData(item1)"
placeholder=
"请填写答案"
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
</view>
</
template
>
<
template
v-else
>
<view
class=
"viewAnswerContent"
style=
"margin-top:20px;"
>
{{
item1
.
Answer
}}
</view>
</
template
>
</view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
style=
"margin-top:30rpx;"
>
<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>
...
...
@@ -49,7 +51,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -58,18 +60,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
();
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
item
.
myAnswer
=
""
;
});
...
...
@@ -80,6 +87,7 @@ export default {
sortTotal
:
props
.
sortTotal
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
isOperate
:
props
.
isOperate
});
if
(
props
.
startIndex
)
{
data
.
current
=
props
.
startIndex
;
...
...
@@ -106,9 +114,9 @@ export default {
}
},
sendData
(
item1
)
{
if
(
item1
.
Answer
&&
item1
.
Answer
!=
''
)
{
if
(
item1
.
Answer
&&
item1
.
Answer
!=
''
)
{
item1
.
IsRes
=
true
;
}
else
{
}
else
{
item1
.
IsRes
=
false
;
}
context
.
emit
(
"answerChange"
,
data
.
data
);
...
...
@@ -125,10 +133,10 @@ export default {
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -137,49 +145,75 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.ExamIndex_Box
{
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.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
;
color
:
gray
;
}
.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
;
...
...
@@ -191,32 +225,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/judge.vue
View file @
9e89deae
...
...
@@ -5,44 +5,53 @@
<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"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper-item></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
class=
"chooseNum"
:class=
"
{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)"
>
{{
item2
.
Name
}}
<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>
<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>
</
template
>
</view>
</view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
>
<view>
<text
style=
"color:#8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{getTrueAnswer(item1.QuestionContentObj)}}
</text>
,
<text>
您的答案:
<
template
v-if=
"item1.StundetAnswer!=''"
>
<text
v-if=
"getTrueAnswer(item1.QuestionContentObj)==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
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></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>
...
...
@@ -54,7 +63,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -63,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
({
autoplay
:
false
,
sortIndex
:
props
.
sort
+
1
,
...
...
@@ -82,6 +96,7 @@ export default {
data
:
props
.
paperData
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
isOperate
:
props
.
isOperate
});
if
(
props
.
startIndex
)
{
data
.
current
=
props
.
startIndex
;
...
...
@@ -118,6 +133,18 @@ export default {
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
)
{
...
...
@@ -130,10 +157,10 @@ export default {
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -142,49 +169,69 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.Single_Before
{
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.Single_Before
{
font-size
:
28
rpx
;
font-weight
:
bold
;
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
;
}
.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
;
...
...
@@ -196,12 +243,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/nounExplanation.vue
View file @
9e89deae
...
...
@@ -5,22 +5,14 @@
<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"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper-item></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
...
...
@@ -28,16 +20,26 @@
<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"
@
input=
"sendData(item1)"
placeholder=
"请填写答案"
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
<textarea
type=
"text"
v-model=
"item1.Answer"
class=
"input textarea"
@
input=
"sendData(item1)"
placeholder=
"请填写答案"
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
</view>
</
template
>
<
template
v-else
>
<view
class=
"viewAnswerContent"
>
{{
item1
.
Answer
}}
</view>
</
template
>
</view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
style=
"margin-top:30rpx;"
>
<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>
...
...
@@ -49,7 +51,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -58,18 +60,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
();
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
item
.
myAnswer
=
""
;
});
...
...
@@ -80,6 +87,7 @@ export default {
sortTotal
:
props
.
sortTotal
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
isOperate
:
props
.
isOperate
});
if
(
props
.
startIndex
)
{
data
.
current
=
props
.
startIndex
;
...
...
@@ -106,9 +114,9 @@ export default {
}
},
sendData
(
item1
)
{
if
(
item1
.
Answer
&&
item1
.
Answer
!=
''
)
{
if
(
item1
.
Answer
&&
item1
.
Answer
!=
''
)
{
item1
.
IsRes
=
true
;
}
else
{
}
else
{
item1
.
IsRes
=
false
;
}
context
.
emit
(
"answerChange"
,
data
.
data
);
...
...
@@ -125,10 +133,10 @@ export default {
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -137,49 +145,71 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.Exam_Total
{
}
.Exam_Total
{
font-size
:
25
rpx
;
color
:
gray
;
}
.ExamIndex_Box
{
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.Single_Before
{
}
.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
;
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
;
...
...
@@ -191,32 +221,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/shortAnswer.vue
View file @
9e89deae
...
...
@@ -5,22 +5,14 @@
<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"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper-item></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
...
...
@@ -28,15 +20,26 @@
<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"
@
input=
"sendData(item1)"
class=
"input textarea"
placeholder=
"请填写答案"
:maxlength=
"-1"
/>
<textarea
type=
"text"
v-model=
"item1.Answer"
@
input=
"sendData(item1)"
class=
"input textarea"
placeholder=
"请填写答案"
:maxlength=
"-1"
/>
</view>
</
template
>
<
template
v-else
>
<view
class=
"viewAnswerContent"
v-html=
"item2.Answer"
></view>
</
template
>
</view>
<view
class=
"AnswerContent"
v-if=
"!isOperate"
style=
"margin-top:30rpx;"
>
<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>
...
...
@@ -48,7 +51,7 @@
</template>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -57,18 +60,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
();
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
item
.
myAnswer
=
""
;
});
...
...
@@ -80,6 +88,7 @@ export default {
sortIndex
:
props
.
sort
+
1
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
isOperate
:
props
.
isOperate
});
if
(
props
.
startIndex
)
{
data
.
current
=
props
.
startIndex
;
...
...
@@ -106,9 +115,9 @@ export default {
}
},
sendData
(
item1
)
{
if
(
item1
.
Answer
&&
item1
.
Answer
!=
''
)
{
if
(
item1
.
Answer
&&
item1
.
Answer
!=
''
)
{
item1
.
IsRes
=
true
;
}
else
{
}
else
{
item1
.
IsRes
=
false
;
}
context
.
emit
(
"answerChange"
,
data
.
data
);
...
...
@@ -125,10 +134,10 @@ export default {
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -137,49 +146,71 @@ export default {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.Exam_Total
{
}
.Exam_Total
{
font-size
:
25
rpx
;
color
:
gray
;
}
.ExamIndex_Box
{
}
.ExamIndex_Box
{
margin-right
:
20px
;
}
.Single_Before
{
}
.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
;
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
;
...
...
@@ -191,32 +222,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/pages/exam/examPaper.vue
View file @
9e89deae
...
...
@@ -47,6 +47,7 @@
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isLast=
"isLast"
:isOperate=
"isOperate"
v-if=
"item.QuestionTypeKey === 'single-number' && index === changeIndex"
/>
<!-- 多选题 -->
...
...
@@ -56,6 +57,7 @@
:isLast=
"isLast"
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isOperate=
"isOperate"
@
getBeforeTopic=
"getBeforeTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
answerChange=
"getAnswerChange($event, index)"
...
...
@@ -93,6 +95,7 @@
:isLast=
"isLast"
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isOperate=
"isOperate"
@
getBeforeTopic=
"getBeforeTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
answerChange=
"getAnswerChange($event, index)"
...
...
@@ -121,6 +124,7 @@
:isLast=
"isLast"
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isOperate=
"isOperate"
@
getAfterTopic=
"getAfterTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
answerChange=
"getAnswerChange($event, index)"
...
...
@@ -133,12 +137,11 @@
:isLast=
"isLast"
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isOperate=
"isOperate"
@
getAfterTopic=
"getAfterTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
answerChange=
"getAnswerChange($event, index)"
v-if=
"
item.QuestionTypeKey === 'short-answer' && index === changeIndex
"
v-if=
"item.QuestionTypeKey === 'short-answer' && index === changeIndex"
/>
<!-- 名词解释 -->
<nounExplanation
...
...
@@ -147,6 +150,7 @@
:isLast=
"isLast"
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isOperate=
"isOperate"
@
getAfterTopic=
"getAfterTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
answerChange=
"getAnswerChange($event, index)"
...
...
@@ -161,6 +165,7 @@
:isLast=
"isLast"
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isOperate=
"isOperate"
@
getAfterTopic=
"getAfterTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
answerChange=
"getAnswerChange($event, index)"
...
...
@@ -175,6 +180,7 @@
:isLast=
"isLast"
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isOperate=
"isOperate"
@
getAfterTopic=
"getAfterTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
answerChange=
"getAnswerChange($event, index)"
...
...
@@ -187,6 +193,7 @@
:isLast=
"isLast"
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isOperate=
"isOperate"
@
getAfterTopic=
"getAfterTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
answerChange=
"getAnswerChange($event, index)"
...
...
@@ -237,6 +244,7 @@
:isLast=
"isLast"
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isOperate=
"isOperate"
@
getAfterTopic=
"getAfterTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
answerChange=
"getAnswerChange($event, index)"
...
...
@@ -265,12 +273,11 @@
:isLast=
"isLast"
:sort=
"index"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:isOperate=
"isOperate"
@
getAfterTopic=
"getAfterTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
answerChange=
"getAnswerChange($event, index)"
v-if=
"
item.QuestionTypeKey === 'sorting-problem' && index === changeIndex
"
v-if=
"item.QuestionTypeKey === 'sorting-problem' && index === changeIndex"
/>
<!-- 连线题待完善 -->
<Connect
...
...
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