import request from "@/utils/request";

// 路面状况排名接口
export function roadRankList(query) {
  return request({
    url: "/bigscreen/getDefectCountRanking",
    method: "get",
    params: query,
  });
}

// 病害趋势柱状图接口
export function roadTrends(query) {
  return request({
    url: "/bigscreen/v2/getHistoryDefect",
    method: "get",
    params: query,
  });
}

// v1
//   今日巡查数据
// export function roadToday(query) {
//   return request({
//     url: "/bigscreen/getInspectionInfo",
//     method: "get",
//     params: query,
//   });
// }
export function roadToday(params) {
  return request({
    url: "/bigscreen/v2/getInspectionInfo",
    method: "get",
    params,
  });
}

// 今日巡查病害弹窗
export function roadTodayDetail(query) {
  return request({
    url: "/bigscreen/v2/getInspectionDetailInfo",
    method: "get",
    params: query,
  });
}

//   pci排名数据
export function roadPic(query) {
  return request({
    url: "/bigscreen/pciRanking",
    method: "get",
    params: query,
  });
}

// v2
// //   病害趋势3维饼图
// export function roadCurrent(query) {
//     return request({
//       url: "/bigscreen/roadStatus",
//       method: "get",
//       params: query,
//     });
//   }

//   病害趋势3维饼图
export function roadCurrent(query) {
  return request({
    url: "/bigscreen/v2/roadStatus",
    method: "get",
    params: query,
  });
}

//   数据栏内右上角下拉框
export function getDropList(query) {
  return request({
    url: "/bigscreen/v2/getDropdownList",
    method: "get",
    params: query,
  });
}

// 获取巡查里程数据
export function getMileage(query) {
  return request({
    url: "/bigscreen/v2/getTaskInfo",
    method: "get",
    params: query,
  });
}

// 获取巡查里程弹窗数据
export function getMileageDetail(query) {
  return request({
    url: "/bigscreen/v2/getTaskDetailInfo",
    method: "get",
    params: query,
  });
}

// 获取巡检车辆数据
export function getCarList(query) {
  return request({
    url: "/bigscreen/v2/getCarList",
    method: "get",
    params: query,
  });
}


// 获取设备直播的url地址
export function getVideoUrl(params) {
  return request({
    url: "/bigscreen/v2/getAiotVideoUrl",
    method: "get",
    params,
  });
}

// 关闭设备的上传视频流
export function closeVideoUrl(params) {
  return request({
    url: "/bigscreen/v2/closeAiotVideo",
    method: "get",
    params,
  });
}


