user.js 1.91 KB
import request from '@/plugin/axios'
/**
 * 登录
 */
export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}
/**
 * 获取用户信息
 */
export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}
/**
 * 创建工作流
 */
export function createProcessInstance(data) {
  return request({
    url: '/workflow/createProcessInstance',
    method: 'post',
    data: data
  })
}
/**
 * 流程的预提交
 */
export function pretransitProcess(data) {
  return request({
    url: '/workflow/pretransitProcess',
    method: 'post',
    data: data
  })
}
/**
 * 流程提交
 */
export function transitProcess(data) {
  return request({
    url: '/workflow/transitProcess',
    method: 'post',
    data: data
  })
}
/**
 * 流程回退
 */
export function rollbackProcess(data) {
  return request({
    url: '/workflow/rollbackProcess',
    method: 'post',
    data: data
  })
}
/**
 * 获取流程环节详细信息
 */
export function getActivityDetail(data) {
  return request({
    url: '/workflow/getActivityDetail',
    method: 'post',
    data: data
  })
}
/**
 * 模板加载
 */
export function  templateLoad(data) {
    return request({
        url: '/template/formal/load/'+data,
        method: 'get',
    })
}
/**
 * 获取工作流大纲
 */
export function getProcessOutline(data) {
  return request({
    url: '/workflow/getProcessOutline',
    method: 'get',
    params: {
      processInstanceId:data,
      isCurrent:true
    }
  })
}
/**
 * 流程强制终止
 */
export function termProcess(data) {
  return request({
    url: '/workflow/termProcess',
    method: 'post',
    data: data
  })
}

/**
 * 根据bsm判断是否存在工作流
 */
export function booleanWorkflow(data) {
  return request({
    url: '/qj/workarea/booleanWorkflow',
    method: 'get',
    params: {
      bsm:data,
    }
  })
}