新增多个路由
Showing
8 changed files
with
130 additions
and
17 deletions
... | @@ -27,6 +27,30 @@ const constantRoutes = [ | ... | @@ -27,6 +27,30 @@ const constantRoutes = [ |
27 | name: '首页', | 27 | name: '首页', |
28 | code: '0-1', | 28 | code: '0-1', |
29 | component: () => import('@/views/panel/index') | 29 | component: () => import('@/views/panel/index') |
30 | }, | ||
31 | { | ||
32 | path: '/create', | ||
33 | name: '新建', | ||
34 | code: '0-2', | ||
35 | component: () => import('@/views/panel/create/index') | ||
36 | }, | ||
37 | { | ||
38 | path: '/modify', | ||
39 | name: '更正', | ||
40 | code: '0-3', | ||
41 | component: () => import('@/views/panel/modify/index') | ||
42 | }, | ||
43 | { | ||
44 | path: '/change', | ||
45 | name: '变更', | ||
46 | code: '0-4', | ||
47 | component: () => import('@/views/panel/change/index') | ||
48 | }, | ||
49 | { | ||
50 | path: '/search', | ||
51 | name: '综合查询', | ||
52 | code: '0-5', | ||
53 | component: () => import('@/views/panel/search/index') | ||
30 | } | 54 | } |
31 | ] | 55 | ] |
32 | } | 56 | } | ... | ... |
... | @@ -31,6 +31,7 @@ const mutations = { | ... | @@ -31,6 +31,7 @@ const mutations = { |
31 | }, | 31 | }, |
32 | // 初始化 | 32 | // 初始化 |
33 | INIT_TABS(state) { | 33 | INIT_TABS(state) { |
34 | debugger | ||
34 | state.openTab = []; | 35 | state.openTab = []; |
35 | state.openTab[0] = { route: "/panel", name: "首页" } | 36 | state.openTab[0] = { route: "/panel", name: "首页" } |
36 | }, | 37 | }, | ... | ... |
... | @@ -63,20 +63,21 @@ export default { | ... | @@ -63,20 +63,21 @@ export default { |
63 | defaultActive: "", | 63 | defaultActive: "", |
64 | headTop: [ | 64 | headTop: [ |
65 | { | 65 | { |
66 | select: true, | 66 | path:"/create", |
67 | }, | ||
68 | { | ||
69 | select: false, | 67 | select: false, |
70 | }, | 68 | }, |
71 | { | 69 | { |
70 | path:"/modify", | ||
72 | select: false, | 71 | select: false, |
73 | }, | 72 | }, |
74 | { | 73 | { |
74 | path:"/change", | ||
75 | select: false, | 75 | select: false, |
76 | }, | 76 | }, |
77 | { | 77 | { |
78 | path:"/search", | ||
78 | select: false, | 79 | select: false, |
79 | }, | 80 | } |
80 | ], | 81 | ], |
81 | // 上导航选中id | 82 | // 上导航选中id |
82 | indId: undefined, | 83 | indId: undefined, |
... | @@ -178,18 +179,18 @@ export default { | ... | @@ -178,18 +179,18 @@ export default { |
178 | { | 179 | { |
179 | name: "新建", | 180 | name: "新建", |
180 | icon: "fa fa-address-card-o", | 181 | icon: "fa fa-address-card-o", |
181 | path: "/officialAccount_panel", | 182 | path: "/create", |
182 | }, | 183 | }, |
183 | { name: "更正", icon: "fa fa-address-card-o", path: "/applets_panel" }, | 184 | { name: "更正", icon: "fa fa-address-card-o", path: "/modify" }, |
184 | { | 185 | { |
185 | name: "变更", | 186 | name: "变更", |
186 | icon: "fa fa-address-card-o", | 187 | icon: "fa fa-address-card-o", |
187 | path: "/appointment_panel", | 188 | path: "/change", |
188 | }, | 189 | }, |
189 | { | 190 | { |
190 | name: "综合查询", | 191 | name: "综合查询", |
191 | icon: "fa fa-address-card-o", | 192 | icon: "fa fa-address-card-o", |
192 | path: "/system_panel", | 193 | path: "/search", |
193 | }, | 194 | }, |
194 | ]; | 195 | ]; |
195 | this.navigationList = list; | 196 | this.navigationList = list; |
... | @@ -208,11 +209,10 @@ export default { | ... | @@ -208,11 +209,10 @@ export default { |
208 | headTop[index].name = item.name; | 209 | headTop[index].name = item.name; |
209 | headTop[index].icon = item.icon; | 210 | headTop[index].icon = item.icon; |
210 | }); | 211 | }); |
211 | this.menuSelect(data, selectId); | ||
212 | }, | ||
213 | menuSelect(data, selectId) { | ||
214 | this.menuList = data[selectId].children; | ||
215 | }, | 212 | }, |
213 | // menuSelect(data, selectId) { | ||
214 | // this.menuList = data[selectId].children; | ||
215 | // }, | ||
216 | handleOpen(key, keyPath) { | 216 | handleOpen(key, keyPath) { |
217 | console.log(key, keyPath); | 217 | console.log(key, keyPath); |
218 | }, | 218 | }, |
... | @@ -231,12 +231,12 @@ export default { | ... | @@ -231,12 +231,12 @@ export default { |
231 | }, | 231 | }, |
232 | selectTopItems(ind) { | 232 | selectTopItems(ind) { |
233 | this.indId = ind; | 233 | this.indId = ind; |
234 | this.menuSelect(this.navigationList, ind); | 234 | // this.menuSelect(this.navigationList, ind); |
235 | this.$store.dispatch("setTabs/init_tabs"); | 235 | // this.$store.dispatch("setTabs/init_tabs"); |
236 | this.$store.dispatch("setTabs/set_active_index", "/panel"); | 236 | // this.$store.dispatch("setTabs/set_active_index", "/panel"); |
237 | this.$router.push("/panel"); | 237 | this.$router.push(this.headTop[ind].path); |
238 | this.navSelect(ind); | 238 | this.navSelect(ind); |
239 | util.cookies.set("indId", ind); | 239 | // util.cookies.set("indId", ind); |
240 | }, | 240 | }, |
241 | // 上导航选中id | 241 | // 上导航选中id |
242 | navSelect(id) { | 242 | navSelect(id) { | ... | ... |
This diff is collapsed.
Click to expand it.
src/views/panel/change/index.vue
0 → 100644
1 | <template> | ||
2 | <div class=""></div> | ||
3 | </template> | ||
4 | |||
5 | <script> | ||
6 | export default { | ||
7 | name:"", | ||
8 | components:{}, | ||
9 | props:{}, | ||
10 | data(){ | ||
11 | return { | ||
12 | } | ||
13 | }, | ||
14 | created(){}, | ||
15 | mounted(){}, | ||
16 | methods:{}, | ||
17 | computed: {}, | ||
18 | watch: {}, | ||
19 | } | ||
20 | </script> | ||
21 | <style scoped lang="less"> | ||
22 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/views/panel/create/index.vue
0 → 100644
1 | <template> | ||
2 | <div class=""></div> | ||
3 | </template> | ||
4 | |||
5 | <script> | ||
6 | export default { | ||
7 | name:"", | ||
8 | components:{}, | ||
9 | props:{}, | ||
10 | data(){ | ||
11 | return { | ||
12 | } | ||
13 | }, | ||
14 | created(){}, | ||
15 | mounted(){}, | ||
16 | methods:{}, | ||
17 | computed: {}, | ||
18 | watch: {}, | ||
19 | } | ||
20 | </script> | ||
21 | <style scoped lang="less"> | ||
22 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/views/panel/modify/index.vue
0 → 100644
1 | <template> | ||
2 | <div class=""></div> | ||
3 | </template> | ||
4 | |||
5 | <script> | ||
6 | export default { | ||
7 | name:"", | ||
8 | components:{}, | ||
9 | props:{}, | ||
10 | data(){ | ||
11 | return { | ||
12 | } | ||
13 | }, | ||
14 | created(){}, | ||
15 | mounted(){}, | ||
16 | methods:{}, | ||
17 | computed: {}, | ||
18 | watch: {}, | ||
19 | } | ||
20 | </script> | ||
21 | <style scoped lang="less"> | ||
22 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
src/views/panel/search/index.vue
0 → 100644
1 | <template> | ||
2 | <div class=""></div> | ||
3 | </template> | ||
4 | |||
5 | <script> | ||
6 | export default { | ||
7 | name:"", | ||
8 | components:{}, | ||
9 | props:{}, | ||
10 | data(){ | ||
11 | return { | ||
12 | } | ||
13 | }, | ||
14 | created(){}, | ||
15 | mounted(){}, | ||
16 | methods:{}, | ||
17 | computed: {}, | ||
18 | watch: {}, | ||
19 | } | ||
20 | </script> | ||
21 | <style scoped lang="less"> | ||
22 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or sign in to post a comment