From 17d461cdc4fc138a6151d8e163d718fd9f7e2020 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Mon, 27 May 2024 20:29:16 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E8=AF=BE=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/assess.vue | 17 +++++++++++++++++ src/components/Course/exam.vue | 31 +++++++++++++++++++++++++++++++ src/views/study/coursenew.vue | 6 ++++-- 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/src/components/Course/assess.vue b/src/components/Course/assess.vue index a6535d91..01ff1710 100644 --- a/src/components/Course/assess.vue +++ b/src/components/Course/assess.vue @@ -60,6 +60,10 @@ content:{ type: Object, default: ()=>{} + }, + courseType:{ + type: String, + default: 0 } }, data(){ @@ -159,6 +163,19 @@ this.$message.error(res.message); } }) + if(this.courseType == 20){ + let params = { + studyId: this.studyId, //学习id, + courseId: this.content.courseId, //课程id, + contentId: this.content.id, //内容id, + contentType: '', + contentName: '', //内容名称 + progress: 100, + status: 9, + contentTotal: '' + }; + apiCourseStudy.studyContent(params) + } } } } diff --git a/src/components/Course/exam.vue b/src/components/Course/exam.vue index 2b743b04..c3c74896 100644 --- a/src/components/Course/exam.vue +++ b/src/components/Course/exam.vue @@ -152,6 +152,10 @@ export default { showTest:{ type:Boolean, default:false + }, + courseType:{ + type: String, + default:0 } }, data() { @@ -512,6 +516,33 @@ export default { }, submitTest(testScore){ //提交处理 //清空提示 + if(this.courseType == 20){ + if(testScore<80){ + const params = { + studyId: this.studyId, //学习id, + courseId: this.content.courseId, //课程id, + contentId: this.content.id, //内容id, + contentType: '', + contentName: '', //内容名称 + progress: 1, + status: 2, + contentTotal: '' + }; + apiStudy.studyContent(params) + }else{ + const params = { + studyId: this.studyId, //学习id, + courseId: this.content.courseId, //课程id, + contentId: this.content.id, //内容id, + contentType: '', + contentName: '', //内容名称 + progress: 100, + status: 9, + contentTotal: '' + }; + apiStudy.studyContent(params) + } + } if(this.timer){ window.clearInterval(this.timer); } diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index fa0012fc..c489d57f 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -102,10 +102,10 @@
- +
- +
@@ -320,6 +320,7 @@ }, data() { return { + courseType: 0, trueFalse: true, audiences:'', isCrowd:false, @@ -1190,6 +1191,7 @@ audiences:this.audiences }).then(rs => { if (rs.status == 200) { + this.courseType = rs.result.course.type this.contentStudysLength = rs.result.contentStudys if(rs.result.contents.length==0){ $this.$message.error('课程内容已删除或课程已不再使用'); From 5b34379e36611d5fa6763859da5ff444b7fe0e3a Mon Sep 17 00:00:00 2001 From: zhangsir Date: Tue, 28 May 2024 11:33:36 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Forward.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Forward.vue b/src/views/Forward.vue index 4e596d08..58d7552a 100644 --- a/src/views/Forward.vue +++ b/src/views/Forward.vue @@ -1,7 +1,7 @@ From 9b16fd37447769d995905aba660b76aeafdab504 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Tue, 28 May 2024 11:37:48 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Forward.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Forward.vue b/src/views/Forward.vue index 58d7552a..4e596d08 100644 --- a/src/views/Forward.vue +++ b/src/views/Forward.vue @@ -1,7 +1,7 @@ From 1ea0e209fe011786a695e2239068882c7cb7344b Mon Sep 17 00:00:00 2001 From: zhangsir Date: Tue, 28 May 2024 13:49:39 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/assess.vue | 18 +++++++++++++++--- src/components/Course/exam.vue | 24 ++++++++++++++++++------ src/views/study/coursenew.vue | 4 ++-- 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/src/components/Course/assess.vue b/src/components/Course/assess.vue index 01ff1710..e7b8993c 100644 --- a/src/components/Course/assess.vue +++ b/src/components/Course/assess.vue @@ -64,6 +64,18 @@ courseType:{ type: String, default: 0 + }, + totalContent:{ + type: Number, + default: 0 + }, + contentName:{ + type: String, + default: '' + }, + contentType:{ + type: String, + default: '' } }, data(){ @@ -168,11 +180,11 @@ studyId: this.studyId, //学习id, courseId: this.content.courseId, //课程id, contentId: this.content.id, //内容id, - contentType: '', - contentName: '', //内容名称 + contentType: this.contentType, + contentName: this.contentName, //内容名称 progress: 100, status: 9, - contentTotal: '' + contentTotal: this.totalContent }; apiCourseStudy.studyContent(params) } diff --git a/src/components/Course/exam.vue b/src/components/Course/exam.vue index c3c74896..f7ad31c1 100644 --- a/src/components/Course/exam.vue +++ b/src/components/Course/exam.vue @@ -156,6 +156,18 @@ export default { courseType:{ type: String, default:0 + }, + totalContent:{ + type: Number, + default:0 + }, + contentName:{ + type: String, + default: '' + }, + contentType:{ + type: String, + default: '' } }, data() { @@ -522,11 +534,11 @@ export default { studyId: this.studyId, //学习id, courseId: this.content.courseId, //课程id, contentId: this.content.id, //内容id, - contentType: '', - contentName: '', //内容名称 + contentType: this.contentType, + contentName: this.contentName, //内容名称 progress: 1, status: 2, - contentTotal: '' + contentTotal: this.totalContent }; apiStudy.studyContent(params) }else{ @@ -534,11 +546,11 @@ export default { studyId: this.studyId, //学习id, courseId: this.content.courseId, //课程id, contentId: this.content.id, //内容id, - contentType: '', - contentName: '', //内容名称 + contentType: this.contentType, + contentName: this.contentName, //内容名称 progress: 100, status: 9, - contentTotal: '' + contentTotal: this.totalContent }; apiStudy.studyContent(params) } diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index c489d57f..43a785c8 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -102,10 +102,10 @@
- +
- +
From 2b323bc6f93139d546ed52b7f6d99dd072eedaea Mon Sep 17 00:00:00 2001 From: zhangsir Date: Tue, 28 May 2024 14:10:06 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E4=B8=8D=E5=90=8C=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Forward.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/Forward.vue b/src/views/Forward.vue index 4e596d08..3010e2cf 100644 --- a/src/views/Forward.vue +++ b/src/views/Forward.vue @@ -1,5 +1,5 @@