
import {normalCallPost} from '@/assets/utils/index';
// 查询流程表单列表
export function listForm(query,pageInfo) {

  return normalCallPost(
    "/form/list",
     {query:query,pageInfo:pageInfo}
     )
}

// 查询流程表单详细
export function getForm(formId) {
  return normalCallPost(
    "/form/view",
     {id:[formId]}
     )
}

export function addForm() {
  //新增 先要add 获取token后再submit
   return normalCallPost(
     "/form/add",
      {}
      )
 }

// 新增流程表单
export function saveForm(data) {

 //新增 先要add 获取token后再submit
  return normalCallPost(
    "/form/save",
     {entity: data}
     )
}

// 修改流程表单
export function updateForm(data) {
  return normalCallPost(
    "/form/save",
     {entity: data}
     )
}

// 删除流程表单
export function delForm(formId) {
  return normalCallPost(
    "/form/delete",
    {id:[formId]}
     )
}

// 挂载表单(流程部署定义与表单关联)
export function addDeployForm(data) {
  return normalCallPost(
    "/deploy/form/save",
     {entity: data}
     )
}

// 导出流程表单
export function exportForm(query) {
  return normalCallPost(
    "/form/export",
     query
     )
  // return request({
  //   url: '/flowable/form/export',
  //   method: 'get',
  //   params: query
  // })
}
