import fetch from '@/utils/fetch'

let holoBaseUrl = '/holo'

export const crossInfo = () => fetch(`${holoBaseUrl}/base-cross-info/list`, {}, 'GET')

export const eventInfo = (data) => fetch(`${holoBaseUrl}/event-info/list`, data, 'GET')

export const inletWayRealTime = (data) => fetch(`${holoBaseUrl}/analysis-rid-entrace-indicator/realtime`, data, 'GET')

export const inletWayTimeBetw = (data) => fetch(`${holoBaseUrl}/analysis-rid-entrace-indicator/time-slot`, data, 'GET')

export const inletWayTurnRealTime = (data) => fetch(`${holoBaseUrl}/analysis-rid-turn-indicators/realtime`, data, 'GET')

export const inletWayTurnTimeBetw = (data) => fetch(`${holoBaseUrl}/analysis-rid-turn-indicators/time-slot`, data, 'GET')

export const roadRealTime = (data) => fetch(`${holoBaseUrl}/analysis-rid-lane-indicators/realtime`, data, 'GET')

export const roadTimeBetw = (data) => fetch(`${holoBaseUrl}/analysis-rid-lane-indicators/time-slot`, data, 'GET')

export const getRoadsTurn = (data) => fetch(`${holoBaseUrl}/base-lane-info/list`, data, 'GET')

export const trafficEByTime = (data) => fetch(`${holoBaseUrl}/analysis-event-trend/list`, data, 'GET')

// 区域时段雷达图
export const areaList = () => fetch(`${holoBaseUrl}/area-index-analysis/list`, {}, 'GET')

// 路口交通流量分析
export const crossFlow = () => fetch(`${holoBaseUrl}/cross-flow/list`, {}, 'GET')

// 路段交通流量分析
export const ridFlow = () => fetch(`${holoBaseUrl}/rid-flow/list`, {}, 'GET')

// 路口详情 - 路口交通指标
export const crossIndex = (data) => fetch(`${holoBaseUrl}/analysis-cross-indicators/query`, data, 'GET')

export const eventAnalysis = () => fetch(`${holoBaseUrl}/event-analysis/list`, {}, 'GET')

export const areaRecent = () => fetch(`${holoBaseUrl}/area-index-analysis/recently`, {}, 'GET')

export const eventAlarm = () => fetch(`${holoBaseUrl}/event-info/alarm`, {}, 'GET')

export const pedNonAnalysis = () => fetch(`${holoBaseUrl}/ped-nonmotor-analysis/list`, {}, 'GET')

//路口配置列表
export const api_getCrossData = (data) => fetch('/web/crossConfig/listLaneInfo', data, 'POST')

export const api_phaseByTimeList = (data) => fetch('/web/planSend/phaseListByTimeSingleRing', data, 'POST')

export const api_planList = (data) => fetch('/web/schemeConfig/listSchemeConfig', data, 'POST')

// 设备图层接口
export const equip_camera = () => fetch(`${holoBaseUrl}/device-camera/list`, {}, 'GET')

export const equip_radar = () => fetch(`${holoBaseUrl}/device-radar/list`, {}, 'GET')

export const equip_signal = () => fetch(`${holoBaseUrl}/device-signal/list`, {}, 'GET')

export const equip_weather = () => fetch(`${holoBaseUrl}/device-weather/list`, {}, 'GET')