|
@@ -139,6 +139,19 @@
|
|
</div>
|
|
</div>
|
|
<div class="question__btns">
|
|
<div class="question__btns">
|
|
<!-- <div class="collect" @click="collect">收藏本题</div> -->
|
|
<!-- <div class="collect" @click="collect">收藏本题</div> -->
|
|
|
|
+ <div
|
|
|
|
+ class="collect"
|
|
|
|
+ @click="
|
|
|
|
+ collect(collectList[questionIndex], questionIndex)
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ <template v-if="!collectList[questionIndex]"
|
|
|
|
+ ><i class="el-icon-star-off"></i>收藏本题
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="collectList[questionIndex]"
|
|
|
|
+ ><i class="el-icon-star-on"></i>已收藏</template
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -248,6 +261,19 @@
|
|
确认答案
|
|
确认答案
|
|
</div>
|
|
</div>
|
|
<!-- <div class="collect" @click="collect">收藏本题</div> -->
|
|
<!-- <div class="collect" @click="collect">收藏本题</div> -->
|
|
|
|
+ <div
|
|
|
|
+ class="collect"
|
|
|
|
+ @click="
|
|
|
|
+ collect(collectList[questionIndex], questionIndex)
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ <template v-if="!collectList[questionIndex]"
|
|
|
|
+ ><i class="el-icon-star-off"></i>收藏本题</template
|
|
|
|
+ >
|
|
|
|
+ <template v-if="collectList[questionIndex]"
|
|
|
|
+ ><i class="el-icon-star-on"></i>已收藏</template
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -339,6 +365,19 @@
|
|
</div>
|
|
</div>
|
|
<div class="question__btns">
|
|
<div class="question__btns">
|
|
<!-- <div class="collect" @click="collect">收藏本题</div> -->
|
|
<!-- <div class="collect" @click="collect">收藏本题</div> -->
|
|
|
|
+ <div
|
|
|
|
+ class="collect"
|
|
|
|
+ @click="
|
|
|
|
+ collect(collectList[questionIndex], questionIndex)
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ <template v-if="!collectList[questionIndex]"
|
|
|
|
+ ><i class="el-icon-star-off"></i>收藏本题</template
|
|
|
|
+ >
|
|
|
|
+ <template v-if="collectList[questionIndex]"
|
|
|
|
+ ><i class="el-icon-star-on"></i>已收藏</template
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -894,6 +933,19 @@
|
|
</div>
|
|
</div>
|
|
<div class="question__btns">
|
|
<div class="question__btns">
|
|
<!-- <div class="collect" @click="collect">收藏本题</div>+ -->
|
|
<!-- <div class="collect" @click="collect">收藏本题</div>+ -->
|
|
|
|
+ <div
|
|
|
|
+ class="collect"
|
|
|
|
+ @click="
|
|
|
|
+ collect(collectList[questionIndex], questionIndex)
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ <template v-if="!collectList[questionIndex]"
|
|
|
|
+ ><i class="el-icon-star-off"></i>收藏本题</template
|
|
|
|
+ >
|
|
|
|
+ <template v-if="collectList[questionIndex]"
|
|
|
|
+ ><i class="el-icon-star-on"></i>已收藏</template
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -994,6 +1046,19 @@
|
|
确认答案
|
|
确认答案
|
|
</div>
|
|
</div>
|
|
<!-- <div class="collect" @click="collect">收藏本题</div> -->
|
|
<!-- <div class="collect" @click="collect">收藏本题</div> -->
|
|
|
|
+ <div
|
|
|
|
+ class="collect"
|
|
|
|
+ @click="
|
|
|
|
+ collect(collectList[questionIndex], questionIndex)
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ <template v-if="!collectList[questionIndex]"
|
|
|
|
+ ><i class="el-icon-star-off"></i>收藏本题</template
|
|
|
|
+ >
|
|
|
|
+ <template v-if="collectList[questionIndex]"
|
|
|
|
+ ><i class="el-icon-star-on"></i>已收藏</template
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -1214,9 +1279,10 @@ export default {
|
|
isTaking: true, //是否正在拍照
|
|
isTaking: true, //是否正在拍照
|
|
stream: null,
|
|
stream: null,
|
|
loading: false,
|
|
loading: false,
|
|
- type: 0, //type:1章卷,2节卷,3模考卷
|
|
|
|
|
|
+ type: 0, //type:1章卷,2节卷,3模块卷
|
|
bankType: 0,
|
|
bankType: 0,
|
|
compareFaceData: 0, // 拍照匹配相似度
|
|
compareFaceData: 0, // 拍照匹配相似度
|
|
|
|
+ collectList: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async mounted() {
|
|
async mounted() {
|
|
@@ -1272,7 +1338,24 @@ export default {
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @param {Object} current
|
|
|
|
+ * 获取收藏信息
|
|
|
|
+ */
|
|
|
|
+ getCollectInfo(current) {
|
|
|
|
+ this.$request.getCollectInfo({
|
|
|
|
+ examId: this.examId,
|
|
|
|
+ questionId: this.questionList[current].questionId,
|
|
|
|
+ goodsId: this.goodsId,
|
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.$set(this.collectList, current, res.data);
|
|
|
|
+ })
|
|
|
|
+ .catch((err) => {
|
|
|
|
+ this.$set(this.collectList, current, false);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
/**
|
|
/**
|
|
* 请求题目列表
|
|
* 请求题目列表
|
|
*/
|
|
*/
|
|
@@ -1415,7 +1498,7 @@ export default {
|
|
|
|
|
|
this.questionList = res.data;
|
|
this.questionList = res.data;
|
|
this.lastCount = this.questionList.length;
|
|
this.lastCount = this.questionList.length;
|
|
-
|
|
|
|
|
|
+ this.getCollectInfo(this.current)
|
|
await this.examRecord();
|
|
await this.examRecord();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -1706,6 +1789,7 @@ export default {
|
|
gradeId: this.gradeId,
|
|
gradeId: this.gradeId,
|
|
totalQuestionNum: questionList,
|
|
totalQuestionNum: questionList,
|
|
allQuestionNum: this.questionList.length,
|
|
allQuestionNum: this.questionList.length,
|
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
this.recordId = res.data;
|
|
this.recordId = res.data;
|
|
@@ -2001,6 +2085,7 @@ export default {
|
|
|
|
|
|
changeIndex(index) {
|
|
changeIndex(index) {
|
|
this.current = index;
|
|
this.current = index;
|
|
|
|
+ this.getCollectInfo(this.current)
|
|
},
|
|
},
|
|
nextQuestion() {
|
|
nextQuestion() {
|
|
if (this.current >= this.questionList.length - 1) {
|
|
if (this.current >= this.questionList.length - 1) {
|
|
@@ -2011,6 +2096,7 @@ export default {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
this.current++;
|
|
this.current++;
|
|
|
|
+ this.getCollectInfo(this.current)
|
|
},
|
|
},
|
|
prevQuestion() {
|
|
prevQuestion() {
|
|
if (this.current == 0) {
|
|
if (this.current == 0) {
|
|
@@ -2021,6 +2107,7 @@ export default {
|
|
return;
|
|
return;
|
|
} else {
|
|
} else {
|
|
this.current--;
|
|
this.current--;
|
|
|
|
+ this.getCollectInfo(this.current)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
isCheck(item, index) {
|
|
isCheck(item, index) {
|
|
@@ -2188,11 +2275,28 @@ export default {
|
|
return count;
|
|
return count;
|
|
},
|
|
},
|
|
|
|
|
|
- collect() {
|
|
|
|
- this.$message({
|
|
|
|
- message: "试做题目,不支持收藏~",
|
|
|
|
- type: "warning",
|
|
|
|
- });
|
|
|
|
|
|
+ collect(state, index) {
|
|
|
|
+ if (!state) {
|
|
|
|
+ this.$request
|
|
|
|
+ .collectQuestion({
|
|
|
|
+ examId: this.examId,
|
|
|
|
+ questionId: this.questionList[index].questionId,
|
|
|
|
+ goodsId: this.goodsId || "",
|
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.$set(this.collectList, index, true);
|
|
|
|
+ this.$message.success("收藏成功");
|
|
|
|
+ this.getCollectInfo(index);
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ this.$request
|
|
|
|
+ .deleteCollectQuestion(this.collectList[index].collectQuestionId)
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.$set(this.collectList, index, false);
|
|
|
|
+ this.$message.success("取消收藏成功");
|
|
|
|
+ });
|
|
|
|
+ }
|
|
return;
|
|
return;
|
|
},
|
|
},
|
|
submit() {
|
|
submit() {
|
|
@@ -2408,30 +2512,31 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
clearInterval(this.timer);
|
|
clearInterval(this.timer);
|
|
- //交卷
|
|
|
|
|
|
+ //交卷 /bank/record/edit
|
|
this.$request
|
|
this.$request
|
|
.bankRecordEdit({
|
|
.bankRecordEdit({
|
|
moduleId: this.moduleId || 0,
|
|
moduleId: this.moduleId || 0,
|
|
chapterId: this.chapterId || 0,
|
|
chapterId: this.chapterId || 0,
|
|
sectionId: this.sectionId || 0,
|
|
sectionId: this.sectionId || 0,
|
|
gradeId: this.gradeId,
|
|
gradeId: this.gradeId,
|
|
|
|
+ courseId: this.courseId,
|
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
|
+ type: this.type, //题卷类型 1章卷 2节卷 3模块卷
|
|
examId: this.examId,
|
|
examId: this.examId,
|
|
- type: this.type,
|
|
|
|
goodsId: this.goodsId,
|
|
goodsId: this.goodsId,
|
|
reportStatus: reportStatus,
|
|
reportStatus: reportStatus,
|
|
recordId: this.recordId,
|
|
recordId: this.recordId,
|
|
- courseId: this.courseId,
|
|
|
|
rightQuestionNum: number,
|
|
rightQuestionNum: number,
|
|
lessQuestionNum: lessQuestionNum,
|
|
lessQuestionNum: lessQuestionNum,
|
|
status: 1,
|
|
status: 1,
|
|
doQuestionIds: doQuestionIds.join(","),
|
|
doQuestionIds: doQuestionIds.join(","),
|
|
- // rightQuestionIds:rightQuestionIds.join(','),
|
|
|
|
- // doQuestionNum: doQuestionNum,
|
|
|
|
|
|
+ rightQuestionIds:rightQuestionIds.join(','),
|
|
|
|
+ doQuestionNum: doQuestionNum,
|
|
performance: score,
|
|
performance: score,
|
|
totalScore: allScore,
|
|
totalScore: allScore,
|
|
- // examTime: parseInt(this.allTimes),
|
|
|
|
- // doTime: parseInt(this.allTimes) - parseInt(this.lastTime),
|
|
|
|
- // historyExamJson: JSON.stringify(this.questionList)
|
|
|
|
|
|
+ examTime: parseInt(this.allTimes),
|
|
|
|
+ doTime: parseInt(this.allTimes) - parseInt(this.lastTime),
|
|
|
|
+ historyExamJson: JSON.stringify(this.questionList)
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
this.isSubmit = true;
|
|
this.isSubmit = true;
|
|
@@ -2454,12 +2559,37 @@ export default {
|
|
this.setExamResult(result);
|
|
this.setExamResult(result);
|
|
this.$router.replace({
|
|
this.$router.replace({
|
|
path: "/course-report",
|
|
path: "/course-report",
|
|
|
|
+ query: {
|
|
|
|
+ // orderGoodsId: this.orderGoodsId,
|
|
|
|
+ // chapterId: this.chapterId,
|
|
|
|
+ // moduleId: this.moduleId,
|
|
|
|
+ examId: this.examId,
|
|
|
|
+ recordId: this.recordId,
|
|
|
|
+ type: this.type, //type:1章卷,2节卷,3模块卷
|
|
|
|
+ },
|
|
});
|
|
});
|
|
}, 1000);
|
|
}, 1000);
|
|
})
|
|
})
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
console.log(err, "err");
|
|
console.log(err, "err");
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ //错题集id提交(客观题)/exam/wwrong/record
|
|
|
|
+ this.$request.examWrongRecord({
|
|
|
|
+ moduleId: this.moduleId || 0,
|
|
|
|
+ chapterId: this.chapterId || 0,
|
|
|
|
+ sectionId: this.sectionId || 0,
|
|
|
|
+ gradeId: this.gradeId,
|
|
|
|
+ courseId: this.courseId,
|
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
|
+ examId: this.examId,
|
|
|
|
+ goodsId: this.goodsId,
|
|
|
|
+ questionIds: doWrongQuestionIds,
|
|
|
|
+ recordId: this.recordId,
|
|
|
|
+ type: 2, // 视频课程的传2
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {})
|
|
|
|
+ .catch((err) => {});
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|