import request from "@/utils/request";

// 查询项目列表
export function listProjectUser(query) {
  return request({
    url: "/iot/project_user/list",
    method: "get",
    params: query
  });
}

// 查询没有被绑定的用户
export function listProjectNotUsed(query) {
  return request({
    url: "/iot/project_user/not-used",
    method: "get",
    params: query
  });
}

// 新增项目用户
export function addProjectUser(data) {
  return request({
    url: "/iot/project_user",
    method: "post",
    data: data
  });
}

// 删除项目用户
export function delProjectUser(projectId, userIds) {
  return request({
    url: "/iot/project_user/" + projectId +  '/' + userIds,
    method: "delete"
  });
}

// 导出项目用户列表
export function exportProjectUser(query) {
  return request({
    url: "/iot/project_user/export",
    method: "get",
    params: query
  });
}
