import request from '@/utils/request'

// 查询地块属性列表
export function listLand(query) {
  return request({
    url: '/resource/land/list',
    method: 'get',
    params: query
  })
}
// 查询地块属性列表 ,用于空间字段专属查询，避免敏感泄露
export function listLandQuery(query) {
  return request({
    url: '/resource/land/query',
    method: 'get',
    params: query
  })
}

// 查询地块属性详细
export function getLand(fid) {
  return request({
    url: '/resource/land/' + fid,
    method: 'get'
  })
}

// 查询地块属性详细
export function getLandDetail(fid) {
  return request({
    url: '/resource/land/detail/' + fid,
    method: 'get'
  })
}

// 查询地块经营详细
export function getLandDetailByDkbm(dkbm) {
  return request({
    url: '/resource/land/detailByDkbm/' + dkbm,
    method: 'get'
  })
}


// 新增地块属性
export function addLand(data) {
  return request({
    url: '/resource/land/add',
    method: 'post',
    data: data
  })
}

// 修改地块属性
export function updateLand(data) {
  return request({
    url: '/resource/land/update',
    method: 'post',
    data: data
  })
}

// 删除地块属性
export function delLand(fid) {
  return request({
    url: '/resource/land/delete/' + fid,
    method: 'get'
  })
}

// 打印地块属性
export function printLand(query) {
  return request({
    url: '/resource/land/print',
    method: 'get',
    params: query
  })
}