import request from '@/utils/request'
// 查询元器件列表
export function listComponent(query) {
  return request({
    url: '/biz/component/list',
    method: 'get',
    params: query
  })
}

// 查询元器件详细
export function getComponent(id) {
  return request({
    url: '/biz/component/' + id,
    method: 'get'
  })
}

// 新增元器件
export function addComponent(data) {
  return request({
    url: '/biz/component',
    method: 'post',
    data: data
  })
}

// 修改元器件
export function updateComponent(data) {
  return request({
    url: '/biz/component',
    method: 'put',
    data: data
  })
}

// 删除元器件
export function delComponent(id) {
  return request({
    url: '/biz/component/' + id,
    method: 'delete'
  })
}
//实现下拉框选择
export function getall() {
  return request({
    url: '/biz/component/all',
    method: 'get'
  })
}
