Browse Source

优化菜单

Sunny Feng 2 năm trước cách đây
mục cha
commit
c891ba88e5
2 tập tin đã thay đổi với 69 bổ sung28 xóa
  1. 69 27
      src/router/index.js
  2. 0 1
      src/store/modules/permission.js

+ 69 - 27
src/router/index.js

xqd xqd xqd xqd xqd xqd xqd xqd
@@ -116,7 +116,7 @@ export const asyncRouterMap = [{
 		meta: {
 			title: '承兑人列表',
 			icon: 'el-icon-s-help',
-			roles: ['admin', 'salesman', ]
+			roles: ['admin', 'salesman']
 		},
 		children: [{
 				path: 'table',
@@ -151,9 +151,15 @@ export const asyncRouterMap = [{
 		]
 	},
 
-	{
-		path: '/form',
-		component: Layout,
+	{
+    path: '/form',
+		component: Layout,
+		redirect: '/form',
+		meta: {
+			title: '出票人列表',
+			icon: 'form',
+			roles: ['admin', 'salesman', 'supplier']
+		},
 		children: [{
 				path: 'index',
 				name: 'Form',
@@ -185,10 +191,16 @@ export const asyncRouterMap = [{
 				hidden: true
 			}
 		]
-	},
+	},
+
 	{
 		path: '/delivery',
-		component: Layout,
+		component: Layout,
+		redirect: '/delivery',
+		meta: {
+			title: '供应商账号',
+			roles: ['admin', 'salesman']
+		},
 		children: [{
 				path: 'index',
 				name: 'delivery',
@@ -210,12 +222,18 @@ export const asyncRouterMap = [{
 				hidden: true
 			}
 		]
-	},
-	{
-		path: '/shipments',
-		component: Layout,
+	},
+
+	{
+    path: '/shipments',
+		component: Layout,
+		redirect: '/shipments',
+		meta: {
+			title: '报表统计',
+			roles: ['admin', 'salesman']
+		},
 		children: [{
-				path: '/shipments/index',
+				path: 'index',
 				name: 'shipments',
 				component: () => import('@/views/shipments/index'),
 				meta: {
@@ -256,10 +274,16 @@ export const asyncRouterMap = [{
 			}
 
 		]
-	},
-	{
-		path: '/management',
-		component: Layout,
+	},
+
+	{
+    path: '/management',
+		component: Layout,
+		redirect: '/management',
+		meta: {
+			title: '业务管理员',
+			roles: ['admin']
+		},
 		children: [{
 				path: 'index',
 				name: 'management',
@@ -271,10 +295,16 @@ export const asyncRouterMap = [{
 				}
 			},
 		]
-	},
-	{
-		path: '/sucuirtyaudit',
-		component: Layout,
+	},
+
+	{
+    path: '/sucuirtyaudit',
+		component: Layout,
+		redirect: '/sucuirtyaudit',
+		meta: {
+			title: '安全审计',
+			roles: ['admin']
+		},
 		children: [{
 				path: 'index',
 				name: 'sucuirtyaudit',
@@ -318,10 +348,16 @@ export const asyncRouterMap = [{
 			}
 
 		]
-	},
-	{
-		path: '/databackup',
-		component: Layout,
+	},
+
+	{
+    path: '/databackup',
+		component: Layout,
+		redirect: '/databackup',
+		meta: {
+			title: '数据备份',
+			roles: ['admin']
+		},
 		children: [{
 			path: 'index',
 			name: 'databackup',
@@ -332,10 +368,16 @@ export const asyncRouterMap = [{
 				roles: ['admin']
 			}
 		}]
-	},
-	{
-		path: '/mine',
-		component: Layout,
+	},
+
+	{
+    path: '/mine',
+		component: Layout,
+		redirect: '/mine',
+		meta: {
+			title: '个人资料',
+			roles: ['admin', 'salesman', 'supplier']
+		},
 		children: [{
 			path: 'index',
 			name: 'mine',

+ 0 - 1
src/store/modules/permission.js

xqd
@@ -50,4 +50,3 @@ export default {
   mutations,
   actions
 }
-