From 495c94ef51e9b8025eb60f0592efd26df3ea1103 Mon Sep 17 00:00:00 2001 From: Vce Date: Fri, 24 May 2024 00:27:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../examManagement/examManagement.vue | 30 +++++++++++++++---- .../examSystem2/trainRecord/trainPlan.vue | 4 +-- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/views/projectFront/examSystem2/examManagement/examManagement.vue b/src/views/projectFront/examSystem2/examManagement/examManagement.vue index 823c4c5c..2502905f 100644 --- a/src/views/projectFront/examSystem2/examManagement/examManagement.vue +++ b/src/views/projectFront/examSystem2/examManagement/examManagement.vue @@ -830,9 +830,11 @@ export default { submitBtn() { console.log(this.compulsoryList) + console.log(this.examForm,111333) this.$refs.examForm.validate((valid) => { if (valid) { - let examInfo = { + if (this.title == '新增考试') { + let examInfo = { checkQuestionType:this.examForm.checkQuestionType, name:this.examForm.name, duration:this.examForm.duration, @@ -840,7 +842,7 @@ export default { projectSn:this.$store.state.projectSn, subjectId:this.examForm.subjectId, remark:this.examForm.remark, - questions:this.examForm.checkQuestionType == 1 ? this.examForm.questions.map(item => item.id).join(',') : this.randomQuestionList.map(item => item.id).join(','), + questions: this.examForm.checkQuestionType == 1 ? this.examForm.questions.map(item => item.id).join(',') : this.randomQuestionList.map(item => item.id).join(','), examRecordList:this.compulsoryList.map(item => { return { id:item.id, @@ -848,15 +850,33 @@ export default { }), radio:this.examForm.checkQuestionType == 1 ? this.examForm.questions.filter(item => item.type == 1).length : this.randomQuestion.examSingle.count, multi:this.examForm.checkQuestionType == 1 ? this.examForm.questions.filter(item => item.type == 2).length : this.randomQuestion.examMultiple.count, - } - - if (this.title == '新增考试') { + } + // examInfo.questions = this.examForm.checkQuestionType == 1 ? this.examForm.questions.map(item => item.id).join(',') : this.randomQuestionList.map(item => item.id).join(','), addPaperApi(examInfo).then((res) => { this.$message.success('新增成功') this.handleClose() this.getRecordList() }) } else { + this.examForm.questions = this.$refs.questionListTable.selection; + let examInfo = { + checkQuestionType:this.examForm.checkQuestionType, + name:this.examForm.name, + duration:this.examForm.duration, + passLine:this.examForm.passLine, + projectSn:this.$store.state.projectSn, + subjectId:this.examForm.subjectId, + remark:this.examForm.remark, + questions: this.examForm.checkQuestionType == 1 ? this.examForm.questions.map(item => item.id).join(',') : this.randomQuestionList.map(item => item.id).join(','), + examRecordList:this.compulsoryList.map(item => { + return { + id:item.id, + } + }), + radio:this.examForm.checkQuestionType == 1 ? this.examForm.questions.filter(item => item.type == 1).length : this.randomQuestion.examSingle.count, + multi:this.examForm.checkQuestionType == 1 ? this.examForm.questions.filter(item => item.type == 2).length : this.randomQuestion.examMultiple.count, + } + // examInfo.questions = this.examForm.checkQuestionType == 1 ? this.examForm.questions.map(item => item.id).join(',') : this.randomQuestionList.map(item => item.id).join(','), examInfo.id = this.examForm.id editPaperApi(examInfo).then((res) => { if(res.success){ diff --git a/src/views/projectFront/examSystem2/trainRecord/trainPlan.vue b/src/views/projectFront/examSystem2/trainRecord/trainPlan.vue index 09cc4c1d..c578706a 100644 --- a/src/views/projectFront/examSystem2/trainRecord/trainPlan.vue +++ b/src/views/projectFront/examSystem2/trainRecord/trainPlan.vue @@ -478,7 +478,8 @@ export default { pageNo: this.worker.pageNo, // pageSize: this.worker.pageSize, pageSize: 999999, - presence: 1, + // presence: 1, + inserviceType: 1, departmentId:'', teamId:'', } @@ -488,7 +489,6 @@ export default { } if(this.workerInfo.departmentAndTeam.gtMaterialDepartmentTeamType?this.workerInfo.departmentAndTeam.gtMaterialDepartmentTeamType === 2:false) { data.teamId = this.workerInfo.departmentAndTeam?this.workerInfo.departmentAndTeam.gtMaterialDepartmentTeamId:'' - } } await getWorkerInfoListApi(data).then((res) => {