import { RouteRecordRaw } from 'vue-router';

// 动态路由
export const dynamicRouter: RouteRecordRaw[] = [
  {
    path: '/',
    redirect: '/document/dataDictionary',
    meta: {
      title: '',
    },
    children: []
  },
  {
    path: '/document', name: 'document', redirect: '/document/dataDictionary', meta: { title: '在线文档', },
    children: [
      { path: 'dataDictionary', name: 'documentDataDictionary', component: () => import('@/subsystem/views/document/dataDictionary/index.vue'), meta: { title: '数据字典', keepAlive: true, } },
      { path: 'interfacedoc', name: 'documentInterfacedoc', component: () => import('@/subsystem/views/document/interfacedoc/index.vue'), meta: { title: '接口文档', keepAlive: true, } }
    ]
  },{
    path: '/log', name: 'log', redirect: '/log/operationLog', meta: { title: '日志管理', },
    children: [
      { path: 'operationLog', name: 'logOperationLog', component: () => import('@/subsystem/views/log/operationLog/index.vue'), meta: { title: '操作日志', keepAlive: true, } },
      { path: 'nginxLog', name: 'logNginxLog', component: () => import('@/subsystem/views/log/nginxLog/index.vue'), meta: { title: 'NGINX日志', keepAlive: true, } },
      { path: 'accessLog', name: 'logAccessLog', component: () => import('@/subsystem/views/log/accessLog/index.vue'), meta: { title: '应用访问日志', keepAlive: true, } },
      { path: 'serviceLog', name: 'logServiceLog', component: () => import('@/subsystem/views/log/serviceLog/index.vue'), meta: { title: '应用服务日志', keepAlive: true, } },
      { path: 'slowsqlLog', name: 'logSlowsqlLog', component: () => import('@/subsystem/views/log/slowsqlLog/index.vue'), meta: { title: '慢SQL日志', keepAlive: true, } },
      { path: 'resttemplateLog', name: 'logResttemplateLog', component: () => import('@/subsystem/views/log/resttemplateLog/index.vue'), meta: { title: '请求外部日志', keepAlive: true, } },
    ]
  },{
    path: '/abnormal', name: 'abnormal', redirect: '/abnormal/abnormalEvent', meta: { title: '异常管理', },
    children: [
      { path: 'abnormalEvent', name: 'abnormalEvent', component: () => import('@/subsystem/views/abnormal/abnormalEvent/index.vue'), meta: { title: '异常事件', keepAlive: true, } },
    ]
  },{
    path: '/config', name: 'config', redirect: '/config/business', meta: { title: '软件配置', },
    children: [
      { path: 'business', name: 'business', component: () => import('@/subsystem/views/config/business/index.vue'), meta: { title: '业务参数配置', keepAlive: true, } },
    ]
  },{
    path: '/printmanage',
    name: 'printmanage',
    redirect: '/printmanage/printmodel',
    meta: {
      title: '打印设计',
    },
    children: [
      // {
      //   path: 'printmodel',
      //   name: 'printmanageprintmodel',
      //   component: () => import('@/subsystem/views/printmanage/printmodel/index.vue'),
      //   meta: {
      //     title: '打印模板管理',
      //     keepAlive: true,
      //   }
      // }
    ]
  },{
    path: '/pay', name: 'pay', redirect: '/pay/payManagement', meta: { title: '支付商户', },
    children: [
      { path: 'payManagement', name: 'payManagement', component: () => import('@/subsystem/views/pay/payManagement/index.vue'), meta: { title: '支付商户', keepAlive: true, } },
    ]
  }

];