import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/sCrop',
    method: 'post',
    data
  })
}

export function del(id) {
  return request({
    url: 'api/sCrop/' + id,
    method: 'delete'
  })
}

export function edit(data) {
  return request({
    url: 'api/sCrop',
    method: 'put',
    data
  })
}

export function getSCropsNoPage() {
  return request({
    url: 'api/getSCropsNoPage',
    method: 'get'
  })
}

export function getSCropsNoPageByproid(projectid) {
  return request({
    url: 'api/getSCropsNoPageByproid/' + projectid,
    method: 'get'
  })
}

export function getAreachartdata(projectid) {
  return request({
    url: 'api/getAreachartdata/' + projectid,
    method: 'get'
  })
}
