import { get, put, post, deletes } from '@/http/index'

// 查询部件列表
export const getSpareParts = async (data) => {
  return await get('/als/spareParts/list', data)
}

// 新增部件
export const addSpareParts = async (data) => {
  return await post('/als/spareParts', data)
}

// 修改部件
export const updateSpareParts = async (data) => {
  return await put('/als/spareParts', data)
}

// 删除部件
export const removeSpareParts = async (id) => {
  return await deletes('/als/spareParts/' + id)
}

//  获取机种和机型树
export const getAircaftTypeAndModelTree = async (data) => {
  return await get('/basicdata/aircaftCatalog/getAircaftTypeAndModelTree', data)
}
