فهرست منبع

fix: 修改router

allen 2 سال پیش
والد
کامیت
c8d180217f
2فایلهای تغییر یافته به همراه145 افزوده شده و 1 حذف شده
  1. 144 0
      src/router/index.js
  2. 1 1
      src/store/modules/permission.js

+ 144 - 0
src/router/index.js

@@ -55,6 +55,150 @@ export const constantRoutes = [
     hidden: true
   },
   {
+    path: '/',
+    component: Layout,
+    redirect: '/home',
+    children: [
+      {
+        path: 'home',
+        name: 'home',
+        meta: { title: '首页',icon:'peoples' },
+        component: () => import('@/views/home')
+      }
+    ]
+  },{
+    path: '/gisShow',
+    component: Layout,
+    redirect: '/gisShow',
+    children: [
+      {
+        path: 'gisShow',
+        name: 'gisShow',
+        meta: { title: 'GIS 展示',icon:'shopping' },
+        component: () => import('@/views/gisShow')
+      }
+    ]
+  },
+  {
+    path: '/monitoringMamage',
+    component: Layout,
+    redirect: '/monitoringMamage',
+    children: [
+      {
+        path: 'monitoringMamage',
+        name: 'monitoringMamage',
+        meta: { title: '监测管理',icon:'shopping' },
+        component: () => import('@/views/monitoringMamage')
+      }
+    ]
+  },{
+    path: '/peasantHouseholdManage',
+    component: Layout,
+    redirect: '/peasantHouseholdManage',
+    children: [
+      {
+        path: 'peasantHouseholdManage',
+        name: 'peasantHouseholdManage',
+        meta: { title: '农户管理',icon:'peoples' },
+        component: () => import('@/views/peasantHouseholdManage')
+      }
+    ]
+  },{
+    path: '/waterCardManage',
+    component: Layout,
+    redirect: '/waterCardManage',
+    children: [
+      {
+        path: 'waterCardManage',
+        name: 'waterCardManage',
+        meta: { title: '水卡管理',icon:'shopping' },
+        component: () => import('@/views/waterCardManage')
+      }
+    ]
+  },{
+    path: '/infrastructure',
+    component: Layout,
+    redirect: '/waterEstablishment',
+    meta: { title: '基础设施', icon: 'peoples' },
+    children: [
+      {
+        path: 'waterEstablishment',
+        name: 'waterEstablishment',
+        meta: { title: '水权设置',icon:'shopping' },
+        component: () => import('@/views/infrastructure/waterEstablishment')
+      },{
+        path: 'waterElectricityPriceSetting',
+        name: 'waterElectricityPriceSetting',
+        meta: { title: '水电价设置',icon:'shopping' },
+        component: () => import('@/views/infrastructure/waterElectricityPriceSetting')
+      },{
+        path: 'deviceSetup',
+        name: 'deviceSetup',
+        meta: { title: '设备管理',icon:'shopping' },
+        component: () => import('@/views/infrastructure/deviceSetup')
+      }
+    ]
+  },{
+    path: '/dataReport',
+    component: Layout,
+    redirect: '/intakeWaterAnalysis',
+    meta: { title: '数据报表', icon: 'peoples' },
+    children: [
+      {
+        path: 'intakeWaterAnalysis',
+        name: 'intakeWaterAnalysis',
+        meta: { title: '用水统计(组织)',icon:'shopping' },
+        component: () => import('@/views/dataReport/intakeWaterAnalysis')
+      },{
+        path: 'saveWaterAnalysis',
+        name: 'saveWaterAnalysis',
+        meta: { title: '节水分析(农户)',icon:'shopping' },
+        component: () => import('@/views/dataReport/saveWaterAnalysis')
+      },{
+        path: 'waterConsumption',
+        name: 'waterConsumption',
+        meta: { title: '取水分析(机井)',icon:'shopping' },
+        component: () => import('@/views/dataReport/waterConsumption')
+      },
+    ]
+  },{
+    path: '/waterSubsidy',
+    component: Layout,
+    redirect: '/waterSubsidy',
+    children: [
+      {
+        path: 'waterSubsidy',
+        name: 'waterSubsidy',
+        meta: { title: '节水政策补贴',icon:'shopping' },
+        component: () => import('@/views/waterSubsidy')
+      }
+    ]
+  },{
+    path: '/waterMarket',
+    component: Layout,
+    redirect: '/waterMarket',
+    children: [
+      {
+        path: 'waterMarket',
+        name: 'waterMarket',
+        meta: { title: '水权交易',icon:'shopping' },
+        component: () => import('@/views/waterMarket')
+      }
+    ]
+  },{
+    path: '/waterManage',
+    component: Layout,
+    redirect: '/waterManage',
+    children: [
+      {
+        path: 'waterManage',
+        name: 'waterManage',
+        meta: { title: '用水协会管理',icon:'shopping' },
+        component: () => import('@/views/waterManage')
+      }
+    ]
+  },
+  {
     path: '/login',
     component: () => import('@/views/login'),
     hidden: true

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

@@ -38,7 +38,7 @@ const permission = {
     GenerateRoutes({ commit }) {
       return new Promise((resolve) => {
         // 向后端请求路由数据
-          const menuDataList = recursionUpdateRouterPath(getMenuList.data);
+          const menuDataList = recursionUpdateRouterPath([]);
 
           const sdata = JSON.parse(JSON.stringify(menuDataList));
           const rdata = JSON.parse(JSON.stringify(menuDataList));