import request from '@/utils/request'

// 创建Bpm 任务规则
export function createTaskAssignRule(data) {
  return request({
    url: '/bpm/task-assign-rule/create',
    method: 'post',
    data: data
  })
}

// 更新Bpm 任务规则
export function updateTaskAssignRule(data) {
  return request({
    url: '/bpm/task-assign-rule/update',
    method: 'put',
    data: data
  })
}

// 删除Bpm 任务规则
export function deleteTaskAssignRule(id) {
  return request({
    url: '/bpm/task-assign-rule/delete?id=' + id,
    method: 'delete'
  })
}

// 获得Bpm 任务规则
export function getTaskAssignRule(id) {
  return request({
    url: '/bpm/task-assign-rule/get?id=' + id,
    method: 'get'
  })
}

// 获得Bpm 任务规则分页
export function getTaskAssignRulePage(params) {
  return request({
    url: '/bpm/task-assign-rule/page',
    method: 'get',
    params
  })
}
// 导出Bpm 任务规则 Excel
export function exportTaskAssignRuleExcel(params) {
  return request({
    url: '/bpm/task-assign-rule/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}