import request from '@/utils/request';

export function getList(data) {
  let param = '?page=' + data.page + '&size=' + data.size;
  if (data.name != undefined && data.name != '') {
    param += '&name=' + data.name;
  }
  return request({
    url: '/iot/project/group/select' + param,
    method: 'get',
    data,
  });
}

export function doDelete(data) {
  return request({
    url: '/iot/project/group/remove?groupId=' + data.groupId,
    method: 'post',
    data,
  });
}

export function remove(data) {
  return request({
    url: '/iot/project/group/remove?groupId=' + data.groupId,
    method: 'post',
    data,
  });
}

export function doAdd(data) {
  return request({
    url: '/iot/project/group/saveOrUpdate',
    method: 'post',
    data,
  });
}
