import { defHttp } from '@/utils/http/axios';
enum Api {
  GetDataList = '/api/Manage/GetDataList',
  EditDronePort = '/api/Manage/EditDronePort',
  DeleteDronePort = '/api/Manage/DeleteDronePort',
  GetUavPageList = '/api/Manage/GetUavPageList',
  EditUav = '/api/Manage/EditUav',
  DeleteUav = '/api/Manage/DeleteUav',
  GetGateway = '/api/AirportMaintenance/GetGateway',
  GetManageDeviceHmsList = '/api/AirportMaintenance/GetManageDeviceHmsList',
}

export function GetDataList(params) {
  return defHttp.get({
    url: Api.GetDataList,
    params
  });
}
export function GetUavPageList(params) {
  return defHttp.get({
    url: Api.GetUavPageList,
    params
  });
}
export function EditDronePort(params) {
  return defHttp.post({
    url: Api.EditDronePort,
    data:params
  });
}
export function EditUav(params) {
  return defHttp.post({
    url: Api.EditUav,
    data:params
  });
}
export function DeleteDronePort(id: string) {
  return defHttp.post({
    url: `${Api.DeleteDronePort}?id=${id}`,
  });
}
export function DeleteUav(id: string) {
  return defHttp.post({
    url: `${Api.DeleteUav}?id=${id}`,
  });
}
export function GetGateway() {
  return defHttp.post({
    url:  Api.GetGateway,
  });
}
export function GetManageDeviceHmsList(params) {
  return defHttp.get({
    url:  Api.GetManageDeviceHmsList,
    params
  });
}