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

const meta = { auth: true }

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

export default {
  path: '/quality_control',
  component: layoutHeaderAside,
  children: (pre => [
    {
      path: 'index',
      name: `${pre}index`,
      meta: { ...meta, title: '质量管理', root: '/quality_control' },
      component: _import('system/function/module-index')
    },
    {
      path: 'first_inspection/category',
      name: `${pre}process-control-inspection-type-management`,
      meta: { ...meta, cache: true, title: '检验类别管理' },
      component: _import('quality-management/process-control/inspection-type-management')
    },
    {
      path: 'first_inspection/setting',
      name: `${pre}process-control-first-article-inspection-configuration`,
      meta: { ...meta, cache: true, title: '首巡检项目配置' },
      component: _import('quality-management/process-control/first-article-inspection-configuration')
    },
    {
      path: 'first_inspection/input',
      name: `${pre}process-control-first-article-inspection-records`,
      meta: { ...meta, cache: true, title: '首巡检录入' },
      component: _import('quality-management/process-control/first-article-inspection-records')
    },
    {
      path: 'first_inspection/report',
      name: `${pre}process-control-first-article-inspection-reports`,
      meta: { ...meta, cache: true, title: '首巡检报表' },
      component: _import('quality-management/process-control/first-article-inspection-reports')
    },
    {
      path: 'xqc/inspection_order_manage',
      name: `${pre}inspection-management-inspection-orders`,
      meta: { ...meta, cache: true, title: '检验单管理' },
      component: _import('quality-management/inspection-management/inspection-orders')
    },
    {
      path: 'xqc/inspection_standard',
      name: `${pre}inspection-management-inspection-standards`,
      meta: { ...meta, cache: true, title: '检验标准' },
      component: _import('quality-management/inspection-management/inspection-standards')
    },
    {
      path: 'xqc/aql_config',
      name: `${pre}inspection-management-aql-standards`,
      meta: { ...meta, cache: true, title: '接收质量限' },
      component: _import('quality-management/inspection-management/aql-standards')
    },
    {
      path: 'xqc/inspection_plan',
      name: `${pre}inspection-management-inspection-plans`,
      meta: { ...meta, cache: true, title: '检测方案维护' },
      component: _import('quality-management/inspection-management/inspection-plans')
    },
    {
      path: 'xqc/inspection_item',
      name: `${pre}inspection-management-inspection-items`,
      meta: { ...meta, cache: true, title: '检验项目' },
      component: _import('quality-management/inspection-management/inspection-items')
    },
    {
      path: 'xqc/sampling_plan',
      name: `${pre}inspection-management-sampling-plans`,
      meta: { ...meta, cache: true, title: '抽样方案配置' },
      component: _import('quality-management/inspection-management/sampling-plans')
    }
  ])('quality_control-')
}
