import { get, uget, post, upost } from '@/http/index'

// 飞机编目查询
export const getAircaftCatalog = async (data) => {
  return await post('/basicdata/aircaftCatalog/getAircaftCatalog', data)
}

// 新增飞机编目
export const addAircaftCatalog = async (data) => {
  return await post('/basicdata/aircaftCatalog/addAircaftCatalog', data)
}

// 修改飞机编目
export const updateAircaftCatalog = async (data) => {
  return await post('/basicdata/aircaftCatalog/updateAircaftCatalog', data)
}

// 删除飞机编目
export const removeAircaftCatalog = async (data) => {
  return await post('/basicdata/aircaftCatalog/removeAircaftCatalog', data)
}

//  获取机种和机型树
export const getAircaftTypeAndModelTree = async (data) => {
  return await get('/basicdata/aircaftCatalog/getAircaftTypeAndModelTree', data)
}
//下载模板
export const downLoadFile = async (data) => {
  window.open(process.env.VUE_APP_BASE_API + '/basicdata/aircaftCatalog/downLoadFile')
}
//导出
export const exportExcel = async (data) => {
  window.open(process.env.VUE_APP_BASE_API + `/basicdata/aircaftCatalog/exportExcel?aircaftModelIdList=${data.aircaftModelIdList}&queryParam=${data.queryParam}`)
}
