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
b7fef7dc
Commit
b7fef7dc
authored
Sep 14, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
bfc29922
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
237 additions
and
87 deletions
+237
-87
readingCompre.vue
src/components/subject/readingCompre.vue
+223
-86
index.vue
src/pages/index/index.vue
+14
-0
index.js
src/utils/index.js
+0
-1
No files found.
src/components/subject/readingCompre.vue
View file @
b7fef7dc
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<swiper
<swiper
class=
"swiper-box"
class=
"swiper-box"
:style=
"
{
:style=
"
{
height: `calc(100vh -
3
00rpx - ${statusBarHeight}px)`,
height: `calc(100vh -
2
00rpx - ${statusBarHeight}px)`,
}"
}"
:autoplay="autoplay"
:autoplay="autoplay"
:current="current"
:current="current"
...
@@ -41,91 +41,219 @@
...
@@ -41,91 +41,219 @@
@
touchend=
"touchend"
@
touchend=
"touchend"
>
本阅读理解共5小题
</view
>
本阅读理解共5小题
</view
>
>
<view
class=
"questionView"
>
<template
v-if=
"!isOperate"
>
<view
<view
class=
"questionView"
>
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"item2"
>
<view
class=
"flex questionTitle"
>
<view
>
{{
index2
+
1
}}
、(
{{
item2
.
QuestionName
}}
,
{{
item2
.
SubScore
}}
分)
</view
>
<view
v-html=
"item2.SubTitle"
></view>
</view>
<view
<view
v-for=
"(item3, index3) in item2.SubAnwser"
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index3"
:key=
"index2"
class=
"item2"
>
>
<!-- 单选 、判断-->
<view
class=
"flex questionTitle"
>
<view
style=
"white-space: nowrap"
>
{{
index2
+
1
}}
、(
{{
item2
.
QuestionName
.
slice
(
0
,
2
)
}}
)
</view
>
<view
v-html=
"item2.SubTitle"
class=
"grow"
></view>
</view>
<view
<view
class=
"flex flex_start_center item3"
v-for=
"(item3, index3) in item2.SubAnwser"
v-if=
"
:key=
"index3"
item2.QuestionKey === 'single' ||
item2.QuestionKey === 'judge'
"
>
>
<!-- 单选 、判断-->
<view
<view
class=
"chooseNum"
class=
"flex flex_start_center item3"
:class=
"
{ myAnswer: item3.IsAnswer }"
v-if=
"
@click="singerChange(item2, item3)"
item2.QuestionKey === 'single' ||
>
{{
item3
.
Name
}}
item2.QuestionKey === 'judge'
"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item3.IsAnswer }"
@click="singerChange(item2, item3)"
>
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
@
click=
"singerChange(item2, item3)"
v-html=
"item3.Content"
></view>
</view>
</view>
<!-- 多选 -->
<view
<view
class=
"chooseName"
class=
"flex flex_start_center item3"
@
click=
"singerChange(item2, item3)"
v-if=
"item2.QuestionKey === 'multiple'"
v-html=
"item3.Content"
>
></view>
<view
</view>
class=
"chooseNum"
<!-- 多选 -->
:class=
"
{ myAnswer: item3.IsAnswer }"
<view
@click="multipleChange(item2, item3)"
class=
"flex flex_start_center item3"
>
{{
item3
.
Name
}}
v-if=
"item2.QuestionKey === 'multiple'"
</view>
>
<view
class=
"chooseName"
@
click=
"multipleChange(item2, item3)"
v-html=
"item3.Content"
></view>
</view>
<!-- 填空 -->
<view
<view
class=
"chooseNum"
class=
"flex flex_start_center item3"
:class=
"
{ myAnswer: item3.IsAnswer }"
v-if=
"item2.QuestionKey === 'fill-in'"
@click="multipleChange(item2, item3)"
>
>
{{
item3
.
Name
}}
<view
class=
"chooseNum"
>
{{
index3
+
1
}}
</view>
<input
type=
"text"
v-model=
"item3.Content"
class=
"chooseName chooseName2"
placeholder=
"请填写答案"
@
input=
"AnswerChange(item2)"
/>
</view>
</view>
<!-- 简答 -->
<view
<view
class=
"chooseName"
class=
"flex flex_start_center item3"
@
click=
"multipleChange(item2, item3)"
v-if=
"item2.QuestionKey === 'short-answer'"
v-html=
"item3.Content"
>
></view>
<textarea
type=
"text"
v-model=
"item3.Content"
class=
"chooseName chooseName2"
placeholder=
"请填写答案"
@
input=
"AnswerChange(item2)"
/>
</view>
</view>
</view>
<!-- 填空 -->
</view>
<view
</view>
class=
"flex flex_start_center item3"
</
template
>
v-if=
"item2.QuestionKey === 'fill-in'"
<
template
v-else
>
>
<view
class=
"questionView"
>
<view
class=
"chooseNum"
>
{{
index3
+
1
}}
</view>
<view
<input
v-for=
"(item2, index2) in item1.QuestionContentObj"
type=
"text"
:key=
"index2"
v-model=
"item3.Content"
class=
"item2"
class=
"chooseName chooseName2"
>
placeholder=
"请填写答案"
<view
class=
"flex questionTitle"
>
@
input=
"AnswerChange(item2)"
<view
style=
"white-space: nowrap"
/>
>
{{
index2
+
1
}}
、(
{{
item2
.
QuestionName
.
slice
(
0
,
2
)
}}
)
</view
>
<view
v-html=
"item2.SubTitle"
></view>
</view>
</view>
<!-- 简答 -->
<view
<view
class=
"flex flex_start_center item3
"
v-for=
"(item3, index3) in item2.SubAnwser
"
v-if=
"item2.QuestionKey === 'short-answer'
"
:key=
"index3
"
>
>
<textarea
<!-- 单选 、判断-->
type=
"text"
<view
v-model=
"item3.Content"
class=
"flex flex_start_center item3"
class=
"chooseName chooseName2"
v-if=
"
placeholder=
"请填写答案"
item2.QuestionKey === 'single' ||
@
input=
"AnswerChange(item2)"
item2.QuestionKey === 'judge'
/>
"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item3.IsAnswer }"
>
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ myAnswerText: item3.IsAnswer }"
v-html="item3.Content"
>
</view>
</view>
<!-- 多选 -->
<view
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'multiple'"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item3.IsAnswer }"
>
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ myAnswerText: item3.IsAnswer }"
v-html="item3.Content"
>
</view>
</view>
<!-- 填空 -->
<view
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'fill-in'"
>
<view
class=
"chooseNum"
>
{{
index3
+
1
}}
</view>
<!--
<input
type=
"text"
v-model=
"item3.Content"
class=
"chooseName chooseName2"
placeholder=
"请填写答案"
disabled
/>
-->
<view
v-html=
"item3.Content"
class=
"chooseName"
></view>
</view>
<!-- 简答 -->
<view
class=
"flex flex_start_center item3"
v-if=
"item2.QuestionKey === 'short-answer'"
>
<!--
<textarea
type=
"text"
v-model=
"item3.Content"
class=
"chooseName chooseName2"
placeholder=
"请填写答案"
disabled
/>
-->
<view
v-html=
"item3.Content"
class=
"chooseName"
></view>
</view>
</view>
<view
class=
"AnswerContent"
v-if=
"isOperate"
>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
item1
.
QuestionAnswerList
[
index2
].
SubAnswer
}}
</text
>
,
<text
>
您的答案:
<template
v-if=
"item2.StundetAnswer != ''"
>
<text
v-if=
"
item1.QuestionAnswerList[index2].SubAnswer ==
item1.AnswerList[index2].SubAnswer
"
class=
"isTrueAnswer"
>
{{
item1
.
AnswerList
[
index2
].
SubAnswer
}}
</text>
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
AnswerList
[
index2
].
SubAnswer
}}
,回答错误
</text
>
</
template
>
<
template
v-else
>
<text>
未作答
</text>
</
template
>
</text>
</view>
</view>
</view>
</view>
</view>
<view
style=
"word-wrap: break-word; margin: 0 30rpx 30rpx 30rpx"
class=
"AnswerContent"
>
<text
style=
"color: #8c8a94"
>
解析:
</text>
<text
style=
"color: #000"
>
{{ item1.AnswerParse }}
</text>
</view>
</view>
</view>
</
view
>
</
template
>
</view>
</view>
</view>
</view>
</swiper-item>
</swiper-item>
...
@@ -155,6 +283,7 @@ export default {
...
@@ -155,6 +283,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
();
...
@@ -170,6 +299,7 @@ export default {
...
@@ -170,6 +299,7 @@ export default {
timer
:
null
,
timer
:
null
,
timeOutEvent
:
false
,
timeOutEvent
:
false
,
statusBarHeight
:
0
,
statusBarHeight
:
0
,
isOperate
:
props
.
isOperate
,
});
});
//判断是否是第一大题
//判断是否是第一大题
if
(
data
.
sortIndex
===
1
)
{
if
(
data
.
sortIndex
===
1
)
{
...
@@ -255,20 +385,9 @@ export default {
...
@@ -255,20 +385,9 @@ export default {
data
.
timeOutEvent
=
false
;
data
.
timeOutEvent
=
false
;
clearTimeout
(
data
.
timer
);
clearTimeout
(
data
.
timer
);
},
},
//获取正确答案
getTrueAnswer
(
item
)
{
let
AnSwer
=
""
;
if
(
item
&&
item
.
length
>
0
)
{
item
.
forEach
((
x
)
=>
{
if
(
x
.
IsAnswer
)
{
AnSwer
=
x
.
Name
;
}
});
}
return
AnSwer
;
},
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
console
.
log
(
361
,
data
.
data
);
if
(
props
.
isLast
)
{
if
(
props
.
isLast
)
{
if
(
data
.
sortIndex
===
1
)
{
if
(
data
.
sortIndex
===
1
)
{
data
.
current
=
props
.
paperData
.
DetailsList
.
length
-
1
;
data
.
current
=
props
.
paperData
.
DetailsList
.
length
-
1
;
...
@@ -346,12 +465,14 @@ export default {
...
@@ -346,12 +465,14 @@ export default {
width
:
100%
;
width
:
100%
;
min-height
:
500
rpx
!important
;
min-height
:
500
rpx
!important
;
max-height
:
800
rpx
!important
;
max-height
:
800
rpx
!important
;
background-color
:
#eee
;
/* background-color: #eee; */
position
:
absolute
;
position
:
absolute
;
left
:
0
rpx
;
left
:
0
rpx
;
bottom
:
0
rpx
;
bottom
:
0
rpx
;
z-index
:
9
;
z-index
:
9
;
color
:
#000000
;
color
:
#000000
;
transition
:
all
0.5
;
box-shadow
:
0
rpx
10
rpx
30
rpx
0
rpx
rgba
(
36
,
36
,
36
,
0.2
);
}
}
.questionView
{
.questionView
{
height
:
100%
;
height
:
100%
;
...
@@ -365,7 +486,7 @@ export default {
...
@@ -365,7 +486,7 @@ export default {
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#888888
;
color
:
#888888
;
margin
:
2
0
rpx
0
;
padding
:
3
0
rpx
0
;
}
}
.questionTitle
{
.questionTitle
{
font-size
:
26
rpx
;
font-size
:
26
rpx
;
...
@@ -375,7 +496,7 @@ export default {
...
@@ -375,7 +496,7 @@ export default {
}
}
.item2
{
.item2
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
margin
:
30
rpx
0
;
margin
-bottom
:
60
rpx
;
padding
:
0
30
rpx
;
padding
:
0
30
rpx
;
}
}
...
@@ -383,7 +504,9 @@ export default {
...
@@ -383,7 +504,9 @@ export default {
background-color
:
#00acf9
!important
;
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
color
:
#ffffff
!important
;
}
}
.myAnswerText
{
color
:
#00acf9
!important
;
}
.item3
{
.item3
{
padding-left
:
25
rpx
;
padding-left
:
25
rpx
;
margin
:
20
rpx
0
;
margin
:
20
rpx
0
;
...
@@ -406,10 +529,24 @@ export default {
...
@@ -406,10 +529,24 @@ export default {
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#111111
;
}
}
.chooseName2
{
.chooseName2
{
flex-grow
:
1
;
flex-grow
:
1
;
border-bottom
:
1px
solid
#111
;
border-bottom
:
1px
solid
#111
;
color
:
#111111
;
}
.isTrueAnswer
{
color
:
green
!important
;
}
.isNotAnswer
{
color
:
red
!important
;
}
.AnswerContent
{
font-size
:
30
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
}
}
</
style
>
</
style
>
src/pages/index/index.vue
View file @
b7fef7dc
...
@@ -277,6 +277,20 @@ export default {
...
@@ -277,6 +277,20 @@ export default {
title
:
"首页"
,
title
:
"首页"
,
});
});
},
},
onShareAppMessage
()
{
return
{
title
:
"甲小鹤"
,
query
:
"/pages/index/index"
,
imageUrl
:
""
,
};
},
onShareTimeline
()
{
return
{
title
:
"甲小鹤"
,
query
:
"/pages/index/index"
,
imageUrl
:
""
,
};
},
};
};
</
script
>
</
script
>
...
...
src/utils/index.js
View file @
b7fef7dc
...
@@ -12,7 +12,6 @@ export let uploadFile = (path, file, successCallback) => {
...
@@ -12,7 +12,6 @@ export let uploadFile = (path, file, successCallback) => {
for
(
let
i
=
0
;
i
<
file
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
file
.
length
;
i
++
)
{
UploadSelfFile
(
path
,
file
[
i
],
successCallback
)
UploadSelfFile
(
path
,
file
[
i
],
successCallback
)
}
}
}
}
//获取base64格式路径
//获取base64格式路径
...
...
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