/*
 * @Author: chris
 * @Date: 2025-09-05 11:34:53
 * @LastEditors: chris
 * @LastEditTime: 2025-09-17 11:53:48
 */
import request from "@/utils/request";

// 查询果园列表
export function listPest(query) {
  return request({
    url: "/leilinglitchi/business/device/list",
    method: "get",
    params: Object.assign({ type: 1 }, query),
  });
}

// 查询果园详细
export function getPest(id) {
  return request({
    url: "/leilinglitchi/business/device/" + id,
    method: "get",
  });
}

// 新增果园
export function addPest(data) {
  return request({
    url: "/leilinglitchi/business/device",
    method: "post",
    data,
  });
}

// 修改果园
export function updatePest(data) {
  return request({
    url: "/leilinglitchi/business/device",
    method: "put",
    data,
  });
}

// 删除果园
export function delPest(id) {
  return request({
    url: "/leilinglitchi/business/device/" + id,
    method: "delete",
  });
}

// 导出果园数据
export function exportPest(query) {
  return request({
    url: "/leilinglitchi/business/device/export",
    method: "post",
    params: query,
    responseType: "blob",
  });
}
