mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-15 05:46:43 +08:00
提交修改的课程详细页面
This commit is contained in:
@@ -117,22 +117,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 课程单元 -->
|
<!-- 课程单元 -->
|
||||||
<div class="course-units" v-if="tab == 1">
|
<div class="course-units" v-if="tab == 1">
|
||||||
<div style="min-height: 500px;">
|
<div style="min-height: 500px;overflow-y: auto;">
|
||||||
<div class="catalog" v-if="courseInfo.type == 20">
|
<div class="catalog" v-if="courseInfo.type == 20">
|
||||||
<div v-for="(item, index) in catalogTree" :key="index" :name="index">
|
<div v-for="(item, index) in catalogTree" :key="index" :name="index">
|
||||||
<div class="units-info" :class="{'units-active':contentData.id == ele.id}"
|
<div style="margin: 10px 0px;font-weight: 700;">{{item.section.name}}</div>
|
||||||
@click="showRes(ele,i,index)" v-for="(ele, i) in item.children" :key="i">
|
<div class="units-info" :class="{'units-active':contentData.id == ele.id}" @click="showRes(ele,i,index)" v-for="(ele, i) in item.children" :key="i">
|
||||||
<img v-if="contentData.id == ele.id" src="../../../public/images/playicon.png" alt=""> 1.
|
<img v-if="contentData.id == ele.id" src="../../../public/images/playicon.png" alt=""> {{i+1}}.
|
||||||
{{ ele.contentName }}
|
{{ ele.contentName }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="catalog">
|
<div v-else class="catalog">
|
||||||
<!-- contentList -->
|
<!-- contentList -->
|
||||||
<div class="units-info" v-for="(list, index) in contentList" :key="index" :name="index"
|
<div class="units-info" v-for="(list, index) in contentList" :key="index" :name="index" @click="showRes(list,i,index)" :class="{'units-active':contentData.id == list.id}">
|
||||||
@click="showRes(list,i,index)" :class="{'units-active':contentData.id == list.id}">
|
|
||||||
<!-- <div class="units-info" :class="{'units-active':contentData.id == ele.id}" @click="showRes(ele,i,index)" v-for="(ele, i) in item.children" :key="i"> -->
|
<!-- <div class="units-info" :class="{'units-active':contentData.id == ele.id}" @click="showRes(ele,i,index)" v-for="(ele, i) in item.children" :key="i"> -->
|
||||||
<img v-if="contentData.id == list.id" src="../../../public/images/playicon.png" alt=""> 1.
|
<img v-if="contentData.id == list.id" src="../../../public/images/playicon.png" alt=""> {{index+1}}.
|
||||||
{{ list.contentName }}
|
{{ list.contentName }}
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
</div>
|
</div>
|
||||||
@@ -810,16 +809,6 @@
|
|||||||
audioPlay() {
|
audioPlay() {
|
||||||
//console.log("开始播放");
|
//console.log("开始播放");
|
||||||
let $this = this;
|
let $this = this;
|
||||||
// if(this.contentData.status!=9){
|
|
||||||
// let completeType=this.curriculumData.completeSetup;
|
|
||||||
// if(completeType==0){
|
|
||||||
// //默认5秒后学习完成.
|
|
||||||
// $this.handleTimeout= setTimeout(function() {$this.saveStudyInfo();}, 5000); //5秒后记录学习完成
|
|
||||||
// }else{
|
|
||||||
// //先记录进行中的学习内容
|
|
||||||
// this.saveStudyItem();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
audioPause() {
|
audioPause() {
|
||||||
//console.log("暂停");
|
//console.log("暂停");
|
||||||
@@ -834,7 +823,7 @@
|
|||||||
apiCoursePortal.detail(this.courseId, false).then(rs => {
|
apiCoursePortal.detail(this.courseId, false).then(rs => {
|
||||||
if (rs.status == 200) {
|
if (rs.status == 200) {
|
||||||
//设置必须的字段
|
//设置必须的字段
|
||||||
if (rs.result.course.type == 20) {
|
if (rs.result.course.type == 20) { //有目录课程
|
||||||
rs.result.sections.forEach(sec => {
|
rs.result.sections.forEach(sec => {
|
||||||
sec.status = 0; //加入状态表未开始
|
sec.status = 0; //加入状态表未开始
|
||||||
rs.result.contents.forEach(c => {
|
rs.result.contents.forEach(c => {
|
||||||
@@ -844,6 +833,19 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.sectionList = rs.result.sections;
|
this.sectionList = rs.result.sections;
|
||||||
|
}else if(rs.result.course.type==10){ //无目录课程
|
||||||
|
rs.result.contents.forEach(c => {
|
||||||
|
c.status = 0; //
|
||||||
|
c.studyItemId = '';
|
||||||
|
c.lastStudyTime = 0;
|
||||||
|
if(c.sortIndex==2){
|
||||||
|
c.contentName='作业';
|
||||||
|
}else if(c.sortIndex==3){
|
||||||
|
c.contentName='考试';
|
||||||
|
}else if(c.sortIndex==4){
|
||||||
|
c.contentName='评估';
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
this.courseInfo = rs.result.course;
|
this.courseInfo = rs.result.course;
|
||||||
this.teachers = rs.result.teachers;
|
this.teachers = rs.result.teachers;
|
||||||
@@ -870,6 +872,7 @@
|
|||||||
this.loadAuthorInfo(rs.result.teachers, userIds);
|
this.loadAuthorInfo(rs.result.teachers, userIds);
|
||||||
}
|
}
|
||||||
this.contentList = rs.result.contents;
|
this.contentList = rs.result.contents;
|
||||||
|
//处理内容的名称
|
||||||
this.totalContent = rs.result.contents.length;
|
this.totalContent = rs.result.contents.length;
|
||||||
//加载学习的数据
|
//加载学习的数据
|
||||||
this.loadStudyData();
|
this.loadStudyData();
|
||||||
|
|||||||
Reference in New Issue
Block a user