添加参数

This commit is contained in:
zhangsir
2024-05-28 13:49:39 +08:00
parent 9b16fd3744
commit 1ea0e209fe
3 changed files with 35 additions and 11 deletions

View File

@@ -64,6 +64,18 @@
courseType:{ courseType:{
type: String, type: String,
default: 0 default: 0
},
totalContent:{
type: Number,
default: 0
},
contentName:{
type: String,
default: ''
},
contentType:{
type: String,
default: ''
} }
}, },
data(){ data(){
@@ -168,11 +180,11 @@
studyId: this.studyId, //学习id, studyId: this.studyId, //学习id,
courseId: this.content.courseId, //课程id, courseId: this.content.courseId, //课程id,
contentId: this.content.id, //内容id, contentId: this.content.id, //内容id,
contentType: '', contentType: this.contentType,
contentName: '', //内容名称 contentName: this.contentName, //内容名称
progress: 100, progress: 100,
status: 9, status: 9,
contentTotal: '' contentTotal: this.totalContent
}; };
apiCourseStudy.studyContent(params) apiCourseStudy.studyContent(params)
} }

View File

@@ -156,6 +156,18 @@ export default {
courseType:{ courseType:{
type: String, type: String,
default:0 default:0
},
totalContent:{
type: Number,
default:0
},
contentName:{
type: String,
default: ''
},
contentType:{
type: String,
default: ''
} }
}, },
data() { data() {
@@ -522,11 +534,11 @@ export default {
studyId: this.studyId, //学习id, studyId: this.studyId, //学习id,
courseId: this.content.courseId, //课程id, courseId: this.content.courseId, //课程id,
contentId: this.content.id, //内容id, contentId: this.content.id, //内容id,
contentType: '', contentType: this.contentType,
contentName: '', //内容名称 contentName: this.contentName, //内容名称
progress: 1, progress: 1,
status: 2, status: 2,
contentTotal: '' contentTotal: this.totalContent
}; };
apiStudy.studyContent(params) apiStudy.studyContent(params)
}else{ }else{
@@ -534,11 +546,11 @@ export default {
studyId: this.studyId, //学习id, studyId: this.studyId, //学习id,
courseId: this.content.courseId, //课程id, courseId: this.content.courseId, //课程id,
contentId: this.content.id, //内容id, contentId: this.content.id, //内容id,
contentType: '', contentType: this.contentType,
contentName: '', //内容名称 contentName: this.contentName, //内容名称
progress: 100, progress: 100,
status: 9, status: 9,
contentTotal: '' contentTotal: this.totalContent
}; };
apiStudy.studyContent(params) apiStudy.studyContent(params)
} }

View File

@@ -102,10 +102,10 @@
<homework v-if="resType == 60 && studyId != ''" :studyId="studyId" :content="contentData"></homework> <homework v-if="resType == 60 && studyId != ''" :studyId="studyId" :content="contentData"></homework>
</div> </div>
<div v-if="resType == 61"> <div v-if="resType == 61">
<exam v-if="resType == 61 && studyId != '' " :studyId="studyId" :courseType="courseType" :content="contentData"></exam> <exam :contentName="contentData.contentName" :contentType="contentData.contentType" v-if="resType == 61 && studyId != '' " :totalContent="totalContent" :studyId="studyId" :courseType="courseType" :content="contentData"></exam>
</div> </div>
<div v-if="resType == 62" style="padding:5px"> <div v-if="resType == 62" style="padding:5px">
<assess v-if="resType == 62 && studyId != '' && contentData.id" :courseType="courseType" :studyId="studyId" :content="contentData"> <assess :contentName="contentData.contentName" :contentType="contentData.contentType" v-if="resType == 62 && studyId != '' && contentData.id" :totalContent="totalContent" :courseType="courseType" :studyId="studyId" :content="contentData">
</assess> </assess>
</div> </div>
</div> </div>