import request from '@/utils/request'

// 查询工业流程图列表
export function listProcess(query) {
  return request({
    url: '/safe/process/list',
    method: 'get',
    params: query
  })
}

// 查询工业流程图详细
export function getProcess(processId) {
  return request({
    url: '/safe/process/' + processId,
    method: 'get'
  })
}

// 新增工业流程图
export function addProcess(data) {
  return request({
    url: '/safe/process',
    method: 'post',
    data: data
  })
}

// 修改工业流程图
export function updateProcess(data) {
  return request({
    url: '/safe/process',
    method: 'put',
    data: data
  })
}

// 删除工业流程图
export function delProcess(processId) {
  return request({
    url: '/safe/process/' + processId,
    method: 'delete'
  })
}

// 导出工业流程图
export function exportProcess(query) {
  return request({
    url: '/safe/process/export',
    method: 'get',
    params: query
  })
}
