cd623270 by 杨威

刷新页面后根据不同路由高亮相对应的导航并获取不同树结构数据

1 parent 43481d0a
......@@ -30,12 +30,6 @@ const constantRoutes = [
component: () => import("@/views/panel/index"),
},
{
path: "/create",
name: "新建",
code: "0-2",
component: () => import("@/views/panel/create/index"),
},
{
path: "/add",
name: "添加",
code: "0-6",
......@@ -77,12 +71,6 @@ const constantRoutes = [
code: "1-5",
component: () => import("@/views/zd/index"),
},
{
path: "/c",
name: "层",
code: "1-7",
component: () => import("@/views/zrz/c/index"),
},
],
},
];
......
......@@ -204,7 +204,24 @@ export default {
// this.sortNavigation(this.navigationList, indId);
// }
this.getDic();
this.getTreeList();
//刷新页面后根据不同路由获取不同树结构数据
if(this.$route.path == '/zrz'){
this.getRightTreeByZrzbsm(this.$store.state.zrzbsm)
}else if(this.$route.path == '/zd'){
this.getRightTree(this.$store.state.zdbsm)
}else{
this.getTreeList();
}
//刷新页面后根据不同路由高亮相对应的导航
if(this.$route.path == '/zrz' || this.$route.path == '/zd' || this.$route.path == '/dz'){
}else{
this.headTop.forEach(item=>{
if (item.path == this.$route.path) {
item.select = true;
}
})
}
this.$nextTick(()=>{
this.treeHeight = this.$el.clientHeight - 120;
});
......