import request from "@/utils/request";

// 查询地区受攻击列表
export function listAttack(query) {
  return request({
    url: "/zongzhi/attack/list",
    method: "get",
    params: query,
  });
}

// 查询地区受攻击详细
export function getAttack(id) {
  return request({
    url: "/zongzhi/attack/" + id,
    method: "get",
  });
}

// 新增地区受攻击
export function addAttack(data) {
  return request({
    url: "/zongzhi/attack",
    method: "post",
    data: data,
  });
}

// 修改地区受攻击
export function updateAttack(data) {
  return request({
    url: "/zongzhi/attack",
    method: "put",
    data: data,
  });
}

// 删除地区受攻击
export function delAttack(id) {
  return request({
    url: "/zongzhi/attack/" + id,
    method: "delete",
  });
}

// 导出地区受攻击
export function exportAttack(data) {
  return request({
    url: "/zongzhi/attack/export",
    method: "post",
    data,
  });
}
