Browse Source

路由白名单

rkljw 4 days ago
parent
commit
0d629ca410
3 changed files with 841 additions and 506 deletions
  1. 121 506
      src/router/index.js
  2. 43 0
      src/views/router/components/tableTitle.vue
  3. 677 0
      src/views/router/routerList.vue

+ 121 - 506
src/router/index.js

@@ -11,7 +11,6 @@ import componentsRouter from './modules/components'
 import chartsRouter from './modules/charts'
 import tableRouter from './modules/table'
 import nestedRouter from './modules/nested'
-import dangyunlong from './modules/dangyunlong'
 
 /**
  * Note: sub-menu only appear when route children.length >= 1
@@ -40,7 +39,6 @@ import dangyunlong from './modules/dangyunlong'
  * all roles can be accessed
  */
 export const constantRoutes = [
-  ...dangyunlong,
   {
     path: '/redirect',
     component: Layout,
@@ -171,7 +169,7 @@ export const constantRoutes = [
         path: '',
         component: () => import('@/views/website/editNavigation'),
         meta: {
-          title: '栏目详情',
+          title: '导航详情',
           hidden: true,
           breadcrumb: true
         }
@@ -194,22 +192,6 @@ export const constantRoutes = [
       }
     ]
   },
-  {
-    path: '/examine',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/news/examine'),
-        meta: {
-          title: '待审核列表',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
   {
     path: '/creatNews',
     component: Layout,
@@ -323,80 +305,15 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/hall',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/chat/hall'),
-        meta: {
-          title: '聊天',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/creatWebsite',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/website/creatWebsite'),
-        meta: {
-          title: '搭建网站',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/contacts',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/chat/contacts'),
-        meta: {
-          title: '通讯录',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/webCrawler',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/crawler/webCrawler'),
-        meta: {
-          title: '建立网站',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  // ----fr-课题分类
-  {
-    path: '/topicType',
+    path: '/routerList',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/chat/topicType'),
+        component: () => import('@/views/router/routerList'),
         meta: {
-          title: '课题分类',
+          title: '路由白名单',
           hidden: true,
           breadcrumb: true
         }
@@ -404,32 +321,31 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/surveyList',
+    path: '/hall',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/surveyList'),
+        component: () => import('@/views/chat/hall'),
         meta: {
-          title: '投票列表',
+          title: '聊天',
           hidden: true,
           breadcrumb: true
         }
       }
     ]
   },
-  ,
   {
-    path: '/jobRecruitingList',
+    path: '/creatWebsite',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/job/jobRecruitingList'),
+        component: () => import('@/views/website/creatWebsite'),
         meta: {
-          title: '招聘列表',
+          title: '搭建网站',
           hidden: true,
           breadcrumb: true
         }
@@ -437,15 +353,15 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/checkjobRecruitingList',
+    path: '/contacts',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/job/checkjobRecruitingList'),
+        component: () => import('@/views/chat/contacts'),
         meta: {
-          title: '招聘审核列表',
+          title: '通讯录',
           hidden: true,
           breadcrumb: true
         }
@@ -453,15 +369,15 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/jobResumeList',
+    path: '/webCrawler',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/job/jobResumeList'),
+        component: () => import('@/views/crawler/webCrawler'),
         meta: {
-          title: '我的沟通列表',
+          title: '建立网站',
           hidden: true,
           breadcrumb: true
         }
@@ -469,33 +385,32 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/creatJob',
+    path: '/topic',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/job/creatJob'),
+        component: () => import('@/views/chat/topic'),
         meta: {
-          title: '发布职位',
+          title: '课题',
           hidden: true,
           breadcrumb: true
         }
       }
     ]
   },
-  // -----------fr---------
-  // ----------liuj------------
+  // ----fr-课题分类
   {
-    path: '/goodList',
+    path: '/topicType',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/GoodList'),
+        component: () => import('@/views/chat/topicType'),
         meta: {
-          title: '商品列表',
+          title: '课题分类',
           hidden: true,
           breadcrumb: true
         }
@@ -503,15 +418,15 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/goodListApply',
+    path: '/webRule',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/GoodListApply'),
+        component: () => import('@/views/crawler/webRule'),
         meta: {
-          title: '商品待审核列表',
+          title: '规则列表',
           hidden: true,
           breadcrumb: true
         }
@@ -519,32 +434,31 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/addGood',
+    path: '/gather',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/addGood'),
+        component: () => import('@/views/crawler/gather'),
         meta: {
-          title: '添加商品',
+          title: '采集器',
           hidden: true,
           breadcrumb: true
         }
       }
     ]
   },
