import request from "@/utils/request";
// 岗检方案接口
// 修改
export function updateProgramme(data) {
  return request({
    url: "/postCheck/programme",
    method: "put",
    data: data,
  });
}

// 新增
export function addProgramme(data) {
  return request({
    url: "/postCheck/programme",
    method: "post",
    data: data,
  });
}

// 查询详细
export function getProgramme(Id) {
  return request({
    url: "/postCheck/programme/" + Id,
    method: "get",
  });
}
// 删除
export function delProgramme(Id) {
  return request({
    url: "/postCheck/programme/" + Id,
    method: "delete",
  });
}

// 查询列表
export function listProgramme(query) {
  return request({
    url: "/postCheck/programme/list",
    method: "get",
    params: query,
  });
}

// 岗检方案模版接口
// 修改
export function updateProgrammeTemplate(data) {
    return request({
      url: "/postCheck/programmeTemplate",
      method: "put",
      data: data,
    });
  }

  // 新增
  export function addProgrammeTemplate(data) {
    return request({
      url: "/postCheck/programmeTemplate",
      method: "post",
      data: data,
    });
  }

  // 查询详细
  export function getProgrammeTemplate(Id) {
    return request({
      url: "/postCheck/programmeTemplate/" + Id,
      method: "get",
    });
  }
  // 删除
  export function delProgrammeTemplate(Id) {
    return request({
      url: "/postCheck/programmeTemplate/" + Id,
      method: "delete",
    });
  }

  // 查询列表
  export function listProgrammeTemplate(query) {
    return request({
      url: "/postCheck/programmeTemplate/list",
      method: "get",
      params: query,
    });
  }
// 岗检方案审核-HR
export function approveHr(data) {
  return request({
    url: "/postCheck/programme/approveHr",
    method: "put",
    params: data,
  });
}
// 岗检方案审核-Icfa
export function approveIcfa(data) {
  return request({
    url: "/postCheck/programme/approveIcfa",
    method: "put",
    params: data,
  });
}
  // 查询列表
  export function getBase64(query) {
    return request({
      url: "/common/getBase64",
      method: "get",
      params: query,
    });
  }
// 启用/禁用
export function approve(data) {
  return request({
    url: "/postCheck/programmeTemplate/approve",
    method: "put",
    params: data,
  });
}

// 发送邮件
export function sendMailFile(params) {
  return request({
    url: "/postCheck/postSendMail/sendMailFile",
    method: "get",
    params
  });
}
