Commit 37642242 authored by 罗超's avatar 罗超

1

parent dfb26cc7
......@@ -110,12 +110,17 @@ export default {
},
//选题
change(item1, item2) {
context.emit("answerChange", data.data);
item1.QuestionContentObj.map((e) => {
if (e.Name == item2.Name) {
e.IsAnswer = true;
} else {
e.IsAnswer = false;
}
if (e.IsAnswer) {
//标记已回答
item1.IsRes = true;
}
});
},
onchange(e) {
......@@ -137,6 +142,7 @@ export default {
},
};
onMounted(() => {
console.log("单选", data.data);
if (props.isLast) {
data.current = props.paperData.DetailsList.length;
}
......@@ -166,8 +172,8 @@ export default {
font-weight: bold;
color: #da7878;
}
.ExamIndex_Box{
margin-right:20px;
.ExamIndex_Box {
margin-right: 20px;
}
.Exam_Total {
font-size: 25rpx;
......
......@@ -2,7 +2,11 @@
<view>
<van-nav-bar fixed>
<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 #title>
<view
......@@ -80,7 +84,8 @@ export default {
props: {
paperData: Object,
},
setup() {
setup(props, ctx) {
console.log(84, ctx);
let Gid = uni.getStorageSync("userInfo").Id;
let data = reactive({
msg: { GuestId: Gid, PaperId: 5, PublishId: 1 },
......@@ -94,7 +99,12 @@ export default {
"/pages/exam/examPaper?index=" + index + "&&index1=" + (index1 + 1),
});
},
//隐藏答题卡
back() {
ctx.emit("hideAnswer");
},
};
console.log("答题卡", props.paperData);
return {
...toRefs(data),
...methods,
......
......@@ -63,6 +63,7 @@
:sortTotal="peaperDetail.Paper.GroupList.length"
@getBeforeTopic="getBeforeTopic()"
@getAfterTopic="getAfterTopic()"
@answerChange="getAnswerChange($event, index)"
v-if="item.QuestionTypeKey === 'single' && index === changeIndex"
/>
<!-- 听力题 -->
......@@ -262,7 +263,7 @@
</view>
</view>
<view class="answer-con" v-if="isShowAnswer">
<Answer :paperData="peaperDetail" />
<Answer :paperData="peaperDetail" @hideAnswer="hideAnswerSheet" />
</view>
<van-toast id="van-toast" />
</view>
......@@ -374,9 +375,17 @@ export default {
showAnswerSheet() {
data.isShowAnswer = true;
},
//隐藏答题卡
hideAnswerSheet() {
data.isShowAnswer = false;
},
//获取答案改变后的数据
getAnswerChange(val, index) {
console.log("父组件答案改变", val, index);
data.peaperDetail.Paper.GroupList[index] = val;
},
};
onMounted(() => {
console.log(366, data.peaperDetail);
getSystemInfo((res) => {
data.statusBarHeight = res.statusBarHeight;
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment