import request from '@/utils/request'

// 查询流程分类列表
export function listCategory(query) {
  return request({
    url: '/activiti/category/list',
    method: 'get',
    params: query
  })
}

// 查询流程分类详细
export function getCategory(id) {
  return request({
    url: '/activiti/category/' + id,
    method: 'get'
  })
}

// 新增流程分类
export function addCategory(data) {
  return request({
    url: '/activiti/category',
    method: 'post',
    data: data
  })
}

// 修改流程分类
export function updateCategory(data) {
  return request({
    url: '/activiti/category',
    method: 'put',
    data: data
  })
}

// 删除流程分类
export function delCategory(id) {
  return request({
    url: '/activiti/category/' + id,
    method: 'delete'
  })
}

// 导出流程分类
export function exportCategory(query) {
  return request({
    url: '/activiti/category/export',
    method: 'get',
    params: query
  })
}

// 修改流程分类
export function updateActCategory(data) {
  return request({
    url: '/activiti/category/act',
    method: 'post',
    params: data
  })
}
