import request from "@/utils/request";
const api = "/mosty-api/mosty-yjzl";
const api1 = "/mosty-api/mosty-qwzx";
const api2 = "/mosty-api/mosty-hczx";

// 大屏预警统计
export const getYjCount = (data) => {
  return request({
    url: api + "/tbZl/yjzlTj",
    method: "POST",
    data
  });
};

// 大屏巡防报备统计
export const getXfbbCount = (data) => {
  return request({
    url: api1 + "/tbQwXfbb/xfbbTj",
    method: "POST",
    data
  });
};
// 大屏被盘查人员统计
export const getPcryCount = (data) => {
  return request({
    url: api2 + "/tbHcBpcry/bpcryTj",
    method: "POST",
    data
  });
};
// 大屏被盘查车辆统计
export const getPcclCount = (data) => {
  return request({
    url: api2 + "/tbHcBpccl/bpcclTj",
    method: "POST",
    data
  });
};

//查询指令分页列表
export const selectInstructList = (data) => {
  return request({
    url: api + "/tbZl/selectInstructList",
    method: "POST",
    data
  });
};
export const selectInstructListNew = (params) => {
  return request({
    url: api + "/tbZl/getMyZlList",
    method: "get",
    params
  });
};
export const selectInstructListZfMine = (params) => {
  return request({
    url: api + "/tbZl/getMySendZlList",
    method: "get",
    params
  });
};

//添加执行记录
export const addZxjl = (data) => {
  return request({
    url: api + "/tbZl/addZxjl ",
    method: "POST",
    data
  });
};
//查询指令详情
export const zlInfo = (id) => {
  return request({
    url: api + `/tbZl/${id}`,
    method: "get",
  });
};

//查询指令执行记录
export const getZxjlList = (data) => {
  return request({
    url: api + "/tbZl/getZxjlList",
    method: "get",
    params: data
  });
};

//指令中心--首页指令状态统计信息
export const ZlZtTjxx = (data) => {
  return request({
    url: api + `/tbZlxxtj/ZlZtTjxx`,
    method: "get",
    params: data
  });
};
//指令中心--首页指令等级统计信息
export const zlDjtjxx = (data) => {
  return request({
    url: api + `/tbZlxxtj/zlDjtjxx`,
    method: "get",
    params: data
  });
};
//指令中心--首页指令排行统计信息
export const zlPhTjxx = (data) => {
  return request({
    url: api + `/tbZlxxtj/zlPhTjxx`,
    method: "get",
    params: data
  });
};
//指令中心--首页指令周期统计信息
export const zlZqtjxx = (data) => {
  return request({
    url: api + `/tbZlxxtj/zlZqtjxx`,
    method: "get",
    params: data
  });
};

//文件下载
export function downFiles(id) {
  return request({
    url: `/mosty-api/mosty-base/minio/file/download/${id}`,
    method: "get"
  })
}