import request from "@/utils/request";

// 查询设备列表
export function getTerminalList(params) {
  return request({
    url: "/api/aiot/list",
    method: "get",
    params,
  });
}

// 删除作业范围
export function deleteTerminal(query) {
  return request({
    url: "/api/aiot/delete",
    method: "delete",
    data: query,
  });
}

//  新增作业范围
export function addTerminal(query) {
  return request({
    url: "/api/aiot/add",
    method: "post",
    data: query,
  });
}

// 修改作业范围
export function updateTerminal(query) {
  return request({
    url: "/api/v2/segment/update",
    method: "put",
    data: query,
  });
}

// 查询设备详情根据id
export function getTerminalById(id) {
  return request({
    url: "/dev-api/api/aiot/get" + id,
    method: "get",
  });
}
