hebeiLargeScreen/src/api/modules/index.ts

117 lines
3.3 KiB
TypeScript

import {GET,POST,FILE,FILEPOST,PUT,GETNOBASE} from "../api";
const indexUrl= {
'leftTop':'/bigscreen/countDeviceNum',//左上
'leftCenter':'/bigscreen/countUserNum',//左中
"centerMap":"/bigscreen/centerMap",
"centerBottom":"/bigscreen/installationPlan",
'leftBottom':"/bigscreen/leftBottom", //坐下
'rightTop':"/bigscreen/alarmNum", //报警次数
'rightBottom':'/bigscreen/rightBottom',//右下
'rightCenter':'/bigscreen/ranking',// 报警排名
}
export default indexUrl
/**左上--设备内总览 */
export const countDeviceNum=(param:any={})=>{
return GET(indexUrl.leftTop,param)
}
/**左中--用户总览 */
export const countUserNum=(param:any={})=>{
return GET(indexUrl.leftCenter,param)
}
/**左下--设备提醒 */
export const leftBottom=(param:any={})=>{
return GET(indexUrl.leftBottom,param)
}
/**中上--地图 */
export const centerMap=(param:any={})=>{
return GET(indexUrl.centerMap,param)
}
/**中下--安装计划 */
export const installationPlan=(param:any={})=>{
return GET(indexUrl.centerBottom,param)
}
/**右上--报警次数 */
export const alarmNum=(param:any={})=>{
return GET(indexUrl.rightTop,param)
}
/**右中--报警排名 */
export const ranking=(param:any={})=>{
return GET(indexUrl.rightCenter,param)
}
/**右下--设备状态 */
export const rightBottom=(param:any={})=>{
return GET(indexUrl.rightBottom,param)
}
/**设备列表 mDevice/pageList*/
export const getDeviceList = (param: any = {}) => {
return POST('/mDevice/pageList', param);
}
/**当日车流量 /dev-api/iotApi/device/trafficFlow/todayTrafficCount*/
export const todayTrafficCount=(param:any={})=>{
return GET('/device/trafficFlow/todayTrafficCount',param)
}
/**查询天气预报 三天 */
export const weatherForecast=(param:any={})=>{
return GET('/weather/forecast',param)
}
/**查询今日天气曲线 */
export const weatherHourly=(param:any={})=>{
return GET('/weather/hourly',param)
}
/*统计当日事件处理状态 */
export const todayStatusCount=(param:any={})=>{
return GET('/device/mevent/todayStatusCount',param)
}
/**根据桩位号获取每小时车流量 */
export const todayHourly=(param:any={})=>{
return GET('/device/trafficFlow/todayHourly',param)
}
/**获取当天每小时总车流量和平均车流量 */
export const trafficTrend=(param:any={})=>{
return GET('/device/trafficFlow/trafficTrend',param)
}
/**事件历史记录管理 历史数据 */
export const meventListHistory=(param:any={})=>{
return GET('/device/mevent/listHistory',param)
}
/**数据字典-根据类型获取字典数据 */
export const getDictData = (dictType: string) => {
return GET(`/system/dict/data/type/${dictType}`);
}
/**视频监控设备列表*/
export const getVideoDeviceList = (param: any = {}) => {
return POST('/video/device/list', param);
}
/**视频流 */
export const videoStream=(param:any={})=>{
return GET('/video/stream',param)
}
//获取拥堵路段
export const getListCurrentMonth = (param: any = {}) => {
return GET('/device/mevent/listCurrentMonth', param);
}
// 今日各监测点车流情况
export const getPointTraffic=(param:any={})=>{
return GET('/device/trafficFlow/pointTraffic',param)
}