diff --git a/src/views/portal/course/Index.vue b/src/views/portal/course/Index.vue index ea6298c5..351adfc4 100644 --- a/src/views/portal/course/Index.vue +++ b/src/views/portal/course/Index.vue @@ -902,6 +902,31 @@ export default { return res; } }, + getAllChecked(){ //获取全部选中的标签 + let list=[]; + + this.ctypeList.forEach(item=>{ + if(item.checked){ + list.push(item); + } + }); + this.oneList.forEach(one=>{ + one.children.forEach(two=>{ + two.children.forEach(three=>{ + if(three.checked){ + list.push(three); + } + }); + if(two.checked ){ + list.push(two); + } + }); + if(one.checked){ + list.push(one); + } + }) + return list; + }, async search() { //测试时间格式化 // let s=1650973801; @@ -924,11 +949,8 @@ export default { this.course.sysType2 = ""; this.course.sysType3 = ""; this.course.keyword=this.keyword; - - this.stagList.forEach(item=>{ - if(item.checked){ - - } + let allChecked=this.getAllChecked(); + allChecked.forEach(item=>{ if(item.type==1){ if(that.course.types){ that.course.types+='-'; } that.course.types+=item.id;