|
@@ -4,7 +4,7 @@
|
|
<div class="bank-record__body">
|
|
<div class="bank-record__body">
|
|
<div class="bank-item" v-for="(record, index) in recordList" :key="index">
|
|
<div class="bank-item" v-for="(record, index) in recordList" :key="index">
|
|
<div class="bank-item__header">
|
|
<div class="bank-item__header">
|
|
- <div class="note">{{ record.paperName }}</div>
|
|
|
|
|
|
+ <div class="note" v-if="record.paperName">{{ record.paperName }}</div>
|
|
{{ record.examName }}
|
|
{{ record.examName }}
|
|
</div>
|
|
</div>
|
|
<div class="bank-item__body">
|
|
<div class="bank-item__body">
|
|
@@ -26,36 +26,67 @@
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
class="btn"
|
|
class="btn"
|
|
- v-if="record.status == 1"
|
|
|
|
- >重做</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- class="btn"
|
|
|
|
- v-if="record.status == 1"
|
|
|
|
- >解析</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- class="btn"
|
|
|
|
- v-if="record.status == 1"
|
|
|
|
- >报告</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- class="btn"
|
|
|
|
|
|
+ @click="
|
|
|
|
+ go('/bank-exam-continue/' + record.goodsId, {
|
|
|
|
+ recordId: record.recordId,
|
|
|
|
+ examId: record.examId,
|
|
|
|
+ chapterId: record.chapterExamId,
|
|
|
|
+ moduleId: record.moduleExamId,
|
|
|
|
+ })
|
|
|
|
+ "
|
|
v-if="record.status == 0 && record.historyExamJson"
|
|
v-if="record.status == 0 && record.historyExamJson"
|
|
>继续答题</el-button
|
|
>继续答题</el-button
|
|
>
|
|
>
|
|
- <el-button type="primary" class="btn">更多记录</el-button>
|
|
|
|
|
|
|
|
- <!-- <div class="btn-line" v-if="index % 2 != 0">
|
|
|
|
- <div class="btn-line__in">重新做题</div>
|
|
|
|
- <div class="btn-line__in">全部解析</div>
|
|
|
|
- <div class="btn-line__in btn-line__in--noborder">
|
|
|
|
- 做题报告
|
|
|
|
|
|
+ <div class="btn-line">
|
|
|
|
+ <div
|
|
|
|
+ class="btn-line__in"
|
|
|
|
+ @click="doRepeat(record)"
|
|
|
|
+ v-if="record.status == 1"
|
|
|
|
+ >
|
|
|
|
+ <div>重新做题</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ class="btn-line__in"
|
|
|
|
+ @click="
|
|
|
|
+ go('/bank-exam-explain/' + record.goodsId, {
|
|
|
|
+ examId: record.examId,
|
|
|
|
+ chapterId: record.chapterExamId,
|
|
|
|
+ moduleId: record.moduleExamId,
|
|
|
|
+ })
|
|
|
|
+ "
|
|
|
|
+ v-if="record.status == 1"
|
|
|
|
+ >
|
|
|
|
+ <div>解析</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ class="btn-line__in"
|
|
|
|
+ v-if="record.status == 1"
|
|
|
|
+ @click="
|
|
|
|
+ go('/bank-report/' + record.goodsId, {
|
|
|
|
+ chapterId: record.chapterExamId,
|
|
|
|
+ moduleId: record.moduleExamId,
|
|
|
|
+ examId: record.examId,
|
|
|
|
+ recordId: record.recordId,
|
|
|
|
+ })
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ <div>做题报告</div>
|
|
</div>
|
|
</div>
|
|
- </div> -->
|
|
|
|
|
|
+ <div
|
|
|
|
+ class="btn-line__in"
|
|
|
|
+ @click="
|
|
|
|
+ go('/person-center/record-list/' + record.goodsId, {
|
|
|
|
+ examId: record.examId,
|
|
|
|
+ chapterId: record.chapterExamId,
|
|
|
|
+ moduleId: record.moduleExamId,
|
|
|
|
+ recordId: record.recordId,
|
|
|
|
+ })
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ <div>更多记录</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -73,6 +104,7 @@
|
|
layout="prev, pager, next"
|
|
layout="prev, pager, next"
|
|
:total="total"
|
|
:total="total"
|
|
:pager-count="5"
|
|
:pager-count="5"
|
|
|
|
+ :page-size="param.pageSize"
|
|
>
|
|
>
|
|
</el-pagination>
|
|
</el-pagination>
|
|
</div>
|
|
</div>
|
|
@@ -97,6 +129,12 @@ export default {
|
|
this.getExamRecordList();
|
|
this.getExamRecordList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ go(path, query) {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path,
|
|
|
|
+ query,
|
|
|
|
+ });
|
|
|
|
+ },
|
|
currentChange(e) {
|
|
currentChange(e) {
|
|
this.param.pageNum = e;
|
|
this.param.pageNum = e;
|
|
this.getExamRecordList();
|
|
this.getExamRecordList();
|
|
@@ -107,6 +145,76 @@ export default {
|
|
this.total = res.total;
|
|
this.total = res.total;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ async doRepeat(section) {
|
|
|
|
+ let count = await this.examRecordCount(section.examId);
|
|
|
|
+ let answerNum = await this.getExamDetail(section.examId);
|
|
|
|
+ //超过答题次数
|
|
|
|
+ if (answerNum > 0 && count >= answerNum) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "warning",
|
|
|
|
+ message: "该试卷只能答题" + answerNum + "次!",
|
|
|
|
+ });
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.$confirm(`是否清空答案重做?`, "提示", {
|
|
|
|
+ confirmButtonText: "重做",
|
|
|
|
+ cancelButtonText: "查看上次",
|
|
|
|
+ closeOnClickModal: false,
|
|
|
|
+ closeOnPressEscape: false,
|
|
|
|
+ distinguishCancelAndClose: false,
|
|
|
|
+ showClose: false,
|
|
|
|
+ })
|
|
|
|
+ .then((_) => {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "/bank-exam/" + section.goodsId,
|
|
|
|
+ query: {
|
|
|
|
+ examId: section.examId,
|
|
|
|
+ moduleId: section.moduleExamId || 0,
|
|
|
|
+ chapterId: section.chapterExamId || 0,
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ .catch((_) => {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "/bank-exam-all-explain/" + section.recordId,
|
|
|
|
+ query: {
|
|
|
|
+ examId: section.examId,
|
|
|
|
+ moduleId: section.moduleExamId || 0,
|
|
|
|
+ chapterId: section.chapterExamId || 0,
|
|
|
|
+ goodsId: section.goodsId,
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查询试卷历史做题次数
|
|
|
|
+ */
|
|
|
|
+ examRecordCount(examId) {
|
|
|
|
+ return new Promise((resolve) => {
|
|
|
|
+ this.$request
|
|
|
|
+ .examRecordCount({
|
|
|
|
+ examId: examId,
|
|
|
|
+ goodsId: this.id,
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ resolve(res.data);
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ /**
|
|
|
|
+ * @param {Object} exam_id
|
|
|
|
+ * 获取试卷可以做的次数
|
|
|
|
+ */
|
|
|
|
+ getExamDetail(exam_id) {
|
|
|
|
+ return new Promise((resolve) => {
|
|
|
|
+ this.$request.getExamDetail(exam_id).then((res) => {
|
|
|
|
+ resolve(res.data.answerNum);
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -183,7 +291,6 @@ export default {
|
|
|
|
|
|
.btn {
|
|
.btn {
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
- margin: 2px 0;
|
|
|
|
width: 122px;
|
|
width: 122px;
|
|
height: 32px;
|
|
height: 32px;
|
|
padding: 0;
|
|
padding: 0;
|
|
@@ -191,30 +298,48 @@ export default {
|
|
display: inline-block;
|
|
display: inline-block;
|
|
text-align: center;
|
|
text-align: center;
|
|
line-height: 32px;
|
|
line-height: 32px;
|
|
|
|
+ vertical-align: middle;
|
|
|
|
+
|
|
|
|
+ /deep/ span {
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
.btn-line {
|
|
.btn-line {
|
|
- width: 309px;
|
|
|
|
- padding: 8px;
|
|
|
|
|
|
+ margin: 0 10px;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ vertical-align: middle;
|
|
|
|
+ display: inline-block;
|
|
background: #ffffff;
|
|
background: #ffffff;
|
|
border: 1px solid #3f8dfd;
|
|
border: 1px solid #3f8dfd;
|
|
- border-radius: 16px;
|
|
|
|
- display: table-cell;
|
|
|
|
|
|
+ border-radius: 30px;
|
|
font-size: 0;
|
|
font-size: 0;
|
|
line-height: 0;
|
|
line-height: 0;
|
|
|
|
|
|
&__in {
|
|
&__in {
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
display: inline-block;
|
|
display: inline-block;
|
|
- padding: 0 15px;
|
|
|
|
- text-align: center;
|
|
|
|
|
|
+ padding: 7px 0;
|
|
color: #3f8dfd;
|
|
color: #3f8dfd;
|
|
- border-right: 1px solid #3f8dfd;
|
|
|
|
- font-size: 16px;
|
|
|
|
- line-height: 16px;
|
|
|
|
|
|
|
|
- &--noborder {
|
|
|
|
- border: 0;
|
|
|
|
|
|
+ > div {
|
|
|
|
+ text-align: center;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ line-height: 16px;
|
|
|
|
+ width: 96px;
|
|
|
|
+ height: 16px;
|
|
|
|
+ border-right: 1px solid #3f8dfd;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ &:nth-last-of-type(1) {
|
|
|
|
+ > div {
|
|
|
|
+ border: 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ &:hover {
|
|
|
|
+ background: #3f8dfd;
|
|
|
|
+ color: #fff;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|