-
   {
-    path: '/jobHuntingList',
+    path: '/creatTopic',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/jobHuntingList'),
+        component: () => import('@/views/chat/creatTopic'),
         meta: {
-          title: '求职信息',
+          title: '编辑课题',
           hidden: true,
           breadcrumb: true
         }
@@ -552,49 +466,47 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/jobHuntingListApply',
+    path: '/webCrawlerList',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/jobHuntingListApply'),
+        component: () => import('@/views/crawler/webCrawlerList'),
         meta: {
-          title: '求职信息',
+          title: '采集列表',
           hidden: true,
           breadcrumb: true
         }
       }
     ]
   },
-
   {
-    path: '/addJobHunting',
+    path: '/webCrawlerListEdit',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/addJobHunting'),
+        component: () => import('@/views/crawler/webCrawlerListEdit'),
         meta: {
-          title: '添加求职',
+          title: '编辑资讯',
           hidden: true,
           breadcrumb: true
         }
       }
     ]
-
   },
   {
-    path: '/addNotice',
+    path: '/adList',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/addNotice'),
+        component: () => import('@/views/advertise/advertiseList'),
         meta: {
-          title: '添加通知',
+          title: '广告列表',
           hidden: true,
           breadcrumb: true
         }
@@ -602,166 +514,186 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/noticeList',
+    path: '/adPlaceList',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/noticeList'),
+        component: () => import('@/views/advertise/adPlaceList'),
         meta: {
-          title: '行政通知列表',
+          title: '广告位管理',
           hidden: true,
           breadcrumb: true
         }
       }
     ]
-
   },
   {
-    path: '/noticeListApply',
+    path: '/adPlaceDetail',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/noticeListApply'),
+        component: () => import('@/views/advertise/adPlaceDetail'),
         meta: {
-          title: '行政通知审核列表',
+          title: '广告位详情',
           hidden: true,
           breadcrumb: true
         }
       }
     ]
-
   },
   {
-    path: '/ncomplaintList',
+    path: '/blogroll',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/ncomplaintList'),
+        component: () => import('@/views/website/blogroll.vue'),
         meta: {
-          title: '投诉举报',
+          title: '友情链接',
           hidden: true,
           breadcrumb: true
         }
       }
     ]
-
   },
   {
-    path: '/ncomplaintListApply',
+    path: '/blackWordList',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/ncomplaintListApply'),
+        component: () => import('@/views/website/blackWordList.vue'),
         meta: {
-          title: '投诉举报审核列表',
+          title: '违禁词',
           hidden: true,
           breadcrumb: true
         }
       }
     ]
-
   },
   {
-    path: '/ncomplaintListDeal',
+    path: '/tabbar',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/ncomplaintListDeal'),
+        component: () => import('@/views/tabbar/tabbar.vue'),
         meta: {
-          title: '投诉举报处理页面',
+          title: '单页',
           hidden: true,
           breadcrumb: true
         }
       }
     ]
-
   },
-
   {
-    path: '/addNcomplaint',
+    path: '/tabbarDetail',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/addNcomplaint'),
+        component: () => import('@/views/tabbar/tabbarDetail.vue'),
         meta: {
-          title: '添加投诉举报',
+          title: '单页详情',
           hidden: true,
           breadcrumb: true
         }
       }
     ]
-
   },
+  // {
+  //   path: '/documentation',
+  //   component: Layout,
+  //   children: [
+  //     {
+  //       path: 'index',
+  //       component: () => import('@/views/documentation/index'),
+  //       name: 'Documentation',
+  //       meta: { title: 'documentation', icon: 'documentation', affix: true }
+  //     }
+  //   ]
+  // },
+  // {
+  //   path: '/guide',
+  //   component: Layout,
+  //   redirect: '/guide/index',
+  //   children: [
+  //     {
+  //       path: 'index',
+  //       component: () => import('@/views/guide/index'),
+  //       name: 'Guide',
+  //       meta: { title: 'guide', icon: 'guide', noCache: true }
+  //     }
+  //   ]
+  // },
   {
-    path: '/addBook',
+    path: '/profile',
     component: Layout,
+    redirect: '/profile/index',
+    hidden: true,
     children: [
       {
-        name: '',
-        path: '',
-        component: () => import('@/views/news/addBook'),
+        path: 'index',
+        component: () => import('@/views/profile/index'),
+        name: 'Profile',
         meta: {
-          title: '添加书刊音像',
+          title: '个人中心',
           hidden: true,
           breadcrumb: true
         }
       }
     ]
   },
