import { get, post, PUBLISH_SERVICE } from '@/services/index';
// 获取全部流程
export const WFGetAllFlow = param => get(`${PUBLISH_SERVICE}/WorkFlow/WFGetAllFlow`, param);
// 获取流程节点的信息
export const GetFlowNode = param => get(`${PUBLISH_SERVICE}/WorkFlow/GetFlowNode`, param);
// 创建或更新流程流程
export const CreateFlow = param => post(`${PUBLISH_SERVICE}/WorkFlow/CreateFlow`, param);
// 更新流程名称
export const UpdateFlowGroup = param => post(`${PUBLISH_SERVICE}/WorkFlow/UpdateFlowGroup`, param);
// 查询全部角色对应的人员
export const GetRoleUser = param => post(`${PUBLISH_SERVICE}/WorkFlow/GetRoleUser`, param);
// 查询全部角色对应的人员(新增分组)
export const GetRoleUserNew = param =>
  get(`${PUBLISH_SERVICE}/UserCenter/GetFlowConfigAllRole`, param);
// 获取节点信息
export const GetNodeInfo = param => get(`${PUBLISH_SERVICE}/WorkFlow/GetNodeInfo`, param);
// 创建或修改流程节点
export const CreateOrUpdateNode = param =>
  post(`${PUBLISH_SERVICE}/WorkFlow/CreateOrUpdateNode`, param);
// 保存修改
export const SaveNodeChange = param => post(`${PUBLISH_SERVICE}/WorkFlow/SaveNodeChange`, param);
// 删除流程
export const DeleteFlow = param => get(`${PUBLISH_SERVICE}/WorkFlow/DeleteFlow`, param);
// 获取流程节点级字段
export const GetFormDataSource = param =>
  get(`${PUBLISH_SERVICE}/WorkFlow/GetFormDataSource`, param);
// 规则效验
export const RuleValidation = param => get(`${PUBLISH_SERVICE}/WorkFlow/RuleValidation`, param);

// 获取可选的子事件流程
export const GetSubEventFlows = param => get(`${PUBLISH_SERVICE}/WorkFlow/GetSubEventFlows`, param);
// 获取流程映射表字段信息
export const GetFlowMapFields = param => get(`${PUBLISH_SERVICE}/WorkFlow/GetFlowMapFields`, param);
// 保存单个节点
export const FlowNodeSave = param =>
  post(`${PUBLISH_SERVICE}/WorkFlow/FlowNodeSave/${param.flowID}`, param);
// 删除节点
export const DeleteFlowNode = param => get(`${PUBLISH_SERVICE}/WorkFlow/DeleteFlowNode`, param);
// 批量删除
export const DeleteFlowNodes = param => post(`${PUBLISH_SERVICE}/WorkFlow/DeleteFlowNodes`, param);
// 保存basde65
export const SaveWorkFlowImage = param =>
  post(`${PUBLISH_SERVICE}/FileCenter/SaveWorkFlowImage`, param);
