import { BasicLayout } from '@/layouts'

const RouteView = {
  name: 'RouteView',
  render: h => h('router-view')
}

export const asyncRouterMap = [
  {
    path: '/',
    name: 'Basic',
    component: BasicLayout,
    meta: { title: '主页' },
    redirect: '/data',
    children: [
      /*{
        path: '/home',
        name: 'Home',
        component: Home,
        meta: { title: '首页信息', icon: 'jg-icon-home' },
      },*/
      /*{
        path: '/realtime-data',
        name: 'RealtimeData',
        meta: { title: '数据信息', icon: 'jg-icon-data' },
        component: () => import(/!* webpackChunkName: "about" *!/ '../views/RealtimeData')
      },*/
      {
        path: '/data',
        name: 'Data',
        meta: { title: '数据信息', icon: 'jg-icon-data' },
        component: () => import(/* webpackChunkName: "about" */ '../views/Data')
      },
      /*{
        path: '/report',
        name: 'Report',
        meta: { title: '打印报表', icon: 'jg-icon-print' },
        // component: () => import(/!* webpackChunkName: "about" *!/ '../views/Report'),
        redirect: '/report/see-run-record',
        component: RouteView,
        children: [
          {
            path: '/see-run-record',
            name: 'SeeRunRecord',
            meta: { title: '查看生产运行记录' },
            component: () => import(/!* webpackChunkName: "about" *!/ '../views/Report/SeeRunRecord')
          },
          {
            path: '/print-run-record',
            name: 'PrintRunRecord',
            meta: { title: '打印生产运行记录' },
            component: () => import(/!* webpackChunkName: "about" *!/ '../views/Report/PrintRunRecord')
          },
          {
            path: '/print-realtime-record',
            name: 'PrintRealtimeRecord',
            meta: { title: '打印瞬时数据报表' },
            component: () => import(/!* webpackChunkName: "about" *!/ '../views/Report/PrintRealtimeRecord')
          },
          {
            path: '/auto-print-run-record',
            name: 'AutoPrintRunRecord',
            meta: { title: '自动打印运行记录' },
            component: () => import(/!* webpackChunkName: "about" *!/ '../views/Report/AutoPrintRunRecord')
          },
        ],
      },*/
      /*{
        path: '/flow-param',
        name: 'FlowParam',
        meta: { title: '流量参数', icon: 'jg-icon-flow' },
        redirect: '/flow-param/flow-param-set',
        component: RouteView,
        children: [
          {
            path: '/flow-param-set',
            name: 'FlowParamSet',
            meta: { title: '流量参数设置' },
            component: () => import(/!* webpackChunkName: "set" *!/ '../views/FlowParam/FlowParamSet')
          },
          {
            path: '/see',
            name: 'flow-param-see',
            meta: { title: '流量参数查看' },
            component: () => import(/!* webpackChunkName: "see" *!/ '../views/FlowParam/FlowParamSee')
          },
        ],
      },
      {
        path: '/heat-param',
        name: 'HeatParam',
        meta: { title: '热值参数', icon: 'jg-icon-heat' },
        redirect: '/heat-param/heat-param-set',
        component: RouteView,
        children: [
          {
            path: '/heat-param-set',
            name: 'HeatParamSet',
            meta: { title: '热值参数设置' },
            component: () => import(/!* webpackChunkName: "set" *!/ '../views/HeatParam/HeatParamSet')
          },
          {
            path: '/heat-param-see',
            name: 'HeatParamSee',
            meta: { title: '热值参数查看' },
            component: () => import(/!* webpackChunkName: "see" *!/ '../views/HeatParam/HeatParamSee')
          },
        ],
      },*/
      {
        path: '/warn-setting',
        name: 'WarnSetting',
        meta: { title: '报警设置', icon: 'jg-icon-meter' },
        redirect: '/warn-setting/warn-set',
        component: RouteView,
        children: [
          {
            path: '/warn-set',
            name: 'WarnSet',
            meta: { title: '报警阈值设置' },
            component: () => import(/* webpackChunkName: "set" */ '../views/WarnSet')
          },
          /*{
            path: '/meter-see',
            name: 'MeterSee',
            meta: { title: '仪表量程查看' },
            component: () => import(/!* webpackChunkName: "see" *!/ '../views/WarnSet/MeterSee')
          },*/
        ],
      },
      {
        path: '/warning',
        name: 'Warning',
        meta: { title: '报警显示', icon: 'jg-icon-warn' },
        component: () => import(/* webpackChunkName: "warning" */ '../views/Warning')
      },
      {
        path: '/device-status',
        name: 'DeviceStatus',
        meta: { title: '设备运行状况', icon: 'jg-icon-heat' },
        component: () => import(/* webpackChunkName: "DeviceStatus" */ '../views/DeviceStatus')
      },
    ]
  },
  {
    path: '*',
    redirect: '/404',
    hidden: true
  }
]

/**
 * 基础路由
 * @type { *[] }
 */
/*export const constantRouterMap = [
  {
    path: '/404',
    component: () => import(/!* webpackChunkName: "fail" *!/ '@/views/exception/404')
  }
]*/
