import { get, post } from '@/api/request';

const env = import.meta.env;
const PREFIX = env.VITE_API_PREFIX_SYSTEM;

// 查询流程模版
export const systemApproveQueryApproveFlowTempalteApi = (params: any) => {
  return get(`${PREFIX}systemApprove/queryApproveFlowTempalte`, params);
};

// 流程状态-跟cid返回一样
export const systemQueryNewApproveFlowStatusApi = (params: any) => {
  return get(`${PREFIX}systemApprove/queryNewApproveFlowStatus`, params);
};

// 流程详情
export const systemQueryApproveInstanceApi = (params: any) => {
  return get(`${PREFIX}systemApprove/queryApproveInstance`, params);
};

// 获取任务id
export const systemQueryGetTaskIdByNodeIdApi = (params: any) => {
  return get(`${PREFIX}systemApprove/getTaskIdByNodeId`, params);
};

// 添加模块评审流程映射
export const systemQueryAddApproveFlowMapApi = (params: any) => {
  return post(`${PREFIX}systemApprove/addApproveFlowMap`, params);
};

// 获取模块评审流程映射
export const systemQueryAllApproveFlowMapApi = (params: any) => {
  return get(`${PREFIX}systemApprove/queryAllApproveFlowMap`, params);
};

// 更新模块评审流程映射
export const systemUpdateApproveFlowMapApi = (params: any) => {
  return post(`${PREFIX}systemApprove/updateApproveFlowMap`, params);
};

// 删除模块评审流程映射
export const systemDeleteApproveFlowMapApi = (params: any) => {
  return get(`${PREFIX}systemApprove/deleteApproveFlowMap`, params);
};
