/**分页查询接口重试日志 */
import request from '@/utils/request'

import {  UPCLOUD_RDC_TMS_BUSINESS_SERVICE } from '@/config/serviceSettings.js'

const serviceName = UPCLOUD_RDC_TMS_BUSINESS_SERVICE

export const billUrl=serviceName+'/inTransit/track/getTrackLoadingBill'
export const shipUrl = serviceName + '/inTransit/track/getTrackShipBill'
export const pathUrl = serviceName + '/inTransit/track/getTrack'
export const warnUrl=serviceName + '/inTransit/common/getAlarm'

//在途管理-车辆派车单查询(分页)
export const LoadingBillTableInfoUrl = () => {
  return {
    location: serviceName+'/inTransit/position/getPositionLoadingBill',
    path:serviceName + '/inTransit/track/getTrackLoadingBill',
  }
}
//在途管理-车辆运单查询(分页)
export const ShipBillTableInfoUrl = () => {
  return {
    location: serviceName+'/inTransit/common/getShipBillByLoadingBillNo',
    path:serviceName + '/inTransit/common/getShipBillByLoadingBillNo',
  }
}

function responseThen(response) {
  if (response.success) {
    this.visible = false
    this.$message.success(response.message)
  } else {
    this.$exception(response)
  }
  this.confirmLoading = false
  return response
}

export const getPathMapData = (_this, data) => {

  let urlType = data.urlType
  return request({
    url: serviceName + '/inTransit/track/getTrack/' + urlType,
    method: 'post',
    data,
  })
}


export const getLocationMapData = (_this, data) => {

  let urlType = data.urlType



 // delete data.urlType
  return request({
    url: serviceName+'/inTransit/position/getPosition/'+urlType,
    method: 'post',
    data,
  })
}


