Commit 37642242 authored by 罗超's avatar 罗超

1

parent dfb26cc7
...@@ -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: 25rpx; font-size: 25rpx;
......
...@@ -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,
......
...@@ -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;
}); });
......
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