import request from '@/utils/request'

// 查询用车申请记录列表
export function listApplyCarLog (query) {
  return request({
    url: '/clw/applyCarLog/list',
    method: 'get',
    params: query
  })
}

// 查询用车申请记录详细
export function getApplyCarLog (id) {
  return request({
    url: '/clw/applyCarLog/' + id,
    method: 'get'
  })
}

// 新增用车申请记录
export function addApplyCarLog (data) {
  return request({
    url: '/clw/applyCarLog',
    method: 'post',
    data: data
  })
}

// 修改用车申请记录
export function updateApplyCarLog (data) {
  return request({
    url: '/clw/applyCarLog',
    method: 'put',
    data: data
  })
}

// 删除用车申请记录
export function delApplyCarLog (id) {
  return request({
    url: '/clw/applyCarLog/' + id,
    method: 'delete'
  })
}
// 流程图
export function getWorkflow (id) {
  return request({
    url: '/clw/workflow/' + id,
    method: 'get'
  })
}
// 车速记录
export function getSpeedList (params) {
  return request({
    url: '/car/speedList',
    method: 'get',
    params
  })
}
// 超速管理记录
export function getOverSpeedList (params) {
  return request({
    url: '/car/overSpeedList',
    method: 'get',
    params
  })
}
// 离线天数
export function getOfflineList (params) {
  return request({
    url: '/car/offlineList',
    method: 'get',
    params
  })
}