Commit 1185e629 authored by zhengke's avatar zhengke

修改

parent 746c10a4
......@@ -2,9 +2,15 @@
<!-- 单选题 -->
<view>
<view class="item">
<view class="name"
>{{ changeNumToHan(sort + 1) }}{{ data.GroupName }}</view
>
<view class="name">
<view>
{{ changeNumToHan(sort + 1) }}{{ data.GroupName }}
<text>(共{{data.DetailsList.length}}道,{{Score}}分)</text>
</view>
<view>
<text class="Single_Before">2</text>/<text class="Exam_Total">{{data.DetailsList.length}}</text>
</view>
</view>
<swiper class="swiper-box" :autoplay="autoplay">
<swiper-item
v-for="(item1, index1) in data.DetailsList"
......@@ -62,6 +68,7 @@ export default {
autoplay: false,
data: props.paperData,
Score: 0
});
let methods = {
......@@ -79,7 +86,19 @@ export default {
data.data.DetailsList[index1].myAnswer =
data.data.DetailsList[index1].QuestionContentObj[index2].Name;
},
//获取总分
getScore(){
data.Score=0;
data.data.DetailsList.forEach(x=>{
data.Score+=x.Score
})
}
};
onMounted(()=>{
console.log(props.paperData,'props.paperData');
that.getScore();
})
let that = methods;
return {
...toRefs(data),
...methods,
......@@ -96,6 +115,16 @@ export default {
color: #111111;
display: flex;
align-items: center;
justify-content: space-between;
}
.Single_Before{
font-size: 28rpx;
font-weight: bold;
color:#DA7878;
}
.Exam_Total{
font-size:25rpx;
color:gray;
}
.swiper-box {
/* height: calc(100vh - 250rpx - constant(safe-area-inset-top, 40rpx)); */
......
......@@ -28,11 +28,7 @@
<SingleChoice
:paperData="item"
:sort="index"
v-if="
item.GroupName === '单选题(数字)' ||
item.GroupName === 'single-number'
"
/>
v-if="item.QuestionTypeKey === 'single-number'" />
<MultipleChoice
:paperData="item"
v-if="item.QuestionTypeKey === 'multiple'"
......
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