cd623270 by 杨威

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

1 parent 43481d0a
...@@ -30,12 +30,6 @@ const constantRoutes = [ ...@@ -30,12 +30,6 @@ const constantRoutes = [
30 component: () => import("@/views/panel/index"), 30 component: () => import("@/views/panel/index"),
31 }, 31 },
32 { 32 {
33 path: "/create",
34 name: "新建",
35 code: "0-2",
36 component: () => import("@/views/panel/create/index"),
37 },
38 {
39 path: "/add", 33 path: "/add",
40 name: "添加", 34 name: "添加",
41 code: "0-6", 35 code: "0-6",
...@@ -77,12 +71,6 @@ const constantRoutes = [ ...@@ -77,12 +71,6 @@ const constantRoutes = [
77 code: "1-5", 71 code: "1-5",
78 component: () => import("@/views/zd/index"), 72 component: () => import("@/views/zd/index"),
79 }, 73 },
80 {
81 path: "/c",
82 name: "层",
83 code: "1-7",
84 component: () => import("@/views/zrz/c/index"),
85 },
86 ], 74 ],
87 }, 75 },
88 ]; 76 ];
......
...@@ -204,7 +204,24 @@ export default { ...@@ -204,7 +204,24 @@ export default {
204 // this.sortNavigation(this.navigationList, indId); 204 // this.sortNavigation(this.navigationList, indId);
205 // } 205 // }
206 this.getDic(); 206 this.getDic();
207 this.getTreeList(); 207 //刷新页面后根据不同路由获取不同树结构数据
208 if(this.$route.path == '/zrz'){
209 this.getRightTreeByZrzbsm(this.$store.state.zrzbsm)
210 }else if(this.$route.path == '/zd'){
211 this.getRightTree(this.$store.state.zdbsm)
212 }else{
213 this.getTreeList();
214 }
215 //刷新页面后根据不同路由高亮相对应的导航
216 if(this.$route.path == '/zrz' || this.$route.path == '/zd' || this.$route.path == '/dz'){
217
218 }else{
219 this.headTop.forEach(item=>{
220 if (item.path == this.$route.path) {
221 item.select = true;
222 }
223 })
224 }
208 this.$nextTick(()=>{ 225 this.$nextTick(()=>{
209 this.treeHeight = this.$el.clientHeight - 120; 226 this.treeHeight = this.$el.clientHeight - 120;
210 }); 227 });
......