新增多个路由
Showing
8 changed files
with
154 additions
and
25 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) { | ... | ... |
... | @@ -3,7 +3,7 @@ | ... | @@ -3,7 +3,7 @@ |
3 | <img class="login-logo" src="./images/logo-login.svg" /> | 3 | <img class="login-logo" src="./images/logo-login.svg" /> |
4 | <div class="login-con"> | 4 | <div class="login-con"> |
5 | <div class="login-title">用户登录</div> | 5 | <div class="login-title">用户登录</div> |
6 | <div class="login-user" :class="{'select-border':change.user}"> | 6 | <div class="login-user" :class="{ 'select-border': change.user }"> |
7 | <img class="user-icon" src="./images/user.svg" /> | 7 | <img class="user-icon" src="./images/user.svg" /> |
8 | <div class="line-mid"></div> | 8 | <div class="line-mid"></div> |
9 | <input | 9 | <input |
... | @@ -16,7 +16,7 @@ | ... | @@ -16,7 +16,7 @@ |
16 | /> | 16 | /> |
17 | <span class="warning" v-show="warning.user">账号不能为空</span> | 17 | <span class="warning" v-show="warning.user">账号不能为空</span> |
18 | </div> | 18 | </div> |
19 | <div class="login-user user-mt" :class="{'select-border':change.pass}"> | 19 | <div class="login-user user-mt" :class="{ 'select-border': change.pass }"> |
20 | <img class="user-icon" src="./images/password.svg" /> | 20 | <img class="user-icon" src="./images/password.svg" /> |
21 | <div class="line-mid"></div> | 21 | <div class="line-mid"></div> |
22 | <input | 22 | <input |
... | @@ -37,12 +37,26 @@ | ... | @@ -37,12 +37,26 @@ |
37 | @focus="reduceBorder('pass')" | 37 | @focus="reduceBorder('pass')" |
38 | @blur="addBorder('pass')" | 38 | @blur="addBorder('pass')" |
39 | /> | 39 | /> |
40 | <img class="password-eye" src="./images/open.svg" @click="selectEyes" v-show="selectEye" /> | 40 | <img |
41 | <img class="password-eye" src="./images/close.svg" @click="selectEyes" v-show="!selectEye" /> | 41 | class="password-eye" |
42 | src="./images/open.svg" | ||
43 | @click="selectEyes" | ||
44 | v-show="selectEye" | ||
45 | /> | ||
46 | <img | ||
47 | class="password-eye" | ||
48 | src="./images/close.svg" | ||
49 | @click="selectEyes" | ||
50 | v-show="!selectEye" | ||
51 | /> | ||
42 | <span class="warning" v-show="warning.pass">密码不能为空</span> | 52 | <span class="warning" v-show="warning.pass">密码不能为空</span> |
43 | </div> | 53 | </div> |
44 | <div class="login-remake"> | 54 | <div class="login-remake"> |
45 | <i class="icon iconfont iconfuxuan1 icon-style" v-show="!selectIcon" @click="selectRemeber"></i> | 55 | <i |
56 | class="icon iconfont iconfuxuan1 icon-style" | ||
57 | v-show="!selectIcon" | ||
58 | @click="selectRemeber" | ||
59 | ></i> | ||
46 | <i | 60 | <i |
47 | class="icon iconfont iconfuxuan-xuanzhong icon-select" | 61 | class="icon iconfont iconfuxuan-xuanzhong icon-select" |
48 | v-show="selectIcon" | 62 | v-show="selectIcon" |
... | @@ -54,7 +68,9 @@ | ... | @@ -54,7 +68,9 @@ |
54 | </div> | 68 | </div> |
55 | <div class="reserved-con"> | 69 | <div class="reserved-con"> |
56 | <div class="reserved-words">版权所有:2020©某某市自然资源和规划</div> | 70 | <div class="reserved-words">版权所有:2020©某某市自然资源和规划</div> |
57 | <div class="reserved-words line-two">技术支持:西安市自然资源规划局信息中心</div> | 71 | <div class="reserved-words line-two"> |
72 | 技术支持:西安市自然资源规划局信息中心 | ||
73 | </div> | ||
58 | </div> | 74 | </div> |
59 | </div> | 75 | </div> |
60 | </template> | 76 | </template> |
... | @@ -112,7 +128,8 @@ export default { | ... | @@ -112,7 +128,8 @@ export default { |
112 | // this.$router.push('/home') | 128 | // this.$router.push('/home') |
113 | // }).catch(() => { | 129 | // }).catch(() => { |
114 | // }) | 130 | // }) |
115 | this.$store.dispatch("permission_routes/getMenus"); | 131 | // this.$store.dispatch("permission_routes/getMenus"); |
132 | this.$router.push("/panel"); | ||
116 | } else if (!this.userInfo.username || !this.userInfo.password) { | 133 | } else if (!this.userInfo.username || !this.userInfo.password) { |
117 | this.$message({ | 134 | this.$message({ |
118 | duration: 2000, | 135 | duration: 2000, |
... | @@ -309,4 +326,3 @@ export default { | ... | @@ -309,4 +326,3 @@ export default { |
309 | } | 326 | } |
310 | } | 327 | } |
311 | </style> | 328 | </style> |
312 | ... | ... |
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