wlzboy
3 天以前 40a8157440e3b906da8f52e07d939d78c3f4c313
ruoyi-ui/src/router/index.js
@@ -5,6 +5,7 @@
/* Layout */
import Layout from '@/layout'
import qywechatRouter from './modules/qywechat'
/**
 * Note: 路由配置项
@@ -52,6 +53,24 @@
    hidden: true
  },
  {
    path: '/system/order/anonymous',
    component: () => import('@/views/system/serviceOrder/anonymous'),
    hidden: true,
    meta: { title: '匿名订单查看', icon: 'eye',anonymous: true }
  },
  {
    path: '/evaluation',
    component: () => import('@/views/evaluation/index'),
    hidden: true,
    meta: { title: '客户评价', anonymous: true }
  },
  {
    path: '/evaluation/test',
    component: () => import('@/views/evaluation/test'),
    hidden: true,
    meta: { title: '评价功能测试', anonymous: true }
  },
  {
    path: '/404',
    component: () => import('@/views/error/404'),
    hidden: true
@@ -87,11 +106,152 @@
        meta: { title: '个人中心', icon: 'user' }
      }
    ]
  },
  {
    path: '/order/detail/:id',
    component: () => import('@/views/system/order/detail'),
    name: 'OrderDetail',
    hidden: true,
    meta: { title: '订单详情页', anonymous: true }
  },
  {
    path: '/anonymous/test',
    component: () => import('@/views/anonymous/test'),
    hidden: true,
    meta: { title: '匿名访问测试', anonymous: true }
  },  {
    path: '/system/gps/map',
    component: () => import('@/views/system/gps/map'),
    name: 'GpsMap',
    hidden: true,
    meta: { title: '车辆轨迹', showMenu: false, icon: 'map' ,anonymous: true}
  },
  {
    path: '/payInfoTest',
    component: (resolve) => require(['@/views/system/payInfoTest/index'], resolve),
    hidden: true,
    meta: { title: '支付信息测试', anonymous: true }
  },
  {
    path: '/system/gps/mapNeed',
    component: () => import('@/views/system/gps/mapNeed'),
    name: 'GpsMapNeed',
    meta: { title: '车辆轨迹', icon: 'map' }
  },
  {
    path: '/system/gps/trackMap',
    component: () => import('@/views/system/gps/trackMap'),
    name: 'GpsTrackMap',
    meta: { title: '车辆行驶轨迹', icon: 'map' }
  },
  {
    path: '/h5/task_create',
    component: () => import('@/views/task/h5/create'),
    hidden: false,
    name: 'H5TaskCreate',
    meta: { title: '创建任务' }
  },
  {
    path: '/system/invoice/detail',
    component: () => import('@/views/system/invoice/detail'),
    name: 'InvoiceDetail',
    hidden: true,
    meta: { title: '发票详情', activeMenu: '/system/invoice' }
  },
  {
    path: '/system/invoice/audit',
    component: () => import('@/views/system/invoice/audit'),
    name: 'InvoiceAudit',
    hidden: true,
    meta: { title: '审核发票', activeMenu: '/system/invoice' }
  },
  {
    path: '/system/invoice/apply',
    component: () => import('@/views/system/invoice/apply'),
    name: 'InvoiceApply',
    hidden: true,
    meta: { title: '申请发票', activeMenu: '/system/invoice' }
  }
]
// 动态路由,基于用户权限动态去加载
export const dynamicRoutes = [
  qywechatRouter,
  // 网络诊断路由
  {
    path: "/system/diag",
    component: Layout,
    redirect: "/system/diag/ocrConnection",
    name: "Diag",
    meta: {
      title: "网络诊断",
      icon: "link",
      permissions: ["system:diag:view"]
    },
    children: [
      {
        path: "ocrConnection",
        component: () => import("@/views/system/diag/ocrConnection"),
        name: "OCRConnectionDiag",
        meta: {
          title: "OCR连接诊断",
          icon: "monitor",
          permissions: ["system:diag:ocr"]
        }
      }
    ]
  },
  // 医院分词测试路由
  {
    path: "/system/hospital",
    component: Layout,
    redirect: "/system/hospital/tokenizer",
    name: "Hospital",
    meta: {
      title: "医院管理",
      icon: "hospital",
      permissions: ["system:hospital:view"]
    },
    children: [
      {
        path: "tokenizer",
        component: () => import("@/views/system/hospital/tokenizer"),
        name: "HospitalTokenizer",
        meta: {
          title: "医院分词测试",
          icon: "search",
          permissions: ["system:hospital:tokenizer"]
        }
      }
    ]
  },
  // 支付管理路由
  {
    path: "/payment",
    component: Layout,
    redirect: "/payment/order",
    name: "Payment",
    meta: {
      title: "支付管理",
      icon: "money"
    },
    children: [
      {
        path: "order",
        component: () => import("@/views/payment/order/index"),
        name: "PayOrder",
        meta: {
          title: "支付订单查询",
          icon: "el-icon-s-order"
        }
      }
    ]
  },
  {
    path: '/system/user-auth',
    component: Layout,
@@ -161,6 +321,33 @@
        meta: { title: '修改生成配置', activeMenu: '/tool/gen' }
      }
    ]
  },
  {
    path: '/task/general-detail',
    component: Layout,
    hidden: true,
    permissions: ['task:general:query'],
    children: [
      {
        path: 'index/:taskId(\\d+)',
        component: () => import('@/views/task/general/detail'),
        name: 'TaskDetail',
        meta: { title: '任务详情', activeMenu: '/task/general' }
      }
    ]
  },
  {
    path: '/task/stat',
    component: Layout,
    hidden: false,
    children: [
      {
        path: 'index',
        component: () => import('@/views/task/stat/index'),
        name: 'DeptOrderStat',
        meta: { title: '分公司录单统计', icon: 'chart', noCache: false }
      }
    ]
  }
]
@@ -177,7 +364,7 @@
}
export default new Router({
  mode: 'history', // 去掉url中的#
  mode: 'history', // 使用history模式,URL更美观
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRoutes
})