|
|
@@ -0,0 +1,468 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div class="select_box">
|
|
|
+ <el-radio-group v-model="errorType" size="medium" @change="_queryStudentErrorQuestion">
|
|
|
+ <el-radio-button :label="-1">全部试题({{ allErrorCount }})</el-radio-button>
|
|
|
+ <el-radio-button :label="0">未掌握({{ unMasterCount }})</el-radio-button>
|
|
|
+ <el-radio-button :label="1">已掌握({{ masterCount }})</el-radio-button>
|
|
|
+ <el-radio-button :label="2">复习题({{ reviewCount }})</el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="content">
|
|
|
+ <div class="right_btn">
|
|
|
+ <el-button size="medium" @click="downloadDialogVisible = true">下载错题本</el-button>
|
|
|
+ <el-button type="primary" size="medium">下载个性化提升手册</el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <Download :visible.sync="downloadDialogVisible" :examId="examId" :subjectCode="subjectCode" />
|
|
|
+
|
|
|
+ <div v-for="(question, index) in questionList" :key="question.questionId">
|
|
|
+ <div class="question_card">
|
|
|
+ <div class="card_top">
|
|
|
+ <div class="card_top_info">
|
|
|
+ <div class="left">
|
|
|
+ <span class="number">{{ index + 1 }}</span>
|
|
|
+ <span class="gray">试题类型:</span>
|
|
|
+ <span class="black">{{ question.questionType }}</span>
|
|
|
+ <span class="tag">高频错题</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="question_content" v-if="question.sourceType === 1"
|
|
|
+ v-html="question.questionData.questionStem"></div>
|
|
|
+ <div class="question_content" v-if="question.sourceType === 2">
|
|
|
+ <img :src="question.questionImg" alt="" width="100%">
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="card_footer" style="margin-bottom: 20px;">
|
|
|
+ <div class="footer_item">
|
|
|
+ <span class="gray">满分:</span>
|
|
|
+ <span class="blue">{{ question.fullScore }}</span>
|
|
|
+ <span class="gray">分</span>
|
|
|
+ </div>
|
|
|
+ <div class="footer_item">
|
|
|
+ <span class="gray">我的得分:</span>
|
|
|
+ <span class="blue">{{ question.score }}</span>
|
|
|
+ <span class="gray">分</span>
|
|
|
+ </div>
|
|
|
+ <div class="footer_item">
|
|
|
+ <span class="gray">难度</span>
|
|
|
+ <span class="blue">一般</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="card_footer">
|
|
|
+ <div class="gray">知识点:</div>
|
|
|
+ <template v-if="question.knowledgePoint && question.knowledgePoint.length > 0">
|
|
|
+ <el-tag type="success" size="small" v-for="(know, index) in question.knowledgePoint"
|
|
|
+ :key="index">
|
|
|
+ {{ know }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="card_buttom">
|
|
|
+ <div class="btn_box">
|
|
|
+ <span class="black" size="small" @click="question.answerShow = !question.answerShow">
|
|
|
+ 我的答案
|
|
|
+ </span>
|
|
|
+ <span class="black" size="small" @click="question.parseShow = !question.parseShow">
|
|
|
+ 查看解析
|
|
|
+ </span>
|
|
|
+
|
|
|
+ <template v-if="question.errorStatus === 0">
|
|
|
+ <template v-if="errorType === -1 || errorType === 0">
|
|
|
+ <span class="black" size="small" @click="_markStudentErrorQuestion(question, 1)">
|
|
|
+ 标记为已掌握
|
|
|
+ </span>
|
|
|
+ <span class="black" size="small" @click="_markStudentErrorQuestion(question, 2)">
|
|
|
+ 加入复习本
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-if="errorType === 1 || question.errorStatus === 1">
|
|
|
+ <span class="black" size="small" @click="_markStudentErrorQuestion(question, 0)">
|
|
|
+ 标记为未掌握
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-if="errorType === 2 || question.errorStatus === 2">
|
|
|
+ <span class="black" size="small" @click="_markStudentErrorQuestion(question, 0)">
|
|
|
+ 移除复习本
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="content" v-if="question.parseShow">
|
|
|
+ <div class="content_inner" v-if="question.sourceType === 1"
|
|
|
+ v-html="question.questionData.analysis"></div>
|
|
|
+ <div class="content_inner" v-if="question.sourceType === 2">
|
|
|
+ <img :src="question.parseImg" alt="" width="100%" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="content" v-if="question.answerShow">
|
|
|
+ <div class="content_inner" v-if="question.sourceType === 1"
|
|
|
+ v-html="question.questionData.answer"></div>
|
|
|
+ <div class="content_inner" v-if="question.sourceType === 2">
|
|
|
+ <img :src="question.answerImg" alt="" width="100%" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="question_card" v-if="question.variationQuestion">
|
|
|
+ <!-- TODO: 这个地方后端暂无数据 -->
|
|
|
+ <div class="card_top">
|
|
|
+ <div class="card_top_info">
|
|
|
+ <div class="left">
|
|
|
+ <span class="number">1</span>
|
|
|
+ <span class="gray">试题类型:</span>
|
|
|
+ <span class="black">选择题</span>
|
|
|
+ <span class="tag">高频错题</span>
|
|
|
+ </div>
|
|
|
+ <div class="right">
|
|
|
+ <span class="gray">来源:</span>
|
|
|
+ <span class="black">这是一场考试名称</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="question_content">这是题目内容</div>
|
|
|
+
|
|
|
+ <div class="yuwen">
|
|
|
+
|
|
|
+ <span class="btn_span active">1</span>
|
|
|
+ <span class="btn_span">2</span>
|
|
|
+
|
|
|
+ <div class="question_list"></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="card_footer">
|
|
|
+ <div class="footer_item">
|
|
|
+ <span class="gray">满分:</span>
|
|
|
+ <span class="blue">5.0</span>
|
|
|
+ <span class="gray">分</span>
|
|
|
+ </div>
|
|
|
+ <div class="footer_item">
|
|
|
+ <span class="gray">我的得分:</span>
|
|
|
+ <span class="blue">5.0</span>
|
|
|
+ <span class="gray">分</span>
|
|
|
+ </div>
|
|
|
+ <div class="footer_item">
|
|
|
+ <span class="gray">难度</span>
|
|
|
+ <span class="blue">一般</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="card_footer">
|
|
|
+ <div class="gray">知识点:</div>
|
|
|
+ <el-tag type="success" size="small">标签二</el-tag>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="text-align: right;">
|
|
|
+ <el-pagination background layout="prev, pager, next" :total="pageParam.total"
|
|
|
+ :page-size="pageParam.pageSize" :current-page="pageParam.pageNum"
|
|
|
+ @current-change="handleCurrentChange">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {
|
|
|
+ queryStudentErrorQuestion,
|
|
|
+ markStudentErrorQuestion,
|
|
|
+ downloadStudentErrorQuestion,
|
|
|
+} from '../../../http/api/errorQuestion';
|
|
|
+import Download from './Download.vue';
|
|
|
+import loadImg from './loadImg.js'
|
|
|
+import { Loading } from 'element-ui';
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ Download,
|
|
|
+ },
|
|
|
+
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ pageParam: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ total: 0,
|
|
|
+ },
|
|
|
+ questionList: [],
|
|
|
+ allErrorCount: 0,
|
|
|
+ unMasterCount: 0,
|
|
|
+ masterCount: 0,
|
|
|
+ reviewCount: 0,
|
|
|
+ answerUrls: [],
|
|
|
+ uploadPaperUrls: [],
|
|
|
+ errorType: -1, // -1全部 0未掌握 1已掌握 2复习题
|
|
|
+
|
|
|
+ examId: null,
|
|
|
+ examType: null,
|
|
|
+ gradeCode: null,
|
|
|
+
|
|
|
+ downloadDialogVisible: false,
|
|
|
+ };
|
|
|
+ },
|
|
|
+
|
|
|
+ computed: {
|
|
|
+ subjectCode() {
|
|
|
+ return this.$store.state.report.filterObject.subjectCode;
|
|
|
+ }, //分析报告公共参数变量
|
|
|
+ },
|
|
|
+
|
|
|
+ watch: {
|
|
|
+ subjectCode(newVal, oldVal) {
|
|
|
+ if (newVal !== oldVal) {
|
|
|
+ this._queryStudentErrorQuestion();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ created() {
|
|
|
+ const ExamInfoItem = JSON.parse(localStorage.getItem("ExamInfoItem") || "{}");
|
|
|
+ const reportExamCourseItem = JSON.parse(localStorage.getItem("reportExamCourseItem") || "{}");
|
|
|
+ this.examId = reportExamCourseItem.examId;
|
|
|
+ this.gradeCode = ExamInfoItem.examData.gradeCode;
|
|
|
+ this.examType = ExamInfoItem.examData.examType;
|
|
|
+ },
|
|
|
+
|
|
|
+ async mounted() {
|
|
|
+ await this._queryStudentErrorQuestion();
|
|
|
+ },
|
|
|
+
|
|
|
+ methods: {
|
|
|
+ async _queryStudentErrorQuestion() {
|
|
|
+ const instance = Loading.service({ fullscreen: true });
|
|
|
+ const { subjectCode, gradeCode, examType, examId, errorType, pageParam: { pageNum, pageSize } } = this
|
|
|
+ const res = await queryStudentErrorQuestion({ subjectCode, gradeCode, examType, examId, errorType, pageNum, pageSize });
|
|
|
+
|
|
|
+ if (res.code === 200) {
|
|
|
+ const { allErrorCount, unMasterCount, masterCount, reviewCount, questionList, answerUrls, uploadPaperUrls } = res.data.records[0];
|
|
|
+
|
|
|
+ this.allErrorCount = allErrorCount;
|
|
|
+ this.masterCount = masterCount;
|
|
|
+ this.unMasterCount = unMasterCount;
|
|
|
+ this.reviewCount = reviewCount;
|
|
|
+ this.answerUrls = answerUrls;
|
|
|
+ this.uploadPaperUrls = uploadPaperUrls;
|
|
|
+ this.pageParam.total = res.data.total * 1;
|
|
|
+
|
|
|
+ for (let i = 0; i < questionList.length; i++) {
|
|
|
+ const { sourceType, titleCoordinates, answerCoordinates, parseCoordinates } = questionList[i]
|
|
|
+ questionList[i].answerShow = false;
|
|
|
+ questionList[i].parseShow = false;
|
|
|
+ if (sourceType === 2) {
|
|
|
+ const questionImg = await loadImg(this.uploadPaperUrls, titleCoordinates);
|
|
|
+ questionList[i].questionImg = questionImg;
|
|
|
+
|
|
|
+ const answerImg = await loadImg(this.answerUrls, answerCoordinates);
|
|
|
+ questionList[i].answerImg = answerImg;
|
|
|
+
|
|
|
+ const parseImg = await loadImg(this.answerUrls, parseCoordinates);
|
|
|
+ questionList[i].parseImg = parseImg;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.questionList = questionList;
|
|
|
+ }
|
|
|
+
|
|
|
+ instance.close();
|
|
|
+ },
|
|
|
+
|
|
|
+ async _markStudentErrorQuestion(question, markStatus) {
|
|
|
+ const res = await markStudentErrorQuestion({
|
|
|
+ questionId: question.questionId,
|
|
|
+ examId: this.examId,
|
|
|
+ subjectCode: this.subjectCode,
|
|
|
+ markStatus
|
|
|
+ })
|
|
|
+
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success('操作成功');
|
|
|
+ await this._queryStudentErrorQuestion();
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message || '操作失败');
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ async handleCurrentChange(page) {
|
|
|
+ this.pageParam.pageNum = page;
|
|
|
+ await this._queryStudentErrorQuestion();
|
|
|
+ },
|
|
|
+ },
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+.select_box {
|
|
|
+ background-color: #ffffff;
|
|
|
+ border-radius: 4px;
|
|
|
+ padding: 10px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.content {
|
|
|
+ background-color: #ffffff;
|
|
|
+ border-radius: 4px;
|
|
|
+ padding: 20px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.right_btn {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.question_card {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ border: 1px solid #DCDFE6;
|
|
|
+ border-radius: 10px;
|
|
|
+
|
|
|
+ .card_top {
|
|
|
+ padding: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .card_top_info {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin-bottom: 20px;
|
|
|
+
|
|
|
+ .left {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ span {
|
|
|
+ margin-right: 10px;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .tag {
|
|
|
+ color: #ffffff;
|
|
|
+ padding: 5px;
|
|
|
+ background-color: #F56C6C;
|
|
|
+ border-radius: 2px;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ left: -5px;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ width: 0;
|
|
|
+ height: 0;
|
|
|
+ border-top: 5px solid transparent;
|
|
|
+ border-bottom: 5px solid transparent;
|
|
|
+ border-right: 5px solid #EE6666;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .number {
|
|
|
+ color: #ffffff;
|
|
|
+ font-size: 14px;
|
|
|
+ padding: 5px 9px;
|
|
|
+ background-color: #2E64FA;
|
|
|
+ border-radius: 4px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .btn_span {
|
|
|
+ color: #2E64FA;
|
|
|
+ font-size: 14px;
|
|
|
+ padding: 5px 9px;
|
|
|
+ border: 1px solid #2E64FA;
|
|
|
+ border-radius: 4px;
|
|
|
+ cursor: pointer;
|
|
|
+ margin-right: 10px;
|
|
|
+
|
|
|
+ &.active {
|
|
|
+ color: #ffffff;
|
|
|
+ background-color: #2E64FA;
|
|
|
+ border-radius: 4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .gray {
|
|
|
+ color: #999;
|
|
|
+ }
|
|
|
+
|
|
|
+ .black {
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+
|
|
|
+ .blue {
|
|
|
+ color: #2E64FA;
|
|
|
+ }
|
|
|
+
|
|
|
+ .question_content {
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .yuwen {
|
|
|
+ margin-top: 20px;
|
|
|
+
|
|
|
+ .question_list {
|
|
|
+ margin-top: 20px;
|
|
|
+ height: 100px;
|
|
|
+ padding-top: 20px;
|
|
|
+ border-top: 1px solid #EBEEF5;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .card_footer {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding-top: 20px;
|
|
|
+ border-top: 1px solid #EBEEF5;
|
|
|
+
|
|
|
+ .footer_item {
|
|
|
+ margin-right: 40px;
|
|
|
+
|
|
|
+ span {
|
|
|
+ margin-right: 5px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .card_buttom {
|
|
|
+ background-color: #DCDFE6;
|
|
|
+ padding: 15px 20px;
|
|
|
+
|
|
|
+ .btn_box {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ margin-bottom: 20px;
|
|
|
+
|
|
|
+ span {
|
|
|
+ margin-left: 20px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .content {
|
|
|
+ padding: 20px;
|
|
|
+ background-color: #ffffff;
|
|
|
+
|
|
|
+ .content_inner {
|
|
|
+ border: 2px dotted #DCDFE6;
|
|
|
+ border-radius: 4px;
|
|
|
+ padding: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+</style>
|