config.js 2.5 KB
import {
  get,
  put,
  post
} from '../../utils/http'
// 查询模型配置信息
export function getLayouts(typeKey, layoutType) {
  return new Promise(async(resolve, reject) => {
    get('/DxModelComponent/findModelComponent', { modelDefName: typeKey, layoutType }).then(res => {
      if (res.items && res.items.content) {
        resolve({
          items: res.items.content
        })
      }
    })
  })
}
// 保存PR/ECR/ECN
export function saveModel(modeName, form) {
  return put(`/${modeName}`, form)
}
// 保存文档
export function editDoc(params) {
  return put('/DxDocument', params)
}
// 查询文档详情
export function getDocDetail(params) {
  return get('DxDocument/detail', params)
}
// 获取流程中CA数据
export function getCADetail(params) {
  return post('/DxChangeNotice/find/recursion', params)
}
// 获取CA数据
export function getCAWorkflowData(params) {
  return post('/DxChangeActivity/find/recursion', params)
}
// 删除CA数据
export function batchCAData(params) {
  return post('/DxChangeActivity/recursion', params)
}
// 保存CA数据
export function saveCAData(params) {
  return post('/DxChangeActivity/recursion', params)
}
// 获取类型数据
export function getModelTree(params) {
  return get('/ModelDefinition/all/base/tree', params)
}
// 获取待办任务列表
export function getUnfinishedTask(params) {
  return get('/workflow/task/todo', params)
}
// 获取待领取任务列表
export function getUnclaimedTask(params) {
  return get('/workflow/task/unclaimed', params)
}
// 查询业务处理表单
export function getBizForm(params) {
  return get('/workflow/task/getBizForm', params)
}
// 完成任务
export function completeTask(params) {
  return post('/workflow/template/operation', params)
}
// 加签减签
export function changeExamination(params) {
  return post('/workflow/template/operation', params)
}
// 获取可减签人员列表
export function getCounterSignDeleteList(params) {
  return get(`/workflow/activity/getCounterSignDeleteList/${params}`)
}
// 根据pbo查询流程实例列表
export function getWFInsts(params) {
  return post(`/workflow/inst`, params)
}
// 查询流程任务历史
export function getInstTaskHisTory(instId, page, size) {
  if (page && size) {
    return get(`/workflow/task/hisTaskList`, {
      instId: instId,
      page,
      size
    })
  } else {
    return get(`/workflow/task/hisTaskList`, {
      instId: instId
    })
  }
}
// 任务关联附件
export function taskAttachment(params) {
  return post(`/workflow/task/attachment`, params)
}