mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 22:36:43 +08:00
开发
This commit is contained in:
@@ -329,7 +329,7 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
// 取消搜索条件标签展示
|
// 取消搜索条件标签展示
|
||||||
stagList() { //计算出选择的内容
|
/*stagList() { //计算出选择的内容
|
||||||
let list = [];
|
let list = [];
|
||||||
if (this.keyword) {
|
if (this.keyword) {
|
||||||
list.push({
|
list.push({
|
||||||
@@ -360,6 +360,77 @@ export default {
|
|||||||
list.push(one);
|
list.push(one);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
return list;
|
||||||
|
},*/
|
||||||
|
|
||||||
|
stagList() {
|
||||||
|
let list = [];
|
||||||
|
|
||||||
|
// 关键词
|
||||||
|
if (this.keyword) {
|
||||||
|
list.push({
|
||||||
|
type: 0,
|
||||||
|
id: 'keyword',
|
||||||
|
name: this.keyword,
|
||||||
|
tagName: this.keyword,
|
||||||
|
checked: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 课程类型
|
||||||
|
this.ctypeList.forEach(item => {
|
||||||
|
if (item.checked) {
|
||||||
|
list.push({
|
||||||
|
...item,
|
||||||
|
tagName: item.name
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 热点标签 - 这是关键修复
|
||||||
|
this.hotTagsList.forEach(item => {
|
||||||
|
if (item.checked) {
|
||||||
|
list.push({
|
||||||
|
...item,
|
||||||
|
name: item.tagName || item.name,
|
||||||
|
tagName: item.tagName || item.name,
|
||||||
|
type: 14
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 三级分类
|
||||||
|
this.oneList.forEach(one => {
|
||||||
|
var twoChildChecked = false;
|
||||||
|
one.children.forEach(two => {
|
||||||
|
if (two.checked) {
|
||||||
|
twoChildChecked = true;
|
||||||
|
}
|
||||||
|
var threeChildChecked = false;
|
||||||
|
two.children.forEach(three => {
|
||||||
|
if (three.checked) {
|
||||||
|
list.push({
|
||||||
|
...three,
|
||||||
|
tagName: three.name
|
||||||
|
});
|
||||||
|
threeChildChecked = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (two.checked && !threeChildChecked) {
|
||||||
|
list.push({
|
||||||
|
...two,
|
||||||
|
tagName: two.name
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (one.checked && !twoChildChecked) {
|
||||||
|
list.push({
|
||||||
|
...one,
|
||||||
|
tagName: one.name
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
ctypeTagAll() {
|
ctypeTagAll() {
|
||||||
|
|||||||
Reference in New Issue
Block a user