Commit e3c3f71d authored by 罗超's avatar 罗超

1

parent e0ca408a
<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 v-if="sortIndex != 1"></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 v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
</view>
<van-toast id="van-toast" />
</view>
<!-- 计算题 -->
<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 v-if="sortIndex != 1"></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.Answer"
class="input textarea"
placeholder="请填写答案"
placeholder-style="textarea-placeholder"
:maxlength="-1"
/>
</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></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,
sortTotal: 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,
sortTotal: props.sortTotal,
current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
import { changeNumToHan } from "../../utils/index";
export default {
props: {
paperData: Object,
sort: Number,
sortTotal: 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,
sortTotal: props.sortTotal,
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,
};
},
};
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;
}
.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;
}
.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;
}
.item {
margin-bottom: 40rpx;
}
.item1 {
margin: 25rpx 0;
align-items: center;
}
.item1 {
margin: 25rpx 0;
align-items: center;
}
.item2 {
/* padding-left: 25rpx; */
margin: 30rpx 0;
}
.item2 {
/* padding-left: 25rpx; */
margin: 30rpx 0;
}
.choose {
background-color: #00acf9 !important;
color: #ffffff !important;
}
.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;
}
.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;
}
.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;
}
.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;
}
.textarea {
box-sizing: border-box;
padding: 20rpx 0;
}
/deep/.textarea-placeholder {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #cccccc;
}
/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 v-if="sortIndex != 1"></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 v-for="(item2, index2) in item1.QuestionContentObj" :key="item2.id"
class="flex item2 flex_start_center">
<view class="chooseName">
<input type="text" v-model="item2.Content" class="input" />
</view>
</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
</view>
<van-toast id="van-toast" />
</view>
<!-- 资料题 -->
<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
v-for="(item2, index2) in item1.QuestionContentObj"
:key="index2"
class="flex item2 flex_start_center"
>
<view class="chooseName">
<input type="text" v-model="item2.Content" class="input" />
</view>
</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></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,
sortTotal: 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,
sortTotal: props.sortTotal,
current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
import { changeNumToHan } from "../../utils/index";
export default {
props: {
paperData: Object,
sort: Number,
sortTotal: 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,
sortTotal: props.sortTotal,
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,
};
},
};
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;
}
.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;
}
.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;
}
.item {
margin-bottom: 40rpx;
}
.item1 {
margin: 25rpx 0;
align-items: center;
}
.item1 {
margin: 25rpx 0;
align-items: center;
}
.item2 {
/* padding-left: 25rpx; */
margin: 30rpx 0;
}
.item2 {
/* padding-left: 25rpx; */
margin: 30rpx 0;
}
.choose {
background-color: #00acf9 !important;
color: #ffffff !important;
}
.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;
}
.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;
}
.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;
}
.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;
}
.textarea {
box-sizing: border-box;
padding: 20rpx 0;
}
/deep/.textarea-placeholder {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #cccccc;
}
/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 v-if="sortIndex != 1"></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 v-for="(item2, index2) in item1.QuestionContentObj" :key="item2.id"
class="flex item2 flex_start_center">
<view class="chooseName">
<input type="text" v-model="item2.Content" class="input" />
</view>
</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
</view>
<van-toast id="van-toast" />
</view>
<!-- 分录题 -->
<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="index1">
<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="index2"
class="flex item2 flex_start_center"
>
<view class="chooseName">
<input
type="text"
v-model="item2.Content"
class="input"
@input="input($event, item2)"
/>
</view>
</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></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,
sortTotal: 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,
sortTotal: props.sortTotal,
current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
import { changeNumToHan } from "../../utils/index";
export default {
props: {
paperData: Object,
sort: Number,
sortTotal: 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,
sortTotal: props.sortTotal,
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,
};
},
};
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");
}
},
input(e, i) {
console.log(i);
},
};
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;
}
.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;
}
.Single_Before {
font-size: 28rpx;
font-weight: bold;
color: #da7878;
}
.swiper-box {
height: calc(100vh - 270rpx);
box-sizing: border-box;
}
.swiper-box {
height: calc(100vh - 270rpx);
box-sizing: border-box;
}
.num {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.num {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.item {
margin-bottom: 40rpx;
}
.item {
margin-bottom: 40rpx;
}
.item1 {
margin: 25rpx 0;
align-items: center;
}
.item1 {
margin: 25rpx 0;
align-items: center;
}
.item2 {
/* padding-left: 25rpx; */
margin: 30rpx 0;
}
.item2 {
/* padding-left: 25rpx; */
margin: 30rpx 0;
}
.choose {
background-color: #00acf9 !important;
color: #ffffff !important;
}
.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;
}
.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;
}
.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;
}
.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;
}
.textarea {
box-sizing: border-box;
padding: 20rpx 0;
}
/deep/.textarea-placeholder {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #cccccc;
}
/deep/.textarea-placeholder {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #cccccc;
}
</style>
<template>
<!-- 单选题 -->
<!-- 听力题 -->
<view class="listen">
<view class="item" style="padding: 0 20px">
<view class="name">
......@@ -38,6 +38,7 @@
:time="audioTime"
:auto-start="false"
class="flex flex_center_center"
style="color:#00acf9;"
ref="listenCountdown"
format="mm:ss"
/>
......@@ -157,7 +158,8 @@ export default {
isLast: Boolean,
},
setup(props, context) {
let { refs } = getCurrentInstance();
let {refs} = getCurrentInstance();
let data = reactive({
autoplay: false,
sortIndex: props.sort + 1, //大题序号
......@@ -183,6 +185,7 @@ export default {
}
});
});
let methods = {
changeNumToHan,
jumpPage() {
......@@ -212,7 +215,7 @@ export default {
if(data.isPlay) {
innerAudioContext.play();
// refs.listenCountdown.start();
console.log("开始播放",refs);
console.log("开始播放");
data.isPlay=false
}else{
innerAudioContext.stop();
......@@ -265,6 +268,7 @@ export default {
},
};
onMounted(() => {
console.log('refs',refs)
if (props.isLast) {
data.current = props.paperData.DetailsList.length;
}
......@@ -385,6 +389,5 @@ export default {
.listen .van-count-down{
font-size: 22rpx !important;
color: #00acf9 !important;
background-color: #000000
}
</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 v-if="sortIndex != 1"></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 v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
</view>
<van-toast id="van-toast" />
</view>
<!-- 论述题 -->
<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.Answer"
class="input textarea"
placeholder="请填写答案"
placeholder-style="textarea-placeholder"
:maxlength="-1"
/>
</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></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,
sortTotal: 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,
sortTotal: props.sortTotal,
current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
import { changeNumToHan } from "../../utils/index";
export default {
props: {
paperData: Object,
sort: Number,
sortTotal: 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,
sortTotal: props.sortTotal,
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,
};
},
};
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;
}
.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;
}
.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;
}
.item {
margin-bottom: 40rpx;
}
.item1 {
margin: 25rpx 0;
align-items: center;
}
.item1 {
margin: 25rpx 0;
align-items: center;
}
.item2 {
/* padding-left: 25rpx; */
margin: 30rpx 0;
}
.item2 {
/* padding-left: 25rpx; */
margin: 30rpx 0;
}
.choose {
background-color: #00acf9 !important;
color: #ffffff !important;
}
.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;
}
.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;
}
.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;
}
.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;
}
.textarea {
box-sizing: border-box;
padding: 20rpx 0;
}
/deep/.textarea-placeholder {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #cccccc;
}
/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 v-if="sortIndex != 1"></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 v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
</view>
<van-toast id="van-toast" />
</view>
<!-- 名词解释 -->
<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="index1">
<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.Answer"
class="input textarea"
placeholder="请填写答案"
placeholder-style="textarea-placeholder"
:maxlength="-1"
/>
</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></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,
sortTotal: 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,
sortTotal: props.sortTotal,
current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
});
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
import { changeNumToHan } from "../../utils/index";
export default {
props: {
paperData: Object,
sort: Number,
sortTotal: 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,
sortTotal: props.sortTotal,
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,
};
},
};
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;
}
.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;
}
.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;
}
.item {
margin-bottom: 40rpx;
}
.item1 {
margin: 25rpx 0;
align-items: center;
}
.item1 {
margin: 25rpx 0;
align-items: center;
}
.item2 {
/* padding-left: 25rpx; */
margin: 30rpx 0;
}
.item2 {
/* padding-left: 25rpx; */
margin: 30rpx 0;
}
.choose {
background-color: #00acf9 !important;
color: #ffffff !important;
}
.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;
}
.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;
}
.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;
}
.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;
}
.textarea {
box-sizing: border-box;
padding: 20rpx 0;
}
/deep/.textarea-placeholder {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #cccccc;
}
/deep/.textarea-placeholder {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #cccccc;
}
</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