import request from '@/utils/request'

// 分页列表
export function List(query) {
  return request({
    url: `/device/manage/list/page`,
    method: 'get',
    params: query
  })
}

// 设备详情
export function Detail(query) {
  return request({
    url: `/device/manage/view`,
    method: 'get',
    params: query
  })
}

// 删除设备
export function Delete(id) {
  return request({
    url: `/device/manage/${id}`,
    method: 'delete'
  })
}

// 添加设备
export function Add(data) {
  return request({
    url: `/device/manage/add`,
    method: 'post',
    data: data
  })
}

// 编辑设备
export function Edit(data) {
  return request({
    url: `/device/manage/edit`,
    method: 'post',
    data: data
  })
}

// 上下架
export function upDown(data){
  return request({
    url: `/device/manage/batchChangerStatus`,
    method: 'post',
    data
  })
}