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

const meta = { auth: true }

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

export default {
  path: '/spc',
  component: layoutHeaderAside,
  children: (pre => [
    {
      path: 'index',
      name: `${pre}index`,
      meta: { ...meta, title: 'SPC统计过程控制', root: '/spc' },
      component: _import('system/function/module-index')
    },
    {
      path: 'management',
      name: `${pre}spc-control-spc-configuration`,
      meta: { ...meta, cache: true, title: 'SPC渲染条件配置' },
      component: _import('quality-management/spc-control/spc-configuration')
    },
    {
      path: 'chart/XBar-R',
      name: `${pre}spc-variable-charts-xbar-r`,
      meta: { ...meta, cache: true, title: 'XBar-R' },
      component: _import('quality-management/spc-variable-charts/xbar-r')
    },
    {
      path: 'chart/XBar-S',
      name: `${pre}spc-variable-charts-xbar-s`,
      meta: { ...meta, cache: true, title: 'XBar-S' },
      component: _import('quality-management/spc-variable-charts/xbar-s')
    },
    {
      path: 'chart/I-MR',
      name: `${pre}spc-variable-charts-i-mr`,
      meta: { ...meta, cache: true, title: 'I-MR' },
      component: _import('quality-management/spc-variable-charts/i-mr')
    },
    {
      path: 'chart/Levey-Jennings',
      name: `${pre}spc-variable-charts-levey-jennings`,
      meta: { ...meta, cache: true, title: 'Levey-Jennings' },
      component: _import('quality-management/spc-variable-charts/levey-jennings')
    },
    {
      path: 'chart/EWMA',
      name: `${pre}spc-variable-charts-ewma`,
      meta: { ...meta, cache: true, title: 'EWMA' },
      component: _import('quality-management/spc-variable-charts/ewma')
    },
    {
      path: 'chart/CUSUM',
      name: `${pre}spc-variable-charts-cusum`,
      meta: { ...meta, cache: true, title: 'CUSUM' },
      component: _import('quality-management/spc-variable-charts/cusum')
    },
    {
      path: 'chart/MA',
      name: `${pre}spc-variable-charts-ma`,
      meta: { ...meta, cache: true, title: 'MA' },
      component: _import('quality-management/spc-variable-charts/ma')
    },
    {
      path: 'chart/MAMR',
      name: `${pre}spc-variable-charts-mamr`,
      meta: { ...meta, cache: true, title: 'MAMR' },
      component: _import('quality-management/spc-variable-charts/mamr')
    },
    {
      path: 'chart/MAMS',
      name: `${pre}spc-variable-charts-mams`,
      meta: { ...meta, cache: true, title: 'MAMS' },
      component: _import('quality-management/spc-variable-charts/mams')
    },
    {
      path: 'chart/Cpk',
      name: `${pre}spc-variable-charts-cpk`,
      meta: { ...meta, cache: true, title: 'CPK' },
      component: _import('quality-management/spc-variable-charts/cpk')
    },
    {
      path: 'chart/DPMO',
      name: `${pre}spc-attribute-charts-dpmo`,
      meta: { ...meta, cache: true, title: 'DPMO' },
      component: _import('quality-management/spc-attribute-charts/dpmo')
    },
    {
      path: 'chart/PChart',
      name: `${pre}spc-attribute-charts-pchart`,
      meta: { ...meta, cache: true, title: 'PChart' },
      component: _import('quality-management/spc-attribute-charts/pchart')
    },
    {
      path: 'chart/NPChart',
      name: `${pre}spc-attribute-charts-npchart`,
      meta: { ...meta, cache: true, title: 'NPChart' },
      component: _import('quality-management/spc-attribute-charts/npchart')
    },
    {
      path: 'chart/CChart',
      name: `${pre}spc-attribute-charts-cchart`,
      meta: { ...meta, cache: true, title: 'CChart' },
      component: _import('quality-management/spc-attribute-charts/cchart')
    },
    {
      path: 'chart/UChart',
      name: `${pre}spc-attribute-charts-uchart`,
      meta: { ...meta, cache: true, title: 'UChart' },
      component: _import('quality-management/spc-attribute-charts/uchart')
    }
  ])('spc-')
}
