const baseUrl = '/opt'
import request from '../utils/request'
// 顶部轮询5指标
export const getGreenwaveList = (data) =>
    request({
        url: `${baseUrl}/trend/greenwaveList`,
        method: 'post',
        data: data
    })
export const getAbnormalList = (data) =>
    request({
        url: `${baseUrl}/trend/abnormalCrossList`,
        method: 'post',
        data: data
    })
export const getKeyCross = (data) =>
    request({
        url:`${baseUrl}/trend/hotspotCross`,
        method: 'post',
        data: data
    })
export const getSingalFlow = (data) => request({
    url:`${baseUrl}/runningEvaluate/metricsDetail`,
    method:'post',
    data: data
})
export const getFlows = ()=>request({
    url:`${baseUrl}/trend/top5Flow`,
    method:'get',
})
// 态势监测 路口级右侧图表 获取车道级数据
export const getCrossLaneData = (data) =>request({
    url: `${baseUrl}/trend/crossLaneData`,
    method: 'post',
    data: data
})
// 态势监测 路口级右侧图表 获取转向级数据
export const getCrossTurnData = (data) =>request({
    url: `${baseUrl}/trend/crossTurnData`,
    method: 'post',
    data: data
})
export const getCrossTurnData1 = (data) =>request({
    url: `${baseUrl}/trend/lanePeriodTurnData`,
    method: 'post',
    data: data
})
// 态势监测 路口级右侧图标 获取路口状态
export const getCrossStatusTimeRate = (data) => request({
    url:`${baseUrl}/trend/crossStatusTimeRate`,
    method:'post',
    data: data
})
// 数据查询 车道交通指标
export const getLaneTrafficIndex = (data) => request({
    url:`${baseUrl}/trend/laneTrafficIndex`,
    method:'post',
    data: data
})
// 态势监测 底部路口级交通事件列表
export const getHoloEventList = (data) =>request({
    url:`${baseUrl}/trend/holoEventList`,
    method:'post',
    data: data
})
// 转向级
export const getLanePeriodTurnData = (data) => request({
    url:`${baseUrl}/trend/lanePeriodTurnData`,
    method:'post',
    data: data
})

// 周期 车道 导出
export const exportLane = (data) => request({
    url:`${baseUrl}/trend/periodExcel`,
    method: 'post',
    data: data,
    // responseType: 'file'
    responseType: "blob",
})

// 周期 转向 导出
export const exportTurn = (data) => request({
    url:`${baseUrl}/trend/periodTurnExcel`,
    method: 'post',
    data: data,
    responseType: "blob",
})

export const exportSnapshot = (data) => request({
    url:`${baseUrl}/trend/laneSnapshotExcel`,
    method: 'post',
    data: data,
    responseType: "blob",
})

// 数据查询 车道快照指标
export const getLaneSnapshotIndex = (data) => request({
    url:`${baseUrl}/trend/laneSnapshotIndex`,
    method:'post',
    data: data
})

// 根据路口id获取车道号
export const initLaneSort = (data) => request({
    url:`${baseUrl}/trend/laneIdList`,
    method:'post',
    data: data
})
// 事件查询 溢出事件
export const overFlowEvent = (data) => request({
    url:`${baseUrl}/trend/overFlowEvent`,
    method:'post',
    data: data
})