/*
 * @Author: SunTao 328867980@qq.com
 * @Date: 2024-10-24 15:03:28
 * @LastEditors: SunTao 328867980@qq.com
 * @LastEditTime: 2024-12-23 09:33:37
 * @FilePath: \znxjxt-ui\src\api\xj\screen\index.js
 * @Description: 大屏首页接口
 */
import request from "@/utils/request";

// 获取数据栏右上角选择数据接口
export function selectTypeList(query) {
  return request({
    url: "/bigscreen/getSwitch",
    method: "get",
    params: query,
  });
}

// v1
// 获取地图打点数据接口
// export function mapPointList(query) {
//   return request({
//     url: "/bigscreen/getMapPoint",
//     method: "get",
//     params: query,
//   });
// }
export function mapPointList(query) {
  return request({
    url: "/bigscreen/v2/getMapPoint",
    method: "get",
    params: query,
  });
}

// 获取地图绘制线段数据接口
export function mapLineList(query) {
  return request({
    url: "/roadline/getLine",
    method: "get",
    params: query,
  });
}

//  获取图片背景下地图坐标信息
export function comppanyImg(params) {
  return request({
    url: "/bigscreen/v2/getCompanyInfo",
    method: "get",
    params,
  });
}


// v1
// 获取病害筛选弹窗列表数据
// export function defeaseList(data) {
//   return request({
//     url: "/bigscreen/getCurrentDefectPage",
//     method: "post",
//     data,
//   });
// }

// 获取病害筛选弹窗列表数据
export function defeaseList(data) {
  return request({
    url: "/bigscreen/v2/getCurrentDefectPage",
    method: "post",
    data,
  });
}

// 获取病害筛选病害日志路线下拉数据
export function getDefectDropDown(params) {
  return request({
    url: "/xj/route/listDropDown",
    method: "get",
    params,
  });
}

//   获取病害筛选弹窗路段下拉数据
// export function getSegment(data) {
//   return request({
//     url: "/bigscreen/selectIdList",
//     method: "post",
//     data,
//   });
// }
export function getSegment(data) {
  return request({
    url: "/bigscreen/v2/selectIdList",
    method: "post",
    data,
  });
}

// 病害筛选根据点击的详情查图片详情
export function getMediaIndex(data){
  return request({
    url: "/bigscreen/v2/getTableIndex",
    method: "post",
    data,
  });
}

// 根据选择的按钮类型查下级选项框
export function getItemTypes(query) {
  return request({
    url: "/bigscreen/v2/getAllDefectType",
    method: "get",
    params: query,
  });
}

// 获取地图右上角路段下拉数据
export function getRoadListTypes() {
  return request({
    url: "/api/v2/segment/selectList",
    method: "post",
  });
}

// 获取病害类型筛选级联下拉
export function getDefectTypes() {
  return request({
    url: "/bigscreen/v2/getDefectTypesDrowDown",
    method: "get",
  });
}

// 获取大屏通知列表
export function getNoticeList(params) {
  return request({
    url: "/notice/list",
    method: "get",
    params,
  });
}

//获取大屏工单信息
export function getWorkOrderList(params) {
  return request({
    url: "/bigscreen/v2/getMaintenanceCount",
    method: "get",
    params,
  });
}
