|
|
@ -160,7 +160,7 @@ export default {
|
|
|
|
//获取当前选中的radio
|
|
|
|
//获取当前选中的radio
|
|
|
|
getRadio() {
|
|
|
|
getRadio() {
|
|
|
|
console.log(this.zzradio);
|
|
|
|
console.log(this.zzradio);
|
|
|
|
this.filterText = "";
|
|
|
|
//this.filterText = "";
|
|
|
|
localStorage.setItem("radio", JSON.stringify(this.zzradio));
|
|
|
|
localStorage.setItem("radio", JSON.stringify(this.zzradio));
|
|
|
|
this.getLineTreeStatus();
|
|
|
|
this.getLineTreeStatus();
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -169,7 +169,29 @@ export default {
|
|
|
|
console.log("点击了刷新");
|
|
|
|
console.log("点击了刷新");
|
|
|
|
|
|
|
|
|
|
|
|
if (this.filterText !== "") {
|
|
|
|
if (this.filterText !== "") {
|
|
|
|
this.$refs.tree.filter(this.filterText);
|
|
|
|
getdyTreeListJoggle({ type: this.zzradio })
|
|
|
|
|
|
|
|
.then((res) => {
|
|
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
this.lineTreeData = res.data.list;
|
|
|
|
|
|
|
|
this.isfavorList = res.data.favorlist;
|
|
|
|
|
|
|
|
this.lineTreeData.unshift({
|
|
|
|
|
|
|
|
id: 0,
|
|
|
|
|
|
|
|
name: "收藏夹",
|
|
|
|
|
|
|
|
bsManufacturer: "收藏夹",
|
|
|
|
|
|
|
|
list: this.isfavorList,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.onlineNum = res.data.onlineNum;
|
|
|
|
|
|
|
|
this.totalNum = res.data.totalNum;
|
|
|
|
|
|
|
|
this.currentData = JSON.parse(localStorage.getItem("currentData"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
|
|
this.$refs.tree.setCurrentKey(this.currentData.id); //一定要加这个选中了否则样式没有出来
|
|
|
|
|
|
|
|
this.$refs.tree.filter(this.filterText);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
|
|
|
console.log(err); //代码错误、请求失败捕获
|
|
|
|
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
getdyTreeListJoggle({ type: this.zzradio })
|
|
|
|
getdyTreeListJoggle({ type: this.zzradio })
|
|
|
|
.then((res) => {
|
|
|
|
.then((res) => {
|
|
|
|