import { appservice } from '@/utils/apiService'

const baseUrl = '/api/work-info'

export function GetDeviceInfo(id) {
  return appservice({
    url: `${baseUrl}/device/${id}`,
    method: 'get'
  })
}

export function GetVehicleInfo(id) {
  return appservice({
    url: `${baseUrl}/vehicle-info/${id}`,
    method: 'get'
  })
}

export function GetSingleDeviceWarnings(params) {
  return appservice({
    url: `${baseUrl}/single-device-warnings`,
    method: 'get',
    params
  })
}

export function GetBeamTransportCarInfo(id) {
  return appservice({
    url: `${baseUrl}/beam-transport-car/${id}`,
    method: 'get'
  })
}

export function GetVehicleRecordList(params) {
  return appservice({
    url: `${baseUrl}/vehicle-record-list`,
    method: 'get',
    params
  })
}

export function GetFrontCrownBlockList(params) {
  return appservice({
    url: `${baseUrl}/front-crown-block-list`,
    method: 'get',
    params
  })
}

export function GetBackCrownBlockList(params) {
  return appservice({
    url: `${baseUrl}/back-crown-block-list`,
    method: 'get',
    params
  })
}

export function GetBeamTransportCarList(params) {
  return appservice({
    url: `${baseUrl}/beam-transport-car-list`,
    method: 'get',
    params
  })
}

export function testCreate(data) {
  return appservice({
    url: `${baseUrl}/create-vehicle`,
    method: 'post',
    data
  })
}
