From 97c940b706d15a51ced7f4714d3928bf5f4b1695 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Thu, 12 Sep 2024 13:22:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/components/addCourse.vue | 11 +++++++---- src/views/course/components/applyForm.vue | 17 +++++++++++++++-- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/views/course/components/addCourse.vue b/src/views/course/components/addCourse.vue index e397ba5..c239cae 100644 --- a/src/views/course/components/addCourse.vue +++ b/src/views/course/components/addCourse.vue @@ -298,7 +298,8 @@ isShow: false, type: 'add', active: 0, - id: '', + id: '', + course_signs_count:0, action: `${process.env.VUE_APP_UPLOAD_API}`, showTinymce: false, courseTypesList: [], @@ -503,7 +504,7 @@ if (res.qun_image) { this.qunList.push(res.qun_image) } - + this.course_signs_count = res.course_signs_count this.publicizeList = res.publicize this.form.dateRange = res.start_date ? [res.start_date, res.end_date] : '' this.form.status = res.status ? res.status : 0 @@ -537,7 +538,8 @@ // 打开自定义表单 editForm(type, id) { // this.$refs.applyForm.formList = deepCopy(this.formList) - this.$refs.applyForm.course_id = this.id + this.$refs.applyForm.course_id = this.id + this.$refs.applyForm.course_signs_count = this.course_signs_count this.$refs.applyForm.dialogVisible = true } @@ -553,7 +555,8 @@ this.showTinymce = true } } else { - this.id = '' + this.id = '' + this.course_signs_count = 0 this.showTinymce = false this.imgList = [] this.qunList = [] diff --git a/src/views/course/components/applyForm.vue b/src/views/course/components/applyForm.vue index c66eb20..1d31181 100644 --- a/src/views/course/components/applyForm.vue +++ b/src/views/course/components/applyForm.vue @@ -124,7 +124,8 @@ }, data() { return { - course_id: "", + course_id: "", + course_signs_count:0, select: { page: 1, page_size: 999, @@ -165,6 +166,15 @@ }, changeCourse(e){ console.log("course-e",e) + if(this.course_signs_count>0){ + this.$message({ + type:'warning', + duration:4000, + message:'当前课程已有人员报名,不可进行报名表单克隆操作' + }) + // this.$Message.warning("当前课程已有人员报名,不可进行报名表单克隆操作") + return + } if(e){ this.hasCourseList.map(item=>{ if(item.id===e){ @@ -339,7 +349,10 @@ if (newval) { this.getFormList() } else { - this.course_id = '' + this.course_id = '' + this.course_signs_count = 0 + this.hasCourseId = '' + this.hasCourseName = '' this.selectFormList.map(item => { item.is_open = false if (item.id) {