import {ElementColumnsList, ResPage, ResultData} from "@/api/interface/index";
import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";


/**
 * @name 实时监测报警模块
 */
// 获取自动站基本信息
export const getPlatformList = (params: {}) => {
  return http.post<ResPage<any>>(PORT1 + `/queryasinfo`, params,{ loading: false });
};

//查询所有人工要素字典表
export const getRgDataList = () => {
  return http.post<ResPage<ElementColumnsList[]>>(PORT1 + `/queryalldataList`);
};



//查询观测要素
export const getDataItemList = (params:{}) => {
  return http.post<ResPage<any>>(PORT1 + `/querydataitem`,params,{ loading: false });
};

//查询观测要素
export const getDataItemList2 = (params:{}) => {
  return http.post<ResPage<any>>(PORT1 + `/querydataitem`,params);
};


//根据条件查询危险天气记录表
export const getTacRecordList = (params:{}) => {
  return http.post<ResPage<any>>(PORT1 + `/querytactrecordlist`,params);
};


//查询所有自动站部件字典
export const getYallSensorList = () => {
  return http.post<ResPage<any>>(PORT1 + `/queryallsensorlist`);
};


//查询工况数据
export const getStaitemList = (params:{}) => {
  return http.post<ResPage<any>>(PORT1 + `/querystaitem`,params);
};


//查询所有自动站部件字典
export const getQuerCertList = (params:{}) => {
  return http.post<ResPage<any>>(PORT1 + `/queryascalinfolist`,params);
};

// 统计到报率
export const getArriveList = (params:{}) => {
  return http.post<ResPage<any>>(PORT1 + `/censusdataarrive`,params);
};

// 统计自动站定检证书
export const getCertificateList = () => {
  return http.post<ResPage<any>>(PORT1 + `/censusascalinfomap`);
};

// 获取FTP链接状态
export const getFTPList = () => {
  return http.post<ResPage<any>>(PORT1 + `/censusftpstate`);
};

//获取所有系统配置【queryallsysitem】
export const getQueryAllSysItem = () => {
  return http.post<ResPage<any>>(PORT1 + `/queryallsysitem`);
};

//获取所有北斗通信机【queryallbeidouitem】
export const getBeidouAllSysItem = () => {
  return http.post<ResPage<any>>(PORT1 + `/queryallbeidouitem`);
};

//获取所有FTP连接【queryallftpitem】
export const getFTPAllSysItem = () => {
  return http.post<ResPage<any>>(PORT1 + `/queryallftpitem`);
};

// 获取站点维护记录查询结果
export const getMaintainrecordList = (params:{}) => {
  return http.post<ResPage<any>>(PORT1 + `/querymaintainrecord`,params);
};

//查询用户
export const getUserList = () => {
  return http.post<ResPage<any>>(PORT1 + `/queryalluserpacket`);
};


//获取自动站编报项目设置【queryaspacket】
export const getYaspacketList = (params:{}) => {
  return http.post<ResPage<any>>(PORT1 + `/queryaspacket`,params);
};


//获取自动站策略信息【queryastactlist】
export const getAstactList = (params:{}) => {
  return http.post<ResPage<any>>(PORT1 + `/queryastactlist`,params);
};



//获取自动站均值信息【queryasaverage】
export const getYasaverag = (params:{}) => {
  return http.post<ResPage<any>>(PORT1 + `/queryasaverage`,params);
};


//获取自动站阈值信息【queryasthreshold】
export const getYasthreshold = (params:{}) => {
  return http.post<ResPage<any>>(PORT1 + `/queryasthreshold`,params);
};


//获取自动站均值信息【queryasaverage】
export const getYasaverage= (params:{}) => {
  return http.post<ResPage<any>>(PORT1 + `/queryasaverage`,params);
};


// 获取观测要素
export const getYassensorlist= (params:{}) => {
  return http.post<ResPage<any>>(PORT1 + `/queryassensorlist`,params);
};

// 获取观测要素字典
export const getAllpartlist= () => {
  return http.post<ResPage<any>>(PORT1 + `/queryallpartlist`);
};

//获取自动站通信信息【queryascomm】
export const getYascomm= (params:{}) => {
  return http.post<ResPage<any>>(PORT1 + `/queryascomm`,params,{ loading: false });
};

//查询所有自动站状态【queryasstatelist】
export const getAs_status= () => {
  return http.post<ResPage<any>>(PORT1 + `/queryasstatelist`,{ loading: false });
};
