import Layout from '@/layout/index.vue'

/**
 * dataSpecies                          机种管理
 * dataType                             机型管理
 * dataAircraftCataloging               飞机编目管理
 * dataAircraftConfiguration            飞机构型管理
 * dataSailingMaterialClassification    航材分类管理
 * dataSailingMaterialMaterialCoding    航材物质编目
 * dataSailingMaterialPrice             航材价格管理
 * dataEnvironment                      环境因子管理
 */

export const dataType = {
  path: '/basicData',
  redirect: '/basicData/dataSpecies',
  component: Layout,
  name: 'DataType',
  meta: {
    title: '基础数据',
    icon: 'el-icon-s-platform'
  },
  sort: 10,
  children: [
    {
      path: '/basicData/dataType',
      component: () => import('@/views/basicData/dataType/index.vue'),
      meta: {
        title: '机种管理'
      },
      sort: 1
    }
  ]
}

export const dataSpecies = {
  path: '/basicData',
  redirect: '/basicData/dataSpecies',
  component: Layout,
  name: 'DataSpecies',
  meta: {
    title: '基础数据',
    icon: 'el-icon-s-platform'
  },
  sort: 10,
  children: [
    {
      path: '/basicData/dataSpecies',
      component: () => import('@/views/basicData/dataSpecies/index.vue'),
      meta: {
        title: '机型管理'
      },
      sort: 2
    }
  ]
}

export const dataAircraftCataloging = {
  path: '/basicData',
  redirect: '/basicData/dataSpecies',
  component: Layout,
  name: 'DataAircraftCataloging',
  meta: {
    title: '基础数据',
    icon: 'el-icon-s-platform'
  },
  sort: 10,
  children: [
    {
      path: '/basicData/dataAircraftCataloging',
      component: () => import('@/views/basicData/dataAircraftCataloging/index.vue'),
      meta: {
        title: '飞机编目管理'
      },
      sort: 3
    }
  ]
}

// export const dataAircraftConfiguration = {
//   path: '/basicData',
//   redirect: '/basicData/dataSpecies',
//   component: Layout,
//   name: 'DataAircraftConfiguration',
//   meta: {
//     title: '基础数据',
//     icon: 'el-icon-s-platform'
//   },
//   sort: 10,
//   children: [
//     {
//       path: '/basicData/dataAircraftConfiguration',
//       component: () => import('@/views/basicData/dataAircraftConfiguration/index.vue'),
//       meta: {
//         title: '飞机构型管理'
//       },
//       sort: 11
//     }
//   ]
// }

export const dataSailingMaterialClassification = {
  path: '/basicData',
  redirect: '/basicData/dataSpecies',
  component: Layout,
  name: 'DataSailingMaterialClassification',
  meta: {
    title: '基础数据',
    icon: 'el-icon-s-platform'
  },
  sort: 10,
  children: [
    {
      path: '/basicData/dataSailingMaterialClassification',
      component: () => import('@/views/basicData/dataSailingMaterialClassification/index.vue'),
      meta: {
        title: '航材分类管理'
      },
      sort: 4
    }
  ]
}

export const dataSailingMaterialMaterialCoding = {
  path: '/basicData',
  redirect: '/basicData/dataSpecies',
  component: Layout,
  name: 'DataSailingMaterialMaterialCoding',
  meta: {
    title: '基础数据',
    icon: 'el-icon-s-platform'
  },
  sort: 10,
  children: [
    {
      path: '/basicData/dataSailingMaterialMaterialCoding',
      component: () => import('@/views/basicData/dataSailingMaterialMaterialCoding/index.vue'),
      meta: {
        title: '航材物资编目-机务'
      },
      sort: 5
    }
  ]
}

export const dataSailingMaterialMaterialCodingAviation = {
  path: '/basicData',
  redirect: '/basicData/dataSpecies',
  component: Layout,
  name: 'DataSailingMaterialMaterialCodingAviation',
  meta: {
    title: '基础数据',
    icon: 'el-icon-s-platform'
  },
  sort: 10,
  children: [
    {
      path: '/basicData/dataSailingMaterialMaterialCodingAviation',
      component: () => import('@/views/basicData/dataSailingMaterialMaterialCodingAviation/index.vue'),
      meta: {
        title: '航材物资编目-航材'
      },
      sort: 6
    }
  ]
}

export const dataSailingMaterialPrice = {
  path: '/basicData',
  redirect: '/basicData/dataSpecies',
  component: Layout,
  name: 'DataSailingMaterialPrice',
  meta: {
    title: '基础数据',
    icon: 'el-icon-s-platform'
  },
  sort: 10,
  children: [
    {
      path: '/basicData/dataSailingMaterialPrice',
      component: () => import('@/views/basicData/dataSailingMaterialPrice/index.vue'),
      meta: {
        title: '航材价格管理'
      },
      sort: 7
    }
  ]
}

export const dataEnvironment = {
  path: '/basicData',
  redirect: '/basicData/dataSpecies',
  component: Layout,
  name: 'DataEnvironment',
  meta: {
    title: '基础数据',
    icon: 'el-icon-s-platform'
  },
  sort: 10,
  children: [
    {
      path: '/basicData/dataEnvironment',
      component: () => import('@/views/basicData/dataEnvironment/index.vue'),
      meta: {
        title: '环境因子管理'
      },
      sort: 8
    },
    {
      path: '/basicData/dataEnvironment/:id/:name/:value',
      component: () => import('@/views/basicData/dataEnvironment/suitableSpareParts.vue'),
      meta: {
        title: '环境因子管理-适用航材',
        hide: true
      }
    }
  ]
}
