修复UI触发子菜单后主菜单跳转到其他菜单的bug

This commit is contained in:
xiaocp2009 2025-09-11 12:11:57 +08:00
parent 80ff93c5e7
commit 64534129a2
12 changed files with 41 additions and 26 deletions

View File

@ -22,6 +22,7 @@ export const views: Record<LastLevelRouteKey, RouteComponent | (() => Promise<Ro
login: () => import("@/views/_builtin/login/index.vue"),
"social-callback": () => import("@/views/_builtin/social-callback/index.vue"),
"user-center": () => import("@/views/_builtin/user-center/index.vue"),
batch_batch: () => import("@/views/batch/batch/index.vue"),
business_category: () => import("@/views/business/category/index.vue"),
business_percentage: () => import("@/views/business/percentage/index.vue"),
demo_demo: () => import("@/views/demo/demo/index.vue"),
@ -29,8 +30,6 @@ export const views: Record<LastLevelRouteKey, RouteComponent | (() => Promise<Ro
home: () => import("@/views/home/index.vue"),
monitor_cache: () => import("@/views/monitor/cache/index.vue"),
monitor_online: () => import("@/views/monitor/online/index.vue"),
mps_batch: () => import("@/views/mps/batch/index.vue"),
"mps_detail-entry": () => import("@/views/mps/detail-entry/index.vue"),
"mps_emp-add-items": () => import("@/views/mps/emp-add-items/index.vue"),
"mps_manual-pricing": () => import("@/views/mps/manual-pricing/index.vue"),
mps_market: () => import("@/views/mps/market/index.vue"),
@ -64,6 +63,7 @@ export const views: Record<LastLevelRouteKey, RouteComponent | (() => Promise<Ro
oss_client: () => import("@/views/oss/client/index.vue"),
"oss_oss-config": () => import("@/views/oss/oss-config/index.vue"),
oss_oss: () => import("@/views/oss/oss/index.vue"),
"report_detail-entry": () => import("@/views/report/detail-entry/index.vue"),
"report_payroll-records": () => import("@/views/report/payroll-records/index.vue"),
"report_performance-m": () => import("@/views/report/performance-m/index.vue"),
"report_performance-q": () => import("@/views/report/performance-q/index.vue"),

View File

@ -39,6 +39,26 @@ export const generatedRoutes: GeneratedRoute[] = [
hideInMenu: true
}
},
{
name: 'batch',
path: '/batch',
component: 'layout.base',
meta: {
title: 'batch',
i18nKey: 'route.batch'
},
children: [
{
name: 'batch_batch',
path: '/batch/batch',
component: 'view.batch_batch',
meta: {
title: 'batch_batch',
i18nKey: 'route.batch_batch'
}
}
]
},
{
name: 'business',
path: '/business',
@ -171,24 +191,6 @@ export const generatedRoutes: GeneratedRoute[] = [
i18nKey: 'route.mps'
},
children: [
{
name: 'mps_batch',
path: '/mps/batch',
component: 'view.mps_batch',
meta: {
title: 'mps_batch',
i18nKey: 'route.mps_batch'
}
},
{
name: 'mps_detail-entry',
path: '/mps/detail-entry',
component: 'view.mps_detail-entry',
meta: {
title: 'mps_detail-entry',
i18nKey: 'route.mps_detail-entry'
}
},
{
name: 'mps_emp-add-items',
path: '/mps/emp-add-items',
@ -519,6 +521,15 @@ export const generatedRoutes: GeneratedRoute[] = [
i18nKey: 'route.report'
},
children: [
{
name: 'report_detail-entry',
path: '/report/detail-entry',
component: 'view.report_detail-entry',
meta: {
title: 'report_detail-entry',
i18nKey: 'route.report_detail-entry'
}
},
{
name: 'report_payroll-records',
path: '/report/payroll-records',

View File

@ -170,6 +170,8 @@ const routeMap: RouteMap = {
"403": "/403",
"404": "/404",
"500": "/500",
"batch": "/batch",
"batch_batch": "/batch/batch",
"business": "/business",
"business_category": "/business/category",
"business_percentage": "/business/percentage",
@ -183,8 +185,6 @@ const routeMap: RouteMap = {
"monitor_cache": "/monitor/cache",
"monitor_online": "/monitor/online",
"mps": "/mps",
"mps_batch": "/mps/batch",
"mps_detail-entry": "/mps/detail-entry",
"mps_emp-add-items": "/mps/emp-add-items",
"mps_manual-pricing": "/mps/manual-pricing",
"mps_market": "/mps/market",
@ -221,6 +221,7 @@ const routeMap: RouteMap = {
"oss_oss": "/oss/oss",
"oss_oss-config": "/oss/oss-config",
"report": "/report",
"report_detail-entry": "/report/detail-entry",
"report_payroll-records": "/report/payroll-records",
"report_performance": "/report/performance",
"report_performance-m": "/report/performance-m",

View File

@ -99,6 +99,7 @@ declare module 'vue' {
NSwitch: typeof import('naive-ui')['NSwitch']
NTab: typeof import('naive-ui')['NTab']
NTable: typeof import('naive-ui')['NTable']
NTabPane: typeof import('naive-ui')['NTabPane']
NTabs: typeof import('naive-ui')['NTabs']
NTag: typeof import('naive-ui')['NTag']
NText: typeof import('naive-ui')['NText']

View File

@ -24,6 +24,8 @@ declare module "@elegant-router/types" {
"403": "/403";
"404": "/404";
"500": "/500";
"batch": "/batch";
"batch_batch": "/batch/batch";
"business": "/business";
"business_category": "/business/category";
"business_percentage": "/business/percentage";
@ -37,8 +39,6 @@ declare module "@elegant-router/types" {
"monitor_cache": "/monitor/cache";
"monitor_online": "/monitor/online";
"mps": "/mps";
"mps_batch": "/mps/batch";
"mps_detail-entry": "/mps/detail-entry";
"mps_emp-add-items": "/mps/emp-add-items";
"mps_manual-pricing": "/mps/manual-pricing";
"mps_market": "/mps/market";
@ -75,6 +75,7 @@ declare module "@elegant-router/types" {
"oss_oss": "/oss/oss";
"oss_oss-config": "/oss/oss-config";
"report": "/report";
"report_detail-entry": "/report/detail-entry";
"report_payroll-records": "/report/payroll-records";
"report_performance": "/report/performance";
"report_performance-m": "/report/performance-m";
@ -142,6 +143,7 @@ declare module "@elegant-router/types" {
| "403"
| "404"
| "500"
| "batch"
| "business"
| "demo"
| "home"
@ -182,6 +184,7 @@ declare module "@elegant-router/types" {
| "login"
| "social-callback"
| "user-center"
| "batch_batch"
| "business_category"
| "business_percentage"
| "demo_demo"
@ -189,8 +192,6 @@ declare module "@elegant-router/types" {
| "home"
| "monitor_cache"
| "monitor_online"
| "mps_batch"
| "mps_detail-entry"
| "mps_emp-add-items"
| "mps_manual-pricing"
| "mps_market"
@ -224,6 +225,7 @@ declare module "@elegant-router/types" {
| "oss_client"
| "oss_oss-config"
| "oss_oss"
| "report_detail-entry"
| "report_payroll-records"
| "report_performance-m"
| "report_performance-q"