workFlowForm.js 522 Bytes
import request from '@/utils/request'

/**
 * 系统表单详情(如请假 leaveApply)
 * @param {string} key 表单编码,如 leaveApply
 * @param {string} id 流程实例/表单主键(processId)
 */
export function getWorkFlowFormInfo(key, id) {
  const name = String(key || '')
  if (!name || !id) return Promise.reject(new Error('表单参数不完整'))
  const apiKey = name.replace(name[0], name[0].toUpperCase())
  return request({
    url: `/api/workflow/Form/${apiKey}/${id}`,
    method: 'get'
  })
}