import request from '@/utils/request'

// 查询流程列表
export function listFlow(query) {
  return request({
    url: '/dcs/flow/list',
    method: 'get',
    params: query
  })
}

// 查询流程详细
export function getFlow(flowId) {
  return request({
    url: '/dcs/flow/' + flowId,
    method: 'get'
  })
}

// 新增流程
export function addFlow(data) {
  return request({
    url: '/dcs/flow',
    method: 'post',
    data: data
  })
}

// 修改流程
export function updateFlow(data) {
  return request({
    url: '/dcs/flow',
    method: 'put',
    data: data
  })
}

// 删除流程
export function delFlow(flowId) {
  return request({
    url: '/dcs/flow/' + flowId,
    method: 'delete'
  })
}

//获取流程列表（下拉框）
export function getFlowList(equipmentId) {
  return request({
    url: '/dcs/flow/getFlowList',
    method: 'get',
    params: equipmentId
  })
}