wlzboy
2026-03-24 6676a35122fd9c97d1b1679c211bc8a9b97f08f2
ruoyi-ui/src/router/index.js
@@ -5,6 +5,7 @@
/* Layout */
import Layout from '@/layout'
import qywechatRouter from './modules/qywechat'
/**
 * Note: 路由配置项
@@ -58,6 +59,18 @@
    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
@@ -106,11 +119,12 @@
    component: () => import('@/views/anonymous/test'),
    hidden: true,
    meta: { title: '匿名访问测试', anonymous: true }
  },{
  },  {
    path: '/system/gps/map',
    component: () => import('@/views/system/gps/map'),
    name: 'GpsMap',
    meta: { title: '车辆轨迹', icon: 'map' ,anonymous: true}
    hidden: true,
    meta: { title: '车辆轨迹', showMenu: false, icon: 'map' ,anonymous: true}
  },
  {
    path: '/payInfoTest',
@@ -131,11 +145,84 @@
    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: '/system/user-auth',
    component: Layout,
@@ -235,7 +322,7 @@
}
export default new Router({
  mode: 'hash', // 使用hash模式,兼容性更好
  mode: 'history', // 使用history模式,URL更美观
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRoutes
})