-  {
-    path: '/bookList',
+  {//站点标识
+    path: '/websiteTag',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/bookList'),
+        component: () => import('@/views/website/websiteTag'),
         meta: {
-          title: '书刊音像列表',
+          title: '网站分组',
           hidden: true,
           breadcrumb: true
         }
       }
     ]
   },
-  {
-    path: '/bookListApply',
+  {//待审核列表
+    path: '/examine',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/bookListApply'),
+        component: () => import('@/views/news/examine'),
         meta: {
-          title: '书刊音像待审核列表',
+          title: '待审核列表',
           hidden: true,
           breadcrumb: true
         }
       }
     ]
   },
-  {
-    path: '/jobHuntingApplyList',
+  { //投票列表
+    path: '/surveyList',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/jobHuntingApplyList'),
+        component: () => import('@/views/news/surveyList'),
         meta: {
-          title: '人才库',
+          title: '投票列表',
           hidden: true,
           breadcrumb: true
         }
@@ -769,15 +701,15 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/jobHuntingApplyDetil',
+    path: '/goodList',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/jobHuntingApplyDetil'),
+        component: () => import('@/views/news/GoodList'),
         meta: {
-          title: '人才库',
+          title: '商品列表',
           hidden: true,
           breadcrumb: true
         }
@@ -785,15 +717,15 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/jobOpportunities',
+    path: '/goodListApply',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/job/jobOpportunitiesList'),
+        component: () => import('@/views/news/GoodListApply'),
         meta: {
-          title: '职场机会',
+          title: '商品待审核列表',
           hidden: true,
           breadcrumb: true
         }
@@ -801,15 +733,15 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/jobOpportunitiesDetails',
+    path: '/addGood',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/job/jobOpportunitiesDetails'),
+        component: () => import('@/views/news/addGood'),
         meta: {
-          title: '职场机会',
+          title: '添加商品',
           hidden: true,
           breadcrumb: true
         }
@@ -817,33 +749,31 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/myApplyList',
+    path: '/addBook',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/news/myApplyList'),
+        component: () => import('@/views/news/addBook'),
         meta: {
-          title: '我的申请',
+          title: '添加书刊音像',
           hidden: true,
           breadcrumb: true
         }
       }
     ]
   },
-  // ----------liuj------------
-
   {
-    path: '/topic',
+    path: '/bookList',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/chat/topic'),
+        component: () => import('@/views/news/bookList'),
         meta: {
-          title: '课题',
+          title: '书刊音像列表',
           hidden: true,
           breadcrumb: true
         }
@@ -851,336 +781,21 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/webRule',
+    path: '/bookListApply',
     component: Layout,
     children: [
       {
         name: '',
         path: '',
-        component: () => import('@/views/crawler/webRule'),
+        component: () => import('@/views/news/bookListApply'),
         meta: {
-          title: '规则列表',
+          title: '书刊音像待审核列表',
           hidden: true,
           breadcrumb: true
         }
       }
     ]
   },
