/*
 * @Author: chris
 * @Date: 2025-09-05 11:34:53
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2026-03-18 10:15:59
 */
import request from "@/utils/request";

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

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

// 新增果园
export function addPest(data) {
  return request({
    url: "/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",
  });
}
