课程多选,查询问题

This commit is contained in:
daihh
2023-01-05 15:35:03 +08:00
parent 015966895c
commit 0ff864e996

View File

@@ -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;