import request from '@/utils/request'

// 查询作物旱情列表
export function listDrought(query) {
  return request({
    url: '/crops/drought/list',
    method: 'get',
    params: query
  })
}

// 查询作物旱情详细
export function getDrought(id) {
  return request({
    url: '/crops/drought/' + id,
    method: 'get'
  })
}

// 新增作物旱情
export function addDrought(data) {
  return request({
    url: '/crops/drought',
    method: 'post',
    data: data
  })
}

// 修改作物旱情
export function updateDrought(data) {
  return request({
    url: '/crops/drought',
    method: 'put',
    data: data
  })
}

// 删除作物旱情
export function delDrought(id) {
  return request({
    url: '/crops/drought/' + id,
    method: 'delete'
  })
}
