dataInventory.ts 2.05 KB
import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw[] = [
  {
    path: '/data-inventory/classify-grade-manage',
    component: Layout,
    meta: {
      title: '分类分级管理',
      icon: 'sidebar-videos',
    },
    children: [
      {
        path: 'task-config',
        name: 'taskConfig',
        component: () => import('@/views/data_inventory/taskConfig.vue'),
        meta: {
          title: '分类分级任务',
          breadcrumb: false,
          cache: true
        },
      },
      {
        path: 'template-config',
        name: 'templateConfig',
        component: () => import('@/views/data_inventory/templateConfig.vue'),
        meta: {
          title: '分类分级模板',
          breadcrumb: false,
          cache: true
        },
      },
      {
        path: 'classStandard-edit',
        name: 'classStandardEdit',
        component: () => import('@/views/data_inventory/classStandardEdit.vue'),
        meta: {
          title: '编辑-',
          sidebar: false,
          breadcrumb: false,
          cache: true,
          reuse: true,
          editPage: true,
          activeMenu: '/data-inventory/classify-grade-manage/template-config'
        },
        beforeEnter: (to, from) => {
          if (to.query.classStandardName) {
            to.meta.title = `编辑-${to.query.classStandardName}`;
          }
        }
      },
      {
        path: 'newCreate-template',
        name: 'newCreateTemplate',
        component: () => import('@/views/data_inventory/newCreateTemplate.vue'),
        meta: {
          title: '新增-',
          sidebar: false,
          breadcrumb: false,
          cache: true,
          reuse: true,
          editPage: true,
          activeMenu: '/data-inventory/classify-grade-manage/template-config'
        },
        beforeEnter: (to, from) => {
          if (to.query.classStandardName) {
            to.meta.title = `新增-${to.query.classStandardName}`;
          }
        }
      },
    ],
  }
]

export default routes