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

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

const serviceName = UPCLOUD_RDC_TMS_BUSINESS_SERVICE
//  分页查询接口重试日志 GET

export const mainTableInfoUrl = serviceName + '/inTransit/shipBill/getShipBill'
//运单定位 POST
export const getPositionUrl = serviceName + '/inTransit/shipBill/getPositionByShipBillId'
//运单轨迹 POST
export const getTrackUrl = serviceName + '/inTransit/shipBill/getTrackByShipBillId'



export const shipUrl=getPositionUrl
export const pathUrl=getTrackUrl
export const warnUrl=serviceName + '/inTransit/common/getAlarm'


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,urlType) => {


  return request({
    url:pathUrl+ '/' + urlType,
    method: 'post',
    data,
  })
}

//运单定位
export const getLocationMapData = (_this, data,urlType) => {
  return request({
    url: getPositionUrl+'/'+urlType,
    method: 'post',
    data
  })
}



export const getAlarmData = (_this, data,urlType) => {
  return request({
    url: warnUrl+'/'+urlType,
    method: 'post',
    data
  })
}
