/* * @Author: lihui * @Date: 2020-11-17 * @Desc 导出动态请求模块通用 */ import { errorCatcher, errorHandle, filter } from 'base-core-lib' import { appRx } from '../defalutConfig/indexRx' import { API_POST_WF_TEXTLOGIN, API_POST_WF_STARTINSTANCE, API_GET_WF_TASKS, API_POST_WF_CREATE, API_POST_WF_HANDLE, API_GET_WF_TASKHISTORIES, API_GET_WF_APPLICATIONS, API_GET_WF_CANDIDATESTAFFINFO, API_POST_WF_CLAIM, API_GET_WF_ACTIVETASK } from '@/api/V2/servicer' // 登录 export const textLogin = appRx.post(API_POST_WF_TEXTLOGIN, errorCatcher, errorHandle, filter) // 启动流程 export const startInstance = appRx.post(API_POST_WF_STARTINSTANCE, errorCatcher, errorHandle, filter) // 获取任务列表 export const tasks = appRx.get(API_GET_WF_TASKS, errorCatcher, errorHandle, filter) // 创建工作流 export const create = appRx.post(API_POST_WF_CREATE, errorCatcher, errorHandle, filter) /** * @Desc 处理任务 需要使用 动态替换路径 来达到请求的目的 * @default process.env.VUE_APP_API_SERVICER * @param {purchase:process.env.VUE_APP_API_SUPPLY,system||systemManage||ship:process.env.VUE_APP_API_ISM,finance:process.env.VUE_APP_API_FINANCE} */ export const handle = appRx.post(API_POST_WF_HANDLE, errorCatcher, errorHandle, filter) // 获取任务审批历史 export const taskHistories = appRx.get(API_GET_WF_TASKHISTORIES, errorCatcher, errorHandle, filter) // 获取用户申请列表 export const applications = appRx.get(API_GET_WF_APPLICATIONS, errorCatcher, errorHandle, filter) // 任务候选人信息 export const candidateStaffInfo = appRx.get(API_GET_WF_CANDIDATESTAFFINFO, errorCatcher, errorHandle, filter) // 任务签收 export const claim = appRx.post(API_POST_WF_CLAIM, errorCatcher, errorHandle, filter) // 获取当前活动任务 export const activeTask = appRx.get(API_GET_WF_ACTIVETASK, errorCatcher, errorHandle, filter)