import request from '@/utils/request'

// 查询工艺定义列表
export function listDefinition(query) {
  return request({
    url: '/aps_process_definition/definition/list',
    method: 'get',
    params: query
  })
}

// 查询工艺定义详细
export function getDefinition(id) {
  return request({
    url: '/aps_process_definition/definition/' + id,
    method: 'get'
  })
}

// 新增工艺定义
export function addDefinition(data) {
  return request({
    url: '/aps_process_definition/definition',
    method: 'post',
    data: data
  })
}

// 修改工艺定义
export function updateDefinition(data) {
  return request({
    url: '/aps_process_definition/definition',
    method: 'put',
    data: data
  })
}

// 删除工艺定义
export function delDefinition(id) {
  return request({
    url: '/aps_process_definition/definition/' + id,
    method: 'delete'
  })
}
