Commit 15fc5cd6 authored by 罗超's avatar 罗超

1

parent ed96ba59
This diff is collapsed.
......@@ -5,35 +5,61 @@
<view class="name">
<view>
{{ changeNumToHan(sortIndex) }}{{ data.GroupName }}
<text style="color: #999999">(共{{ data.DetailsList.length }}道,{{ data.GScore }}分)</text>
<text style="color: #999999"
>(共{{ data.DetailsList.length }}道,{{ data.GScore }}分)</text
>
</view>
<view class="ExamIndex_Box">
<text class="Single_Before">{{ ExamIndex }}</text>/<text
class="Exam_Total">{{ data.DetailsList.length }}</text>
<text class="Single_Before">{{ ExamIndex }}</text
>/<text class="Exam_Total">{{ data.DetailsList.length }}</text>
</view>
</view>
<swiper class="swiper-box" :style="{
<swiper
class="swiper-box"
:style="{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
}" :autoplay="autoplay" :current="current" @change="onchange">
}"
:autoplay="autoplay"
:current="current"
@change="onchange"
>
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="flex">
<view class="num" v-html="item1.Title"></view>{{item1.Score}}
<view class="num" v-html="item1.Title"></view>{{
item1.Score
}}
</view>
<view v-for="(item2, index2) in item1.QuestionContentObj" :key="index2"
class="item2 flex flex_start_center">
<view
v-for="(item2, index2) in item1.QuestionContentObj"
:key="index2"
class="item2 flex flex_start_center"
>
<template v-if="isOperate">
<view class="chooseNum" :class="{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)">{{ item2.ShowName }}
<view
class="chooseNum"
:class="{ myAnswer: item2.IsAnswer }"
@click="change(item1, item2)"
>{{ item2.ShowName }}
</view>
<view class="chooseName" @click="change(item1, item2)" v-html="item2.Content"></view>
<view
class="chooseName"
@click="change(item1, item2)"
v-html="item2.Content"
></view>
</template>
<template v-else>
<view class="chooseNum" :class="{ isTrueAnswer: item2.IsAnswer }">{{ item2.Name }}
<view
class="chooseNum"
:class="{ isTrueAnswer: item2.IsAnswer }"
>{{ item2.Name }}
</view>
<view class="chooseName" :class="{ isTrueAnswer: item2.IsAnswer }"
v-html="item2.Content">
<view
class="chooseName"
:class="{ isTrueAnswer: item2.IsAnswer }"
v-html="item2.Content"
>
</view>
</template>
</view>
......@@ -41,28 +67,39 @@
<view class="AnswerContent" v-if="!isOperate">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{item1.Answer}}</text>
<text class="isTrueAnswer">{{ item1.Answer }}</text
>
<text>
您的答案:
<template v-if="item1.StundetAnswer != ''">
<text v-if="item1.Answer ==item1.StundetAnswer" class="isTrueAnswer">
<text
v-if="item1.Answer == item1.StundetAnswer"
class="isTrueAnswer"
>
{{ item1.StundetAnswer }},回答正确
</text>
<text v-else class="isNotAnswer">{{ item1.StundetAnswer }},回答错误</text>
<text v-else class="isNotAnswer"
>{{ item1.StundetAnswer }},回答错误</text
>
</template>
<template v-else>
<text>未作答</text>
</template>
</text>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
<view style="margin: 20rpx 0" v-if="item1.StudentScore">
<text style="color: #8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore > 0">{{
item1.StudentScore
}}</text>
<text class="isNotAnswer" v-else>{{ item1.StudentScore }}</text>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view style="color: #000; display: inline-block" v-html="item1.AnswerParse"></view>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
</swiper-item>
......@@ -74,7 +111,7 @@
</template>
<script>
import {
import {
ref,
reactive,
toRefs,
......@@ -83,11 +120,9 @@
watch,
computed,
onMounted,
} from "vue";
import {
changeNumToHan
} from "../../utils/index";
export default {
} from "vue";
import { changeNumToHan } from "../../utils/index";
export default {
props: {
paperData: Object,
isLast: Boolean,
......@@ -144,14 +179,16 @@
},
onchange(e) {
data.ExamIndex = e.detail.current;
if (data.sortIndex == 1) {
data.ExamIndex = e.detail.current + 1;
}
if (data.ExamIndex === data.data.DetailsList.length + 1) {
this.$emit("getAfterTopic");
}
if (e.detail.current == 0 && data.sortIndex != 1) {
this.$emit("getBeforeTopic");
console.log("多选返回", e);
}
}
},
};
onMounted(() => {
if (props.isLast) {
......@@ -170,10 +207,10 @@
};
},
onLoad() {},
};
};
</script>
<style scoped>
.name {
.name {
height: 90rpx;
font-size: 28rpx;
font-family: PingFang SC;
......@@ -182,70 +219,70 @@
display: flex;
align-items: center;
justify-content: space-between;
}
}
.ExamIndex_Box {
.ExamIndex_Box {
margin-right: 20px;
}
}
.isTrueAnswer {
.isTrueAnswer {
color: green !important;
}
}
.isNotAnswer {
.isNotAnswer {
color: red !important;
}
}
.AnswerContent {
.AnswerContent {
font-size: 30rpx;
padding: 28rpx;
background-color: #f4f4f4;
border-radius: 5px;
}
}
.Single_Before {
.Single_Before {
font-size: 28rpx;
font-weight: bold;
color: #da7878;
}
}
.Exam_Total {
.Exam_Total {
font-size: 25rpx;
color: gray;
}
}
.swiper-box {
.swiper-box {
height: calc(100vh - 270rpx);
box-sizing: border-box;
}
}
.num {
.num {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
}
.item {
.item {
margin-bottom: 40rpx;
}
}
.item1 {
.item1 {
/* margin: 25rpx 0; */
align-items: center;
}
}
.item2 {
.item2 {
padding-left: 25rpx;
margin: 30rpx 0;
}
}
.myAnswer {
.myAnswer {
background-color: #00acf9 !important;
color: #ffffff !important;
}
}
.chooseNum {
.chooseNum {
width: 40rpx;
height: 40rpx;
text-align: center;
......@@ -257,12 +294,12 @@
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
}
.chooseName {
.chooseName {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
}
}
</style>
......@@ -183,7 +183,7 @@
</view>
<view v-show="current == 2" style="height: calc(100vh - 50px)">
<SignUp ref="children"></SignUp>
<!-- <SignUp ref="children"></SignUp> -->
</view>
<auth
......@@ -242,12 +242,12 @@ import {
onMounted,
} from "vue";
import Loadmore from "../../components/loadmore.vue";
import SignUp from "../../components/signUp.vue";
// import SignUp from "../../components/signUp.vue";
import { getActivityTypeList, getActivityList } from "../../api/activity";
export default {
components: {
Loadmore,
SignUp,
// SignUp,
},
setup() {
let i = getCurrentInstance();
......
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