mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
课程多选,查询问题
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user