-  {
-    path: '/gather',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/crawler/gather'),
-        meta: {
-          title: '采集器',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/creatTopic',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/chat/creatTopic'),
-        meta: {
-          title: '编辑课题',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/webCrawlerList',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/crawler/webCrawlerList'),
-        meta: {
-          title: '采集列表',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/webCrawlerListEdit',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/crawler/webCrawlerListEdit'),
-        meta: {
-          title: '编辑资讯',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/adList',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/advertise/advertiseList.vue'),
-        meta: {
-          title: '广告列表',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/adPlaceList',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/advertise/adPlaceList'),
-        meta: {
-          title: '广告位管理',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {//站点标识
-    path: '/websiteTag',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/website/websiteTag'),
-        meta: {
-          title: '网站分组',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/adPlaceDetail',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/advertise/adPlaceDetail'),
-        meta: {
-          title: '广告位详情',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/blogroll',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/website/blogroll.vue'),
-        meta: {
-          title: '友情链接',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/blackWordList',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/website/blackWordList.vue'),
-        meta: {
-          title: '违禁词',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/tabbar',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/tabbar/tabbar.vue'),
-        meta: {
-          title: '单页',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/tabbarDetail',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/tabbar/tabbarDetail.vue'),
-        meta: {
-          title: '单页详情',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/creatTabbarDetail',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/tabbar/creatTabbarDetail.vue'),
-        meta: {
-          title: '添加单页详情',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/style',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/componentGallery/style.vue'),
-        meta: {
-          title: '风格',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/plate',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/componentGallery/plate.vue'),
-        meta: {
-          title: '版块',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/module',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/componentGallery/module.vue'),
-        meta: {
-          title: '组件',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  {
-    path: '/imgList',
-    component: Layout,
-    children: [
-      {
-        name: '',
-        path: '',
-        component: () => import('@/views/componentGallery/imgList.vue'),
-        meta: {
-          title: '静态资源管理',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  },
-  // {
-  //   path: '/documentation',
-  //   component: Layout,
-  //   children: [
-  //     {
-  //       path: 'index',
-  //       component: () => import('@/views/documentation/index'),
-  //       name: 'Documentation',
-  //       meta: { title: 'documentation', icon: 'documentation', affix: true }
-  //     }
-  //   ]
-  // },
-  // {
-  //   path: '/guide',
-  //   component: Layout,
-  //   redirect: '/guide/index',
-  //   children: [
-  //     {
-  //       path: 'index',
-  //       component: () => import('@/views/guide/index'),
-  //       name: 'Guide',
-  //       meta: { title: 'guide', icon: 'guide', noCache: true }
-  //     }
-  //   ]
-  // },
-  {
-    path: '/profile',
-    component: Layout,
-    redirect: '/profile/index',
-    hidden: true,
-    children: [
-      {
-        path: 'index',
-        component: () => import('@/views/profile/index'),
-        name: 'Profile',
-        meta: {
-          title: '个人中心',
-          hidden: true,
-          breadcrumb: true
-        }
-      }
-    ]
-  }
 ]
 
 /**

+ 43 - 0
src/views/router/components/tableTitle.vue

@@ -0,0 +1,43 @@
+<template>
+  <div class="tableTitle">
+    <span class="tableFloatLine"></span>
+    {{name}}
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    name: {
+      type: String,
+      required: true,
+    },
+  },
+  data() {
+    return {
+      someData: '',
+    };
+  },
+};
+</script>
+
+<style scoped lang="less">
+  .tableTitle {
+    height: 38px;
+    line-height: 38px;
+    color:#333333;
+    position: relative;
+    margin-bottom: 30px;
+    .tableFloatLine {
+      // display: inline-block;
+      width: 3px;
+      height:16px;
+      background:#5570F1;
+      display: block;
+      position: absolute;
+      left:-20px;
+      top:10px;
+      // vertical-align: middle;
+    }
+  }
+</style>

+ 677 - 0
src/views/router/routerList.vue

@@ -0,0 +1,677 @@
+<template>
+    <!-- 路由白名单位管理 -->
+    <div>
+        <!-- 头部搜索框部分 -->
+        <div class="title">
+            <el-row>
+                <el-col :span="6" class="left">
+                    <div class="searchBox">
+                        <div class="searchTitle">网站名称</div>
+                        <el-select v-model="webSiteName_id" :multiple="false" :multiple-limit="1" filterable remote
+                            reserve-keyword placeholder="请输入网站名称" clearable :remote-method="getWebNavList"
+                            :loading="webSiteLoading" @change="selectWebSite">
+                            <el-option v-for="item in webSiteList" :key="item.id" :label="item.title"
+                                :value="item.id">
+                            </el-option>
+                        </el-select>
+                    </div>
+                </el-col>
+              
+                <el-col :span="6" class="left">
+                    <div class="searchBox">
+                        <div class="searchTitle">所属功能</div>
+                        <el-input v-model="function_name" class="input" clearable placeholder="请输入所属功能"></el-input>
+                    </div>
+                </el-col>
+                <el-col :span="8" class="right">
+                    <div class="btnList">
+                        <button class="search" @click="goSearch">搜索</button>
+                        <button class="reset" @click="goReset">重置</button>
+                    </div>
+                </el-col>
+            </el-row>
+        </div>
+        <!--表格内容 start------------------------------------------------------------>
+        <div class="layerBox">
+            <tableTitle :name="tableDivTitle" />
+            <button class="btn" @click="addWhiteRouter">添加路由</button>
+            <el-row>
+                <template>
+                    <el-table class="my-table" v-loading="loading" :data="tableData" style="width: 100%">
+                        <el-table-column fixed prop="id" label="编号" width="90">
+                        </el-table-column>
+                        <el-table-column prop="website_names" label="所属网站">
+                            <template slot-scope="scope">
+                                <div class="titleWidth">{{scope.row.website_names.join('、')}}</div>
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="router_url" label="路由路径" width="110">
+                        </el-table-column>
+                        <el-table-column prop="function_name" label="所属功能" width="110">
+                        </el-table-column>
+                         <el-table-column fixed="right" label="操作" width="200" align="center">
+                            <template slot-scope="scope">
+                                <div class="listBtnBox">
+                                    <div class="listEditBtn" @click="goEdit(scope.row.id, scope.row)"><i
+                                            class="el-icon-edit-outline"></i>编辑</div>
+                                    <div class="listDeleteBtn" @click="deleteRow(scope.row.id, tableData)"><i
+                                        class="el-icon-delete"></i>删除</div>
+                                </div>
+                            </template>
+                        </el-table-column>
+                    
+                    </el-table>
+                </template>
+            </el-row>
+        </div>
+        <!--分页 start------------------------------------------------------------>
+        <div class="alignBox">
+            <el-row>
+                <el-col :span="24">
+                    <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                        :current-page="page" :page-size="pageSize" layout="total, prev, pager, next, jumper"
+                        :total="total">
+                    </el-pagination>
+                </el-col>
+            </el-row>
+        </div>
+        <!--分页 end------------------------------------------------------------>
+        <!--表格内容 end------------------------------------------------------------>
+
+        <!-- 弹出框 编辑 start----------------------------------------------------------->
+        <el-dialog :title="dialogName" :visible.sync="dialogTableVisible" width="50%" top="8vh"
+            :close-on-click-modal="false">
+            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+                <div class="dialogText">
+                    <el-form-item label="网站名称:" prop="website_id">
+                        <el-cascader
+                            :filter-method="getWebNavList"
+                            v-model="ruleForm.website_id"
+                            placeholder="请输入网站名称"
+                            :options="webSiteList"
+                            :props="props"
+                            clearable
+                            filterable
+                            collapse-tags>
+                        </el-cascader>
+         
+                    </el-form-item>
+                    <el-form-item label="所属功能:" prop="function_name">
+                        <el-input v-model="ruleForm.function_name" placeholder="请输入所属功能"></el-input>
+                    </el-form-item>
+                    <el-form-item label="路由地址:" prop="router_url">
+                        <el-input v-model="ruleForm.router_url" placeholder="例如:/xiangcunshangcheng"></el-input>
+                    </el-form-item>
+                </div>
+                <div class="dialogBtn">
+                    <el-button type="info" @click="cancelForm">取消</el-button>
+                    <el-button type="primary" @click="submitForm">提交</el-button>
+                </div>
+            </el-form>
+        </el-dialog>
+        <!-- 弹出框 编辑 end----------------------------------------------------------->
+    </div>
+</template>
+
+<script>
+//表格标题
+import tableTitle from './components/tableTitle.vue';
+
+//引入公用样式
+import '@/styles/global.less';
+import { getWhiteRouterList,delWhiteRouter,addWhiteRouter,upWhiteRouter } from '@/api/router'
+export default {
+    components: {
+        tableTitle,//表格标题-
+    },
+    data() {
+        const validateEmpty = (rule, value, callback) => {
+            if (value.length == 0) {
+                callback(new Error('该项不能为空!'))
+            } else {
+                callback()
+            }
+        }
+        return {
+            props:{ 
+                multiple: true,
+                label:"website_name",
+                value:"id"
+            },
+            tableDivTitle: "路由白名单",  //列表标题
+            dialogTableVisible: false,      //编辑弹框
+            dialogName: '编辑', //编辑弹窗名称
+            loading: true, //加载中
+            tableData: [],//表格数据
+            // 可以输入的搜索框相关
+            webSiteList: [],//获取关联网站列表
+            webSiteLoading: false,
+            value: '',
+            // 分页相关
+            page: 1,
+            pageSize: 10,
+            total: 0,
+            // 搜索框相关
+            webSiteName_id: '', //网站名称id
+            function_name: '', //所属功能
+            website_id: [], //网站id
+            id:"", //当前编辑的id
+            ruleForm: {
+                website_id: '', //网站名称
+                function_name: '', //路由白名单位名称
+                router_url: '', //路由白名单位标识
+                
+            },
+            rules: {
+                website_id: [{ required: true, trigger: 'blur', validator: validateEmpty }],
+                function_name: [{ required: true, trigger: 'blur', validator: validateEmpty }],
+                router_url: [{ required: true, trigger: 'blur', validator: validateEmpty }],
+            }
+        }
+    },
+    methods: {
+        //1.列表和分页相关 start ------------------------------------------------------------>
+        //1.1 开始请求列表信息方法
+        getData() {
+                getWhiteRouterList({
+                    page: this.page,
+                    pageSize: this.pageSize,
+                    name: this.function_name,
+                    website_id: this.webSiteName_id, //路由白名单位名称 id
+                }).then(data => {
+                    this.loading=false;
+                    console.log("返回数据",data);
+                    this.tableData = data.data.rows
+                    this.total = data.data.count
+               
+                })
+        },
+
+        //1.2 删除内容
+        deleteRow(id) {
+            let data = new FormData()
+            data.append('id', id)
+            this.$confirm('注意:删除后,该条信息及其绑定关系全部删除', '是否确认删除该条信息?', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+            }).then(() => {
+                console.log("当前删除:" + id)
+
+                delWhiteRouter({
+                    id: id
+                }).then(data => {
+                    console.log(data);
+                    if (data.code = 200) {
+                        this.$message({
+                            message: '删除成功',
+                            type: 'success'
+                        })
+                        this.getData()
+                    } else if (data.code == 0) {
+                        this.$message({
+                            message: data.message,
+                            type: 'error'
+                        })
+                    }
+                })
+
+            }).catch(() => {
+                this.$message({
+                    type: 'warning',
+                    message: '已取消删除'
+                });
+            });
+        },
+        //1.4 列表内容分页
+        //直接跳转
+        handleSizeChange(val) {
+            this.page = val;
+            this.getData();
+        },
+        //1.5 点击分页
+        handleCurrentChange(val) {
+            this.page = val;
+            this.getData();
+        },
+        // 1.6 搜索按钮
+        goSearch() {
+            getWhiteRouterList({
+                page: this.page,
+                pageSize: this.pageSize,
+                function_name: this.function_name,
+                website_id: this.webSiteName_id, //路由白名单位名称 id
+            }).then(data => {
+                console.log(data);
+                this.tableData = data.data.rows
+                this.total = data.data.count
+        
+            })
+
+        },
+        //1.7 重置按钮
+        goReset() {
+            this.webSiteName_id = ""
+            this.function_name = ""
+            this.getData()
+        },
+        //列表和分页相关 end ------------------------------------------------------------>
+
+        //1.8 编辑
+        goEdit(id, val) {
+            // console.log(id);
+            this.dialogName = '编辑'
+            this.id = id
+            this.dialogTableVisible = true
+            console.log(id, val);
+            // console.log("状态", val.status);
+            //数据回显
+            this.ruleForm.website_id = val.website_id //网站id
+            this.ruleForm.function_name = val.function_name //功能名称
+            this.ruleForm.router_url = val.router_url //路由地址
+        },
+
+        //2.0 添加
+        addWhiteRouter() {
+            this.dialogTableVisible = true
+            this.dialogName = "添加"
+
+            //添加时清空回显回来的数据
+            this.ruleForm.website_id = '' //网站id
+            this.ruleForm.function_name = '' //功能名称
+            this.ruleForm.router_url = '' //路由地址
+        },
+
+
+        // 2.1 弹出层相关方法
+        // 提交表单
+        submitForm() {
+            // 判断用户是否输入数据
+            if (this.dialogName == "添加") {
+                this.$refs.ruleForm.validate(valid => {
+                    if (valid) {
+                            // Flatten the website_id array
+                            const flattenedWebsiteId = this.ruleForm.website_id.flat();
+                            addWhiteRouter({
+                                website_id: flattenedWebsiteId,
+                                function_name: this.ruleForm.function_name,
+                                router_url: this.ruleForm.router_url,
+                        
+                            }).then(data => {
+                                console.log(data);
+                                if (data.code == 200) {
+                                    this.$message({
+                                        message: '添加成功',
+                                        type: 'success'
+                                    })
+                                    this.dialogTableVisible = false
+                                    this.getData()
+                                } else {
+                                    this.$message({
+                                        message: data.message,
+                                        type: 'error'
+                                    })
+                                    this.dialogTableVisible = true
+                                    return
+                                }
+                            })
+                    }
+                })
+            }
+
+            if (this.dialogName == "编辑") {
+                // Flatten the website_id array
+                this.$refs.ruleForm.validate(valid => {
+                if (valid) {
+                        const flattenedWebsiteId = this.ruleForm.website_id.flat();
+                        upWhiteRouter({
+                            website_id: flattenedWebsiteId,
+                            function_name: this.ruleForm.function_name,
+                            router_url: this.ruleForm.router_url,        
+                            id: this.id
+                        }).then(data => {
+                            console.log(data);
+                            if (data.code == 200) {
+                                this.$message({
+                                    message: '编辑成功',
+                                    type: 'success'
+                                })
+                                this.dialogTableVisible = false
+                            }else {
+                                this.$message({
+                                    message: data.message,
+                                    type: 'error'
+                                })
+                                this.dialogTableVisible = true
+                            }
+                            this.getData()
+                        })
+            }
+            
+        })
+        }
+        },
+        //取消添加或编辑
+        cancelForm() {
+            this.dialogTableVisible = false
+        },
+        //搜索部分的输入关键词下拉框
+        selectWebSite(value) {
+            this.webSiteName_id = value
+        },
+
+        //添加 / 编辑弹窗中输入关键词下拉框 
+        // 判断是否已经关联了网站
+        detectionWebSite(value) {
+            console.log(value);
+            this.website_id = value
+            console.log(this.website_id);
+
+        },
+
+        //
+        getWebNavList(query) {
+            if (query !== '') {
+                this.webSiteLoading = true;
+                let data = { keyword: query }
+                let dataArr = [];
+                this.$store.dispatch('pool/getNavWebList', data).then(res => {
+                    this.webSiteList = res.data;
+                    this.webSiteLoading = false;
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '网络错误,请重试!'
+                    });
+                })
+            } else {
+                this.navList = [];
+            }
+        },
+    },
+    mounted() {
+        this.getData(),
+        this.getWebNavList();
+    
+    },
+}
+</script>
+
+<style scoped lang="less">
+input[aria-hidden=true] {
+    display: none !important;
+}
+
+// 提示信息
+.tips {
+    margin: 30px;
+    background-color: #e9ecf9;
+    border-radius: 11px;
+    .tipsIcon {
+        margin: 10px 15px;
+        display: inline-block;
+        width: 24px;
+        height: 24px;
+        background: url("../../assets/advertise/Info Circle.png") no-repeat;
+        vertical-align: middle;
+    }
+    .tipsText {
+        font-size: 14px;
+        color: #666666;
+    }
+}
+
+// 头部
+.title {
+    margin: 30px 30px 20px 30px;
+    padding: 30px 30px 40px 30px;
+    background-color: #fff;
+    border-radius: 20px 20px 20px 20px;
+    border: 1px solid #E9EDF7;
+    .left {
+        float: left;
+    }
+    .right {
+        float: right;
+    }
+    .searchBox {
+        ::v-deep .el-input {
+            position: relative;
+            font-size: 14px;
+            display: inline-block;
+            width: 80%;
+        }
+
+        .searchTitle {
+            padding-bottom: 10px;
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: 400;
+            font-size: 14px;
+            color: #999999;
+            line-height: 16px;
+        }
+
+        .el-select {
+            width: 100%;
+            display: inline-block;
+            position: relative;
+        }
+    }
+
+
+    .btnList {
+        float: right;
+        padding-top: 28px;
+
+        button {
+            height: 38px;
+            border: none;
+            border-radius: 8px;
+            padding: 0 30px;
+        }
+
+        .search {
+            background-color: #5570f1;
+            color: #fff;
+            margin-right: 20px;
+        }
+
+        .reset {
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: 400;
+            font-size: 16px;
+            color: #333333;
+            background: #F5F7FB;
+            border-radius: 8px 8px 8px 8px;
+            border: 1px solid rgba(85, 112, 241, 0.11);
+        }
+    }
+}
+
+.layerBox {
+    padding: 30px 20px;
+    position: relative;
+
+    .btn {
+        position: absolute;
+        top: 30px;
+        right: 20px;
+        height: 38px;
+        color: #fff;
+        background-color: #5570f1;
+        border: none;
+        border-radius: 8px;
+        padding: 8px 28px 9px;
+        box-sizing: border-box;
+    }
+
+    .listBtnBox {
+        justify-content: left;
+    }
+
+
+    .listDeleteBtn,
+    .listEditBtn,
+    .listLookBtn {
+        margin-left: 0px;
+        padding-left: 0px;
+        margin-right: 20px;
+        width: 76px;
+        height: 36px;
+        line-height: 36px;
+    }
+
+
+    .listLookBtn {
+        text-align: center;
+        border-radius: 8px;
+        cursor: pointer;
+        color: #55b5f1;
+        background-color: rgba(85, 181, 241, 0.16);
+
+        >i {
+            padding-right: 8px;
+        }
+    }
+
+    ::v-deep .el-form-item {
+        margin-bottom: 50px;
+    }
+
+    ::v-deep .el-select {
+        width: 100%;
+    }
+
+    ::v-deep .el-input--medium,
+    ::v-deep .el-form-item__label {
+        line-height: 36px;
+        font-size: 16px;
+    }
+}
+
+// 弹出层内容
+.dialogText {
+    margin: 0 7px 0 3px;
+    padding-bottom: 1px;
+    padding: 30px 60px 1px 20px;
+    background-color: #f5f7fb;
+
+    .adImage {
+        width: 140px;
+        height: 140px;
+        line-height: 210px;
+        border-radius: 12px;
+        border: 1px solid rgba(85, 112, 241, 0.11);
+
+        img {
+            width: 140px;
+            height: 80px;
+        }
+    }
+
+
+
+    ::v-deep .avatar {
+        width: 140px;
+        height: auto;
+    }
+
+    .price {
+        ::v-deep .el-input {
+            width: 29%;
+        }
+    }
+
+    .example {
+        font-family: Microsoft YaHei;
+        color: #5570F1;
+    }
+
+    .el_btnList {
+        margin-right: 15px;
+        margin-top: 20px;
+    }
+
+    //日期时间选择器的宽
+    ::v-deep .el-date-editor.el-input {
+        width: 48%;
+    }
+
+    ::v-deep .el-button+.el-button {
+        margin-left: 0px;
+    }
+
+    ::v-deep .el-select {
+        width: 100%;
+    }
+
+    ::v-deep .el-form-item {
+        margin-bottom: 50px;
+    }
+}
+
+// 弹出层按钮
+.dialogBtn {
+    text-align: center;
+    margin: 50px auto 20px;
+
+    button {
+        width: 184px;
+        padding: 16px;
+        font-family: Microsoft YaHei, Microsoft YaHei;
+        font-weight: 400;
+        font-size: 20px;
+        border: none;
+        border-radius: 12px 12px 12px 12px;
+    }
+
+    // 取消
+    .cancel {
+        color: #333333;
+        background-color: #f5f7fb;
+        border: 2px solid rgba(85, 112, 241, 0.11);
+    }
+
+    // 提交
+    .submit {
+        color: #fff;
+        background-color: #5570F1;
+        margin-left: 40px;
+    }
+}
+
+//审核弹出框
+.radioGroup {
+    ::v-deep .el-form-item {
+        margin-top: 40px;
+        margin-bottom: 0;
+    }
+}
+
+.graph {
+    background-color: #f5f7fb;
+    padding: 60px 100px;
+    overflow: hidden;
+
+    li {
+        float: left;
+    }
+
+    >li:first-child {
+        margin-right: 100px;
+    }
+}
+
+.dialog-footer {
+    margin: 0 auto;
+}
+
+.titleWidth {
+  width: 400px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+::v-deep.el-cascader{
+    width: 100%;
+}
+</style>