import request from '@/utils/request';

/**
 * 查询设备列表
 * @param query
 * @returns {*}
 */

export const listDevice = (query) => {
  return request({
    url: '/jdyw/device/list',
    method: 'get',
    params: query
  });
};
/**
 * 查询设备信息详细
 * @param id
 */
export const getDevice = (id) => {
  return request({
    url: '/jdyw/device/' + id,
    method: 'get'
  });
};

/**
 * 新增设备信息
 * @param data
 */
export const addDevice = (data) => {
  return request({
    url: '/jdyw/device',
    method: 'post',
    data: data
  });
};

/**
 * 修改设备信息
 * @param data
 */
export const updateDevice = (data) => {
  return request({
    url: '/jdyw/device',
    method: 'put',
    data: data
  });
};

/**
 * 删除设备类型信息
 * @param id
 */
export const delDevice = (id: string | number | Array<string | number>) => {
  return request({
    url: '/jdyw/device/' + id,
    method: 'delete'
  });
};
