import layoutHeaderAside from '@/layout/header-aside'

const meta = { auth: true }

const _import = require('@/libs/util.import.' + process.env.NODE_ENV)

export default {
  path: '/data_middleground',
  component: layoutHeaderAside,
  children: (pre => [
    {
      path: 'index',
      name: `${pre}index`,
      meta: { ...meta, title: '数据中台', root: '/data_middleground' },
      component: _import('system/function/module-index')
    },
    {
      path: 'basic_traceability/reverse_direction_traceability',
      name: `${pre}basic_traceability-reverse_direction_traceability`,
      meta: { ...meta, cache: true, title: '反向追溯' },
      component: _import('data-platform/traceability/backward')
    },
    {
      path: 'basic_traceability/positive_direction_traceability',
      name: `${pre}basic_traceability-positive_direction_traceability`,
      meta: { ...meta, cache: true, title: '正向追溯' },
      component: _import('data-platform/traceability/forward')
    },
    {
      path: 'produce/traceability/curve',
      name: `${pre}traceability-curve`,
      meta: { ...meta, cache: true, title: '电池曲线' },
      component: _import('data-platform/traceability/battery-curve')
    },
    {
      path: 'produce/traceability/tray',
      name: `${pre}traceability-tray`,
      meta: { ...meta, cache: true, title: '托盘追溯' },
      component: _import('data-platform/traceability/tray')
    },
    {
      path: 'produce/traceability/battery',
      name: `${pre}traceability-battery`,
      meta: { ...meta, cache: true, title: '电池追溯' },
      component: _import('data-platform/traceability/battery')
    },
    {
      path: 'produce/report/equipment-history',
      name: `${pre}report-equipment-history`,
      meta: { ...meta, cache: true, title: '设备履历报表' },
      component: _import('data-platform/production-reports/equipment-history')
    },
    {
      path: 'produce/report/battery-detail',
      name: `${pre}report-battery-detail`,
      meta: { ...meta, cache: true, title: '电池详情报表' },
      component: _import('data-platform/production-reports/battery-detail')
    },
    {
      path: 'pancake/eagle_eyes',
      name: `${pre}formation-data-record`,
      meta: { ...meta, cache: true, title: '鹰眼' },
      component: _import('data-platform/correlation-analysis/hawkeye')
    }
  ])('data_middleground-')
}
