import request from '@/utils/request'

// 查询作物长势列表
export function listGrowth(query) {
  return request({
    url: '/crops/growth/list',
    method: 'get',
    params: query
  })
}

// 查询作物长势详细
export function getGrowth(id) {
  return request({
    url: '/crops/growth/' + id,
    method: 'get'
  })
}

// 新增作物长势
export function addGrowth(data) {
  return request({
    url: '/crops/growth',
    method: 'post',
    data: data
  })
}

// 修改作物长势
export function updateGrowth(data) {
  return request({
    url: '/crops/growth',
    method: 'put',
    data: data
  })
}

// 删除作物长势
export function delGrowth(id) {
  return request({
    url: '/crops/growth/' + id,
    method: 'delete'
  })
}
