mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-08 02:16:43 +08:00
Merge branch 'zcwy-master' into dev0515
This commit is contained in:
@@ -173,6 +173,7 @@
|
||||
<div v-for="(item, index) in catalogTree" :key="index" :name="index">
|
||||
<el-menu
|
||||
ref="menu"
|
||||
:default-openeds="defaultOpeneds"
|
||||
:default-active="activeId"
|
||||
:unique-opened="true"
|
||||
class="el-menu-vertical-demo"
|
||||
@@ -185,8 +186,8 @@
|
||||
<div style="margin-right: 23px;font-weight: 700;font-size: 16px;">({{ item.children.filter(item=>item.status == 9).length }}/{{ item.children.length }})</div>
|
||||
</div>
|
||||
</template>
|
||||
<el-menu-item-group>
|
||||
<div class="units-info" :class="{'units-active':contentData.id == ele.id}" v-for="(ele, i) in item.children" :key="i" @click="showRes(ele,i,index)">
|
||||
<el-menu-item-group 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,item)">
|
||||
<el-menu-item :index="ele.id" style="padding: 0;padding-left: 10px;">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<div style="font-size: 16px;" :title="ele.contentName">{{i+1}}. {{ ele.contentName.slice(0, 15)+(ele.contentName.length > 15 ? '...' : '') }}</div>
|
||||
@@ -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() {
|
||||
//加载是否请过分
|
||||
|
||||
Reference in New Issue
Block a user