mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 11:56:44 +08:00
调试
This commit is contained in:
@@ -710,15 +710,55 @@ export default {
|
||||
}
|
||||
},
|
||||
//搜索条件
|
||||
// 搜索条件
|
||||
stagClose(tag, tagIndex) {
|
||||
this.courseChosen = void 0;
|
||||
tag.checked = false;
|
||||
|
||||
if (tag.type == 0) {
|
||||
// 关键词类型
|
||||
this.keyword = '';
|
||||
} else if (tag.type == 1) {
|
||||
// 课程类型
|
||||
this.ctypeList.forEach(item => {
|
||||
if (item.id == tag.id) {
|
||||
item.checked = false;
|
||||
}
|
||||
});
|
||||
} else if (tag.type == 14) {
|
||||
// 热点标签类型
|
||||
this.hotTagsList.forEach(item => {
|
||||
if (item.id == tag.id) {
|
||||
item.checked = false;
|
||||
}
|
||||
});
|
||||
// 更新course.tags
|
||||
const checkedHotTags = this.hotTagsList.filter(tag => tag.checked);
|
||||
let tagIds = checkedHotTags.map(tag => tag.id).join(',');
|
||||
this.course.tags = tagIds;
|
||||
} else if (tag.type == 11 || tag.type == 12 || tag.type == 13) {
|
||||
// 三级分类标签
|
||||
this.oneList.forEach(one => {
|
||||
if (one.id == tag.id) {
|
||||
one.checked = false;
|
||||
}
|
||||
one.children.forEach(two => {
|
||||
if (two.id == tag.id) {
|
||||
two.checked = false;
|
||||
}
|
||||
two.children.forEach(three => {
|
||||
if (three.id == tag.id) {
|
||||
three.checked = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
this.navTitle = []
|
||||
this.searchData();
|
||||
},
|
||||
|
||||
isTagMatched(tag) {
|
||||
// 检查stagList中是否有匹配的标签
|
||||
return this.stagList.some(searchTag =>
|
||||
@@ -762,10 +802,23 @@ export default {
|
||||
handleClearTags() {
|
||||
//清空所有的条件
|
||||
this.keyword = '';
|
||||
// 取消搜索条件标签展示
|
||||
// this.ctypeList.forEach(item => {
|
||||
// item.checked = false;
|
||||
// });
|
||||
|
||||
// 清除课程类型
|
||||
this.ctypeList.forEach(item => {
|
||||
item.checked = false;
|
||||
});
|
||||
|
||||
// 清除热点标签
|
||||
this.hotTagsList.forEach(item => {
|
||||
item.checked = false;
|
||||
});
|
||||
// 清空course.tags
|
||||
this.course.tags = '';
|
||||
|
||||
// 清除年份选择
|
||||
this.yearChosen = [];
|
||||
|
||||
// 清除三级分类
|
||||
this.oneList.forEach(one => {
|
||||
one.checked = false;
|
||||
one.children.forEach(two => {
|
||||
@@ -775,7 +828,8 @@ export default {
|
||||
})
|
||||
})
|
||||
});
|
||||
// 清除左侧被选中的内容
|
||||
|
||||
// 清除左侧被选中的内容
|
||||
this.courseChosen = void 0;
|
||||
this.twoList = [];
|
||||
this.threeList = [];
|
||||
@@ -784,6 +838,7 @@ export default {
|
||||
sessionStorage.removeItem(this.localSessionKey)
|
||||
this.searchData();
|
||||
},
|
||||
|
||||
// 导航切换(录播课,线下课,学习项目)
|
||||
handleTypeClick(item, list) {
|
||||
// item.checked = !item.checked;
|
||||
|
||||
Reference in New Issue
Block a user