From 0ff864e996af5a5c44cc88445e841a98d4900d80 Mon Sep 17 00:00:00 2001 From: daihh Date: Thu, 5 Jan 2023 15:35:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=A4=9A=E9=80=89=EF=BC=8C?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/portal/course/Index.vue | 32 ++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) 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;