import request from "@/utils/request";

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

// 查询归档类型详细
export function getType(archiveTypeId) {
  return request({
    url: "/archive/type/" + archiveTypeId,
    method: "get",
  });
}

// 新增归档类型
export function addType(data) {
  return request({
    url: "/archive/type",
    method: "post",
    data: data,
  });
}

// 修改归档类型
export function updateType(data) {
  return request({
    url: "/archive/type",
    method: "put",
    data: data,
  });
}

// 删除归档类型
export function delType(archiveTypeId) {
  return request({
    url: "/archive/type/" + archiveTypeId,
    method: "delete",
  });
}
// 可以发起的流程列表.
export function allFlows(domain) {
  return request({
    url: "/jflow/restful/DB_allFlows",
    params: {
      domain: domain,
    },
    method: "get",
  });
}
// 获取所有的流程信息.
export function allJoinOneFlows(query) {
  return request({
    url: "/jflow/restful/allJoinOneFlows",
    method: "get",
    params: query,
  });
}
//删除指定流程及内容
export function deleteFlow(workId) {
  return request({
    url: "/jflow/restful/delWorkById",
    method: "get",
    params: {
      workId: workId,
    },
  });
}
