import { defHttp } from '/@/utils/http/axios';

const locationType = { debuggerApi: true };

// 流域信息
// 查流域信息
export function getBasinInformationPage(params) {
  return defHttp.get({
    ...locationType,
    url: `/hdinfo/page`,
    params,
  });
}
// 删流域信息
export function deleBasinInformationByIds(ids) {
  return defHttp.delete({
    ...locationType,
    url: `/hdinfo/deleteByIds?ids=${ids}`,
    // data,
  });
}
// 新增流域信息
export function addBasinInformation(params,isUpdate) {
  // debugger
  return defHttp[isUpdate ? 'put' : 'post']({
    ...locationType,
    url: `/hdinfo`,
    params,
  });
}

// 工程信息
// 查工程信息
export function getProjectInfoPage(params) {
  return defHttp.get({
    ...locationType,
    url: `/gcbaseinfo/page`,
    params,
  });
}
// 删工程信息
export function deleProjectInfoByIds(ids) {
  return defHttp.delete({
    ...locationType,
    url: `/gcbaseinfo/deleteByIds?ids=${ids}`,
    // data,
  });
}

// 天空一体监测
// 查天空一体监测
export function getSkyInspectionPage(params) {
  return defHttp.get({
    ...locationType,
    url: '/jcgltkjcsj/page',
    params,
  });
}
// 删天空一体监测
export function deleSkyInspectionByIds(ids) {
  return defHttp.delete({
    ...locationType,
    url: `/jcgltkjcsj/deleteByIds?ids=${ids}`,
    // data,
  });
}

// // 多元数据接入
// export function getmuSourcePage(params) {
//   return defHttp.get(
//     {
//       ...locationType,
//       url: '/yxBase/dzsbsjjr/page',
//       params,
//     },
//     {
//       joinPrefix: false,
//     }
//   );
// }

// 地灾一张卡
// 查地灾一张卡
export function getDisasterInformationCardPage(params) {
  return defHttp.get({
    ...locationType,
    url: '/dzdxinfo/page',
    params,
  });
}

// 删地灾一张卡
export function deleDisasterInformationCardByIds(ids) {
  return defHttp.delete({
    ...locationType,
    url: `/dzdxinfo/deleteByIds?ids=${ids}`,
    // data,
  });
}
