From 5103729dde38b2a313367e43df8ce73285f08a30 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期一, 30 六月 2025 14:35:59 +0800 Subject: [PATCH] Merge branch 'dev-2.2.0' of http://120.26.58.240:8888/r/JYBIndependentFront into dev-2.2.0 --- src/router/index.ts | 141 +++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 131 insertions(+), 10 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index 7d7ffa3..f283d1a 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -2,6 +2,8 @@ import Layout from '@/layout/MainLayout/Layout.vue'; import ErrorLayout from '@/layout/ErrorLayout/ErrorLayout.vue'; +import { AppType } from '@/constants'; +import { loadEnv } from '@build/index'; // import { ElIcons } from '@/typings' @@ -53,6 +55,7 @@ children?: Route[]; }; +//@ts-ignore export const constantRoutes: Route[] = [ { path: '/redirect', @@ -73,6 +76,12 @@ component: Layout, redirect: '/home', alwaysShow: true, + meta: { + rank: 1001, + icon: 'home', + title: '淇濆崟绠$悊', + rootMenu: true, + }, children: [ { path: 'home', @@ -80,21 +89,76 @@ hidden: false, component: () => import('@/views/Home/Home.vue'), meta: { - rank: 10001, - title: '棣栭〉', + rank: 1001, + title: '淇濆崟绠$悊', affix: true, // rootMenu: true, icon: 'home', }, }, + { + path: '/InsuranceOrderDetail/:id', + name: 'InsuranceOrderDetail', + hidden: true, + component: () => import('@/views/Home/InsuranceOrderDetail.vue'), + meta: { + rank: 10002, + title: '淇濆崟璇︽儏', + // rootMenu: true, + icon: 'home', + }, + }, + { + path: '/InsurancePolicyStampFiles/:id', + name: 'InsurancePolicyStampFiles', + hidden: true, + component: () => import('@/views/Home/InsurancePolicyStampFiles.vue'), + meta: { + rank: 10003, + title: '淇濆崟涓嬭浇', + // rootMenu: true, + icon: 'home', + }, + }, + { + path: '/InsureDownloadInvoice/:id', + name: 'InsureDownloadInvoice', + hidden: true, + component: () => import('@/views/Home/InsureDownloadInvoice.vue'), + meta: { + rank: 10004, + title: '鍙戠エ涓嬭浇', + // rootMenu: true, + icon: 'home', + }, + }, + { + path: '/InsurePayDetail/:id', + name: 'InsurePayDetail', + hidden: true, + component: () => import('@/views/Home/InsurePayDetail.vue'), + meta: { + rank: 10005, + title: '鏀粯璇︽儏', + // rootMenu: true, + icon: 'home', + }, + }, + { + path: '/BatchChange/:id', + name: 'BatchChange', + hidden: true, + component: () => import('@/views/Home/BatchChange.vue'), + meta: { + rank: 10002, + title: '鎵规敼', + // rootMenu: true, + icon: 'home', + }, + }, ], - meta: { - rank: 1001, - icon: 'home', - title: '棣栭〉', - rootMenu: true, - }, }, + { path: '/InsuranceClaim', redirect: 'noRedirect', @@ -150,6 +214,61 @@ }, ], }, + AppType === 'jx' && { + path: '/BalanceManage', + redirect: 'noRedirect', + component: Layout, + hidden: false, + alwaysShow: true, + meta: { + rank: 10010, + title: '浣欓绠$悊', + rootMenu: true, + icon: 'home', + }, + children: [ + { + path: '/BalanceManage', + name: 'BalanceManage', + hidden: false, + alwaysShow: true, + component: () => import('@/views/BalanceManage/BalanceManage.vue'), + meta: { + rank: 10011, + title: '浣欓绠$悊', + // rootMenu: true, + icon: 'home', + }, + }, + ], + }, + // { + // path: '/FileManage', + // redirect: 'noRedirect', + // component: Layout, + // hidden: false, + // alwaysShow: true, + // meta: { + // rank: 10020, + // title: '鏂囦欢绠$悊', + // rootMenu: true, + // icon: 'home', + // }, + // children: [ + // { + // path: '/FileManage', + // name: 'FileManage', + // hidden: false, + // alwaysShow: true, + // component: () => import('@/views/FileManage/FileManage.vue'), + // meta: { + // rank: 10021, + // title: '鏂囦欢绠$悊', + // icon: 'home', + // }, + // }, + // ], + // }, { path: '/Login', name: 'Login', @@ -188,7 +307,7 @@ }, ], }, -]; +].filter(Boolean); export const asyncRoutes: Route[] = [ { @@ -213,9 +332,11 @@ }, ]; +const { VITE_PUBLIC_PATH } = loadEnv(); + const createRouterFactory = () => createRouter({ - history: createWebHistory(), // hash妯″紡锛歝reateWebHashHistory锛宧istory妯″紡锛歝reateWebHistory + history: createWebHistory(VITE_PUBLIC_PATH), // hash妯″紡锛歝reateWebHashHistory锛宧istory妯″紡锛歝reateWebHistory scrollBehavior(to, from, savedPosition) { return new Promise((resolve) => { if (savedPosition) { -- Gitblit v1.9.1