Commit cacc5bb3 authored by 罗超's avatar 罗超

1

parent d1fb8532
<template> <template>
<view class="answer-sheets"> <view>
<view v-for="(item, index) in questionList" :key="index" class="item"> <view class="answer-sheets">
<view class="name"> <view v-for="(item, index) in questionList" :key="index" class="item">
{{ changeNumToHan(index + 1) }}{{ item.GroupName }}</view <view class="name">
> {{ changeNumToHan(index + 1) }}{{ item.GroupName }}</view
<view class="flex flex_wrap">
<view
v-for="(item1, index1) in item.DetailsList"
:key="index1"
class="flex flex_wrap"
> >
<view class="flex flex_wrap">
<view <view
class="item1-1" v-for="(item1, index1) in item.DetailsList"
v-if=" :key="index1"
item1.QuestionTypeKey === 'reading-comprehensio' ||
item1.QuestionTypeKey === 'listening'
"
>{{ index1 + 1 }}.</view
>
<view class="item1" v-else @click="jumpPage(index, index1)">{{
index1 + 1
}}</view>
<view
v-if="
item1.QuestionTypeKey === 'reading-comprehensio' ||
item1.QuestionTypeKey === 'listening'
"
class="flex flex_wrap" class="flex flex_wrap"
> >
<view <view
v-for="(item2, index2) in item1.QuestionContentObj" class="item1-1"
:key="index2" v-if="
item1.QuestionTypeKey === 'reading-comprehensio' ||
item1.QuestionTypeKey === 'listening'
"
>{{ index1 + 1 }}.</view
> >
<view class="item1">{{ index2 + 1 }}</view> <view class="item1" v-else @click="jumpPage(index, index1)">{{
index1 + 1
}}</view>
<view
v-if="
item1.QuestionTypeKey === 'reading-comprehensio' ||
item1.QuestionTypeKey === 'listening'
"
class="flex flex_wrap"
>
<view
v-for="(item2, index2) in item1.QuestionContentObj"
:key="index2"
>
<view class="item1">{{ index2 + 1 }}</view>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -57,14 +59,15 @@ import { ...@@ -57,14 +59,15 @@ import {
computed, computed,
onMounted, onMounted,
} from "vue"; } from "vue";
import { getPaperDetail } from "../../api/exam";
import { changeNumToHan } from "../../utils/index"; import { changeNumToHan } from "../../utils/index";
export default { export default {
setup() { setup() {
let paperData = uni.getStorageSync("paperData");
console.log(66, paperData);
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 },
questionList: [], questionList: paperData.Paper.GroupList,
}); });
let methods = { let methods = {
changeNumToHan, changeNumToHan,
...@@ -74,15 +77,14 @@ export default { ...@@ -74,15 +77,14 @@ export default {
"/pages/exam/examPaper?index=" + index + "&&index1=" + (index1 + 1), "/pages/exam/examPaper?index=" + index + "&&index1=" + (index1 + 1),
}); });
}, },
//选题
change(type, index, index1, index2) {}, // async getPaperDetail() {
async getPaperDetail() { // let res = await getPaperDetail(data.msg);
let res = await getPaperDetail(data.msg); // if (res) {
if (res) { // data.questionList = res.Data.Paper.GroupList;
data.questionList = res.Data.Paper.GroupList; // console.log(90, res.Data.Paper.GroupList);
console.log(90, res.Data.Paper.GroupList); // }
} // },
},
}; };
return { return {
...toRefs(data), ...toRefs(data),
...@@ -93,7 +95,6 @@ export default { ...@@ -93,7 +95,6 @@ export default {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "答题卡", title: "答题卡",
}); });
this.getPaperDetail();
}, },
}; };
</script> </script>
...@@ -102,6 +103,8 @@ export default { ...@@ -102,6 +103,8 @@ export default {
.answer-sheets { .answer-sheets {
box-sizing: border-box; box-sizing: border-box;
padding: 30rpx; padding: 30rpx;
height: calc(100vh - 150rpx);
overflow-y: auto;
} }
.name, .name,
.num { .num {
...@@ -159,12 +162,18 @@ export default { ...@@ -159,12 +162,18 @@ export default {
} }
.submitBox { .submitBox {
width: 750rpx; width: 750rpx;
height: 100rpx; height: 150rpx;
background-color: #e2e2e2; background-color: #e2e2e2;
position: fixed;
left: 0;
bottom: 0;
box-sizing: border-box;
padding-top: 40rpx;
} }
.submit { .submit {
width: 600rpx; width: 600rpx;
height: 50rpx; height: 70rpx;
border-radius: 35rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
...@@ -173,5 +182,6 @@ export default { ...@@ -173,5 +182,6 @@ export default {
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
color: #fff; color: #fff;
margin: 0 auto;
} }
</style> </style>
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