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
aadf1bd9
Commit
aadf1bd9
authored
Sep 10, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
题了
parent
08570063
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
31 deletions
+40
-31
ListenTopic.vue
src/components/subject/ListenTopic.vue
+33
-28
shortAnswer.vue
src/components/subject/shortAnswer.vue
+6
-3
examPaper.vue
src/pages/exam/examPaper.vue
+1
-0
No files found.
src/components/subject/ListenTopic.vue
View file @
aadf1bd9
...
...
@@ -69,13 +69,13 @@
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item
2.myAnswer === item3.Name
}"
@click="singerChange(i
ndex1, index2, index
3)"
:class=
"
{ myAnswer: item
3.IsAnswer
}"
@click="singerChange(i
tem2,item
3)"
>
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
@
click=
"singerChange(i
ndex1, index2, index
3)"
@
click=
"singerChange(i
tem2,item
3)"
v-html=
"item3.Content"
></view>
</view>
...
...
@@ -86,15 +86,13 @@
>
<view
class=
"chooseNum"
:class=
"
{
myAnswer: item2.myAnswer.find((e) => e == item3.Name),
}"
@click="multipleChange(index1, index2, index3)"
:class=
"
{myAnswer: item3.IsAnswer}"
@click="multipleChange(item3)"
>
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
@
click=
"multipleChange(i
ndex1, index2, index
3)"
@
click=
"multipleChange(i
tem
3)"
v-html=
"item3.Content"
></view>
</view>
...
...
@@ -190,6 +188,11 @@ export default {
data
.
current
=
props
.
startIndex
;
data
.
ExamIndex
=
props
.
startIndex
;
}
watch
(
data
.
data
,
(
newVal
,
oldVal
)
=>
{
if
(
newVal
){
context
.
emit
(
"answerChange"
,
newVal
);
}
});
let
methods
=
{
changeNumToHan
,
jumpPage
()
{
...
...
@@ -234,28 +237,30 @@ export default {
},
//----------------------------------------选题----------------------------------
// 单选or判断
singerChange
(
i
ndex1
,
index2
,
index
3
)
{
data
.
data
.
DetailsList
[
index1
].
QuestionContentObj
[
index2
].
myAnswer
=
data
.
data
.
DetailsList
[
index1
].
QuestionContentObj
[
index2
].
SubAnwser
[
index3
].
Name
;
singerChange
(
i
tem2
,
item
3
)
{
item2
.
SubAnwser
.
forEach
(
x
=>
{
x
.
IsAnswer
=
false
;
})
item3
.
IsAnswer
=!
item3
.
IsAnswer
},
// 多选
multipleChange
(
index1
,
index2
,
index3
)
{
let
myAnswer
=
data
.
data
.
DetailsList
[
index1
].
QuestionContentObj
[
index2
]
.
myAnswer
?
data
.
data
.
DetailsList
[
index1
].
QuestionContentObj
[
index2
].
myAnswer
:
[];
let
res
=
data
.
data
.
DetailsList
[
index1
].
QuestionContentObj
[
index2
].
SubAnwser
[
index3
].
Name
;
let
find
=
myAnswer
.
indexOf
(
res
);
if
(
find
==
-
1
)
{
myAnswer
.
push
(
res
);
}
else
{
myAnswer
.
splice
(
find
,
1
);
}
multipleChange
(
item
)
{
item
.
IsAnswer
=!
item
.
IsAnswer
;
this
.
$forceUpdate
();
// let myAnswer = data.data.DetailsList[index1].QuestionContentObj[index2]
// .myAnswer
// ? data.data.DetailsList[index1].QuestionContentObj[index2].myAnswer
// : [];
// let res =
// data.data.DetailsList[index1].QuestionContentObj[index2].SubAnwser[
// index3
// ].Name;
// let find = myAnswer.indexOf(res);
// if (find == -1) {
// myAnswer.push(res);
// } else {
// myAnswer.splice(find, 1);
// }
},
onchange
(
e
)
{
data
.
audioTime
=
"00:00"
;
...
...
src/components/subject/shortAnswer.vue
View file @
aadf1bd9
...
...
@@ -24,7 +24,7 @@
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"i
tem1.id
"
:key=
"i
ndex1
"
>
<view
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
...
...
@@ -35,9 +35,9 @@
<textarea
type=
"text"
v-model=
"item1.Answer"
@
input=
"sendData"
class=
"input textarea"
placeholder=
"请填写答案"
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
</view>
...
...
@@ -75,6 +75,7 @@ export default {
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
item
.
myAnswer
=
""
;
});
let
data
=
reactive
({
data
:
props
.
paperData
,
autoplay
:
false
,
...
...
@@ -98,7 +99,6 @@ export default {
uni
.
navigateBack
();
},
onchange
(
e
)
{
context
.
emit
(
"answerChange"
,
data
.
data
);
data
.
ExamIndex
=
e
.
detail
.
current
;
if
(
data
.
ExamIndex
===
data
.
data
.
DetailsList
.
length
+
1
)
{
console
.
log
(
"进入"
);
...
...
@@ -108,6 +108,9 @@ export default {
this
.
$emit
(
"getBeforeTopic"
);
}
},
sendData
(){
context
.
emit
(
"answerChange"
,
data
.
data
);
}
};
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
...
...
src/pages/exam/examPaper.vue
View file @
aadf1bd9
...
...
@@ -76,6 +76,7 @@
:sortTotal=
"peaperDetail.Paper.GroupList.length"
@
getBeforeTopic=
"getBeforeTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
answerChange=
"getAnswerChange($event, index)"
v-if=
"item.QuestionTypeKey === 'listening' && index === changeIndex"
/>
<!-- 填空题 -->
...
...
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