import request from "@/utils/request";

// 查询设备参数列表
export function listParam(query) {
  return request({
    url: "/iot/param/list",
    method: "get",
    params: query
  });
}

// 查询设备参数详细
export function getParam(sourceId) {
  return request({
    url: "/iot/param/" + sourceId,
    method: "get"
  });
}

// 新增设备参数
export function addParam(data) {
  return request({
    url: "/iot/param",
    method: "post",
    data: data
  });
}

// 修改设备参数
export function updateParam(data) {
  return request({
    url: "/iot/param",
    method: "put",
    data: data
  });
}

// 删除设备参数
export function delParam(sourceId) {
  return request({
    url: "/iot/param/" + sourceId,
    method: "delete"
  });
}

// 导出设备参数
export function exportParam(query) {
  return request({
    url: "/iot/param/export",
    method: "get",
    params: query
  });
}
