import request from "@/utils/request";

// 实验室专利成果
export const achievementList = (params) => {
  return request({
    url: `/app/laboratory/achievementList`,
    method: "GET",
    params,
  });
};

// 实验室成果
export const laboratoryAchievementList = (params) => {
  return request({
    url: `/app/laboratory/laboratoryAchievementList`,
    method: "GET",
    params,
  });
};

export const deleteAchievements = (ids) => {
  return request({
    url: `/app/laboratory/deleteAchievements/${ids}`,
    method: "DELETE",
  });
};

// 实验室成果详情
export const achievementInfo = (params) => {
  return request({
    url: `/app/laboratory/achievementInfo`,
    method: "GET",
    params,
  });
};

// 实验室成果新增
export const insertAchievement = (data) => {
  return request({
    url: `/app/laboratory/insertAchievement`,
    method: "POST",
    data,
  });
};

// 实验室成果修改
export const updateAchievement = (data) => {
  return request({
    url: `/app/laboratory/updateAchievement`,
    method: "PUT",
    data,
  });
};

// /app/laboratory/importTemplate
export const labAchievementTemplate = () =>
  request({
    url: "/app/laboratory/importTemplate",
    method: "GET",
    responseType: "blob",
  });
