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,9 +113,19 @@ export default { ...@@ -113,9 +113,19 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
if (props.startIndex) { //判断是否是第一大题
data.current = props.startIndex; if (data.sortIndex === 1) {
data.ExamIndex = props.startIndex; 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,
...@@ -148,7 +158,11 @@ export default { ...@@ -148,7 +158,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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,9 +90,19 @@ export default { ...@@ -90,9 +90,19 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
if (props.startIndex) { //判断是否是第一大题
data.current = props.startIndex; if (data.sortIndex === 1) {
data.ExamIndex = props.startIndex; 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,
...@@ -133,7 +143,11 @@ export default { ...@@ -133,7 +143,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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,9 +76,19 @@ export default { ...@@ -76,9 +76,19 @@ export default {
ExamIndex: 1, //第几题 ExamIndex: 1, //第几题
statusBarHeight: 0, statusBarHeight: 0,
}); });
if (props.startIndex) { //判断是否是第一大题
data.current = props.startIndex; if (data.sortIndex === 1) {
data.ExamIndex = props.startIndex; 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,
...@@ -108,7 +118,11 @@ export default { ...@@ -108,7 +118,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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,7 +164,11 @@ export default { ...@@ -151,7 +164,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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,9 +121,19 @@ export default { ...@@ -121,9 +121,19 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
if (props.startIndex) { //判断是否是第一大题
data.current = props.startIndex; if (data.sortIndex === 1) {
data.ExamIndex = props.startIndex; 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;
}
} }
watch(data.data, (newVal, oldVal) => { watch(data.data, (newVal, oldVal) => {
if (newVal) { if (newVal) {
...@@ -159,7 +169,11 @@ export default { ...@@ -159,7 +169,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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,9 +114,19 @@ export default { ...@@ -114,9 +114,19 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
if (props.startIndex) { //判断是否是第一大题
data.current = props.startIndex; if (data.sortIndex === 1) {
data.ExamIndex = props.startIndex; 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,
...@@ -144,7 +154,11 @@ export default { ...@@ -144,7 +154,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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,9 +190,19 @@ export default { ...@@ -190,9 +190,19 @@ export default {
} }
}); });
}); });
if (props.startIndex) { //判断是否是第一大题
data.current = props.startIndex; if (data.sortIndex === 1) {
data.ExamIndex = props.startIndex; 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;
}
} }
watch(data.data, (newVal, oldVal) => { watch(data.data, (newVal, oldVal) => {
if (newVal) { if (newVal) {
...@@ -289,7 +299,11 @@ export default { ...@@ -289,7 +299,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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 (props.startIndex) { //判断是否是第一大题
data.current = props.startIndex; if (data.sortIndex === 1) {
data.ExamIndex = props.startIndex; 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() {
...@@ -187,7 +198,11 @@ export default { ...@@ -187,7 +198,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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,9 +82,19 @@ export default { ...@@ -82,9 +82,19 @@ export default {
ExamIndex: 1, //第几题 ExamIndex: 1, //第几题
statusBarHeight: 0, statusBarHeight: 0,
}); });
if (props.startIndex) { //判断是否是第一大题
data.current = props.startIndex; if (data.sortIndex === 1) {
data.ExamIndex = props.startIndex; 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,
...@@ -117,7 +127,11 @@ export default { ...@@ -117,7 +127,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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,7 +214,11 @@ export default { ...@@ -203,7 +214,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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 (props.startIndex) { //判断是否是第一大题
data.current = props.startIndex; if (data.sortIndex === 1) {
data.ExamIndex = props.startIndex; 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() {
...@@ -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,7 +214,11 @@ export default { ...@@ -207,7 +214,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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 (props.startIndex) { //判断是否是第一大题
data.current = props.startIndex; if (data.sortIndex === 1) {
data.ExamIndex = props.startIndex; 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() {
...@@ -193,7 +202,11 @@ export default { ...@@ -193,7 +202,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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,9 +161,19 @@ export default { ...@@ -161,9 +161,19 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
if (props.startIndex) { //判断是否是第一大题
data.current = props.startIndex; if (data.sortIndex === 1) {
data.ExamIndex = props.startIndex; 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;
}
} }
watch(data.data, (newVal, oldVal) => { watch(data.data, (newVal, oldVal) => {
if (newVal) { if (newVal) {
...@@ -227,7 +237,11 @@ export default { ...@@ -227,7 +237,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -82,9 +82,19 @@ export default { ...@@ -82,9 +82,19 @@ export default {
ExamIndex: 1, //第几题 ExamIndex: 1, //第几题
statusBarHeight: 0, statusBarHeight: 0,
}); });
if (props.startIndex) { //判断是否是第一大题
data.current = props.startIndex; if (data.sortIndex === 1) {
data.ExamIndex = props.startIndex; 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,
...@@ -117,7 +127,11 @@ export default { ...@@ -117,7 +127,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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,9 +113,19 @@ export default { ...@@ -113,9 +113,19 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
if (props.startIndex) { //判断是否是第一大题
data.current = props.startIndex; if (data.sortIndex === 1) {
data.ExamIndex = props.startIndex; 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,
...@@ -148,7 +158,11 @@ export default { ...@@ -148,7 +158,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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,9 +138,19 @@ export default { ...@@ -138,9 +138,19 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
if (props.startIndex) { //判断是否是第一大题
data.current = props.startIndex; if (data.sortIndex === 1) {
data.ExamIndex = props.startIndex; 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,
...@@ -188,7 +198,11 @@ export default { ...@@ -188,7 +198,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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,9 +111,19 @@ export default { ...@@ -111,9 +111,19 @@ export default {
isOperate: props.isOperate, isOperate: props.isOperate,
statusBarHeight: 0, statusBarHeight: 0,
}); });
if (props.startIndex) { //判断是否是第一大题
data.current = props.startIndex; if (data.sortIndex === 1) {
data.ExamIndex = props.startIndex; 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,
...@@ -146,7 +156,11 @@ export default { ...@@ -146,7 +156,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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,9 +171,19 @@ export default { ...@@ -171,9 +171,19 @@ export default {
timeOutEvent: false, timeOutEvent: false,
statusBarHeight: 0, statusBarHeight: 0,
}); });
if (props.startIndex) { //判断是否是第一大题
data.current = props.startIndex; if (data.sortIndex === 1) {
data.ExamIndex = props.startIndex; 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;
}
} }
watch(data.data, (newVal, oldVal) => { watch(data.data, (newVal, oldVal) => {
if (newVal) { if (newVal) {
...@@ -251,7 +261,11 @@ export default { ...@@ -251,7 +261,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
...@@ -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,7 +150,11 @@ export default { ...@@ -146,7 +150,11 @@ export default {
}; };
onMounted(() => { onMounted(() => {
if (props.isLast) { if (props.isLast) {
data.current = props.paperData.DetailsList.length; if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
} }
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight; data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
}); });
......
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