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

1

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