import request from "@/router/axios";

//获取所有有效项目
export const queryProjectList = (params) => {
  return request({
    url: "/api/blade-manager/signPfxFile/queryProjectList",
    method: "get",
    params,
  });
};

//分页获取证书列表数据
export const listpage = (params) => {
  return request({
    url: "/api/blade-manager/signPfxFile/page",
    method: "get",
    params,
  });
};

//注册
export const goRegister = (data) => {
  return request({
    url: "/api/blade-manager/signPfxFile/goRegister",
    method: "post",
    data,
  });
};

//删除数据
export const remove = (data) => {
  return request({
    url: "/api/blade-manager/signPfxFile/remove",
    method: "post",
    params: data,
  });
};

//获取详情数据
export const getById = (data) => {
  return request({
    url: "/api/blade-manager/signPfxFile/getById",
    method: "post",
    params: data,
  });
};

//新增
export const save = (data) => {
  return request({
    url: "/api/blade-manager/signPfxFile/save",
    method: "post",
    data,
  });
};

//获取当前系统下所有用户
export const findUserByName = (params) => {
  return request({
    url: "/api/blade-manager/signPfxFile/findUserByName",
    method: "get",
    params,
  });
};

//获取角色方
export const queryRole = (params) => {
  return request({
    url: "/api/blade-manager/signPfxFile/queryRole",
    method: "get",
    params,
  });
};

//获取项目和合同段
export const queryProjectAndContract = (params) => {
  return request({
    url: "/api/blade-manager/signPfxFile/queryProjectAndContract",
    method: "get",
    params,
  });
};

//上传图片
export const addFileInfo = (data) => {
  return request({
    url: "/api/blade-resource/client/addFileInfo",
    method: "post",
    data,
  });
};

//上传签名体图片
export const compressAndUpload = (data) => {
  return request({
    url: "/api/blade-manager/signPfxFile/compressAndUpload",
    method: "post",
    data,
  });
};

//修改
export const update = (data) => {
  return request({
    url: "/api/blade-manager/signPfxFile/update",
    method: "post",
    data,
  });
};

export const findPfxType = (params) => {
  return request({
    url: "/api/blade-business/task/query-task-type-status",
    method: "get",
    params,
  });
};

export const getPriwbsPdf = (pkeyId) => {
  return request({
    url: "/api/blade-manager/exceltab/get-priwbs-pdf",
    method: "get",
    params: { pkeyId },
  });
};

export const picPresave = (form) => {
  return request({
    url: "/api/blade-manager/signPfxFile/picPresave",
    method: "post",
    data: form,
  });
};

export const prePicture = (form) => {
  return request({
    url: "/api/blade-manager/signPfxFile/prePicture",
    method: "post",
    data: form,
  });
};

// 获取状态统计接口
export const getTaskBatchCount = (form) => {
  return request({
    url: "/api/blade-business/taskBatch/count",
    method: "post",
    data: form,
  });
};

// 电签监控-运行中接口
export const getTaskBatchPage = (form) => {
  return request({
    url: "/api/blade-business/taskBatch/page",
    method: "post",
    data: form,
  });
};

// 电签监控-排队中接口
export const getTaskBatchPageOrder = (form) => {
  return request({
    url: "/api/blade-business/taskBatch/pageOrder",
    method: "post",
    data: form,
  });
};