import { get, post, del, put } from '/@/utils/request';

export default {
  // 物联网卡列表
  simCard: {
    getList: (params: object) => get('/sim/collect/list', params),
    addItem: (data: object) => post('/device/add', data),
    editItem: (data: object) => put('/device/edit', data),
    deleteItem: (data: object) => del('/sim/collect/delete', data),
    detailItem: (params: object) => get('/sim/collect/one', params),
    getFlowDataByDateRange: (data: object) => post('/sim/collect/flow_date', data),
  },
  dashboard: {
    getFlowDataByDateRange: (data: object) => post('/sim/history_traffic/date', data), // 仪表盘折线接口
    getTop10Data: (data: object) => post('/sim/traffic_statis/top_flow', data),
    getFlowData: (data: object) => get('/sim/traffic_statis/get', data)
  },
  platform: {
    getList: (params: object) => get('/sim/factory/list', params),
    addItem: (data: object) => post('/sim/factory/add', data),
    editItem: (data: object) => put('/sim/factory/edit', data),
  }
}