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

// 查询故障所需备件列表
export const getFaultSpareParts = async (data) => {
  return await get('/als/faultSpareParts/list', data)
}

// 新增故障所需备件
export const addFaultSpareParts = async (data) => {
  return await post('/als/faultSpareParts', data)
}

// 修改故障所需备件
export const updateFaultSpareParts = async (data) => {
  return await put('/als/faultSpareParts', data)
}

// 删除故障所需备件
export const removeFaultSpareParts = async (id) => {
  return await deletes('/als/faultSpareParts/' + id)
}

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