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
ef0252b5
Commit
ef0252b5
authored
Mar 11, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
4f23c371
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
21 deletions
+59
-21
answer.vue
src/components/question/subject/answer.vue
+6
-4
singlenumber.vue
src/components/question/subject/singlenumber.vue
+48
-15
examGongu.vue
src/pages/exam/examGongu.vue
+5
-2
No files found.
src/components/question/subject/answer.vue
View file @
ef0252b5
...
...
@@ -23,7 +23,7 @@
</view>
</view>
</view>
<view
class=
"submitBox"
>
<view
class=
"submitBox"
v-if=
"!isShowJx"
>
<view
class=
"submit"
@
click=
"savePaper"
>
立即提交
</view>
</view>
<van-toast
id=
"van-toast"
/>
...
...
@@ -47,15 +47,17 @@
export
default
{
props
:
{
paperData
:
Array
,
saveId
:
Number
saveId
:
Number
,
isShowJx
:
Boolean
},
setup
(
props
,
ctx
)
{
let
data
=
reactive
({
questionList
:
props
.
paperData
,
saveMsg
:
{
Id
:
props
.
saveId
,
ExamDetailsList
:
[]
}
ExamDetailsList
:
[],
},
isShowJx
:
props
.
isShowJx
});
let
methods
=
{
chooseTopic
(
index
)
{
...
...
src/components/question/subject/singlenumber.vue
View file @
ef0252b5
...
...
@@ -9,10 +9,22 @@
</view>
<view
v-for=
"(item2, index2) in dataObj.QuestionContentObj"
:key=
"index2"
class=
"flex item2 flex_start_center"
>
<view
class=
"chooseNum"
:class=
"
{ 'isMyChoose': item2.ShowName==dataObj.StudentAnswer[0]}"
@click="change(dataObj, item2)">
{{
item2
.
ShowName
}}
</view>
<view
class=
"chooseName"
@
click=
"change(dataObj, item2)"
v-html=
"item2.Content"
></view>
<template
v-if=
"!isShowJx"
>
<view
class=
"chooseNum"
:class=
"
{ 'isMyChoose': item2.ShowName==dataObj.StudentAnswer[0]}"
@click="change(dataObj, item2)">
{{
item2
.
ShowName
}}
</view>
<view
class=
"chooseName"
@
click=
"change(dataObj, item2)"
v-html=
"item2.Content"
></view>
</
template
>
<
template
v-else
>
<view
class=
"chooseNum"
:class=
"
{ 'isRightAnswer': item2.ShowName==dataObj.Answer,'isNotRightAnswer':getErrorAnswer(dataObj,item2.ShowName) }">
{{
item2
.
ShowName
}}
</view>
<view
class=
"chooseName"
:class=
"
{ 'isRightText': item2.ShowName==dataObj.Answer,'isNotAnswer':getErrorAnswer(dataObj,item2.ShowName) }"
v-html="item2.Content">
</view>
</
template
>
</view>
<view
class=
"AnswerContent"
v-if=
"isShowJx"
>
<view>
...
...
@@ -31,8 +43,7 @@
</
template
>
</text>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"dataObj.AnswerParse"
class=
"flex"
>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"dataObj.AnswerParse"
class=
"flex"
>
<text
style=
"color: #8c8a94;flex-shrink: 0;"
>
解析:
</text>
<view
style=
"color: #000"
v-html=
"dataObj.AnswerParse"
></view>
</view>
...
...
@@ -69,9 +80,17 @@
});
let
UserInfo
=
uni
.
getStorageSync
(
'userInfo'
);
let
methods
=
{
change
(
item1
,
item2
)
{
change
(
item1
,
item2
)
{
item1
.
StudentAnswer
[
0
]
=
item2
.
Name
;
context
.
emit
(
"answerChange"
,
data
.
dataObj
);
},
//判断是否为正确答案
getErrorAnswer
(
item1
,
Number
)
{
if
(
item1
.
StudentAnswer
[
0
]
!=
item1
.
QuestionAnswerList
[
0
])
{
if
(
item1
.
StudentAnswer
[
0
]
==
Number
)
{
return
true
}
}
}
};
onMounted
(()
=>
{
...
...
@@ -87,11 +106,20 @@
};
</
script
>
<
style
scoped
>
.isTrueAnswer
{
color
:
green
!important
;
}
.isRightAnswer
{
background-color
:
green
;
color
:
#fff
!important
;
}
.isRightText
{
color
:
green
!important
;
}
.isNotRightAnswer
{
background-color
:
red
!important
;
color
:
#fff
!important
;
}
.isNotAnswer
{
color
:
red
!important
;
}
...
...
@@ -101,6 +129,8 @@
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
max-height
:
515
rpx
;
overflow
:
auto
;
}
.swiper-box
{
...
...
@@ -114,7 +144,7 @@
}
.item
{
margin-top
:
180
rpx
;
margin-top
:
180
rpx
;
}
.item1
{
...
...
@@ -140,19 +170,22 @@
color
:
#111111
;
flex-shrink
:
0
;
}
.isMyChoose
{
.isMyChoose
{
background-color
:
#4C50E7
;
color
:
#fff
;
color
:
#fff
;
}
.chooseName
{
font-size
:
30
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
.Exam_Score
{
color
:
#999999
;
font-size
:
28
rpx
;
.Exam_Score
{
color
:
#999999
;
font-size
:
28
rpx
;
flex-shrink
:
0
;
}
</
style
>
src/pages/exam/examGongu.vue
View file @
ef0252b5
...
...
@@ -26,7 +26,7 @@
</swiper-item>
</swiper>
</view>
<answer
v-if=
"isShowAnswer"
:paperData=
"dataList"
@
hideAnswer=
"hideAnswer"
:saveId=
"saveId"
@
chooseTopic=
"jumpTopic"
></answer>
<answer
v-if=
"isShowAnswer"
:paperData=
"dataList"
@
hideAnswer=
"hideAnswer"
:saveId=
"saveId"
:isShowJx=
"isShowJx"
@
chooseTopic=
"jumpTopic"
></answer>
</view>
</template>
...
...
@@ -93,7 +93,9 @@
}
},
getList
()
{
data
.
msg
.
StudentId
=
UserInfo
.
AccountId
;
if
(
data
.
isShowJx
){
data
.
msg
.
StudentId
=
UserInfo
.
AccountId
;
}
GetAppBankDetails
(
data
.
msg
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
.
Code
==
1
)
{
...
...
@@ -162,6 +164,7 @@
// 1开始考试 2产看解析
if
(
options
.
Type
==
1
){
this
.
getStart
();
this
.
msg
.
StudentId
=
''
;
this
.
isShowJx
=
false
;
}
if
(
options
.
Type
==
2
){
...
...
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