Commit 7b63a3b1 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/xiangwei/educationstu into master

# Conflicts:
#	src/pages/exam/examPaper.vue
parents d6300413 cf56b230
......@@ -116,6 +116,10 @@
font-weight: bold;
color: #DA7878;
}
.Exam_Total{
font-size:25rpx;
color:gray;
}
.swiper-box {
height: calc(100vh - 270rpx);
box-sizing: border-box;
......
......@@ -17,7 +17,6 @@
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="item1.id">
<view class="item1">
<view class="flex flex_start_center">
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view>
<!-- <view>{{ item1.Title }}</view> -->
</view>
......@@ -34,6 +33,7 @@
</view>
</view>
</swiper-item>
<swiper-item></swiper-item>
</swiper>
<van-toast id="van-toast" />
</view>
......@@ -57,7 +57,8 @@
export default {
props: {
paperData: Object,
sort: Number
sort: Number,
isLast: Boolean
},
setup(props, context) {
let {
......@@ -98,8 +99,10 @@
},
onchange(e) {
data.ExamIndex = e.detail.current;
console.log(data.ExamIndex,'data.ExamIndex');
console.log(data.data.DetailsList.length + 1,'length');
if (data.ExamIndex === data.data.DetailsList.length + 1) {
console.log('进入')
console.log('进入翻页')
this.$emit('getAfterTopic');
}
if (e.detail.current == 0) {
......@@ -107,6 +110,11 @@
}
}
};
onMounted(()=>{
if(props.isLast){
data.current = props.paperData.DetailsList.length;
}
})
return {
...toRefs(data),
...methods,
......@@ -125,6 +133,15 @@
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 - 270rpx);
box-sizing: border-box;
......
......@@ -17,7 +17,6 @@
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="item1.id">
<view class="item1">
<view class="flex flex_start_center">
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view>
</view>
<view v-for="(item2, index2) in item1.QuestionContentObj" :key="item2.id"
......@@ -128,6 +127,10 @@
font-weight: bold;
color:#DA7878;
}
.Exam_Total{
font-size:25rpx;
color:gray;
}
.swiper-box {
height: calc(100vh - 270rpx);
box-sizing: border-box;
......
......@@ -19,7 +19,6 @@
>
<view class="item1">
<view class="flex flex_start_center">
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view>
</view>
......@@ -62,7 +61,7 @@ import {
} from "vue";
import { changeNumToHan } from "../../utils/index";
export default {
props: { paperData: Object, sort: Number },
props: { paperData: Object, sort: Number , isLast: Boolean},
setup(props, context) {
let { ctx } = getCurrentInstance();
......@@ -70,7 +69,7 @@ export default {
autoplay: false,
sortIndex: props.sort+1,
data: props.paperData,
current: 35 ,//默认从第几个开始-用于从快捷菜单点入
current: 1 ,//默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
......@@ -101,7 +100,9 @@ export default {
}
};
onMounted(()=>{
console.log(props.paperData,'props.paperData');
if(props.isLast){
data.current = props.paperData.DetailsList.length;
}
})
let that = methods;
return {
......
<template>
<!-- 单选题 -->
<view>
<view class="item">
<view class="name">
<view>
{{ changeNumToHan(sortIndex) }}{{ data.GroupName }}
<text style="color:#999999;">(共{{data.DetailsList.length}}道,{{data.GScore}}分)</text>
</view>
<view>
<text class="Single_Before">{{ExamIndex}}</text>/<text class="Exam_Total">{{data.DetailsList.length}}</text>
</view>
</view>
<swiper class="swiper-box" :autoplay="autoplay" :current="current" @change="onchange">
<swiper-item
v-for="(item1, index1) in data.DetailsList"
:key="item1.id"
>
<view class="item1">
<view class="flex flex_start_center">
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view>
</view>
<!-- 单选题 -->
<view>
<view class="item">
<view class="name">
<view>
{{ changeNumToHan(sortIndex) }}{{ data.GroupName }}
<text style="color:#999999;">(共{{data.DetailsList.length}}道,{{data.GScore}}分)</text>
</view>
<view>
<text class="Single_Before">{{ExamIndex}}</text>/<text
class="Exam_Total">{{data.DetailsList.length}}</text>
</view>
</view>
<swiper class="swiper-box" :autoplay="autoplay" :current="current" @change="onchange">
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="item1.id">
<view class="item1">
<view class="flex flex_start_center">
<view class="num" v-html="item1.Title"></view>
</view>
<view
v-for="(item2, index2) in item1.QuestionContentObj"
:key="item2.id"
class="flex item2 flex_start_center"
>
<view
class="chooseNum"
:class="{ myAnswer: item1.myAnswer === item2.Name }"
@click="change(index1, index2)"
>{{ item2.Name }}
</view>
<view
class="chooseName"
@click="change(index1, index2)"
v-html="item2.Content"
></view>
</view>
</view>
</swiper-item>
<swiper-item></swiper-item>
</swiper>
</view>
<van-toast id="van-toast" />
</view>
<view v-for="(item2, index2) in item1.QuestionContentObj" :key="item2.id"
class="flex item2 flex_start_center">
<view class="chooseNum" :class="{ myAnswer: item1.myAnswer === item2.Name }"
@click="change(index1, index2)">{{ item2.Name }}
</view>
<view class="chooseName" @click="change(index1, index2)" v-html="item2.Content"></view>
</view>
</view>
</swiper-item>
<swiper-item></swiper-item>
</swiper>
</view>
<van-toast id="van-toast" />
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
import { changeNumToHan } from "../../utils/index";
export default {
props: { paperData: Object, sort: Number, isLast: Boolean},
setup(props, context) {
let { ctx } = getCurrentInstance();
let data = reactive({
autoplay: false,
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
import {
changeNumToHan
} from "../../utils/index";
export default {
props: {
paperData: Object,
sort: Number,
isLast: Boolean
},
setup(props, context) {
let {
ctx
} = getCurrentInstance();
data: props.paperData,
sortIndex: props.sort+1,
current: 0 ,//默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
let data = reactive({
autoplay: false,
data: props.paperData,
sortIndex: props.sort + 1,
current: 0, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
let methods = {
changeNumToHan,
jumpPage() {
uni.navigateTo({
url: "/pages/exam/examPaper",
});
},
back() {
uni.navigateBack();
},
//选题
change(index1, index2) {
data.data.DetailsList[index1].myAnswer =
data.data.DetailsList[index1].QuestionContentObj[index2].Name;
},
onchange(e){
data.ExamIndex = e.detail.current+1;
if(data.ExamIndex===data.data.DetailsList.length+1){
this.$emit('getAfterTopic');
}
}
};
onMounted(()=>{
// if(props.isLast){
// data.current = props.paperData.DetailsList.length;
// }
})
let that = methods;
return {
...toRefs(data),
...methods,
};
},
};
let methods = {
changeNumToHan,
jumpPage() {
uni.navigateTo({
url: "/pages/exam/examPaper",
});
},
back() {
uni.navigateBack();
},
//选题
change(index1, index2) {
data.data.DetailsList[index1].myAnswer =
data.data.DetailsList[index1].QuestionContentObj[index2].Name;
},
onchange(e) {
data.ExamIndex = e.detail.current+1;
if (data.ExamIndex === data.data.DetailsList.length+1) {
this.$emit('getAfterTopic');
}
}
};
onMounted(() => {
if (props.isLast) {
data.current = data.data.DetailsList.length-1;
}
})
let that = methods;
return {
...toRefs(data),
...methods,
};
},
};
</script>
<style scoped>
.name {
height: 90rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 800;
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)); */
height: calc(100vh - 270rpx);
box-sizing: border-box;
/* padding-bottom: env(safe-area-inset-top, 40rpx); */
/* background-color: #f00; */
}
.num {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.item {
/* margin-bottom: 40rpx; */
position: relative;
}
.item1 {
/* margin: 25rpx 0; */
align-items: center;
}
.item2 {
padding-left: 25rpx;
margin: 30rpx 0;
}
.myAnswer {
background-color: #00acf9 !important;
color: #ffffff !important;
}
.chooseNum {
width: 40rpx;
height: 40rpx;
text-align: center;
line-height: 40rpx;
border-radius: 50%;
border: 1px solid #e2e2e2;
margin-right: 30rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.chooseName {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
}
</style>
\ No newline at end of file
.name {
height: 90rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 800;
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)); */
height: calc(100vh - 270rpx);
box-sizing: border-box;
/* padding-bottom: env(safe-area-inset-top, 40rpx); */
/* background-color: #f00; */
}
.num {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.item {
/* margin-bottom: 40rpx; */
position: relative;
}
.item1 {
/* margin: 25rpx 0; */
align-items: center;
}
.item2 {
padding-left: 25rpx;
margin: 30rpx 0;
}
.myAnswer {
background-color: #00acf9 !important;
color: #ffffff !important;
}
.chooseNum {
width: 40rpx;
height: 40rpx;
text-align: center;
line-height: 40rpx;
border-radius: 50%;
border: 1px solid #e2e2e2;
margin-right: 30rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.chooseName {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
}
</style>
<template>
<!-- 单选题 -->
<view>
<view class="item">
<view class="name"
>{{ changeNumToHan(data.GSortNum + 1) }}{{ data.GroupName }}</view
>
<view
v-for="(item1, index1) in data.DetailsList"
:key="item1.id"
class="item1"
>
<view class="flex flex_start_center">
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view>
</view>
<!-- 单选题 -->
<view>
<view class="item">
<view class="name">
<view>
{{ changeNumToHan(data.GSortNum + 1) }}{{ data.GroupName }}
<text style="color:#999999;">(共{{data.DetailsList.length}}道,{{data.GScore}}分)</text>
</view>
<view>
<text class="Single_Before">{{ExamIndex}}</text>/<text class="Exam_Total">{{data.DetailsList.length}}</text>
</view>
</view>
<swiper class="swiper-box" :autoplay="autoplay" :current="current" @change="onchange">
<swiper-item></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="item1.id">
<view class="item1">
<view class="flex flex_start_center">
<view class="num" v-html="item1.Title"></view>
</view>
<view
v-for="(item2, index2) in item1.QuestionContentObj"
:key="item2.id"
class="flex item2 flex_start_center"
>
<view
class="chooseNum"
:class="{ myAnswer: item1.myAnswer === item2.Name }"
@click="change(index1, index2)"
>{{ item2.Name }}
</view>
<view
class="chooseName"
@click="change(index1, index2)"
v-html="item2.Content"
></view>
</view>
</view>
</view>
<van-toast id="van-toast" />
</view>
<view v-for="(item2, index2) in item1.QuestionContentObj" :key="item2.id"
class="flex item2 flex_start_center">
<view class="chooseNum" :class="{ myAnswer: item1.myAnswer === item2.Name }"
@click="change(index1, index2)">{{ item2.Name }}
</view>
<view class="chooseName" @click="change(index1, index2)" v-html="item2.Content"></view>
</view>
</view>
</swiper-item>
<swiper-item></swiper-item>
</swiper>
</view>
<van-toast id="van-toast" />
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
import { changeNumToHan } from "../../utils/index";
export default {
props: { paperData: Object },
setup(props, context) {
console.log(57, props.paperData);
let { ctx } = getCurrentInstance();
let data = reactive({
data: props.paperData,
});
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
import {
changeNumToHan
} from "../../utils/index";
export default {
props: {
paperData: Object,
sort: Number,
isLast: Boolean
},
setup(props, context) {
let {ctx} = getCurrentInstance();
let data = reactive({
autoplay: false,
sortIndex: props.sort+1,
data: props.paperData,
current: 1 ,//默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
let methods = {
changeNumToHan,
jumpPage() {
uni.navigateTo({
url: "/pages/exam/examPaper",
});
},
back() {
uni.navigateBack();
},
//选题
change(index1, index2) {
data.data.DetailsList[index1].myAnswer =
data.data.DetailsList[index1].QuestionContentObj[index2].Name;
},
};
return {
...toRefs(data),
...methods,
};
},
};
let methods = {
changeNumToHan,
jumpPage() {
uni.navigateTo({
url: "/pages/exam/examPaper",
});
},
back() {
uni.navigateBack();
},
//选题
change(index1, index2) {
data.data.DetailsList[index1].myAnswer =
data.data.DetailsList[index1].QuestionContentObj[index2].Name;
},
onchange(e){
data.ExamIndex = e.detail.current;
if(data.ExamIndex===data.data.DetailsList.length+1){
this.$emit('getAfterTopic');
}
if(e.detail.current==0){
this.$emit('getBeforeTopic');
}
}
};
onMounted(()=>{
if(props.isLast){
data.current = props.paperData.DetailsList.length;
}
})
let that = methods;
return {
...toRefs(data),
...methods,
};
},
};
</script>
<style scoped>
.name {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 800;
color: #111111;
}
.num {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.item {
margin-bottom: 40rpx;
}
.item1 {
margin: 25rpx 0;
align-items: center;
}
.item2 {
padding-left: 25rpx;
margin: 30rpx 0;
}
.myAnswer {
background-color: #00acf9 !important;
color: #ffffff !important;
}
.chooseNum {
width: 40rpx;
height: 40rpx;
text-align: center;
line-height: 40rpx;
border-radius: 50%;
border: 1px solid #e2e2e2;
margin-right: 30rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.chooseName {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
}
</style>
\ No newline at end of file
.name {
height: 90rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 800;
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 - 270rpx);
box-sizing: border-box;
}
.num {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.item {
margin-bottom: 40rpx;
}
.item1 {
margin: 25rpx 0;
align-items: center;
}
.item2 {
padding-left: 25rpx;
margin: 30rpx 0;
}
.myAnswer {
background-color: #00acf9 !important;
color: #ffffff !important;
}
.chooseNum {
width: 40rpx;
height: 40rpx;
text-align: center;
line-height: 40rpx;
border-radius: 50%;
border: 1px solid #e2e2e2;
margin-right: 30rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.chooseName {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
}
</style>
......@@ -92,6 +92,7 @@ export default {
props: {
paperData: Object,
sort: Number,
isLast: Boolean
},
setup(props, context) {
let { ctx } = getCurrentInstance();
......@@ -159,7 +160,9 @@ export default {
},
};
onMounted(() => {
console.log(props.paperData, "props.paperData");
if(props.isLast){
data.current = props.paperData.DetailsList.length;
}
});
let that = methods;
return {
......
......@@ -71,6 +71,7 @@
@getAfterTopic="getAfterTopic()"
v-if="item.QuestionTypeKey === 'fill-in' && index === changeIndex"
/>
<<<<<<< HEAD
<!-- 阅读理解 -->
<readingCompre
:paperData="item"
......@@ -84,6 +85,31 @@
/>
<!-- <Judge :paperData="item" v-if="item.QuestionTypeKey === 'judge'" />
<Write
=======
<!-- 阅读理解 -->
<readingCompre
:paperData="item"
:isLast="isLast"
:sort="index"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if="
item.QuestionTypeKey === 'reading-comprehensio' &&
index === changeIndex
"
/>
<!-- 判断题 -->
<Judge
:paperData="item"
:isLast="isLast"
:sort="index"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if="item.QuestionTypeKey === 'judge' && index === changeIndex"
/>
<!--简答题、名词解释、论述题、计算题、口语题、其它-->
<!-- <Write
>>>>>>> cf56b230171a1070596b5408cec3117e0a398f3c
:paperData="item"
v-if="
item.QuestionTypeKey === 'short-answer' ||
......@@ -92,8 +118,8 @@
item.QuestionTypeKey === 'calculation' ||
item.QuestionTypeKey === 'entry-problem'
"
/>
<Connect :paperData="item" v-if="item.QuestionTypeKey === 'matching'" />
/> -->
<!-- <Connect :paperData="item" v-if="item.QuestionTypeKey === 'matching'" />
<Sort
:paperData="item"
v-if="
......@@ -126,8 +152,8 @@ import MultipleChoice from "../../components/subject/MultipleChoice.vue";
import ListenTopic from "../../components/subject/ListenTopic.vue";
import FillInTheBlanks from "../../components/subject/FillInTheBlanks";
import readingCompre from "../../components/subject/readingCompre";
import Judge from "../../components/subject/judge.vue";
import Write from "../../components/subject/write.vue";
import Connect from "../../components/subject/Connect.vue"; //"连线题"
import Sort from "../../components/subject/Sort"; //"排序题"
......@@ -151,8 +177,7 @@ export default {
time: 2 * 60 * 60 * 1000,
statusBarHeight: 0,
// msg: { GuestId: Gid, PaperId: 6, Id: 3 },
msg: { GuestId: Gid, PaperId: 25, Id: 6 },
// msg: { GuestId: Gid, PaperId: 5, Id: 0 },
msg: { GuestId: Gid, PaperId: 5, Id: 0 },
peaperDetail: {},
changeIndex: 0,
isLast: false, //用于判断是否从后往前翻
......@@ -179,6 +204,7 @@ export default {
//往后翻
getAfterTopic() {
this.changeIndex++;
this.isLast = false;
},
//往前翻
getBeforeTopic() {
......
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