Commit cacc5bb3 authored by 罗超's avatar 罗超

1

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