From d8b570430066fae42d6884671cef541fc820de1c Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期五, 15 十一月 2024 14:42:44 +0800
Subject: [PATCH] 动态路由

---
 src/router/index.js |  237 +++--------------------------------------------------------
 1 files changed, 13 insertions(+), 224 deletions(-)

diff --git a/src/router/index.js b/src/router/index.js
index 02582a3..33af930 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,4 +1,4 @@
-import { createWebHistory, createRouter } from 'vue-router'
+import { createWebHistory, createWebHashHistory, createRouter } from 'vue-router'
 /* Layout */
 import Layout from '@/layout'
 
@@ -62,244 +62,33 @@
     component: () => import('@/views/safetyReview/expertManage/checkProgress/index.vue'),
     hidden: true
   },
-  {
-    path: '/expertUser',
-    component: () => import('@/views/safetyReview/userManage/expertUsers/index.vue'),
-    hidden: true
-  },
-  {
-    path: '/evaluate',
-    component: () => import('@/views/safetyReview/baseSet/evaluateType/index.vue'),
-    hidden: true
-  },
-  {
-    path: '/business',
-    component: () => import('@/views/safetyReview/baseSet/business/index.vue'),
-    hidden: true
-  },
-  {
-    path: '/area',
-    component: () => import('@/views/safetyReview/baseSet/area/index.vue'),
-    hidden: true
-  },
   // {
-  //   path: '',
+  //   path: '/noMenu',
   //   component: Layout,
-  //   redirect: '/index',
+  //   redirect: '/noMenu',
   //   children: [
   //     {
-  //       path: '/index',
-  //       component: () => import('@/views/index'),
-  //       name: 'Index',
-  //       meta: { title: '首页',icon: 'form', affix: true }
+  //       path: '/noMenu',
+  //       component: () => import('@/views/error/noMenu.vue'),
+  //       name: 'noMenu',
+  //       meta: { title: '提示',icon: 'form',  affix: true }
   //     }
   //   ]
   // },
   {
-    path: '/noMenu',
-    component: Layout,
-    redirect: '/noMenu',
-    children: [
-      {
-        path: '/noMenu',
-        component: () => import('@/views/error/noMenu.vue'),
-        name: 'noMenu',
-        meta: { title: '提示',icon: 'form',  affix: true }
-      }
-    ]
-  },
-  {
     path: '',
     component: Layout,
-    redirect: '/institution',
+    redirect: '/index',
+    hidden: true,
     children: [
       {
-        path: '/institution',
-        component: () => import('@/views/safetyReview/institution/institution.vue'),
-        name: 'Institution',
-        meta: { title: '机构公示', icon: 'form', affix: true }
+        path: '/index',
+        component: () => import('@/views/index'),
+        name: 'Index',
+        meta: { title: '首页', icon: 'dashboard', affix: true }
       }
     ]
   },
