b98171c6 by 杨威

目录树调整

1 parent 10fbfffc
......@@ -216,7 +216,8 @@ export default {
path: '/'+item.type,
query:{
source: 2,
bsm:item.bsm
bsm:item.bsm,
auth:this.$route.query.auth ? this.$route.query.auth :'0,1,2'
}
});
}else if(item.type == 'zrz'){
......@@ -225,7 +226,8 @@ export default {
path: '/'+item.type,
query:{
source: 2,
bsm:item.bsm
bsm:item.bsm,
auth:this.$route.query.auth ? this.$route.query.auth :'0,1,2'
}
});
}else if(item.type == 'dz'){
......@@ -234,7 +236,8 @@ export default {
path: '/'+item.type,
query:{
source: 2,
bsm:item.bsm
bsm:item.bsm,
auth:this.$route.query.auth ? this.$route.query.auth :'0,1,2'
}
});
}
......
......@@ -128,7 +128,12 @@ import sxdr from '@components/sxdr/sxdr'
export default {
inheritAttrs: false,
props: {
pd: {},
pd: {
type:Array,
default: () => {
return [];
},
},
size: {
type: Number,
default: 16,
......@@ -196,7 +201,9 @@ export default {
// }
},
created() {
this.$nextTick(()=>{
this.preDealData(this.pd);
})
// this.expandTreeItemById(["6b5af49d803f97baf06afb897de257f5"]);
},
......@@ -280,6 +287,9 @@ export default {
},
preDealData(list) {
//楼盘表目录树没有expand属性
// if(list == null){
// return list
// }else{
list.forEach((x) => {
if (x.expand == undefined) this.$set(x, "expand", true);
if (x.children && x.children.length > 0) {
......@@ -287,6 +297,7 @@ export default {
}
});
return list;
// }
},
// 根据id展开树的具体项
expandTreeItemById(idList) {
......@@ -339,7 +350,8 @@ export default {
}
})
}
})
});
this.$store.state.treeData = this.formatData;
},
//自然幢右键点击事件
openMenu(e,item){
......
......@@ -280,6 +280,7 @@ export default {
if (res.success) {
this.pd = res.result;
this.$store.state.newZdbsm = '';
this.$store.state.treeData = res.result;
}
});
},
......