Commit 9eae14cd authored by zhengke's avatar zhengke

修改

parent c1433d1d
<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 }}
......
<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 }}
......
<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 }}
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
} }
.item1 { .item1 {
margin: 25rpx 0; /* margin: 25rpx 0; */
align-items: center; align-items: center;
} }
......
<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 }}
......
<template> <template>
<!-- 单选题 --> <!-- 单选题 -->
<view> <view>
<view class="item"> <view class="item" style="padding:0 20px;">
<view class="name"> <view class="name">
<view> <view>
{{ changeNumToHan(data.GSortNum + 1) }}{{ data.GroupName }} {{ changeNumToHan(data.GSortNum + 1) }}{{ data.GroupName }}
......
<template> <template>
<!-- 主观题 --> <!-- 主观题 -->
<view> <view>
<view class="item"> <view class="item">
<view class="name" <view class="name">
>{{ changeNumToHan(data.GSortNum + 1) }}{{ data.GroupName }}</view <view>
> {{ changeNumToHan(sortIndex) }}{{ data.GroupName }}
<view <text style="color:#999999;">(共{{data.DetailsList.length}}道,{{data.GScore}}分)</text>
v-for="(item1, index1) in data.DetailsList" </view>
:key="item1.id" <text class="Single_Before">{{ExamIndex}}</text>/<text
class="item1" class="Exam_Total">{{data.DetailsList.length}}</text>
> </view>
<view class="flex flex_start_center"> <swiper class="swiper-box" :autoplay="autoplay" :current="current" @change="onchange">
<view>{{ index1 + 1 }}</view> <swiper-item v-for="(item1, index1) in data.DetailsList" :key="item1.id">
<view class="num" v-html="item1.Title"></view> <view class="item1">
</view> <view class="flex flex_start_center">
<view>{{ index1 + 1 }}</view>
<!-- <view <view class="num" v-html="item1.Title"></view>
v-for="(item2, index2) in item1.QuestionContentObj" </view>
:key="item2.id" <view class="chooseName">
class="flex item2 flex_start_center" <textarea type="text" v-model="item1.myAnswer" class="input textarea" placeholder="请填写答案"
> --> placeholder-style="textarea-placeholder" :maxlength="-1" />
<view class="chooseName"> </view>
<textarea </view>
type="text" </swiper-item>
v-model="item1.myAnswer" </swiper>
class="input textarea" </view>
placeholder="请填写答案" <van-toast id="van-toast" />
placeholder-style="textarea-placeholder" </view>
:maxlength="-1"
/>
</view>
<!-- </view> -->
</view>
</view>
<van-toast id="van-toast" />
</view>
</template> </template>
<script> <script>
import { import {
ref, ref,
reactive, reactive,
toRefs, toRefs,
toRef, toRef,
getCurrentInstance, getCurrentInstance,
watch, watch,
computed, computed,
onMounted, onMounted,
} from "vue"; } from "vue";
import { changeNumToHan } from "../../utils/index"; import {
export default { changeNumToHan
props: { paperData: Object }, } from "../../utils/index";
setup(props, context) { export default {
let { ctx } = getCurrentInstance(); props: {
props.paperData.DetailsList.forEach((item, index) => { paperData: Object,
item.myAnswer = ""; sort: Number,
}); isLast: Boolean
let data = reactive({ },
data: props.paperData, 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 = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/exam/examPaper", url: "/pages/exam/examPaper",
}); });
}, },
back() { back() {
uni.navigateBack(); uni.navigateBack();
}, },
}; onchange(e) {
return { data.ExamIndex = e.detail.current;
...toRefs(data), if (data.ExamIndex === data.data.DetailsList.length + 1) {
...methods, 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> </script>
<style scoped> <style scoped>
.name { .name {
font-size: 28rpx; height: 90rpx;
font-family: PingFang SC; font-size: 28rpx;
font-weight: 800; font-family: PingFang SC;
color: #111111; font-weight: 800;
} color: #111111;
.num { display: flex;
font-size: 26rpx; align-items: center;
font-family: PingFang SC; justify-content: space-between;
font-weight: bold; }
color: #111111;
} .Single_Before {
.item { font-size: 28rpx;
margin-bottom: 40rpx; font-weight: bold;
} color: #DA7878;
.item1 { }
margin: 25rpx 0;
align-items: center; .num {
} font-size: 26rpx;
.item2 { font-family: PingFang SC;
/* padding-left: 25rpx; */ font-weight: bold;
margin: 30rpx 0; color: #111111;
} }
.choose {
background-color: #00acf9 !important; .item {
color: #ffffff !important; margin-bottom: 40rpx;
} }
.chooseNum {
width: 40rpx; .item1 {
height: 40rpx; margin: 25rpx 0;
text-align: center; align-items: center;
line-height: 40rpx; }
border-radius: 50%;
border: 1px solid #e2e2e2; .item2 {
margin-right: 30rpx; /* padding-left: 25rpx; */
font-size: 26rpx; margin: 30rpx 0;
font-family: PingFang SC; }
font-weight: bold;
color: #111111; .choose {
} background-color: #00acf9 !important;
.chooseName { color: #ffffff !important;
font-size: 24rpx; }
font-family: PingFang SC;
font-weight: 500; .chooseNum {
color: #111111; width: 40rpx;
} height: 40rpx;
.input { text-align: center;
box-sizing: border-box; line-height: 40rpx;
width: 690rpx; border-radius: 50%;
border-bottom: 2rpx solid #000; border: 1px solid #e2e2e2;
color: #000; margin-right: 30rpx;
font-size: 22rpx; font-size: 26rpx;
} font-family: PingFang SC;
.textarea { font-weight: bold;
box-sizing: border-box; color: #111111;
padding: 20rpx 0; }
}
/deep/.textarea-placeholder { .chooseName {
font-size: 20rpx; font-size: 24rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #cccccc; color: #111111;
} }
</style>
\ No newline at end of file .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>
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
v-if="item.QuestionTypeKey === 'judge' && index === changeIndex" v-if="item.QuestionTypeKey === 'judge' && index === changeIndex"
/> />
<!--简答题、名词解释、论述题、计算题、口语题、其它--> <!--简答题、名词解释、论述题、计算题、口语题、其它-->
<!-- <Write <Write
:paperData="item" :paperData="item"
v-if=" v-if="
item.QuestionTypeKey === 'short-answer' || item.QuestionTypeKey === 'short-answer' ||
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
item.QuestionTypeKey === 'calculation' || item.QuestionTypeKey === 'calculation' ||
item.QuestionTypeKey === 'entry-problem' item.QuestionTypeKey === 'entry-problem'
" "
/> --> />
<!-- <Connect :paperData="item" v-if="item.QuestionTypeKey === 'matching'" /> <!-- <Connect :paperData="item" v-if="item.QuestionTypeKey === 'matching'" />
<Sort <Sort
:paperData="item" :paperData="item"
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
time: 2 * 60 * 60 * 1000, time: 2 * 60 * 60 * 1000,
statusBarHeight: 0, statusBarHeight: 0,
// msg: { GuestId: Gid, PaperId: 6, Id: 3 }, // msg: { GuestId: Gid, PaperId: 6, Id: 3 },
msg: { GuestId: Gid, PaperId: 5, Id: 0 }, msg: { GuestId: Gid, PaperId: 5, PublishId: 1 },
peaperDetail: {}, peaperDetail: {},
changeIndex: 0, changeIndex: 0,
isLast: false, //用于判断是否从后往前翻 isLast: false, //用于判断是否从后往前翻
......
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