添加参数

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:{
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)
}

View File

@@ -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)
}

View File

@@ -102,10 +102,10 @@
<homework v-if="resType == 60 && studyId != ''" :studyId="studyId" :content="contentData"></homework>
</div>
<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 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>
</div>
</div>