import request from "@/utils/request";

// 查询等保单位列表
export function listUnit(query) {
  return request({
    url: "/zongzhi/dengbaounit/list",
    method: "get",
    params: query,
  });
}

// 查询等保单位详细
export function getUnit(id) {
  return request({
    url: "/zongzhi/dengbaounit/" + id,
    method: "get",
  });
}

// 新增等保单位
export function addUnit(data) {
  return request({
    url: "/zongzhi/dengbaounit",
    method: "post",
    data: data,
  });
}

// 修改等保单位
export function updateUnit(data) {
  return request({
    url: "/zongzhi/dengbaounit",
    method: "put",
    data: data,
  });
}

// 删除等保单位
export function delUnit(id) {
  return request({
    url: "/zongzhi/dengbaounit/" + id,
    method: "delete",
  });
}

// 导出等保单位
export function exportUnit(data) {
  return request({
    url: "/zongzhi/dengbaounit/export",
    method: "post",
    data,
  });
}
