Commit 313b7e68 authored by 罗超's avatar 罗超

1

parent 37642242
...@@ -39,9 +39,13 @@ ...@@ -39,9 +39,13 @@
" "
>{{ index1 + 1 }}.</view >{{ index1 + 1 }}.</view
> >
<view class="item1" v-else @click="jumpPage(index, index1)">{{ <view
index1 + 1 class="item1"
}}</view> :class="{ isRes: item1.IsRes }"
v-else
@click="chooseTopic(index, index1)"
>{{ index1 + 1 }}</view
>
<view <view
v-if=" v-if="
...@@ -93,11 +97,16 @@ export default { ...@@ -93,11 +97,16 @@ export default {
}); });
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage(index, index1) { chooseTopic(index, index1, index2) {
uni.navigateTo({ ctx.emit("chooseTopic", {
url: index,
"/pages/exam/examPaper?index=" + index + "&&index1=" + (index1 + 1), index1,
index2,
}); });
// uni.navigateTo({
// url:
// "/pages/exam/examPaper?index=" + index + "&&index1=" + (index1 + 1),
// });
}, },
//隐藏答题卡 //隐藏答题卡
back() { back() {
...@@ -198,4 +207,9 @@ export default { ...@@ -198,4 +207,9 @@ export default {
color: #fff; color: #fff;
margin: 0 auto; margin: 0 auto;
} }
.isRes {
background-color: #00acf9 !important;
color: #ffffff !important;
border: none !important;
}
</style> </style>
...@@ -263,7 +263,11 @@ ...@@ -263,7 +263,11 @@
</view> </view>
</view> </view>
<view class="answer-con" v-if="isShowAnswer"> <view class="answer-con" v-if="isShowAnswer">
<Answer :paperData="peaperDetail" @hideAnswer="hideAnswerSheet" /> <Answer
:paperData="peaperDetail"
@hideAnswer="hideAnswerSheet"
@chooseTopic="jumpTopic"
/>
</view> </view>
<van-toast id="van-toast" /> <van-toast id="van-toast" />
</view> </view>
...@@ -354,10 +358,9 @@ export default { ...@@ -354,10 +358,9 @@ export default {
back() { back() {
uni.navigateBack(); uni.navigateBack();
}, },
async getPaperDetail(callback) { async getPaperDetail() {
let res = await getPaperDetail(data.msg); let res = await getPaperDetail(data.msg);
if (res) { if (res) {
callback(res);
data.peaperDetail = res.Data; data.peaperDetail = res.Data;
} }
}, },
...@@ -384,6 +387,12 @@ export default { ...@@ -384,6 +387,12 @@ export default {
console.log("父组件答案改变", val, index); console.log("父组件答案改变", val, index);
data.peaperDetail.Paper.GroupList[index] = val; data.peaperDetail.Paper.GroupList[index] = val;
}, },
//跳转到指定题目
jumpTopic(val) {
data.peaperDetail.Paper.GroupList[val.index].startIndex =
val.index1 + 1;
data.isShowAnswer = false;
},
}; };
onMounted(() => { onMounted(() => {
getSystemInfo((res) => { getSystemInfo((res) => {
...@@ -396,17 +405,7 @@ export default { ...@@ -396,17 +405,7 @@ export default {
}; };
}, },
onLoad(options) { onLoad(options) {
this.getPaperDetail((res) => { this.getPaperDetail();
if (options.index) {
this.changeIndex = parseInt(options.index);
if (options.index1) {
res.Data.Paper.GroupList[this.changeIndex].startIndex = parseInt(
options.index1
);
}
}
});
console.log(340, options, this.changeIndex);
}, },
}; };
</script> </script>
......
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