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
37642242
Commit
37642242
authored
Sep 10, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
dfb26cc7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
7 deletions
+32
-7
SingleChoice.vue
src/components/subject/SingleChoice.vue
+9
-3
answer.vue
src/components/subject/answer.vue
+12
-2
examPaper.vue
src/pages/exam/examPaper.vue
+11
-2
No files found.
src/components/subject/SingleChoice.vue
View file @
37642242
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<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>
<!--
<i
<!--
<i
class=
"iconfont icon-caidanzu answerSheet"
class=
"iconfont icon-caidanzu answerSheet"
@
click=
"jumpAnswerSheet"
@
click=
"jumpAnswerSheet"
></i>
-->
></i>
-->
...
@@ -110,12 +110,17 @@ export default {
...
@@ -110,12 +110,17 @@ export default {
},
},
//选题
//选题
change
(
item1
,
item2
)
{
change
(
item1
,
item2
)
{
context
.
emit
(
"answerChange"
,
data
.
data
);
item1
.
QuestionContentObj
.
map
((
e
)
=>
{
item1
.
QuestionContentObj
.
map
((
e
)
=>
{
if
(
e
.
Name
==
item2
.
Name
)
{
if
(
e
.
Name
==
item2
.
Name
)
{
e
.
IsAnswer
=
true
;
e
.
IsAnswer
=
true
;
}
else
{
}
else
{
e
.
IsAnswer
=
false
;
e
.
IsAnswer
=
false
;
}
}
if
(
e
.
IsAnswer
)
{
//标记已回答
item1
.
IsRes
=
true
;
}
});
});
},
},
onchange
(
e
)
{
onchange
(
e
)
{
...
@@ -137,6 +142,7 @@ export default {
...
@@ -137,6 +142,7 @@ export default {
},
},
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
console
.
log
(
"单选"
,
data
.
data
);
if
(
props
.
isLast
)
{
if
(
props
.
isLast
)
{
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
}
}
...
@@ -166,8 +172,8 @@ export default {
...
@@ -166,8 +172,8 @@ export default {
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
;
...
...
src/components/subject/answer.vue
View file @
37642242
...
@@ -2,7 +2,11 @@
...
@@ -2,7 +2,11 @@
<view>
<view>
<van-nav-bar
fixed
>
<van-nav-bar
fixed
>
<template
#
left
>
<template
#
left
>
<van-icon
name=
"cross"
style=
"font-size: 32rpx; color: #111"
/>
<van-icon
name=
"cross"
style=
"font-size: 32rpx; color: #111"
@
click=
"back"
/>
</
template
>
</
template
>
<
template
#
title
>
<
template
#
title
>
<view
<view
...
@@ -80,7 +84,8 @@ export default {
...
@@ -80,7 +84,8 @@ export default {
props
:
{
props
:
{
paperData
:
Object
,
paperData
:
Object
,
},
},
setup
()
{
setup
(
props
,
ctx
)
{
console
.
log
(
84
,
ctx
);
let
Gid
=
uni
.
getStorageSync
(
"userInfo"
).
Id
;
let
Gid
=
uni
.
getStorageSync
(
"userInfo"
).
Id
;
let
data
=
reactive
({
let
data
=
reactive
({
msg
:
{
GuestId
:
Gid
,
PaperId
:
5
,
PublishId
:
1
},
msg
:
{
GuestId
:
Gid
,
PaperId
:
5
,
PublishId
:
1
},
...
@@ -94,7 +99,12 @@ export default {
...
@@ -94,7 +99,12 @@ export default {
"/pages/exam/examPaper?index="
+
index
+
"&&index1="
+
(
index1
+
1
),
"/pages/exam/examPaper?index="
+
index
+
"&&index1="
+
(
index1
+
1
),
});
});
},
},
//隐藏答题卡
back
()
{
ctx
.
emit
(
"hideAnswer"
);
},
};
};
console
.
log
(
"答题卡"
,
props
.
paperData
);
return
{
return
{
...
toRefs
(
data
),
...
toRefs
(
data
),
...
methods
,
...
methods
,
...
...
src/pages/exam/examPaper.vue
View file @
37642242
...
@@ -63,6 +63,7 @@
...
@@ -63,6 +63,7 @@
:sortTotal=
"peaperDetail.Paper.GroupList.length"
:sortTotal=
"peaperDetail.Paper.GroupList.length"
@
getBeforeTopic=
"getBeforeTopic()"
@
getBeforeTopic=
"getBeforeTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
getAfterTopic=
"getAfterTopic()"
@
answerChange=
"getAnswerChange($event, index)"
v-if=
"item.QuestionTypeKey === 'single' && index === changeIndex"
v-if=
"item.QuestionTypeKey === 'single' && index === changeIndex"
/>
/>
<!-- 听力题 -->
<!-- 听力题 -->
...
@@ -262,7 +263,7 @@
...
@@ -262,7 +263,7 @@
</view>
</view>
</view>
</view>
<view
class=
"answer-con"
v-if=
"isShowAnswer"
>
<view
class=
"answer-con"
v-if=
"isShowAnswer"
>
<Answer
:paperData=
"peaperDetail"
/>
<Answer
:paperData=
"peaperDetail"
@
hideAnswer=
"hideAnswerSheet"
/>
</view>
</view>
<van-toast
id=
"van-toast"
/>
<van-toast
id=
"van-toast"
/>
</view>
</view>
...
@@ -374,9 +375,17 @@ export default {
...
@@ -374,9 +375,17 @@ export default {
showAnswerSheet
()
{
showAnswerSheet
()
{
data
.
isShowAnswer
=
true
;
data
.
isShowAnswer
=
true
;
},
},
//隐藏答题卡
hideAnswerSheet
()
{
data
.
isShowAnswer
=
false
;
},
//获取答案改变后的数据
getAnswerChange
(
val
,
index
)
{
console
.
log
(
"父组件答案改变"
,
val
,
index
);
data
.
peaperDetail
.
Paper
.
GroupList
[
index
]
=
val
;
},
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
console
.
log
(
366
,
data
.
peaperDetail
);
getSystemInfo
((
res
)
=>
{
getSystemInfo
((
res
)
=>
{
data
.
statusBarHeight
=
res
.
statusBarHeight
;
data
.
statusBarHeight
=
res
.
statusBarHeight
;
});
});
...
...
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