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

1

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