Commit 376589b3 authored by 罗超's avatar 罗超

1

parent b076f170
...@@ -92,6 +92,7 @@ export default { ...@@ -92,6 +92,7 @@ export default {
current: 1, //默认从第几个开始-用于从快捷菜单点入 current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题 ExamIndex: 1, //第几题
}); });
console.log(86, data.data);
if (props.startIndex) { if (props.startIndex) {
data.current = props.startIndex; data.current = props.startIndex;
data.ExamIndex = props.startIndex; data.ExamIndex = props.startIndex;
......
...@@ -65,6 +65,7 @@ export default { ...@@ -65,6 +65,7 @@ export default {
sort: Number, sort: Number,
sortTotal: Number, sortTotal: Number,
isLast: Boolean, isLast: Boolean,
startIndex: Number,
}, },
setup(props, context) { setup(props, context) {
let { ctx } = getCurrentInstance(); let { ctx } = getCurrentInstance();
...@@ -79,7 +80,10 @@ export default { ...@@ -79,7 +80,10 @@ export default {
current: 1, //默认从第几个开始-用于从快捷菜单点入 current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题 ExamIndex: 1, //第几题
}); });
if (props.startIndex) {
data.current = props.startIndex;
data.ExamIndex = props.startIndex;
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
......
...@@ -68,6 +68,7 @@ export default { ...@@ -68,6 +68,7 @@ export default {
sort: Number, sort: Number,
sortTotal: Number, sortTotal: Number,
isLast: Boolean, isLast: Boolean,
startIndex: Number,
}, },
setup(props, context) { setup(props, context) {
let { ctx } = getCurrentInstance(); let { ctx } = getCurrentInstance();
...@@ -82,7 +83,10 @@ export default { ...@@ -82,7 +83,10 @@ export default {
current: 1, //默认从第几个开始-用于从快捷菜单点入 current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题 ExamIndex: 1, //第几题
}); });
if (props.startIndex) {
data.current = props.startIndex;
data.ExamIndex = props.startIndex;
}
let methods = { let methods = {
changeNumToHan, changeNumToHan,
jumpPage() { jumpPage() {
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<view v-for="(item, index) in peaperDetail.Paper.GroupList" :key="index"> <view v-for="(item, index) in peaperDetail.Paper.GroupList" :key="index">
<!-- 数字单选题 --> <!-- 数字单选题 -->
<SingleChoiceNumber <SingleChoiceNumber
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
@getBeforeTopic="getBeforeTopic()" @getBeforeTopic="getBeforeTopic()"
@getAfterTopic="getAfterTopic()" @getAfterTopic="getAfterTopic()"
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
/> />
<!-- 多选题 --> <!-- 多选题 -->
<MultipleChoice <MultipleChoice
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -51,18 +51,18 @@ ...@@ -51,18 +51,18 @@
/> />
<!-- 单选题 --> <!-- 单选题 -->
<SingleChoice <SingleChoice
:startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
:sortTotal="peaperDetail.Paper.GroupList.length" :sortTotal="peaperDetail.Paper.GroupList.length"
:startIndex="changeIndexSub"
@getBeforeTopic="getBeforeTopic()" @getBeforeTopic="getBeforeTopic()"
@getAfterTopic="getAfterTopic()" @getAfterTopic="getAfterTopic()"
v-if="item.QuestionTypeKey === 'single' && index === changeIndex" v-if="item.QuestionTypeKey === 'single' && index === changeIndex"
/> />
<!-- 听力题 --> <!-- 听力题 -->
<ListenTopic <ListenTopic
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
/> />
<!-- 填空题 --> <!-- 填空题 -->
<FillInTheBlanks <FillInTheBlanks
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<!-- 阅读理解 --> <!-- 阅读理解 -->
<readingCompre <readingCompre
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
/> />
<!-- 判断题 --> <!-- 判断题 -->
<Judge <Judge
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
/> />
<!-- 简答题 --> <!-- 简答题 -->
<shortAnswer <shortAnswer
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
/> />
<!-- 名词解释 --> <!-- 名词解释 -->
<nounExplanation <nounExplanation
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
/> />
<!-- 论述题 --> <!-- 论述题 -->
<easyQuestion <easyQuestion
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
/> />
<!-- 计算题 --> <!-- 计算题 -->
<Calculation <Calculation
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
/> />
<!-- 分录题 --> <!-- 分录题 -->
<EntryProblem <EntryProblem
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
/> />
<!-- 口语题 --> <!-- 口语题 -->
<Spoken <Spoken
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
/> />
<!-- 其他 --> <!-- 其他 -->
<Other <Other
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
/> />
<!-- 完型填空 --> <!-- 完型填空 -->
<Cloze <Cloze
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
/> />
<!-- 资料题 --> <!-- 资料题 -->
<Dataquestion <Dataquestion
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
/> />
<!-- 公用选择题 --> <!-- 公用选择题 -->
<SharingChoose <SharingChoose
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
/> />
<!-- 排序题 --> <!-- 排序题 -->
<SortingProblem <SortingProblem
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
/> />
<!-- 连线题待完善 --> <!-- 连线题待完善 -->
<Connect <Connect
:startIndex="changeIndexSub" :startIndex="item.startIndex"
:paperData="item" :paperData="item"
:isLast="isLast" :isLast="isLast"
:sort="index" :sort="index"
...@@ -339,11 +339,12 @@ export default { ...@@ -339,11 +339,12 @@ export default {
back() { back() {
uni.navigateBack(); uni.navigateBack();
}, },
async getPaperDetail() { async getPaperDetail(callback) {
let res = await getPaperDetail(data.msg); let res = await getPaperDetail(data.msg);
if (res) { if (res) {
callback(res);
data.peaperDetail = res.Data; data.peaperDetail = res.Data;
console.log(90, res.Data.Paper.GroupList); // console.log(90, res.Data.Paper.GroupList);
} }
}, },
//往后翻 //往后翻
...@@ -368,16 +369,17 @@ export default { ...@@ -368,16 +369,17 @@ export default {
}; };
}, },
onLoad(options) { onLoad(options) {
this.getPaperDetail(); this.getPaperDetail((res) => {
if (options.index) {
if (options.index) { this.changeIndex = parseInt(options.index);
this.changeIndex = parseInt(options.index); if (options.index1) {
console.log(350, this.changeIndex); res.Data.Paper.GroupList[this.changeIndex].startIndex = parseInt(
} options.index1
if (options.index1) { );
this.changeIndexSub = parseInt(options.index1); }
console.log(350, this.changeIndexSub); }
} });
console.log(340, options, this.changeIndex);
}, },
}; };
</script> </script>
......
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