perf: 走查问题调整

This commit is contained in:
rd
2025-08-29 12:03:04 +08:00
parent 83d11f1f53
commit 98d7adc550
23 changed files with 289 additions and 156 deletions

View File

@ -8,6 +8,7 @@ import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { MENU_GROUP_IDS } from './constants';
import createRouteGuard from './guard';
import { GROUP_MAIN_NAME } from '@/layouts/components/siderBar/menu-list';
NProgress.configure({ showSpinner: false }); // NProgress Configuration
@ -30,6 +31,7 @@ export const router = createRouter({
meta: {
requiresAuth: false,
requireLogin: true,
group: GROUP_MAIN_NAME,
}
},
{

View File

@ -1,6 +1,9 @@
import { IconBookmark } from '@arco-design/web-vue/es/icon';
import type { AppRouteRecordRaw } from '../types';
import { MENU_GROUP_IDS } from '@/router/constants';
import { GROUP_MANAGEMENT_NAME, GROUP_WRITER_NAME } from '@/layouts/components/siderBar/menu-list';
const COMPONENTS: AppRouteRecordRaw[] = [
{
@ -14,6 +17,9 @@ const COMPONENTS: AppRouteRecordRaw[] = [
requireLogin: true,
roles: ['*'],
id: MENU_GROUP_IDS.MANAGEMENT_ID,
group: GROUP_MANAGEMENT_NAME,
hideAiSearch: true,
},
children: [
{
@ -25,6 +31,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [
requiresAuth: false,
requireLogin: true,
roles: ['*'],
group: GROUP_MANAGEMENT_NAME,
hideAiSearch: true,
},
},
{
@ -36,6 +44,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [
requiresAuth: false,
requireLogin: true,
roles: ['*'],
group: GROUP_MANAGEMENT_NAME,
hideAiSearch: true,
},
},
{
@ -47,6 +57,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [
requiresAuth: false,
requireLogin: true,
roles: ['*'],
group: GROUP_MANAGEMENT_NAME,
hideAiSearch: true,
},
},
],

View File

@ -2,8 +2,7 @@ import type { AppRouteRecordRaw } from '../types';
import { MENU_GROUP_IDS } from '@/router/constants';
import IconContentManuscript from '@/assets/svg/svg-contentManuscript.svg';
export const GROUP_WRITER_NAME = 'GroupWriterMaterialCenter';
import { GROUP_WRITER_NAME } from '@/layouts/components/siderBar/menu-list';
const COMPONENTS: AppRouteRecordRaw[] = [
{
@ -56,7 +55,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [
hideInMenu: true,
activeMenu: 'WriterMaterialCenterFinishedProducts',
},
component: () => import('@/views/writer-material-center/components/finished-products/manuscript/upload/index.vue'),
component: () =>
import('@/views/writer-material-center/components/finished-products/manuscript/upload/index.vue'),
},
{
path: 'edit/:writerCode/:id',
@ -70,7 +70,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [
hideInMenu: true,
activeMenu: 'WriterMaterialCenterFinishedProducts',
},
component: () => import('@/views/writer-material-center/components/finished-products/manuscript/edit/index.vue'),
component: () =>
import('@/views/writer-material-center/components/finished-products/manuscript/edit/index.vue'),
},
{
path: 'detail/:writerCode/:id',
@ -84,7 +85,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [
hideInMenu: true,
activeMenu: 'WriterMaterialCenterFinishedProducts',
},
component: () => import('@/views/writer-material-center/components/finished-products/manuscript/detail/index.vue'),
component: () =>
import('@/views/writer-material-center/components/finished-products/manuscript/detail/index.vue'),
},
{
path: 'check-list/detail/:id/:writerCode',
@ -98,9 +100,10 @@ const COMPONENTS: AppRouteRecordRaw[] = [
roles: ['*'],
activeMenu: 'WriterMaterialCenterFinishedProducts',
},
component: () => import('@/views/writer-material-center/components/finished-products/manuscript/detail/index.vue'),
component: () =>
import('@/views/writer-material-center/components/finished-products/manuscript/detail/index.vue'),
},
{
{
path: 'check/:writerCode',
name: 'WriterManuscriptCheck',
meta: {
@ -112,7 +115,8 @@ const COMPONENTS: AppRouteRecordRaw[] = [
hideInMenu: true,
activeMenu: 'WriterMaterialCenterFinishedProducts',
},
component: () => import('@/views/writer-material-center/components/finished-products/manuscript/check/index.vue'),
component: () =>
import('@/views/writer-material-center/components/finished-products/manuscript/check/index.vue'),
},
],
},

View File

@ -88,77 +88,77 @@ const COMPONENTS: AppRouteRecordRaw[] = [
},
],
},
{
path: '/put-account',
name: 'PutAccount',
redirect: 'put-account/accountManagement',
meta: {
locale: '投放资源中心',
icon: IconPutAccount,
requiresAuth: true,
requireLogin: true,
roles: ['*'],
id: MENU_GROUP_IDS.PROPERTY_ID,
},
children: [
{
path: 'manage',
name: 'PutAccountAccountManagement',
meta: {
locale: '账户管理',
requiresAuth: true,
requireLogin: true,
roles: ['*'],
},
component: () => import('@/views/property-marketing/put-account/account-manage/index.vue'),
},
{
path: 'data',
name: 'PutAccountAccountData',
meta: {
locale: '账户数据',
requiresAuth: true,
requireLogin: true,
roles: ['*'],
},
component: () => import('@/views/property-marketing/put-account/account-data/index.vue'),
},
{
path: 'account-dashboard',
name: 'PutAccountAccountDashboard',
meta: {
locale: '投放表现分析',
requiresAuth: true,
requireLogin: true,
roles: ['*'],
},
component: () => import('@/views/property-marketing/put-account/account-dashboard/index.vue'),
},
{
path: 'investmentGuidelines',
name: 'PutAccountInvestmentGuidelines',
meta: {
locale: '投放指南',
requiresAuth: true,
requireLogin: true,
roles: ['*'],
},
component: () => import('@/views/property-marketing/put-account/investment-guidelines/index.vue'),
},
{
path: 'detail/:id',
name: 'PutAccountInvestmentGuidelinesDetail',
meta: {
locale: '投放指南详情',
requiresAuth: true,
hideInMenu: true,
roles: ['*'],
activeMenu: 'PutAccountInvestmentGuidelines',
},
component: () => import('@/views/property-marketing/put-account/investment-guidelines/detail.vue'),
},
],
},
// {
// path: '/put-account',
// name: 'PutAccount',
// redirect: 'put-account/accountManagement',
// meta: {
// locale: '投放资源中心',
// icon: IconPutAccount,
// requiresAuth: true,
// requireLogin: true,
// roles: ['*'],
// id: MENU_GROUP_IDS.PROPERTY_ID,
// },
// children: [
// {
// path: 'manage',
// name: 'PutAccountAccountManagement',
// meta: {
// locale: '账户管理',
// requiresAuth: true,
// requireLogin: true,
// roles: ['*'],
// },
// component: () => import('@/views/property-marketing/put-account/account-manage/index.vue'),
// },
// {
// path: 'data',
// name: 'PutAccountAccountData',
// meta: {
// locale: '账户数据',
// requiresAuth: true,
// requireLogin: true,
// roles: ['*'],
// },
// component: () => import('@/views/property-marketing/put-account/account-data/index.vue'),
// },
// {
// path: 'account-dashboard',
// name: 'PutAccountAccountDashboard',
// meta: {
// locale: '投放表现分析',
// requiresAuth: true,
// requireLogin: true,
// roles: ['*'],
// },
// component: () => import('@/views/property-marketing/put-account/account-dashboard/index.vue'),
// },
// {
// path: 'investmentGuidelines',
// name: 'PutAccountInvestmentGuidelines',
// meta: {
// locale: '投放指南',
// requiresAuth: true,
// requireLogin: true,
// roles: ['*'],
// },
// component: () => import('@/views/property-marketing/put-account/investment-guidelines/index.vue'),
// },
// {
// path: 'detail/:id',
// name: 'PutAccountInvestmentGuidelinesDetail',
// meta: {
// locale: '投放指南详情',
// requiresAuth: true,
// hideInMenu: true,
// roles: ['*'],
// activeMenu: 'PutAccountInvestmentGuidelines',
// },
// component: () => import('@/views/property-marketing/put-account/investment-guidelines/detail.vue'),
// },
// ],
// },
// {
// path: '/intelligent-solution',
// name: 'IntelligentSolution',

View File

@ -16,4 +16,5 @@ export interface AppRouteRecordRaw {
props?: Record<string, any>;
beforeEnter?: NavigationGuard | NavigationGuard[];
fullPath?: string;
hideAiSearch?: boolean;
}