Commit 9188ae8f authored by 罗超's avatar 罗超

1

parent 3ce7b18d
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
:current="current" :current="current"
@change="onchange" @change="onchange"
> >
<swiper-item></swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1"> <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">
...@@ -113,10 +113,20 @@ export default { ...@@ -113,10 +113,20 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
...@@ -148,8 +158,12 @@ export default { ...@@ -148,8 +158,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
let that = methods; let that = methods;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
:current="current" :current="current"
@change="onchange" @change="onchange"
> >
<swiper-item></swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1"> <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">
...@@ -90,10 +90,20 @@ export default { ...@@ -90,10 +90,20 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
...@@ -133,8 +143,12 @@ export default { ...@@ -133,8 +143,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
let that = methods; let that = methods;
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
:current="current" :current="current"
@change="onchange" @change="onchange"
> >
<swiper-item></swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item <swiper-item
v-for="(item1, index1) in data.DetailsList" v-for="(item1, index1) in data.DetailsList"
:key="item1.id" :key="item1.id"
...@@ -76,10 +76,20 @@ export default { ...@@ -76,10 +76,20 @@ export default {
ExamIndex: 1, //第几题 ExamIndex: 1, //第几题
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
...@@ -108,8 +118,12 @@ export default { ...@@ -108,8 +118,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
return { return {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
:current="current" :current="current"
@change="onchange" @change="onchange"
> >
<swiper-item></swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1"> <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">
...@@ -121,7 +121,20 @@ export default { ...@@ -121,7 +121,20 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) {
data.current = props.startIndex;
data.ExamIndex = props.startIndex;
}
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
...@@ -151,8 +164,12 @@ export default { ...@@ -151,8 +164,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
let that = methods; let that = methods;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
:current="current" :current="current"
@change="onchange" @change="onchange"
> >
<swiper-item></swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1"> <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">
...@@ -121,10 +121,20 @@ export default { ...@@ -121,10 +121,20 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
}
watch(data.data, (newVal, oldVal) => { watch(data.data, (newVal, oldVal) => {
if (newVal) { if (newVal) {
context.emit("answerChange", newVal); context.emit("answerChange", newVal);
...@@ -159,8 +169,12 @@ export default { ...@@ -159,8 +169,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
let that = methods; let that = methods;
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
:current="current" :current="current"
@change="onchange" @change="onchange"
> >
<swiper-item></swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1"> <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">
...@@ -114,10 +114,20 @@ export default { ...@@ -114,10 +114,20 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
...@@ -144,8 +154,12 @@ export default { ...@@ -144,8 +154,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
return { return {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
@change="onchange" @change="onchange"
:skip-hidden-item-layout="true" :skip-hidden-item-layout="true"
> >
<swiper-item></swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1"> <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">
...@@ -190,10 +190,20 @@ export default { ...@@ -190,10 +190,20 @@ export default {
} }
}); });
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
}
watch(data.data, (newVal, oldVal) => { watch(data.data, (newVal, oldVal) => {
if (newVal) { if (newVal) {
context.emit("answerChange", newVal); context.emit("answerChange", newVal);
...@@ -289,8 +299,12 @@ export default { ...@@ -289,8 +299,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
onUnmounted(() => { onUnmounted(() => {
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
:current="current" :current="current"
@change="onchange" @change="onchange"
> >
<swiper-item></swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1"> <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">
...@@ -138,10 +138,21 @@ export default { ...@@ -138,10 +138,21 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
...@@ -187,8 +198,12 @@ export default { ...@@ -187,8 +198,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
let that = methods; let that = methods;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
:current="current" :current="current"
@change="onchange" @change="onchange"
> >
<swiper-item></swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1"> <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">
...@@ -82,10 +82,20 @@ export default { ...@@ -82,10 +82,20 @@ export default {
ExamIndex: 1, //第几题 ExamIndex: 1, //第几题
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
...@@ -117,8 +127,12 @@ export default { ...@@ -117,8 +127,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
let that = methods; let that = methods;
......
...@@ -24,11 +24,8 @@ ...@@ -24,11 +24,8 @@
:current="current" :current="current"
@change="onchange" @change="onchange"
> >
<swiper-item></swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item <swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
v-for="(item1, index1) in data.DetailsList"
:key="item1.id"
>
<view class="item1" style="padding: 0 20px"> <view class="item1" style="padding: 0 20px">
<view class="flex flex_start_center"> <view class="flex flex_start_center">
<template <template
...@@ -124,6 +121,7 @@ export default { ...@@ -124,6 +121,7 @@ export default {
sortTotal: Number, sortTotal: Number,
isLast: Boolean, isLast: Boolean,
isOperate: Boolean, isOperate: Boolean,
startIndex: Number,
}, },
setup(props, context) { setup(props, context) {
let { ctx } = getCurrentInstance(); let { ctx } = getCurrentInstance();
...@@ -145,7 +143,20 @@ export default { ...@@ -145,7 +143,20 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) {
data.current = props.startIndex;
data.ExamIndex = props.startIndex;
}
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
...@@ -203,8 +214,12 @@ export default { ...@@ -203,8 +214,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
let that = methods; let that = methods;
......
...@@ -13,10 +13,6 @@ ...@@ -13,10 +13,6 @@
<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>
<!-- <i
class="iconfont icon-caidanzu answerSheet"
@click="jumpAnswerSheet"
></i> -->
</view> </view>
<swiper <swiper
class="swiper-box" class="swiper-box"
...@@ -27,10 +23,9 @@ ...@@ -27,10 +23,9 @@
:current="current" :current="current"
@change="onchange" @change="onchange"
:skip-hidden-item-layout="true" :skip-hidden-item-layout="true"
:disable-programmatic-animation="true"
> >
<swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<!-- 第一页 -->
</swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1"> <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">
...@@ -146,10 +141,21 @@ export default { ...@@ -146,10 +141,21 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
...@@ -176,11 +182,12 @@ export default { ...@@ -176,11 +182,12 @@ export default {
}); });
}, },
onchange(e) { onchange(e) {
// if (data.sortIndex == 1) {
data.ExamIndex = e.detail.current; data.ExamIndex = e.detail.current;
//} if (data.sortIndex == 1) {
data.ExamIndex = e.detail.current + 1;
}
if (data.ExamIndex === data.data.DetailsList.length + 1) { if (data.ExamIndex === data.data.DetailsList.length + 1) {
console.log("单选", e.detail);
this.$emit("getAfterTopic"); this.$emit("getAfterTopic");
} }
if (e.detail.current == 0 && data.sortIndex != 1) { if (e.detail.current == 0 && data.sortIndex != 1) {
...@@ -207,8 +214,12 @@ export default { ...@@ -207,8 +214,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
let that = methods; let that = methods;
......
...@@ -24,9 +24,7 @@ ...@@ -24,9 +24,7 @@
@change="onchange" @change="onchange"
:skip-hidden-item-layout="true" :skip-hidden-item-layout="true"
> >
<swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<!-- 第一页 -->
</swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1"> <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">
...@@ -142,10 +140,21 @@ export default { ...@@ -142,10 +140,21 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
...@@ -193,8 +202,12 @@ export default { ...@@ -193,8 +202,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
let that = methods; let that = methods;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
:current="current" :current="current"
@change="onchange" @change="onchange"
> >
<swiper-item></swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1"> <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">
...@@ -161,10 +161,20 @@ export default { ...@@ -161,10 +161,20 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
}
watch(data.data, (newVal, oldVal) => { watch(data.data, (newVal, oldVal) => {
if (newVal) { if (newVal) {
context.emit("answerChange", newVal); context.emit("answerChange", newVal);
...@@ -227,8 +237,12 @@ export default { ...@@ -227,8 +237,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
let that = methods; let that = methods;
......
...@@ -82,10 +82,20 @@ export default { ...@@ -82,10 +82,20 @@ export default {
ExamIndex: 1, //第几题 ExamIndex: 1, //第几题
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
...@@ -117,8 +127,12 @@ export default { ...@@ -117,8 +127,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
let that = methods; let that = methods;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
:current="current" :current="current"
@change="onchange" @change="onchange"
> >
<swiper-item></swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1"> <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">
...@@ -113,10 +113,20 @@ export default { ...@@ -113,10 +113,20 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
...@@ -148,8 +158,12 @@ export default { ...@@ -148,8 +158,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
let that = methods; let that = methods;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
:current="current" :current="current"
@change="onchange" @change="onchange"
> >
<swiper-item></swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1"> <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">
...@@ -138,10 +138,20 @@ export default { ...@@ -138,10 +138,20 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
...@@ -188,8 +198,12 @@ export default { ...@@ -188,8 +198,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
let that = methods; let that = methods;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
:current="current" :current="current"
@change="onchange" @change="onchange"
> >
<swiper-item></swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1"> <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">
...@@ -111,10 +111,20 @@ export default { ...@@ -111,10 +111,20 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
...@@ -146,8 +156,12 @@ export default { ...@@ -146,8 +156,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
let that = methods; let that = methods;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
:current="current" :current="current"
@change="onchange" @change="onchange"
> >
<swiper-item></swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1"> <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">
...@@ -171,10 +171,20 @@ export default { ...@@ -171,10 +171,20 @@ export default {
timeOutEvent: false, timeOutEvent: false,
statusBarHeight: 0, statusBarHeight: 0,
}); });
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
}
watch(data.data, (newVal, oldVal) => { watch(data.data, (newVal, oldVal) => {
if (newVal) { if (newVal) {
context.emit("answerChange", newVal); context.emit("answerChange", newVal);
...@@ -251,8 +261,12 @@ export default { ...@@ -251,8 +261,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
let that = methods; let that = methods;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
:current="current" :current="current"
@change="onchange" @change="onchange"
> >
<swiper-item></swiper-item> <swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1"> <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">
...@@ -115,6 +115,10 @@ export default { ...@@ -115,6 +115,10 @@ export default {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
} }
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
...@@ -146,8 +150,12 @@ export default { ...@@ -146,8 +150,12 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length; data.current = props.paperData.DetailsList.length;
} }
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
let that = methods; let that = methods;
......
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