Commit e3c3f71d authored by 罗超's avatar 罗超

1

parent e0ca408a
<template> <template>
<!-- 计算题 --> <!-- 计算题 -->
<view> <view>
<view class="item" style="padding:0 20px;"> <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>
<view> <view>
<text class="Single_Before">{{ExamIndex}}</text>/ <text class="Single_Before">{{ ExamIndex }}</text
<text class="Exam_Total">{{data.DetailsList.length}}</text> >/
<text class="Exam_Total">{{ data.DetailsList.length }}</text>
</view> </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 v-if="sortIndex != 1"></swiper-item> <swiper-item v-if="sortIndex != 1"></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">
<view>{{ index1 + 1 }}</view> <view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view> <view class="num" v-html="item1.Title"></view>
</view> </view>
<view class="chooseName"> <view class="chooseName">
<textarea type="text" v-model="item1.myAnswer" class="input textarea" placeholder="请填写答案" <textarea
placeholder-style="textarea-placeholder" :maxlength="-1" /> type="text"
v-model="item1.Answer"
class="input textarea"
placeholder="请填写答案"
placeholder-style="textarea-placeholder"
:maxlength="-1"
/>
</view> </view>
</view> </view>
</swiper-item> </swiper-item>
...@@ -34,7 +51,7 @@ ...@@ -34,7 +51,7 @@
</template> </template>
<script> <script>
import { import {
ref, ref,
reactive, reactive,
toRefs, toRefs,
...@@ -43,19 +60,17 @@ ...@@ -43,19 +60,17 @@
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,
sort: Number, sort: Number,
sortTotal: Number, sortTotal: Number,
isLast: Boolean isLast: Boolean,
}, },
setup(props, context) { setup(props, context) {
let {ctx} = getCurrentInstance(); let { ctx } = getCurrentInstance();
props.paperData.DetailsList.forEach((item, index) => { props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = ""; item.myAnswer = "";
}); });
...@@ -81,29 +96,29 @@ ...@@ -81,29 +96,29 @@
onchange(e) { onchange(e) {
data.ExamIndex = e.detail.current; data.ExamIndex = e.detail.current;
if (data.ExamIndex === data.data.DetailsList.length + 1) { if (data.ExamIndex === data.data.DetailsList.length + 1) {
console.log('进入') console.log("进入");
this.$emit('getAfterTopic'); this.$emit("getAfterTopic");
} }
if (e.detail.current == 0) { if (e.detail.current == 0) {
this.$emit('getBeforeTopic'); this.$emit("getBeforeTopic");
}
} }
},
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}) });
let that = methods; let that = methods;
return { return {
...toRefs(data), ...toRefs(data),
...methods, ...methods,
}; };
}, },
}; };
</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;
...@@ -112,44 +127,44 @@ ...@@ -112,44 +127,44 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.Single_Before { .Single_Before {
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
color: #DA7878; color: #da7878;
} }
.swiper-box { .swiper-box {
height: calc(100vh - 270rpx); height: calc(100vh - 270rpx);
box-sizing: border-box; box-sizing: border-box;
} }
.num { .num {
font-size: 26rpx; font-size: 26rpx;
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;
} }
.choose { .choose {
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;
...@@ -161,32 +176,32 @@ ...@@ -161,32 +176,32 @@
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
color: #111111; color: #111111;
} }
.chooseName { .chooseName {
font-size: 24rpx; font-size: 24rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #111111; color: #111111;
} }
.input { .input {
box-sizing: border-box; box-sizing: border-box;
width: 690rpx; width: 690rpx;
border-bottom: 2rpx solid #000; border-bottom: 2rpx solid #000;
color: #000; color: #000;
font-size: 22rpx; font-size: 22rpx;
} }
.textarea { .textarea {
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx 0; padding: 20rpx 0;
} }
/deep/.textarea-placeholder { /deep/.textarea-placeholder {
font-size: 20rpx; font-size: 20rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #cccccc; color: #cccccc;
} }
</style> </style>
<template> <template>
<!-- 计算题 --> <!-- 资料题 -->
<view> <view>
<view class="item" style="padding:0 20px;"> <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>
<view> <view>
<text class="Single_Before">{{ExamIndex}}</text>/ <text class="Single_Before">{{ ExamIndex }}</text
<text class="Exam_Total">{{data.DetailsList.length}}</text> >/
<text class="Exam_Total">{{ data.DetailsList.length }}</text>
</view> </view>
</view> </view>
<swiper class="swiper-box" :autoplay="autoplay" :current="current" @change="onchange"> <swiper
<swiper-item v-if="sortIndex != 1"></swiper-item> class="swiper-box"
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="item1.id"> :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="item1">
<view class="flex flex_start_center"> <view class="flex flex_start_center">
<view>{{ index1 + 1 }}</view> <view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view> <view class="num" v-html="item1.Title"></view>
</view> </view>
<view v-for="(item2, index2) in item1.QuestionContentObj" :key="item2.id" <view
class="flex item2 flex_start_center"> v-for="(item2, index2) in item1.QuestionContentObj"
:key="index2"
class="flex item2 flex_start_center"
>
<view class="chooseName"> <view class="chooseName">
<input type="text" v-model="item2.Content" class="input" /> <input type="text" v-model="item2.Content" class="input" />
</view> </view>
...@@ -36,7 +50,7 @@ ...@@ -36,7 +50,7 @@
</template> </template>
<script> <script>
import { import {
ref, ref,
reactive, reactive,
toRefs, toRefs,
...@@ -45,21 +59,17 @@ ...@@ -45,21 +59,17 @@
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,
sort: Number, sort: Number,
sortTotal: Number, sortTotal: Number,
isLast: Boolean isLast: Boolean,
}, },
setup(props, context) { setup(props, context) {
let { let { ctx } = getCurrentInstance();
ctx
} = getCurrentInstance();
props.paperData.DetailsList.forEach((item, index) => { props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = ""; item.myAnswer = "";
}); });
...@@ -85,29 +95,29 @@ ...@@ -85,29 +95,29 @@
onchange(e) { onchange(e) {
data.ExamIndex = e.detail.current; data.ExamIndex = e.detail.current;
if (data.ExamIndex === data.data.DetailsList.length + 1) { if (data.ExamIndex === data.data.DetailsList.length + 1) {
console.log('进入') console.log("进入");
this.$emit('getAfterTopic'); this.$emit("getAfterTopic");
} }
if (e.detail.current == 0) { if (e.detail.current == 0) {
this.$emit('getBeforeTopic'); this.$emit("getBeforeTopic");
}
} }
},
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}) });
let that = methods; let that = methods;
return { return {
...toRefs(data), ...toRefs(data),
...methods, ...methods,
}; };
}, },
}; };
</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;
...@@ -116,44 +126,44 @@ ...@@ -116,44 +126,44 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.Single_Before { .Single_Before {
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
color: #DA7878; color: #da7878;
} }
.swiper-box { .swiper-box {
height: calc(100vh - 270rpx); height: calc(100vh - 270rpx);
box-sizing: border-box; box-sizing: border-box;
} }
.num { .num {
font-size: 26rpx; font-size: 26rpx;
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;
} }
.choose { .choose {
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;
...@@ -165,32 +175,32 @@ ...@@ -165,32 +175,32 @@
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
color: #111111; color: #111111;
} }
.chooseName { .chooseName {
font-size: 24rpx; font-size: 24rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #111111; color: #111111;
} }
.input { .input {
box-sizing: border-box; box-sizing: border-box;
width: 690rpx; width: 690rpx;
border-bottom: 2rpx solid #000; border-bottom: 2rpx solid #000;
color: #000; color: #000;
font-size: 22rpx; font-size: 22rpx;
} }
.textarea { .textarea {
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx 0; padding: 20rpx 0;
} }
/deep/.textarea-placeholder { /deep/.textarea-placeholder {
font-size: 20rpx; font-size: 20rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #cccccc; color: #cccccc;
} }
</style> </style>
<template> <template>
<!-- 计算题 --> <!-- 分录题 -->
<view> <view>
<view class="item" style="padding:0 20px;"> <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>
<view> <view>
<text class="Single_Before">{{ExamIndex}}</text>/ <text class="Single_Before">{{ ExamIndex }}</text
<text class="Exam_Total">{{data.DetailsList.length}}</text> >/
<text class="Exam_Total">{{ data.DetailsList.length }}</text>
</view> </view>
</view> </view>
<swiper class="swiper-box" :autoplay="autoplay" :current="current" @change="onchange"> <swiper
<swiper-item v-if="sortIndex != 1"></swiper-item> class="swiper-box"
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="item1.id"> :autoplay="autoplay"
:current="current"
@change="onchange"
>
<swiper-item></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1"> <view class="item1">
<view class="flex flex_start_center"> <view class="flex flex_start_center">
<view>{{ index1 + 1 }}</view> <view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view> <view class="num" v-html="item1.Title"></view>
</view> </view>
<view v-for="(item2, index2) in item1.QuestionContentObj" :key="item2.id" <view
class="flex item2 flex_start_center"> v-for="(item2, index2) in item1.QuestionContentObj"
:key="index2"
class="flex item2 flex_start_center"
>
<view class="chooseName"> <view class="chooseName">
<input type="text" v-model="item2.Content" class="input" /> <input
type="text"
v-model="item2.Content"
class="input"
@input="input($event, item2)"
/>
</view> </view>
</view> </view>
</view> </view>
...@@ -36,7 +52,7 @@ ...@@ -36,7 +52,7 @@
</template> </template>
<script> <script>
import { import {
ref, ref,
reactive, reactive,
toRefs, toRefs,
...@@ -45,21 +61,17 @@ ...@@ -45,21 +61,17 @@
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,
sort: Number, sort: Number,
sortTotal: Number, sortTotal: Number,
isLast: Boolean isLast: Boolean,
}, },
setup(props, context) { setup(props, context) {
let { let { ctx } = getCurrentInstance();
ctx
} = getCurrentInstance();
props.paperData.DetailsList.forEach((item, index) => { props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = ""; item.myAnswer = "";
}); });
...@@ -85,29 +97,32 @@ ...@@ -85,29 +97,32 @@
onchange(e) { onchange(e) {
data.ExamIndex = e.detail.current; data.ExamIndex = e.detail.current;
if (data.ExamIndex === data.data.DetailsList.length + 1) { if (data.ExamIndex === data.data.DetailsList.length + 1) {
console.log('进入') console.log("进入");
this.$emit('getAfterTopic'); this.$emit("getAfterTopic");
} }
if (e.detail.current == 0) { if (e.detail.current == 0) {
this.$emit('getBeforeTopic'); this.$emit("getBeforeTopic");
}
} }
},
input(e, i) {
console.log(i);
},
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}) });
let that = methods; let that = methods;
return { return {
...toRefs(data), ...toRefs(data),
...methods, ...methods,
}; };
}, },
}; };
</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;
...@@ -116,46 +131,46 @@ ...@@ -116,46 +131,46 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.Single_Before { .Single_Before {
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
color: #DA7878; color: #da7878;
} }
.swiper-box { .swiper-box {
height: calc(100vh - 270rpx); height: calc(100vh - 270rpx);
box-sizing: border-box; box-sizing: border-box;
} }
.num { .num {
font-size: 26rpx; font-size: 26rpx;
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;
} }
.choose { .choose {
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;
...@@ -167,32 +182,32 @@ ...@@ -167,32 +182,32 @@
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
color: #111111; color: #111111;
} }
.chooseName { .chooseName {
font-size: 24rpx; font-size: 24rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #111111; color: #111111;
} }
.input { .input {
box-sizing: border-box; box-sizing: border-box;
width: 690rpx; width: 690rpx;
border-bottom: 2rpx solid #000; border-bottom: 2rpx solid #000;
color: #000; color: #000;
font-size: 22rpx; font-size: 22rpx;
} }
.textarea { .textarea {
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx 0; padding: 20rpx 0;
} }
/deep/.textarea-placeholder { /deep/.textarea-placeholder {
font-size: 20rpx; font-size: 20rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #cccccc; color: #cccccc;
} }
</style> </style>
<template> <template>
<!-- 单选题 --> <!-- 听力题 -->
<view class="listen"> <view class="listen">
<view class="item" style="padding: 0 20px"> <view class="item" style="padding: 0 20px">
<view class="name"> <view class="name">
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
:time="audioTime" :time="audioTime"
:auto-start="false" :auto-start="false"
class="flex flex_center_center" class="flex flex_center_center"
style="color:#00acf9;"
ref="listenCountdown" ref="listenCountdown"
format="mm:ss" format="mm:ss"
/> />
...@@ -157,7 +158,8 @@ export default { ...@@ -157,7 +158,8 @@ export default {
isLast: Boolean, isLast: Boolean,
}, },
setup(props, context) { setup(props, context) {
let { refs } = getCurrentInstance(); let {refs} = getCurrentInstance();
let data = reactive({ let data = reactive({
autoplay: false, autoplay: false,
sortIndex: props.sort + 1, //大题序号 sortIndex: props.sort + 1, //大题序号
...@@ -183,6 +185,7 @@ export default { ...@@ -183,6 +185,7 @@ export default {
} }
}); });
}); });
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
...@@ -212,7 +215,7 @@ export default { ...@@ -212,7 +215,7 @@ export default {
if(data.isPlay) { if(data.isPlay) {
innerAudioContext.play(); innerAudioContext.play();
// refs.listenCountdown.start(); // refs.listenCountdown.start();
console.log("开始播放",refs); console.log("开始播放");
data.isPlay=false data.isPlay=false
}else{ }else{
innerAudioContext.stop(); innerAudioContext.stop();
...@@ -265,6 +268,7 @@ export default { ...@@ -265,6 +268,7 @@ export default {
}, },
}; };
onMounted(() => { onMounted(() => {
console.log('refs',refs)
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
...@@ -385,6 +389,5 @@ export default { ...@@ -385,6 +389,5 @@ export default {
.listen .van-count-down{ .listen .van-count-down{
font-size: 22rpx !important; font-size: 22rpx !important;
color: #00acf9 !important; color: #00acf9 !important;
background-color: #000000
} }
</style> </style>
<template> <template>
<!-- 论述题 --> <!-- 论述题 -->
<view> <view>
<view class="item" style="padding:0 20px;"> <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>
<view> <view>
<text class="Single_Before">{{ExamIndex}}</text>/ <text class="Single_Before">{{ ExamIndex }}</text
<text class="Exam_Total">{{data.DetailsList.length}}</text> >/
<text class="Exam_Total">{{ data.DetailsList.length }}</text>
</view> </view>
</view> </view>
<swiper class="swiper-box" :autoplay="autoplay" :current="current" @change="onchange"> <swiper
<swiper-item v-if="sortIndex != 1"></swiper-item> class="swiper-box"
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="item1.id"> :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="item1">
<view class="flex flex_start_center"> <view class="flex flex_start_center">
<view>{{ index1 + 1 }}</view> <view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view> <view class="num" v-html="item1.Title"></view>
</view> </view>
<view class="chooseName"> <view class="chooseName">
<textarea type="text" v-model="item1.myAnswer" class="input textarea" placeholder="请填写答案" <textarea
placeholder-style="textarea-placeholder" :maxlength="-1" /> type="text"
v-model="item1.Answer"
class="input textarea"
placeholder="请填写答案"
placeholder-style="textarea-placeholder"
:maxlength="-1"
/>
</view> </view>
</view> </view>
</swiper-item> </swiper-item>
...@@ -34,7 +51,7 @@ ...@@ -34,7 +51,7 @@
</template> </template>
<script> <script>
import { import {
ref, ref,
reactive, reactive,
toRefs, toRefs,
...@@ -43,21 +60,17 @@ ...@@ -43,21 +60,17 @@
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,
sort: Number, sort: Number,
sortTotal: Number, sortTotal: Number,
isLast: Boolean isLast: Boolean,
}, },
setup(props, context) { setup(props, context) {
let { let { ctx } = getCurrentInstance();
ctx
} = getCurrentInstance();
props.paperData.DetailsList.forEach((item, index) => { props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = ""; item.myAnswer = "";
}); });
...@@ -83,29 +96,29 @@ ...@@ -83,29 +96,29 @@
onchange(e) { onchange(e) {
data.ExamIndex = e.detail.current; data.ExamIndex = e.detail.current;
if (data.ExamIndex === data.data.DetailsList.length + 1) { if (data.ExamIndex === data.data.DetailsList.length + 1) {
console.log('进入') console.log("进入");
this.$emit('getAfterTopic'); this.$emit("getAfterTopic");
} }
if (e.detail.current == 0) { if (e.detail.current == 0) {
this.$emit('getBeforeTopic'); this.$emit("getBeforeTopic");
}
} }
},
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}) });
let that = methods; let that = methods;
return { return {
...toRefs(data), ...toRefs(data),
...methods, ...methods,
}; };
}, },
}; };
</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;
...@@ -114,44 +127,44 @@ ...@@ -114,44 +127,44 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.Single_Before { .Single_Before {
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
color: #DA7878; color: #da7878;
} }
.swiper-box { .swiper-box {
height: calc(100vh - 270rpx); height: calc(100vh - 270rpx);
box-sizing: border-box; box-sizing: border-box;
} }
.num { .num {
font-size: 26rpx; font-size: 26rpx;
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;
} }
.choose { .choose {
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;
...@@ -163,32 +176,32 @@ ...@@ -163,32 +176,32 @@
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
color: #111111; color: #111111;
} }
.chooseName { .chooseName {
font-size: 24rpx; font-size: 24rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #111111; color: #111111;
} }
.input { .input {
box-sizing: border-box; box-sizing: border-box;
width: 690rpx; width: 690rpx;
border-bottom: 2rpx solid #000; border-bottom: 2rpx solid #000;
color: #000; color: #000;
font-size: 22rpx; font-size: 22rpx;
} }
.textarea { .textarea {
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx 0; padding: 20rpx 0;
} }
/deep/.textarea-placeholder { /deep/.textarea-placeholder {
font-size: 20rpx; font-size: 20rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #cccccc; color: #cccccc;
} }
</style> </style>
<template> <template>
<!-- 名词解释 --> <!-- 名词解释 -->
<view> <view>
<view class="item" style="padding:0 20px;"> <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>
<view> <view>
<text class="Single_Before">{{ExamIndex}}</text>/ <text class="Single_Before">{{ ExamIndex }}</text
<text class="Exam_Total">{{data.DetailsList.length}}</text> >/
<text class="Exam_Total">{{ data.DetailsList.length }}</text>
</view> </view>
</view> </view>
<swiper class="swiper-box" :autoplay="autoplay" :current="current" @change="onchange"> <swiper
<swiper-item v-if="sortIndex != 1"></swiper-item> class="swiper-box"
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="item1.id"> :autoplay="autoplay"
:current="current"
@change="onchange"
>
<swiper-item></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1"> <view class="item1">
<view class="flex flex_start_center"> <view class="flex flex_start_center">
<view>{{ index1 + 1 }}</view> <view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view> <view class="num" v-html="item1.Title"></view>
</view> </view>
<view class="chooseName"> <view class="chooseName">
<textarea type="text" v-model="item1.myAnswer" class="input textarea" placeholder="请填写答案" <textarea
placeholder-style="textarea-placeholder" :maxlength="-1" /> type="text"
v-model="item1.Answer"
class="input textarea"
placeholder="请填写答案"
placeholder-style="textarea-placeholder"
:maxlength="-1"
/>
</view> </view>
</view> </view>
</swiper-item> </swiper-item>
...@@ -34,7 +48,7 @@ ...@@ -34,7 +48,7 @@
</template> </template>
<script> <script>
import { import {
ref, ref,
reactive, reactive,
toRefs, toRefs,
...@@ -43,21 +57,17 @@ ...@@ -43,21 +57,17 @@
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,
sort: Number, sort: Number,
sortTotal: Number, sortTotal: Number,
isLast: Boolean isLast: Boolean,
}, },
setup(props, context) { setup(props, context) {
let { let { ctx } = getCurrentInstance();
ctx
} = getCurrentInstance();
props.paperData.DetailsList.forEach((item, index) => { props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = ""; item.myAnswer = "";
}); });
...@@ -83,29 +93,29 @@ ...@@ -83,29 +93,29 @@
onchange(e) { onchange(e) {
data.ExamIndex = e.detail.current; data.ExamIndex = e.detail.current;
if (data.ExamIndex === data.data.DetailsList.length + 1) { if (data.ExamIndex === data.data.DetailsList.length + 1) {
console.log('进入') console.log("进入");
this.$emit('getAfterTopic'); this.$emit("getAfterTopic");
} }
if (e.detail.current == 0) { if (e.detail.current == 0) {
this.$emit('getBeforeTopic'); this.$emit("getBeforeTopic");
}
} }
},
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}) });
let that = methods; let that = methods;
return { return {
...toRefs(data), ...toRefs(data),
...methods, ...methods,
}; };
}, },
}; };
</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;
...@@ -114,44 +124,44 @@ ...@@ -114,44 +124,44 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.Single_Before { .Single_Before {
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
color: #DA7878; color: #da7878;
} }
.swiper-box { .swiper-box {
height: calc(100vh - 270rpx); height: calc(100vh - 270rpx);
box-sizing: border-box; box-sizing: border-box;
} }
.num { .num {
font-size: 26rpx; font-size: 26rpx;
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;
} }
.choose { .choose {
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;
...@@ -163,32 +173,32 @@ ...@@ -163,32 +173,32 @@
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
color: #111111; color: #111111;
} }
.chooseName { .chooseName {
font-size: 24rpx; font-size: 24rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #111111; color: #111111;
} }
.input { .input {
box-sizing: border-box; box-sizing: border-box;
width: 690rpx; width: 690rpx;
border-bottom: 2rpx solid #000; border-bottom: 2rpx solid #000;
color: #000; color: #000;
font-size: 22rpx; font-size: 22rpx;
} }
.textarea { .textarea {
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx 0; padding: 20rpx 0;
} }
/deep/.textarea-placeholder { /deep/.textarea-placeholder {
font-size: 20rpx; font-size: 20rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #cccccc; color: #cccccc;
} }
</style> </style>
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