|
@@ -106,6 +106,7 @@
|
|
|
:key="chapterIndex"
|
|
|
>
|
|
|
<div
|
|
|
+ v-if="chapter.type == 1"
|
|
|
class="bank-chapter__item__text"
|
|
|
@click="openChapter(chapter)"
|
|
|
>
|
|
@@ -122,7 +123,7 @@
|
|
|
|
|
|
<div
|
|
|
class="bank-section"
|
|
|
- v-if="chapter.showList"
|
|
|
+ v-if="chapter.showList && chapter.type == 1"
|
|
|
>
|
|
|
<div
|
|
|
class="bank-section__item"
|
|
@@ -133,7 +134,7 @@
|
|
|
section, sectionIndex
|
|
|
) in chapter.list"
|
|
|
:key="sectionIndex"
|
|
|
- @click="getResource(section)"
|
|
|
+ @click="getResource(section,1)"
|
|
|
>
|
|
|
<template v-if="section.type != 2">
|
|
|
<template>
|
|
@@ -190,7 +191,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
+ <template
|
|
|
+ v-if="checkSection(section)"
|
|
|
+ >
|
|
|
+ <div class="btn btn--green"
|
|
|
+ @click="getResource(section,2)">
|
|
|
+ 习题
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<template
|
|
|
v-if="section.durationTime > 0"
|
|
|
>
|
|
@@ -311,6 +319,47 @@
|
|
|
</template>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div
|
|
|
+ v-if="chapter.type == 2"
|
|
|
+ class="bank-section__item"
|
|
|
+ @click="getResource(chapter,3)"
|
|
|
+ >
|
|
|
+ <template>
|
|
|
+ <template>
|
|
|
+ <div
|
|
|
+ class="test-btn"
|
|
|
+ v-if="chapter.doType == 1"
|
|
|
+ >
|
|
|
+ 练习
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="test-btn"
|
|
|
+ v-if="chapter.doType != 1"
|
|
|
+ >
|
|
|
+ 考试
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div
|
|
|
+ class="bank-section__item__text"
|
|
|
+ >
|
|
|
+ {{ chapter.name }}
|
|
|
+ </div>
|
|
|
+ <template>
|
|
|
+ <div
|
|
|
+ class="btn btn--green"
|
|
|
+ v-if="chapter.learning == 1"
|
|
|
+ >
|
|
|
+ 合格
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="btn btn--red"
|
|
|
+ v-if="chapter.learning == 0"
|
|
|
+ >
|
|
|
+ 不合格
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -348,7 +397,7 @@
|
|
|
section, sectionIndex
|
|
|
) in menu.list"
|
|
|
:key="sectionIndex"
|
|
|
- @click="getResource(section)"
|
|
|
+ @click="getResource(section,1)"
|
|
|
>
|
|
|
<template v-if="section.type != 2">
|
|
|
<template>
|
|
@@ -403,7 +452,14 @@
|
|
|
}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+ <template
|
|
|
+ v-if="checkSection(section)"
|
|
|
+ >
|
|
|
+ <div class="btn btn--green"
|
|
|
+ @click="getResource(section,2)">
|
|
|
+ 习题
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<template
|
|
|
v-if="section.durationTime > 0"
|
|
|
>
|
|
@@ -537,7 +593,7 @@
|
|
|
:class="{
|
|
|
active: isActive(menu),
|
|
|
}"
|
|
|
- @click="getResource(menu)"
|
|
|
+ @click="getResource(menu,1)"
|
|
|
>
|
|
|
<template>
|
|
|
<div
|
|
@@ -582,7 +638,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
+ <template
|
|
|
+ v-if="checkSectionList(menu)"
|
|
|
+ >
|
|
|
+ <div class="btn btn--green"
|
|
|
+ @click="getResource(menu,2,true)">
|
|
|
+ 习题
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<template v-if="menu.durationTime > 0">
|
|
|
<div class="during">
|
|
|
{{
|
|
@@ -704,7 +767,7 @@
|
|
|
section, sectionIndex
|
|
|
) in chapter.list"
|
|
|
:key="sectionIndex"
|
|
|
- @click="getResource(section)"
|
|
|
+ @click="getResource(section,1)"
|
|
|
>
|
|
|
<template v-if="section.type != 2">
|
|
|
<template>
|
|
@@ -919,7 +982,7 @@
|
|
|
section, sectionIndex
|
|
|
) in menu.list"
|
|
|
:key="sectionIndex"
|
|
|
- @click="getResource(section)"
|
|
|
+ @click="getResource(section,1)"
|
|
|
>
|
|
|
<template v-if="section.type != 2">
|
|
|
<template>
|
|
@@ -1108,7 +1171,7 @@
|
|
|
:class="{
|
|
|
active: isActive(menu),
|
|
|
}"
|
|
|
- @click="getResource(menu)"
|
|
|
+ @click="getResource(menu,1)"
|
|
|
>
|
|
|
<template>
|
|
|
<div
|
|
@@ -2994,6 +3057,8 @@ export default {
|
|
|
clickSectionItem: {}, // 点击节的内容
|
|
|
courseTotal: 0,
|
|
|
teaIndex: 0,
|
|
|
+ sectionExamList:[],//节试卷集合
|
|
|
+ sectionExam:[]//节试卷集合
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -3225,6 +3290,18 @@ export default {
|
|
|
this.liveLast = res.data;
|
|
|
});
|
|
|
},
|
|
|
+ //校验节是否有试卷
|
|
|
+ checkSection(item){
|
|
|
+ console.log(this.sectionExam,item,'00000000');
|
|
|
+ if(this.sectionExam.length == 0){
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if(this.sectionExam.some((section) => section.sectionId == item.sectionId)){
|
|
|
+ return true
|
|
|
+ }else{
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ },
|
|
|
/**
|
|
|
* 获取观看记录
|
|
|
*/
|
|
@@ -4904,7 +4981,7 @@ export default {
|
|
|
},
|
|
|
openModule(menuItem, status = false) {
|
|
|
//重修目录点击
|
|
|
- console.log(menuItem.list);
|
|
|
+ console.log(menuItem,'menuItem');
|
|
|
menuItem.showList = !menuItem.showList;
|
|
|
|
|
|
if (!menuItem.list.length) {
|
|
@@ -4979,6 +5056,14 @@ export default {
|
|
|
},
|
|
|
openChapter(chapter) {
|
|
|
console.log(chapter, "chapter");
|
|
|
+ //获取节试卷列表
|
|
|
+ this.$request
|
|
|
+ .reSectionExamList({
|
|
|
+ chapterId: chapter.chapterId || chapter.menuId,
|
|
|
+ courseId:this.courseId,
|
|
|
+ gradeId:this.gradeId}).then((res) => {
|
|
|
+ this.sectionExam = res.data
|
|
|
+ })
|
|
|
chapter.showList = !chapter.showList;
|
|
|
if (!chapter.list.length) {
|
|
|
if (chapter.isRebuild) {
|
|
@@ -5140,11 +5225,39 @@ export default {
|
|
|
console.log('直播的用户学习日志:', res)
|
|
|
})
|
|
|
},
|
|
|
+ //校验节是否有试卷
|
|
|
+ checkSectionList(item){
|
|
|
+ console.log(item,'item');
|
|
|
+ console.log(this.sectionExamList,'this.sectionExamList');
|
|
|
+ if(this.sectionExamList.length == 0){
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if(this.sectionExamList.some((section) => section.sectionId == item.menuId)){
|
|
|
+ return true
|
|
|
+ }else{
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ },
|
|
|
/**
|
|
|
* 点击节
|
|
|
*/
|
|
|
- async getResource(section) {
|
|
|
- console.log('点击节节节', section)
|
|
|
+ async getResource(section,type,flag) {
|
|
|
+ //type:1章卷,2节卷,3模考卷
|
|
|
+ console.log('点击节节节', section,type)
|
|
|
+ if(flag){
|
|
|
+ //节卷
|
|
|
+ let data = this.sectionExamList.filter(x => x.sectionId == section.menuId)
|
|
|
+ if(data && data.length > 0){
|
|
|
+ section = data[0]
|
|
|
+ }
|
|
|
+ }else if(type == 2){
|
|
|
+ //节卷
|
|
|
+ let data = this.sectionExam.filter(x => x.sectionId == section.sectionId)
|
|
|
+ if(data && data.length > 0){
|
|
|
+ section = data[0]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log('2222222', section)
|
|
|
this.clickSectionItem = section
|
|
|
//逻辑
|
|
|
if (section.sectionType === 2 && section.liveStartTime && section.liveEndTime) {
|
|
@@ -5187,7 +5300,9 @@ export default {
|
|
|
courseId: this.courseId,
|
|
|
gradeId: this.gradeId,
|
|
|
moduleId: section.moduleId || 0,
|
|
|
+ sectionId: section.sectionId || 0,
|
|
|
examId: section.typeId,
|
|
|
+ type: type,
|
|
|
chapterId: section.chapterId || 0,
|
|
|
orderGoodsId: this.orderGoodsId,
|
|
|
},
|
|
@@ -5201,7 +5316,9 @@ export default {
|
|
|
courseId: this.courseId,
|
|
|
gradeId: this.gradeId,
|
|
|
moduleId: section.moduleId || 0,
|
|
|
+ sectionId: section.sectionId || 0,
|
|
|
examId: section.typeId,
|
|
|
+ type: type,
|
|
|
chapterId: section.chapterId || 0,
|
|
|
orderGoodsId: this.orderGoodsId,
|
|
|
},
|
|
@@ -5268,7 +5385,9 @@ export default {
|
|
|
courseId: this.courseId,
|
|
|
gradeId: this.gradeId,
|
|
|
moduleId: section.moduleId || 0,
|
|
|
+ sectionId: section.sectionId || 0,
|
|
|
examId: section.typeId,
|
|
|
+ type: type,
|
|
|
chapterId: section.chapterId || 0,
|
|
|
orderGoodsId: this.orderGoodsId,
|
|
|
},
|
|
@@ -5281,7 +5400,9 @@ export default {
|
|
|
courseId: this.courseId,
|
|
|
gradeId: this.gradeId,
|
|
|
moduleId: section.moduleId || 0,
|
|
|
+ sectionId: section.sectionId || 0,
|
|
|
examId: section.typeId,
|
|
|
+ type: type,
|
|
|
chapterId: section.chapterId || 0,
|
|
|
orderGoodsId: this.orderGoodsId,
|
|
|
},
|
|
@@ -5312,7 +5433,9 @@ export default {
|
|
|
courseId: this.courseId,
|
|
|
gradeId: this.gradeId,
|
|
|
moduleId: section.moduleId || 0,
|
|
|
+ sectionId: section.sectionId || 0,
|
|
|
examId: section.typeId,
|
|
|
+ type: type,
|
|
|
chapterId: section.chapterId || 0,
|
|
|
orderGoodsId: this.orderGoodsId,
|
|
|
},
|
|
@@ -5326,7 +5449,9 @@ export default {
|
|
|
courseId: this.courseId,
|
|
|
gradeId: this.gradeId,
|
|
|
moduleId: section.moduleId || 0,
|
|
|
+ sectionId: section.sectionId || 0,
|
|
|
examId: section.typeId,
|
|
|
+ type: type,
|
|
|
chapterId: section.chapterId || 0,
|
|
|
orderGoodsId: this.orderGoodsId,
|
|
|
},
|
|
@@ -6692,8 +6817,8 @@ export default {
|
|
|
console.log('==============self.menuList===', res.rows, self.menuList)
|
|
|
if ((this.sectionItem.recordingUrl||this.sectionItem.liveUrl) && this.needOpenNew) {
|
|
|
this.needOpenNew = false;
|
|
|
- if (this.sectionItem.sectionType == 1) {
|
|
|
- console.log("录播")
|
|
|
+ if (this.sectionItem.sectionType == 1) {
|
|
|
+ console.log("录播",this.sectionItem)
|
|
|
//录播
|
|
|
this.chapterId = this.sectionItem.chapterId;
|
|
|
this.moduleId = this.sectionItem.moduleId;
|
|
@@ -6702,7 +6827,7 @@ export default {
|
|
|
this.playVideo(this.sectionItem);
|
|
|
} else if (this.sectionItem.sectionType == 2) {
|
|
|
console.log("直播")
|
|
|
- this.getResource(this.sectionItem)
|
|
|
+ this.getResource(this.sectionItem,1)
|
|
|
//直播
|
|
|
// this.studyRecordGetLastLive();
|
|
|
} else if (this.sectionItem.sectionType == 3) {
|
|
@@ -6786,6 +6911,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ //获取节试卷列表
|
|
|
+ this.$request
|
|
|
+ .reSectionExamList({
|
|
|
+ chapterId: 0,
|
|
|
+ courseId:this.courseId,
|
|
|
+ gradeId:this.gradeId}).then((res) => {
|
|
|
+ this.sectionExamList = res.data
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
getReMenuList() {
|