Commit e36903fd authored by 罗超's avatar 罗超

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

# Conflicts:
#	src/pages/exam/examPaper.vue
parents e6ace375 81cae92d
<template> <template>
<!-- 主观题 --> <!-- 计算题 -->
<view> <view>
<view class="item"> <view class="item" style="padding:0 20px;">
<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>
<text class="Single_Before">{{ExamIndex}}</text>/<text <view>
class="Exam_Total">{{data.DetailsList.length}}</text> <text class="Single_Before">{{ExamIndex}}</text>/
<text class="Exam_Total">{{data.DetailsList.length}}</text>
</view>
</view> </view>
<swiper class="swiper-box" :autoplay="autoplay" :current="current" @change="onchange"> <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"> <swiper-item v-for="(item1, index1) in data.DetailsList" :key="item1.id">
<view class="item1"> <view class="item1">
<view class="flex flex_start_center"> <view class="flex flex_start_center">
...@@ -23,6 +26,7 @@ ...@@ -23,6 +26,7 @@
</view> </view>
</view> </view>
</swiper-item> </swiper-item>
<swiper-item></swiper-item>
</swiper> </swiper>
</view> </view>
<van-toast id="van-toast" /> <van-toast id="van-toast" />
...@@ -115,7 +119,10 @@ ...@@ -115,7 +119,10 @@
font-weight: bold; font-weight: bold;
color: #DA7878; color: #DA7878;
} }
.swiper-box {
height: calc(100vh - 270rpx);
box-sizing: border-box;
}
.num { .num {
font-size: 26rpx; font-size: 26rpx;
font-family: PingFang SC; font-family: PingFang SC;
......
<template>
<!-- 计算题 -->
<view>
<view class="item" style="padding:0 20px;">
<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></swiper-item>
<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 class="chooseName">
<textarea type="text" v-model="item1.myAnswer" class="input textarea" placeholder="请填写答案"
placeholder-style="textarea-placeholder" :maxlength="-1" />
</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();
props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = "";
});
let data = reactive({
data: props.paperData,
autoplay: false,
sortIndex: props.sort + 1,
current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
let methods = {
changeNumToHan,
jumpPage() {
uni.navigateTo({
url: "/pages/exam/examPaper",
});
},
back() {
uni.navigateBack();
},
onchange(e) {
data.ExamIndex = e.detail.current;
if (data.ExamIndex === data.data.DetailsList.length + 1) {
console.log('进入')
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 {
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;
}
.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;
}
.choose {
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;
}
.input {
box-sizing: border-box;
width: 690rpx;
border-bottom: 2rpx solid #000;
color: #000;
font-size: 22rpx;
}
.textarea {
box-sizing: border-box;
padding: 20rpx 0;
}
/deep/.textarea-placeholder {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #cccccc;
}
</style>
<template>
<!-- 计算题 -->
<view>
<view class="item" style="padding:0 20px;">
<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></swiper-item>
<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 class="chooseName">
<textarea type="text" v-model="item1.myAnswer" class="input textarea" placeholder="请填写答案"
placeholder-style="textarea-placeholder" :maxlength="-1" />
</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();
props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = "";
});
let data = reactive({
data: props.paperData,
autoplay: false,
sortIndex: props.sort + 1,
current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
let methods = {
changeNumToHan,
jumpPage() {
uni.navigateTo({
url: "/pages/exam/examPaper",
});
},
back() {
uni.navigateBack();
},
onchange(e) {
data.ExamIndex = e.detail.current;
if (data.ExamIndex === data.data.DetailsList.length + 1) {
console.log('进入')
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 {
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;
}
.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;
}
.choose {
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;
}
.input {
box-sizing: border-box;
width: 690rpx;
border-bottom: 2rpx solid #000;
color: #000;
font-size: 22rpx;
}
.textarea {
box-sizing: border-box;
padding: 20rpx 0;
}
/deep/.textarea-placeholder {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #cccccc;
}
</style>
<template>
<!-- 计算题 -->
<view>
<view class="item" style="padding:0 20px;">
<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></swiper-item>
<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 class="chooseName">
<textarea type="text" v-model="item1.myAnswer" class="input textarea" placeholder="请填写答案"
placeholder-style="textarea-placeholder" :maxlength="-1" />
</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();
props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = "";
});
let data = reactive({
data: props.paperData,
autoplay: false,
sortIndex: props.sort + 1,
current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
let methods = {
changeNumToHan,
jumpPage() {
uni.navigateTo({
url: "/pages/exam/examPaper",
});
},
back() {
uni.navigateBack();
},
onchange(e) {
data.ExamIndex = e.detail.current;
if (data.ExamIndex === data.data.DetailsList.length + 1) {
console.log('进入')
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 {
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;
}
.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;
}
.choose {
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;
}
.input {
box-sizing: border-box;
width: 690rpx;
border-bottom: 2rpx solid #000;
color: #000;
font-size: 22rpx;
}
.textarea {
box-sizing: border-box;
padding: 20rpx 0;
}
/deep/.textarea-placeholder {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #cccccc;
}
</style>
<template>
<!-- 计算题 -->
<view>
<view class="item" style="padding:0 20px;">
<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></swiper-item>
<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 class="chooseName">
<textarea type="text" v-model="item1.myAnswer" class="input textarea" placeholder="请填写答案"
placeholder-style="textarea-placeholder" :maxlength="-1" />
</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();
props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = "";
});
let data = reactive({
data: props.paperData,
autoplay: false,
sortIndex: props.sort + 1,
current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
let methods = {
changeNumToHan,
jumpPage() {
uni.navigateTo({
url: "/pages/exam/examPaper",
});
},
back() {
uni.navigateBack();
},
onchange(e) {
data.ExamIndex = e.detail.current;
if (data.ExamIndex === data.data.DetailsList.length + 1) {
console.log('进入')
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 {
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;
}
.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;
}
.choose {
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;
}
.input {
box-sizing: border-box;
width: 690rpx;
border-bottom: 2rpx solid #000;
color: #000;
font-size: 22rpx;
}
.textarea {
box-sizing: border-box;
padding: 20rpx 0;
}
/deep/.textarea-placeholder {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #cccccc;
}
</style>
<template>
<!-- 计算题 -->
<view>
<view class="item" style="padding:0 20px;">
<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></swiper-item>
<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 class="chooseName">
<textarea type="text" v-model="item1.myAnswer" class="input textarea" placeholder="请填写答案"
placeholder-style="textarea-placeholder" :maxlength="-1" />
</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();
props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = "";
});
let data = reactive({
data: props.paperData,
autoplay: false,
sortIndex: props.sort + 1,
current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
let methods = {
changeNumToHan,
jumpPage() {
uni.navigateTo({
url: "/pages/exam/examPaper",
});
},
back() {
uni.navigateBack();
},
onchange(e) {
data.ExamIndex = e.detail.current;
if (data.ExamIndex === data.data.DetailsList.length + 1) {
console.log('进入')
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 {
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;
}
.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;
}
.choose {
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;
}
.input {
box-sizing: border-box;
width: 690rpx;
border-bottom: 2rpx solid #000;
color: #000;
font-size: 22rpx;
}
.textarea {
box-sizing: border-box;
padding: 20rpx 0;
}
/deep/.textarea-placeholder {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #cccccc;
}
</style>
<template>
<!-- 论述题 -->
<view>
<view class="item" style="padding:0 20px;">
<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></swiper-item>
<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 class="chooseName">
<textarea type="text" v-model="item1.myAnswer" class="input textarea" placeholder="请填写答案"
placeholder-style="textarea-placeholder" :maxlength="-1" />
</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();
props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = "";
});
let data = reactive({
data: props.paperData,
autoplay: false,
sortIndex: props.sort + 1,
current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
let methods = {
changeNumToHan,
jumpPage() {
uni.navigateTo({
url: "/pages/exam/examPaper",
});
},
back() {
uni.navigateBack();
},
onchange(e) {
data.ExamIndex = e.detail.current;
if (data.ExamIndex === data.data.DetailsList.length + 1) {
console.log('进入')
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 {
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;
}
.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;
}
.choose {
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;
}
.input {
box-sizing: border-box;
width: 690rpx;
border-bottom: 2rpx solid #000;
color: #000;
font-size: 22rpx;
}
.textarea {
box-sizing: border-box;
padding: 20rpx 0;
}
/deep/.textarea-placeholder {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #cccccc;
}
</style>
<template>
<!-- 名词解释 -->
<view>
<view class="item" style="padding:0 20px;">
<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></swiper-item>
<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 class="chooseName">
<textarea type="text" v-model="item1.myAnswer" class="input textarea" placeholder="请填写答案"
placeholder-style="textarea-placeholder" :maxlength="-1" />
</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();
props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = "";
});
let data = reactive({
data: props.paperData,
autoplay: false,
sortIndex: props.sort + 1,
current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
let methods = {
changeNumToHan,
jumpPage() {
uni.navigateTo({
url: "/pages/exam/examPaper",
});
},
back() {
uni.navigateBack();
},
onchange(e) {
data.ExamIndex = e.detail.current;
if (data.ExamIndex === data.data.DetailsList.length + 1) {
console.log('进入')
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 {
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;
}
.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;
}
.choose {
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;
}
.input {
box-sizing: border-box;
width: 690rpx;
border-bottom: 2rpx solid #000;
color: #000;
font-size: 22rpx;
}
.textarea {
box-sizing: border-box;
padding: 20rpx 0;
}
/deep/.textarea-placeholder {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #cccccc;
}
</style>
<template>
<!-- 简答题 -->
<view>
<view class="item" style="padding:0 20px;">
<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></swiper-item>
<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 class="chooseName">
<textarea type="text" v-model="item1.myAnswer" class="input textarea" placeholder="请填写答案"
placeholder-style="textarea-placeholder" :maxlength="-1" />
</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();
props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = "";
});
let data = reactive({
data: props.paperData,
autoplay: false,
sortIndex: props.sort + 1,
current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
let methods = {
changeNumToHan,
jumpPage() {
uni.navigateTo({
url: "/pages/exam/examPaper",
});
},
back() {
uni.navigateBack();
},
onchange(e) {
data.ExamIndex = e.detail.current;
if (data.ExamIndex === data.data.DetailsList.length + 1) {
console.log('进入')
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 {
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;
}
.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;
}
.choose {
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;
}
.input {
box-sizing: border-box;
width: 690rpx;
border-bottom: 2rpx solid #000;
color: #000;
font-size: 22rpx;
}
.textarea {
box-sizing: border-box;
padding: 20rpx 0;
}
/deep/.textarea-placeholder {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #cccccc;
}
</style>
...@@ -101,25 +101,106 @@ ...@@ -101,25 +101,106 @@
@getBeforeTopic="getBeforeTopic()" @getBeforeTopic="getBeforeTopic()"
v-if="item.QuestionTypeKey === 'judge' && index === changeIndex" v-if="item.QuestionTypeKey === 'judge' && index === changeIndex"
/> />
<!--简答题、名词解释、论述题、计算题、口语题、其它--> <!-- 简答题 -->
<!-- <Write <shortAnswer
:paperData="item" :paperData="item"
:isLast="isLast"
:sort="index"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if="
item.QuestionTypeKey === 'short-answer' && index === changeIndex
"
/>
<!-- 名词解释 -->
<nounExplanation
:paperData="item"
:isLast="isLast"
:sort="index"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if="
item.QuestionTypeKey === 'noun-explanation' && index === changeIndex
"
/>
<!-- 论述题 -->
<easyQuestion
:paperData="item"
:isLast="isLast"
:sort="index"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if="
item.QuestionTypeKey === 'essay-question' && index === changeIndex
"
/>
<!-- 计算题 -->
<Calculation
:paperData="item"
:isLast="isLast"
:sort="index"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if="item.QuestionTypeKey === 'calculation' && index === changeIndex"
/>
<!-- 口语题 -->
<Spoken
:paperData="item"
:isLast="isLast"
:sort="index"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if="item.QuestionTypeKey === 'spoken' && index === changeIndex"
/>
<!-- 其他 -->
<Other
:paperData="item"
:isLast="isLast"
:sort="index"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if="item.QuestionTypeKey === 'other' && index === changeIndex"
/>
<!-- 完型填空 -->
<Cloze
:paperData="item"
:isLast="isLast"
:sort="index"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if="item.QuestionTypeKey === 'cloze' && index === changeIndex"
/>
<!-- 资料题 -->
<Dataquestion
:paperData="item"
:isLast="isLast"
:sort="index"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if=" v-if="
item.QuestionTypeKey === 'short-answer' || item.QuestionTypeKey === 'data-question' && index === changeIndex
item.QuestionTypeKey === 'noun-explanation' ||
item.QuestionTypeKey === 'essay-question' ||
item.QuestionTypeKey === 'calculation' ||
item.QuestionTypeKey === 'entry-problem'
" "
/> --> />
<!-- <Connect :paperData="item" v-if="item.QuestionTypeKey === 'matching'" /> <!-- 排序题 -->
<Sort <SortingProblem
:paperData="item" :paperData="item"
:isLast="isLast"
:sort="index"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if=" v-if="
item.QuestionTypeKey === 'sorting-problem' || item.QuestionTypeKey === 'sorting-problem' && index === changeIndex
item.QuestionTypeKey === 'listening'
" "
/> --> />
<!-- 连线题待完善 -->
<Connect
:paperData="item"
:isLast="isLast"
:sort="index"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if="item.QuestionTypeKey === 'matching' && index === changeIndex"
/>
</view> </view>
</view> </view>
<van-toast id="van-toast" /> <van-toast id="van-toast" />
...@@ -146,8 +227,15 @@ import ListenTopic from "../../components/subject/ListenTopic.vue"; ...@@ -146,8 +227,15 @@ import ListenTopic from "../../components/subject/ListenTopic.vue";
import FillInTheBlanks from "../../components/subject/FillInTheBlanks"; import FillInTheBlanks from "../../components/subject/FillInTheBlanks";
import readingCompre from "../../components/subject/readingCompre"; import readingCompre from "../../components/subject/readingCompre";
import Judge from "../../components/subject/judge.vue"; import Judge from "../../components/subject/judge.vue";
import ShortAnswer from "../../components/subject/shortAnswer.vue";
import Write from "../../components/subject/write.vue"; import nounExplanation from "../../components/subject/nounExplanation.vue";
import easyQuestion from "../../components/subject/easyQuestion.vue";
import Calculation from "../../components/subject/Calculation.vue";
import Spoken from "../../components/subject/Spoken.vue";
import Other from "../../components/subject/Other.vue";
import Cloze from "../../components/subject/Cloze.vue";
import Dataquestion from "../../components/subject/Dataquestion.vue";
import SortingProblem from "../../components/subject/SortingProblem.vue";
import Connect from "../../components/subject/Connect.vue"; //"连线题" import Connect from "../../components/subject/Connect.vue"; //"连线题"
import Sort from "../../components/subject/Sort"; //"排序题" import Sort from "../../components/subject/Sort"; //"排序题"
export default { export default {
...@@ -159,7 +247,16 @@ export default { ...@@ -159,7 +247,16 @@ export default {
FillInTheBlanks, FillInTheBlanks,
readingCompre, readingCompre,
Judge, Judge,
Write, ShortAnswer,
nounExplanation,
easyQuestion,
Calculation,
Spoken,
Other,
Cloze,
Dataquestion,
SortingProblem,
Connect, Connect,
Sort, Sort,
}, },
......
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