import axios from './http';

/** 获取天气 **/
export function getWeather(data) {
  return axios({
    url: '/env/weather/info',
    method: 'post',
    params: data
  })
}

// 登录
export function Login(data) {
  return axios({
    url: '/admin/my/loginMultilevel',
    method: 'post',
    data: data
  })
}

// 牧场列表
export function getFarm(data) {
  return axios({
    url: '/admin/farm/getFarm',
    method: 'get',
    params: data
  })
}

// 根据id 修改 默认样式 导航
export function findUpdate(data) {
  return axios({
    url: '/admin/accountMultilevel/update',
    method: 'post',
    data: data
  })
}

// 选择牧场
export function getFarmId(data) {
  return axios({
    url: 'admin/accountMultilevel/getLastFarmId',
    method: 'get',
    params: data,
  })
}

// 首页生态检测
export function getScreen(data) {
  return axios({
    url: 'env/room/listLargeScreen',
    method: 'get',
    params: data,
  })
}

export function getEnv(data) {
  return axios({
    url: 'env/room/getAllRoomEnvironment',
    method: 'get',
    params: data
  })
}

/* 环境查询 */
export function getByRoom(data) {
  return axios({
    url: '/env/room/listByRoom',
    method: 'post',
    data: data
  })
}

/** 栋舍饮用水 **/
export function getListWater(data) {
  return axios({
    url: '/env/dayWater/listWater',
    method: 'post',
    data: data
  })
}

/** 根据roomid 拿摄像头 **/
export function getRoomVideo(data) {
  return axios({
    url: '/video/camera/getCameraDetailsByRoomId',
    method: 'get',
    params: data
  })
}

/** 首页生产经营 **/
export function getListLargeScreen(data) {
  return axios({
    url: 'produce/prodWorkPlan/listLargeScreen',
    method: 'get',
    params: data
  })
}

/** 得到video列表 **/
export function getVideoAll(data) {
  return axios({
    url: 'video/cameraArea/lsitAndCamera',
    method: 'get',
    params: data
  })
}
/** 根据id查视频 **/
export function getVideo(data) {
  return axios({
    url: '/video/camera/getCameraDetails',
    method: 'post',
    data: data
  })
}

/** 拿到特定视频 **/
export function getBaseVideo(data) {
  return axios({
    url: '/video/baseSpecificVideo/listSpecif',
    method: 'get',
    params: data
  })
}

/** 车辆通行图标**/
export function getCar(data) {
  return axios({
    url: '/video/screen/car/count_car_record',
    method: 'get',
    params: data
  })
}

/** 门禁管理图表 **/
export function getRecord(data) {
  return axios({
    url: '/video/screen/person/count_person_record',
    method: 'get',
    params: data
  })
}

/** 保存video **/
export function saveVideo(data) {
  return axios({
    url: 'admin/accountMultilevel/updateVideoId',
    method: 'get',
    params: data
  })
}

/**  拿到上一次的video **/
export function lastVideo(data) {
  return axios({
    url: 'video/camera/initCamera',
    method: 'get',
    params: data
  })
}

/** 循环拿到video **/
export function romVideo(data) {
  return axios({
    url: 'video/camera/listScreenCamera',
    method: 'get',
    params: data
  })
}

/** 死猪 **/
export function getSizhu(data) {
  return axios({
    url: '/video/screen/sizhu/count_sizhu_record',
    method: 'get',
    params: data
  })
}

/** 车辆通行列表 **/
export function getCarList(data) {
  return axios({
    url: '/video/car/get_car_record',
    method: 'get',
    params: data
  })
}

/** 人脸闸机 **/
export function getPersonList(data) {
  return axios({
    url: '/video/person/get_person_record',
    method: 'post',
    data: data
  })
}

/** 人员管理 - 人脸门禁 - Token */
export function getFaceToken(data) {
  return axios({
    url: '/video/token/getToken',
    method: 'get',
    params: data
  })
}

/** 死猪 **/
export function getSizhuList(data) {
  return axios({
    url: '/video/accident/accident_record_xixiao',
    method: 'post',
    data: data
  })
}

/** 环保  **/
export function getEnvList(data) {
  return axios({
    url: 'env/environ/getLastEnviron',
    method: 'get',
    params: data
  })
}

/** 报警列表 **/
export function getAlarmList(data) {
  return axios({
    url: 'env/alarm/getTodayAlarm',
    method: 'get',
    params: data
  })
}

/** 车辆烘干  **/
export function getHoure(data) {
  return axios({
    url: '/video/telecom/listeventByHoure',
    method: 'get',
    params: data
  })
}

/** 报警分级 **/
export function getWeekInfo(data) {
  return axios({
    url: 'env/alarm/getOneWeekAlarm',
    method: 'get',
    params: data
  })
}

/** 今日报警 **/
export function getAlarmRate(data) {
  return axios({
    url: 'env/alarm/getTodayAlarmRate',
    method: 'get',
    params: data
  })
}

/**  事件分布 **/
export function getCountByDay(data) {
  return axios({
    url: '/video/screen/alarmCount/CountByDay',
    method: 'get',
    params: data
  })
}

/** 门禁管理违规 **/
export function getDoor(data) {
  return axios({
    url: '/video/screen/person/count_person_record_fail_success',
    method: 'get',
    params: data
  })
}

/* 车辆洗消 - 视频回放 */
export function getCarWashVideo(params) {
  return axios({
    url: '/video/video/getVideoRecord',
    method: 'post',
    data: params
  })
}



/** 首页生物安全 **/
export function getAlarmAndPig(params) {
  return axios({
    url: '/video/screen/index/dataList',
    method: 'get',
    params: params
  })
}


/** 首页报警信息 **/
export function alarmHome(data) {
  return axios({
    url: '/produce/warning/getMainPageWarning',
    method: 'get',
    params: data
  })
}

/** 拿到所有牧场 **/
export function getXFarm(data) {
  return axios({
    url: '/admin/my/xfarmList',
    method: 'get',
    params: data
  })
}

/**  设备信息 **/
export function getDevice(data) {
  return axios({
    url: '/admin/farm/device/getCountDeviceFailureRate',
    method: 'get',
    params: data
  })
}

/** 生态监测拿到视频 **/
export function getLastVideo(data) {
  return axios({
    url: 'video/camera/screenCamera',
    method: 'get',
    params: data
  })
}

/** 金铭人脸  **/
export function JmGroups(data) {
  return axios({
    url: 'video/AiFaceCount/groups',
    method: 'get',
    params: data
  })
}

/* 栋舍 */
export function getSchool(data) {
  return axios({
    url: '/env/floor/list',
    method: 'get',
    params: data
  })
}

/* 楼层 */
export function getByFloor(data) {
  return axios({
    url: '/env/box/listByFloor',
    method: 'get',
    params: data
  })
}

/** 单元 **/
export function getUid(data) {
  return axios({
    url: '/env/room/listBy',
    method: 'get',
    params: data
  })
}

/** 用料 **/
export function getFodder(data) {
  return axios({
    url: '/env/sysFodder/getFodder',
    method: 'post',
    data: data
  })
}

/** 天气预报报警 **/
export function InfoWeater(data) {
  return axios({
    url: '/produce/threshold/listWarningInfoWeater',
    method: 'post',
    data: data
  })
}

