import request from "@/utils/request";

// 查询归档列表
export function listArchive(query) {
  return request({
    url: "/offcial/archive/list",
    method: "get",
    params: query,
  });
}

// 查询归档详细
export function getArchive(archiveId) {
  return request({
    url: "/offcial/archive/" + archiveId,
    method: "get",
  });
}

// 新增归档
export function addArchive(data) {
  return request({
    url: "/offcial/archive",
    method: "post",
    data: data,
  });
}

// 修改归档
export function updateArchive(data) {
  return request({
    url: "/offcial/archive",
    method: "put",
    data: data,
  });
}

// 删除归档
export function delArchive(archiveId) {
  return request({
    url: "/offcial/archive/" + archiveId,
    method: "delete",
  });
}

// 新增归档
export function saveArchive(data) {
  return request({
    url: "/offcial/archive/save",
    method: "post",
    data: data,
  });
}
// 重新归档
export function rePush(workId) {
  return request({
    url: "/offcial/archive/rePush/" + workId,
    method: "post",
  });
}
