From a535b6ee852965e0614fb74c9c927caa2fb3a3eb Mon Sep 17 00:00:00 2001 From: zhangsir Date: Fri, 14 Jun 2024 16:19:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/study/coursenew.vue | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index 11d0cc7f..88d79caf 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -173,6 +173,7 @@
({{ item.children.filter(item=>item.status == 9).length }}/{{ item.children.length }})
- -
+ +
{{i+1}}. {{ ele.contentName.slice(0, 15)+(ele.contentName.length > 15 ? '...' : '') }}
@@ -354,8 +355,9 @@ }, data() { return { - KeyIndex: '', activeId: '', + isFalse: false, + defaultOpeneds: [], sendEventProgress: 0, trueFalse: true, audiences:'', @@ -491,12 +493,15 @@ this.stopStudyTime(); }, methods: { - handleOpen(key, keyPath) { - console.log(key, keyPath,'handleOpen'); - this.KeyIndex = key; + handleOpen(key,path){ + // console.log(key,path,'handleOpen') + if(this.isFalse){ + this.defaultOpeneds = [key] + } + this.isFalse = false }, - handleClose(key, keyPath) { - console.log(key, keyPath,'handleClose'); + handleClose(key,path){ + // console.log(key,path,'handleClose') }, toUserHome(tea){ this.$router.push({path:this.$xpage.getHomePath(tea.teacherId)}) @@ -636,7 +641,7 @@ window.open(url, '_blank'); }, //替换播放区域 - changePlayRes(r){ + changePlayRes(r,item){ if(this.appendStudyOtherHandle!=null){ window.clearTimeout(this.appendStudyOtherHandle); @@ -648,6 +653,10 @@ this.resType = r.contentType; this.contentData = r; this.activeId = this.contentData.id + if(item){ + this.isFalse = true + this.handleOpen(item.section.id,[item.section.id]) + } this.contentData.name = this.courseInfo.name; this.saveStudyDuration(); @@ -782,7 +791,7 @@ //console.log(h,$this.controlHeight,'$this.controlHeight'); }) }, - showRes(r, i, index) { //i:子节下标,index:章下标 + showRes(r, i, index,item) { //i:子节下标,index:章下标 // 无权限查看不能点击 if(!this.isCrowd){ return @@ -830,7 +839,7 @@ } } } - this.changePlayRes(r); + this.changePlayRes(r,item); }, loadScorePraiseAndTrample() { //加载是否请过分