import request from '@/utils/request'

// 查列表
export function getAllModel() {
  const params = {
    page: 0,
    size: 9999,
    enabled: true
  }
  return request({
    url: 'api/activiti/model/list',
    method: 'get',
    params
  })
}

// 跳创建
export function add(data) {
  return request({
    url: 'api/activiti/model/createModel',
    method: 'get'
  })
}

// 删除(单个)
export function del(ids) {
  return request({
    url: 'api/activiti/model/' + ids,
    method: 'delete'
  })
}

// 跳编辑页面
export function editPage(modelId) {
  return request({
    url: 'api/activiti/model/' + modelId + '/update',
    method: 'get'
  })
}

// 部署流程
export function deploy(modelId) {
  return request({
    url: 'api/activiti/model/' + modelId + '/deploy',
    method: 'get'
  })
}

export default {
  editPage,
  del,
  deploy
}
