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

1

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