/*
 * @Author: Z 1518051043@qq.com
 * @Date: 2025-12-08 17:37:05
 * @LastEditors: zwy 1518051043@qq.com
 * @LastEditTime: 2026-01-04 09:56:36
 * @FilePath: \yuanxinPro\src\api\Zodiac.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%A
 */

import request from "@/utils/request";
import { pa } from "element-plus/es/locales.mjs";
// 左侧菜单-星座构型信息
export function stellationInfoApi() {
  return request({
    url: "/constellationInfo/list",
    method: "get",
  });
}
//时间
export function timeInfoApi() {
  return request({
    url: "/time/time",
    method: "get",
  });
}
// 左侧菜单-卫星列表信息
export function stellateListInfoApi() {
  return request({
    url: "/SatelliteBasicInfo/list",
    method: "get",
  });
}
// 左侧菜单-地面系统信息
export function siteDataInfoListApi() {
  return request({
    url: "/SiteData/list",
    method: "get",
  });
}

export function siteDataPageErrorInfoApi(data) {
  return request({
    url: "/SiteData/pageError",
    method: "post",
    params: data,
  });
}

export function groundSystemStatisticsInfoApi() {
  return request({
    url: "/GroundSystem/statistics",
    method: "get",
  });
}

export function subSystemStatisticsInfoApi() {
  return request({
    url: "/GroundSystem/statistics",
    method: "get",
    // data: data
  });
}

export function getSubSystemOpitionListApi(data) {
  return request({
    url: "/subSystem/getSubSystem?subSystemType=" + data.subSystemType,
    method: "get",
  });
}

//  //console.log("propsDate-min--3333333333--------",{
//     endTime: historyTimeDateRange.value[1],
//     satelliteId: useAppStoreInstance.globalSatelliteSearchID==='0'? "4097": (useAppStoreInstance.globalSatelliteSearchID),
//     startTime: historyTimeDateRange.value[0],
//     subSystemType: arcHistorySubSystemOptions[arcHistoryActiveIndex.value],
//     code: historyCode.value,
//   });
export function getSubSystemCurveListApi(data) {
  return request({
    url:
      "/subSystem/getSubSystemCurve?satelliteId=" +
      data.satelliteId +
      "&startTime=" +
      data.startTime +
      "&endTime=" +
      data.endTime +
      "&code=" +
      data.code +
      "&subSystemType=" +
      data.subSystemType,
    method: "get",
  });
}

//配置模板中的区域数据
export function getRegionPanel() {
  return request({
    url: "/commPanel/getRegionPanel",
    method: "get",
  });
}

//配置模板中的信关站数据
export function getSignalSitePanel() {
  return request({
    url: "/commPanel/getSignalSitePanel",
    method: "get",
  });
}

//配置模板中的网格数据
export function getGridPanel() {
  return request({
    url: "/commPanel/getGridPanel",
    method: "get",
  });
}

// 容量数据
export function getCapacity(data) {
  return request({
    url: "/commPanel/getCapacity",
    method: "get",
    params: data,
  });
}

//流量
export function getTraffic(data) {
  return request({
    url: "/commPanel/getTraffic",
    method: "get",
    params: data,
  });
}

//规划可用性
export function getAvailability(data) {
  return request({
    url: "/commPanel/getAvailability",
    method: "get",
    params: data,
  });
}

//接入时延(搜星)
export function getDelay(data) {
  return request({
    url: "/commPanel/getDelay",
    method: "get",
    params: data,
  });
}

//丢包率获取
export function getLossRate(data) {
  return request({
    url: "/commPanel/getLossRate",
    method: "get",
    params: data,
  });
}

//格网数据
export function getGridInfoList() {
  return request({
    url: "/GridInfo/list",
    method: "get",
  });
}

//模板配置列表
export function getTemplateList() {
  return request({
    url: "/templateApi/list",
    method: "get",
  });
}

//模板配置新增
export function templateAdd(data) {
  return request({
    url: "/templateApi/add",
    method: "post",
    data,
  });
}
//模板配置删除
export function templateDel(data) {
  return request({
    url: "/templateApi/delete",
    method: "get",
    params: {
      templateId: data.templateId,
    },
  });
}

//模板配置详情
export function templateDetail(data) {
  return request({
    url: "/templateApi/detail",
    method: "get",
    params: {
      templateId: data.templateId,
    },
  });
}

//模板配置修改
export function templateuUpdate(data) {
  return request({
    url: "/templateApi/update",
    method: "POST",
    data,
  });
}

export function templateConfigAdd(data) {
  return request({
    url: "/objectApi/add",
    method: "POST",
    data,
  });
}
export function templateConfigQuery() {
  return request({
    url: "/objectApi/queryByIp",
    method: "POST",
  });
}

//获取所有曲线数据
export function getPanelCurve(data) {
  return request({
    url: "/commPanel/getPanelCurve",
    method: "get",
    params: data,
  });
}
