import request from '@/utils/request'

//获取设备配件列表
export function devicePartslist(query) {
  return request({
    url: '/deviceParts/list',
    method: 'get',
    baseURL: "/afterSales-api",
    params: query
  })
}

//新增配件
export function devicePartsPost(query) {
  return request({
    url: '/deviceParts',
    baseURL: "/afterSales-api",
    method: 'post',
  })
}

//修改配件
export function devicePartsPut(query) {
  return request({
    url: '/deviceParts',
    baseURL: "/afterSales-api",
    method: 'put',
    data: query
  })
}
//删除配件

export function devicePartsdel(partsId) {
  return request({
    url: '/deviceParts'+partsId,
    method: 'delete',
    baseURL: "/afterSales-api",
  })
}
//场景列表
export function sceneList(query) {
  return request({
    url: '/deviceRepairScene/list',
    method: 'get',
    params: query,
    baseURL: "/afterSales-api",
  })
}
//新增场景
export function deviceRepairPOST(data) {
  return request({
    url: '/deviceRepairScene',
    method: 'post',
    data: data,
    baseURL: "/afterSales-api",
  })
}
//修改场景
export function deviceRepairPUT(data) {
  return request({
    url: '/deviceRepairScene',
    method: 'put',
    data: data,
    baseURL: "/afterSales-api",
  })
}
//删除场景
export function deviceRepairDEL(sceneIds) {
  return request({
    url: '/deviceRepairScene/'+sceneIds,
    method: 'delete',
    baseURL: "/afterSales-api",
  })
}
//查询配件
export function deviceRepairParts(sceneIds) {
  return request({
    url: '/deviceRepairScene/parts/'+sceneIds,
    method: 'get',
    baseURL: "/afterSales-api",
  })
}
