import request from '@/utils/request'

// 查询装置列表
export function listPlant(query) {
  return request({
    url: '/base/plant/list',
    method: 'get',
    params: query
  })
}

// 查询装置详细
export function getPlant(id) {
  return request({
    url: '/base/plant/' + id,
    method: 'get'
  })
}

// 新增装置
export function addPlant(data) {
  return request({
    url: '/base/plant',
    method: 'post',
    data: data
  })
}

// 修改装置
export function updatePlant(data) {
  return request({
    url: '/base/plant',
    method: 'put',
    data: data
  })
}

// 删除装置
export function delPlant(id) {
  return request({
    url: '/base/plant/' + id,
    method: 'delete'
  })
}

export function getAllPlantName() {
  return request({
    url: '/base/plant/allPlantName',
    method: 'get'
  })
}
export function handleApprove(data) {
  return request({
    url: '/base/plant/handleApprove',
    method: 'put',
    data:data
  })
}
