Commit 0f102a240747c02d06ffe9888a9fb4b39647b95c
1 parent
d4df1bf6
fix:修复复制试卷的时候tagid为0导致异常
Showing
1 changed file
with
5 additions
and
3 deletions
src/views/examinationPaper/add.vue
| ... | ... | @@ -1521,7 +1521,7 @@ export default { |
| 1521 | 1521 | this.tagList = deepClone(this.answerTypeList); |
| 1522 | 1522 | this.answerTypeName = ""; |
| 1523 | 1523 | if (type != -1) { |
| 1524 | - this.form.tagId = data || ""; | |
| 1524 | + this.form.tagId = data || ""; | |
| 1525 | 1525 | this.$message.success("添加成功"); |
| 1526 | 1526 | } |
| 1527 | 1527 | } else { |
| ... | ... | @@ -1607,7 +1607,7 @@ export default { |
| 1607 | 1607 | }) || []; |
| 1608 | 1608 | if (!hasWrongType) { |
| 1609 | 1609 | this.answerTypeName = "错题复习"; |
| 1610 | - await this.addPaperType(-1); | |
| 1610 | + await this.addPaperType(-1); | |
| 1611 | 1611 | } |
| 1612 | 1612 | // if (this.type != 2) { |
| 1613 | 1613 | // this.form.tagId = this.answerTypeList[0]?.id || ""; |
| ... | ... | @@ -1697,7 +1697,9 @@ export default { |
| 1697 | 1697 | } |
| 1698 | 1698 | this.form.tagId = ""; |
| 1699 | 1699 | this.formatData(data); |
| 1700 | - this.form.tagId = data.tagId; | |
| 1700 | + if (data.tagId > 0) { | |
| 1701 | + this.form.tagId = data.tagId; | |
| 1702 | + } | |
| 1701 | 1703 | } else { |
| 1702 | 1704 | this.$message.error(info); |
| 1703 | 1705 | } | ... | ... |