diff --git a/src/utils/index.js b/src/utils/index.js index e6b51f3..89ced25 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -759,8 +759,9 @@ export function tablePrint(id, title) { .el-table{width:100%} .el-table,.el-table__body-wrapper{max-height:auto} .el-table .el-table__cell{padding:12px 0} - .el-table thead tr:first-child th.el-table__cell{border-top: 1px solid #ccc;background:#ccc} + .el-table thead tr:first-child th.el-table__cell{border-top: 1px solid #ccc} .el-table thead tr:first-child th.el-table__cell:first-child{border-left: 1px solid #ccc;} + .el-table thead tr th.el-table__cell{background:#ccc} .el-table tbody tr td.el-table__cell:first-child{border-left: 1px solid #ccc;} .el-table td.el-table__cell{border-bottom: 1px solid #ccc;} .el-table--border .el-table__cell{border-right: 1px solid #ccc;} @@ -794,6 +795,6 @@ export function tablePrint(id, title) { awin.document.body.append(pTit) } awin.document.body.append(aDom); - // awin.print(); - // awin.close() + awin.print(); + awin.close() } \ No newline at end of file diff --git a/src/views/examinationPaper/add.vue b/src/views/examinationPaper/add.vue index 6feff93..f427129 100644 --- a/src/views/examinationPaper/add.vue +++ b/src/views/examinationPaper/add.vue @@ -1873,20 +1873,27 @@ export default { if (status == 0) { this.form.title = data.title + "_副本"; this.form.tagId = data.tagId === 0 ? "" : data.tagId; - - this.form.subjectName = this.subjectList.length - ? this.subjectList.filter((item) => { - return item.label == data.subjectName; - })?.value - : ""; + if (this.subjectList.length) { + this.subjectList.map((item) => { + if (item.label == data.subjectName) { + this.form.subjectName = item.value; + } + }); + } else { + this.form.subjectName = ""; + } this.form.examsDuration = data.examsDuration; if (this.role != "ROLE_PERSONAL") { this.form.sharingType = data.sharingType; - this.form.gradeName = this.gradeList.length - ? this.gradeList.filter((item) => { - return item == data.gradeName; - }) - : ""; + if (this.gradeList.length) { + this.gradeList.map((item) => { + if (item == data.gradeName) { + this.form.gradeName = data.gradeName; + } + }); + } else { + this.form.gradeName = ""; + } } this.form.questionList = data.questionList?.map((item) => { let subQuestions = diff --git a/src/views/examinationPaper/index.vue b/src/views/examinationPaper/index.vue index 1d4aed2..7813d32 100644 --- a/src/views/examinationPaper/index.vue +++ b/src/views/examinationPaper/index.vue @@ -6,7 +6,7 @@