Prechádzať zdrojové kódy

管理后台-路由权限配置

panyong 3 rokov pred
rodič
commit
6574c97adc

+ 21 - 30
htmldev/manage/src/router/modules/business.js

@@ -4,48 +4,39 @@ const businessRouter = {
   path: '/business',
   component: Layout,
   name: 'Business',
-  meta: { title: '业务中心', icon: 'el-icon-s-shop' },
+  meta: { title: '业务中心', icon: 'el-icon-s-shop', roleValue: 'business_show' },
   redirect: '/business/outlet/list',
   children: [
     {
       path: 'outlet',
-      component: () => import('@/views/business/outlet/index'),
+      component: () => import('@/views/business/outlet/list/index'),
       name: 'BusinessOutlet',
-      meta: { title: '门店管理', icon: 'el-icon-s-shop' },
-      redirect: '/business/outlet/list',
-      children: [
-        {
-          path: 'list',
-          component: () => import('@/views/business/outlet/list/index'),
-          name: 'BusinessOutletList',
-          meta: { title: '门店列表' }
-        }
-      ]
+      meta: { title: '门店列表', icon: 'el-icon-s-shop', roleValue: 'business_outlet_show' }
     },
     {
       path: 'place',
       component: () => import('@/views/business/place/index'),
       name: 'BusinessPlace',
-      meta: { title: '订座管理', icon: 'el-icon-place' },
+      meta: { title: '订座管理', icon: 'el-icon-place', roleValue: 'business_place_show' },
       redirect: '/business/place/reserve',
       children: [
         {
           path: 'reserve',
           component: () => import('@/views/business/place/reserve/index'),
           name: 'BusinessPlaceReserve',
-          meta: { title: '预订' }
+          meta: { title: '预订', roleValue: 'business_place_reserve_show' }
         },
         {
           path: 'set',
           component: () => import('@/views/business/place/set/index'),
           name: 'BusinessPlaceSet',
-          meta: { title: '未来7天排座' }
+          meta: { title: '未来7天排座', roleValue: 'business_place_set_show' }
         },
         {
           path: 'list',
           component: () => import('@/views/business/place/list/index'),
           name: 'BusinessPlaceList',
-          meta: { title: '座位模板' }
+          meta: { title: '座位模板', roleValue: 'business_place_list_show' }
         }
       ]
     },
@@ -53,38 +44,38 @@ const businessRouter = {
       path: 'sms',
       component: () => import('@/views/business/sms/index'),
       name: 'BusinessSMS',
-      meta: { title: '演出管理', icon: 'el-icon-headset' },
+      meta: { title: '演出管理', icon: 'el-icon-headset', roleValue: 'business_sms_show' },
       redirect: '/business/sms/plan',
       children: [
         {
           path: 'pickASong',
           component: () => import('@/views/business/sms/pickASong/index'),
           name: 'BusinessSMSPickASong',
-          meta: { title: '点歌记录' }
+          meta: { title: '点歌记录', roleValue: 'business_sms_pickASong_show' }
         },
         {
           path: 'reward',
           component: () => import('@/views/business/sms/reward/index'),
           name: 'BusinessSMSReward',
-          meta: { title: '赞赏记录' }
+          meta: { title: '赞赏记录', roleValue: 'business_sms_reward_show' }
         },
         {
           path: 'plan',
           component: () => import('@/views/business/sms/plan/index'),
           name: 'BusinessSMSPlan',
-          meta: { title: '演出安排' }
+          meta: { title: '演出安排', roleValue: 'business_sms_plan_show' }
         },
         {
           path: 'musicLib',
           component: () => import('@/views/business/sms/musicLib/index'),
           name: 'BusinessSMSMusicLib',
-          meta: { title: '曲库管理' }
+          meta: { title: '曲库管理', roleValue: 'business_sms_musicLib_show' }
         },
         {
           path: 'playList',
           component: () => import('@/views/business/sms/playList/index'),
           name: 'BusinessSMSPlayList',
-          meta: { title: '艺人曲库' },
+          meta: { title: '艺人曲库', roleValue: 'business_sms_playList_show' },
           hidden: true
         }
       ]
@@ -93,20 +84,20 @@ const businessRouter = {
       path: 'oms',
       component: () => import('@/views/business/oms/index'),
       name: 'BusinessOMS',
-      meta: { title: '点单管理', icon: 'el-icon-s-order' },
+      meta: { title: '点单管理', icon: 'el-icon-s-order', roleValue: 'business_oms_show' },
       redirect: '/business/oms/order',
       children: [
         {
           path: 'order',
           component: () => import('@/views/business/oms/list/index'),
           name: 'BusinessOMSOrder',
-          meta: { title: '点单列表' }
+          meta: { title: '点单列表', roleValue: 'business_oms_order_list_show' }
         },
         {
           path: 'detail',
           component: () => import('@/views/business/oms/detail/index'),
           name: 'BusinessOMSDetail',
-          meta: { title: '点单详情' },
+          meta: { title: '点单详情', roleValue: 'business_oms_detail_list_show' },
           hidden: true
         }
       ]
@@ -115,26 +106,26 @@ const businessRouter = {
       path: 'pms',
       component: () => import('@/views/business/pms/index'),
       name: 'BusinessPMS',
-      meta: { title: '商品管理', icon: 'el-icon-goods' },
+      meta: { title: '商品管理', icon: 'el-icon-goods', roleValue: 'business_pms_show' },
       redirect: '/business/pms/goods',
       children: [
         {
           path: 'category',
           component: () => import('@/views/business/pms/category/index'),
           name: 'BusinessPMSCategory',
-          meta: { title: '商品分类' }
+          meta: { title: '商品分类', roleValue: 'business_pms_category_show' }
         },
         {
           path: 'goods',
           component: () => import('@/views/business/pms/goods/index'),
           name: 'BusinessPMSGoods',
-          meta: { title: '商品列表' }
+          meta: { title: '商品列表', roleValue: 'business_pms_goods_show' }
         },
         {
           path: 'goodsAttr',
           component: () => import('@/views/business/pms/goodsAttr/index'),
           name: 'BusinessPMSGoodsAttr',
-          meta: { title: '商品附加' }
+          meta: { title: '商品附加', roleValue: 'business_pms_goodsAttr_show' }
         }
       ]
     },
@@ -142,7 +133,7 @@ const businessRouter = {
       path: 'saveWine',
       component: () => import('@/views/business/saveWine/index'),
       name: 'BusinessSaveWine',
-      meta: { title: '存酒记录', icon: 'el-icon-goods' }
+      meta: { title: '存酒记录', icon: 'el-icon-goods', roleValue: 'business_saveWine_show' }
     }
   ]
 }

+ 2 - 2
htmldev/manage/src/router/modules/fms.js

@@ -4,7 +4,7 @@ const fms = {
   path: '/fms',
   component: Layout,
   name: 'Fms',
-  meta: { title: '财务中心', icon: 'money' },
+  meta: { title: '财务中心', icon: 'money', roleValue: 'fms_show' },
   redirect: '/fms/check',
   alwaysShow: true,
   children: [
@@ -12,7 +12,7 @@ const fms = {
       path: 'check',
       component: () => import('@/views/fms/check/index'),
       name: 'FmsCheck',
-      meta: { title: '流水', icon: 'el-icon-s-check' }
+      meta: { title: '流水', icon: 'el-icon-s-check', roleValue: 'fms_check_show' }
     }
   ]
 }

+ 5 - 5
htmldev/manage/src/router/modules/ums.js

@@ -4,32 +4,32 @@ const ums = {
   path: '/ums',
   component: Layout,
   name: 'Ums',
-  meta: { title: '用户中心', icon: 'user' },
+  meta: { title: '用户中心', icon: 'user', roleValue: 'ums_show' },
   redirect: '/ums/customer',
   children: [
     {
       path: 'customer',
       component: () => import('@/views/ums/customer/index'),
       name: 'UmsCustomer',
-      meta: { title: '注册用户', icon: 'el-icon-s-custom' }
+      meta: { title: '注册用户', icon: 'el-icon-s-custom', roleValue: 'ums_customer_show' }
     },
     {
       path: 'singer',
       component: () => import('@/views/ums/singer/index'),
       name: 'UmsSinger',
-      meta: { title: '艺人', icon: 'peoples' }
+      meta: { title: '艺人', icon: 'peoples', roleValue: 'ums_singer_show' }
     },
     {
       path: 'worker',
       component: () => import('@/views/ums/worker/index'),
       name: 'UmsWorker',
-      meta: { title: '吧台', icon: 'el-icon-user-solid' }
+      meta: { title: '吧台', icon: 'el-icon-user-solid', roleValue: 'ums_worker_show' }
     },
     {
       path: 'boss',
       component: () => import('@/views/ums/boss/index'),
       name: 'UmsBoss',
-      meta: { title: '老板', icon: 'el-icon-user' }
+      meta: { title: '老板', icon: 'el-icon-user', roleValue: 'ums_boss_show' }
     }
   ]
 }

+ 0 - 9
htmldev/manage/src/views/business/outlet/index.vue

@@ -1,9 +0,0 @@
-<template>
-  <router-view/>
-</template>
-
-<script>
-</script>
-
-<style lang="scss" scoped>
-</style>