import request from "@/utils/request";

// 查询安全隐患列表
export function listDanger(query) {
  return request({
    url: "/zongzhi/danger/list",
    method: "get",
    params: query,
  });
}

// 查询安全隐患详细
export function getDanger(id) {
  return request({
    url: "/zongzhi/danger/" + id,
    method: "get",
  });
}

// 新增安全隐患
export function addDanger(data) {
  return request({
    url: "/zongzhi/danger",
    method: "post",
    data: data,
  });
}

// 修改安全隐患
export function updateDanger(data) {
  return request({
    url: "/zongzhi/danger",
    method: "put",
    data: data,
  });
}

// 删除安全隐患
export function delDanger(id) {
  return request({
    url: "/zongzhi/danger/" + id,
    method: "delete",
  });
}

// 导出安全隐患
export function exportDanger(data) {
  return request({
    url: "/zongzhi/danger/export",
    method: "post",
    data,
  });
}