-  {
-    path: '/notice',
-    component: Layout,
-    redirect: '/notice',
-    children: [
-      {
-        path: '/notice',
-        component: () => import('@/views/safetyReview/notice/notice.vue'),
-        name: 'Notice',
-        meta: { title: '公告发布',icon: 'form',  affix: true }
-      }
-    ]
-  },
-  {
-    path: '/law',
-    component: Layout,
-    redirect: '/law',
-    children: [
-      {
-        path: '/law',
-        component: () => import('@/views/safetyReview/law/law.vue'),
-        name: 'Law',
-        meta: { title: '法律法规',icon: 'form', affix: true }
-      }
-    ]
-  },
-  {
-    path: '/project',
-    component: Layout,
-    redirect: '/project',
-    children: [
-      {
-        path: '/project',
-        component: () => import('@/views/safetyReview/projectManage/index.vue'),
-        name: 'Project',
-        meta: { title: '项目管理',icon: 'form', affix: true }
-      }
-    ]
-  },
-  {
-    path: '/projectSupplement',
-    component: Layout,
-    redirect: '/projectSupplement',
-    children: [
-      {
-        path: '/projectSupplement',
-        component: () => import('@/views/safetyReview/projectSupplement/index.vue'),
-        name: 'projectSupplement',
-        meta: { title: '项目补录',icon: 'form', affix: true }
-      }
-    ]
-  },
-  {
-    path: '/process',
-    component: Layout,
-    redirect: '/process',
-    children: [
-      {
-        path: '/process',
-        component: () => import('@/views/safetyReview/projectManage/process.vue'),
-        name: 'Process',
-        meta: { title: '项目信息管理'}
-      }
-    ]
-  },
-
-  {
-    path: '/userManage',
-    component: Layout,
-    redirect: '/userManage/supervise',
-    meta: { title: '用户管理'},
-    children: [
-      {
-        path: 'supervise',
-        component: () => import('@/views/safetyReview/userManage/superviseUsers/index.vue'),
-        name: 'supervise',
-        meta: { title: '监管用户管理',icon: 'form'}
-      },
-      {
-        path: 'institutionUser',
-        component: () => import('@/views/safetyReview/userManage/institutionUsers/index.vue'),
-        name: 'institutionUser',
-        meta: { title: '机构用户管理',icon: 'form'}
-      },
-      {
-        path: 'expertUsers',
-        component: () => import('@/views/safetyReview/userManage/expertUsers/index.vue'),
-        name: 'expertUsers',
-        meta: { title: '专家用户管理',icon: 'form'}
-      },
-    ]
-  },
-  {
-    path: '/expertManage',
-    component: Layout,
-    redirect: '/expertManage/experts',
-    meta: { title: '厅专家库管理'},
-    children: [
-      {
-        path: 'experts',
-        component: () => import('@/views/safetyReview/expertManage/experts/index.vue'),
-        name: 'expert',
-        meta: { title: '厅专家库',icon: 'form'}
-      },
-      {
-        path: 'applyRecords',
-        component: () => import('@/views/safetyReview/expertManage/applyRecords/index.vue'),
-        name: 'applyRecords',
-        meta: { title: '专家申请记录',icon: 'form'}
-      },
-      {
-        path: 'expertUser',
-        component: () => import('@/views/safetyReview/userManage/expertUsers/index.vue'),
-        name: 'expertUser',
-        meta: { title: '专家用户管理',icon: 'form'}
-      },
-    ]
-  },
-  {
-    path: '/postEvaluation',
-    component: Layout,
-    redirect: '/postEvaluation',
-    children: [
-      {
-        path: '/postEvaluation',
-        component: () => import('@/views/safetyReview/expertManage/postEvaluation/index.vue'),
-        name: 'postEvaluation',
-        meta: { title: '事后考评'}
-      }
-    ]
-  },
-  {
-    path: '/evaluateRecord',
-    component: Layout,
-    redirect: '/evaluateRecord',
-    children: [
-      {
-        path: '/evaluateRecord',
-        component: () => import('@/views/safetyReview/expertManage/evaluateRecord/index.vue'),
-        name: 'evaluateRecord',
-        meta: { title: '专家考评记录'}
-      }
-    ]
-  },
-  {
-    path: '/system',
-    component: Layout,
-    redirect: '/system/post',
-    meta: { title: '系统设置'},
-    children: [
-      {
-        path: 'dept',
-        component: () => import('@/views/system/dept/index.vue'),
-        name: 'dept',
-        meta: { title: '部门处室管理',icon: 'form'}
-      },
-      {
-        path: 'expertsType',
-        component: () => import('@/views/safetyReview/baseSet/expertsType/index.vue'),
-        name: 'expertsType',
-        meta: { title: '专业领域管理',icon: 'form'}
-      },
-      {
-        path: 'evaluate',
-        component: () => import('@/views/safetyReview/baseSet/evaluateType/index.vue'),
-        name: 'evaluate',
-        meta: { title: '考评项目管理',icon: 'form'}
-      },
-      {
-        path: 'openApply',
-        component: () => import('@/views/safetyReview/baseSet/openApply/index.vue'),
-        name: 'openApply',
-        meta: { title: '专家申请设置',icon: 'form'}
-      }
-    ]
-  },
-
-
-
   {
     path: '/user',
     component: Layout,

--
Gitblit v1.9.2