From a838aca210f925167fb37b4b29b1a6034b4500fa Mon Sep 17 00:00:00 2001 From: Vce Date: Thu, 23 May 2024 22:27:06 +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 | 26 ++-- .../learningMaterial/learningMaterial.vue | 131 +++++++++++------- .../subjectManagement/subjectManagement.vue | 3 +- 3 files changed, 99 insertions(+), 61 deletions(-) diff --git a/src/views/projectFront/examSystem2/examManagement/examManagement.vue b/src/views/projectFront/examSystem2/examManagement/examManagement.vue index 9310bf3a..a1303a34 100644 --- a/src/views/projectFront/examSystem2/examManagement/examManagement.vue +++ b/src/views/projectFront/examSystem2/examManagement/examManagement.vue @@ -138,17 +138,18 @@ - - - - - - - + + + + + + + + @@ -252,6 +253,7 @@ + @@ -807,7 +809,7 @@ export default { this.personType = 1 this.title = "编辑考试"; // console.log(row); - this.examForm = row + this.examForm = JSON.parse(JSON.stringify(row)) diff --git a/src/views/projectFront/examSystem2/learningMaterial/learningMaterial.vue b/src/views/projectFront/examSystem2/learningMaterial/learningMaterial.vue index 1df7799e..506b98b6 100644 --- a/src/views/projectFront/examSystem2/learningMaterial/learningMaterial.vue +++ b/src/views/projectFront/examSystem2/learningMaterial/learningMaterial.vue @@ -75,15 +75,18 @@
- + - + - +
单个文件不超过100M,最多可上传1个附件
将文件拖到此处,或点击上传
- + 0){ - console.log('==========studyCycle-submitBtn==========',this.studyCycle) - this.addCourseForm.beginTime = this.studyCycle[0] - this.addCourseForm.endTime = this.studyCycle[1] - } - this.addCourseForm.projectSn = this.$store.state.projectSn; - // this.addCourseForm.coverImg = this.coverFileList - // this.addCourseForm.fileList = this.materialFileList - if(!this.addCourseForm.subjectId){ - this.$message.error('请选择科目类型') - return - } - if(!this.addCourseForm.courseName){ - this.$message.error('请输入课程名称') - return - } - if(!this.addCourseForm.fileUrl){ - this.$message.error('请上传视频文件') - return - } - if(!this.addCourseForm.coverImg){ - this.$message.error('请上传课程封面') - return - } - if(this.title === '新增课程'){ - addCourseApi(this.addCourseForm).then((res)=>{ - if (res.code == 200) { - this.handleClose() - this.$message.success(res.result); - this.getPageCourseApi(); + submitBtn(addCourseForm) { // 提交按钮 + this.$refs[addCourseForm].validate((valid) =>{ + if(valid){ + if(this.studyCycle.length > 0){ + console.log('==========studyCycle-submitBtn==========',this.studyCycle) + this.addCourseForm.beginTime = this.studyCycle[0] + this.addCourseForm.endTime = this.studyCycle[1] } - }) - }else{ - editCourseApi(this.addCourseForm).then((res)=>{ - if (res.code == 200) { - this.handleClose() - this.$message.success('编辑成功'); - this.getPageCourseApi(); + this.addCourseForm.projectSn = this.$store.state.projectSn; + // this.addCourseForm.coverImg = this.coverFileList + // this.addCourseForm.fileList = this.materialFileList + if(!this.addCourseForm.subjectId){ + this.$message.error('请选择科目类型') + return } - }) - } - console.log('==========addCourseForm-submitBtn==========',this.addCourseForm) + if(!this.addCourseForm.courseName){ + this.$message.error('请输入课程名称') + return + } + if(!this.addCourseForm.fileUrl){ + this.$message.error('请上传视频文件') + return + } + if(!this.addCourseForm.coverImg){ + this.$message.error('请上传课程封面') + return + } + if(this.title === '新增课程'){ + addCourseApi(this.addCourseForm).then((res)=>{ + if (res.code == 200) { + this.handleClose() + this.$message.success(res.result); + this.getPageCourseApi(); + } + }) + }else{ + editCourseApi(this.addCourseForm).then((res)=>{ + if (res.code == 200) { + this.handleClose() + this.$message.success('编辑成功'); + this.getPageCourseApi(); + } + }) + } + console.log('==========addCourseForm-submitBtn==========',this.addCourseForm) + } + }) + + }, sizeChange(val) { // pageSize的处理 this.pagInfo.pageSize = val diff --git a/src/views/projectFront/examSystem2/subjectManagement/subjectManagement.vue b/src/views/projectFront/examSystem2/subjectManagement/subjectManagement.vue index 5cd5f10f..18c7bad4 100644 --- a/src/views/projectFront/examSystem2/subjectManagement/subjectManagement.vue +++ b/src/views/projectFront/examSystem2/subjectManagement/subjectManagement.vue @@ -99,8 +99,7 @@ export default { }, watch:{ dialogVisible(newVal,oldVal){ - // this.getExamSubjectList() - // if(newVal === false) this.subjectInfo = {} + } }, computed: {