task#10514,调度app详情地图折线显示问题

This commit is contained in:
2024-01-30 14:24:39 +08:00
parent 56f7df75e7
commit 9a391bd0c7
2 changed files with 16 additions and 31 deletions

View File

@ -18,13 +18,12 @@ service.interceptors.request.use(
let reqUrl=config.url let reqUrl=config.url
config.data = config.contentType ? config.data : qs.stringify(config.data) config.data = config.contentType ? config.data : qs.stringify(config.data)
config.headers['Content-Type'] = config.contentType || 'application/x-www-form-urlencoded' config.headers['Content-Type'] = config.contentType || 'application/x-www-form-urlencoded'
// const token = localStorage.getItem('token'); const token = localStorage.getItem('token');
// let token='28adfbc810248f777b062e9a9177f273' // let token='28adfbc810248f777b062e9a9177f273'
let token='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzb25nIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MDY1ODU2NzIsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjU0NjU0LCJwaG9uZSI6IjE3NjMwMDM1NjU4IiwibmFtZSI6InNvbmciLCJzdXBwbGllck5hbWUiOiLkuIrmtbfmtYvor5XmnI3liqHllYYiLCJzdXBwbGllcklkIjozMzA0MSwic3VwcGxpZXJUeXBlIjoxLCJ1c2VybmFtZSI6InNvbmciLCJ1c2VyVHlwZSI6InJlc2N1ZUFwcCIsImRldmljZUlkIjoiMjJiNDljYTIwZjliODMzMGQ5ODcyMTczZjM5ZWE2OGJjIiwiYXV0aG9yaXRpZXMiOltdfSwic2NvcGUiOlsiYWxsIl0sImlzcyI6Imh0dHBzOi8vc2lub2Fzc2lzdC5jb20iLCJleHAiOjE3MDY2NzIwNzIsImlhdCI6MTcwNjU4NTY3Mn0.8pvEpomf59DxeB71s2kPB5CAvKCqxuyn2RycQ-ScYLU' // let token='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzb25nIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MDY1ODU2NzIsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjU0NjU0LCJwaG9uZSI6IjE3NjMwMDM1NjU4IiwibmFtZSI6InNvbmciLCJzdXBwbGllck5hbWUiOiLkuIrmtbfmtYvor5XmnI3liqHllYYiLCJzdXBwbGllcklkIjozMzA0MSwic3VwcGxpZXJUeXBlIjoxLCJ1c2VybmFtZSI6InNvbmciLCJ1c2VyVHlwZSI6InJlc2N1ZUFwcCIsImRldmljZUlkIjoiMjJiNDljYTIwZjliODMzMGQ5ODcyMTczZjM5ZWE2OGJjIiwiYXV0aG9yaXRpZXMiOltdfSwic2NvcGUiOlsiYWxsIl0sImlzcyI6Imh0dHBzOi8vc2lub2Fzc2lzdC5jb20iLCJleHAiOjE3MDY2NzIwNzIsImlhdCI6MTcwNjU4NTY3Mn0.8pvEpomf59DxeB71s2kPB5CAvKCqxuyn2RycQ-ScYLU'
if (reqUrl.includes("/driverApp")) { if (reqUrl.includes("/driverApp")) {
config.headers['token'] = `${token}`; config.headers['token'] = `${token}`;
} else { } else {
console.log("调度app")
config.headers['Authorization'] = `${token}`; config.headers['Authorization'] = `${token}`;
} }
return config return config

View File

@ -99,7 +99,7 @@
<span>不通过原因</span> <span>不通过原因</span>
</div> </div>
</div> </div>
<select id="mySelect" class="mySelect" v-model="other" @change="getValue" > <select id="mySelect" class="mySelect" v-model="other" >
<option value="缺失凭证照片">缺失凭证照片</option> <option value="缺失凭证照片">缺失凭证照片</option>
<option value="申请金额与凭证不一致">申请金额与凭证不一致</option> <option value="申请金额与凭证不一致">申请金额与凭证不一致</option>
<option value="非正常产生路桥费">非正常产生路桥费</option> <option value="非正常产生路桥费">非正常产生路桥费</option>
@ -164,22 +164,25 @@ export default {
}); });
}, },
mapMarkers(){ mapMarkers(){
let ABpolyline=''
let BCpolyline=''
if(this.abPath && this.abPath.length>0){ if(this.abPath && this.abPath.length>0){
console.log("创建折现1") ABpolyline = new AMap.Polyline({
let polyline1 = new AMap.Polyline({ path: [...this.abPath],
path: [...this.bcPath],
strokeColor: '#005DC7', // 路径线颜色 strokeColor: '#005DC7', // 路径线颜色
strokeWeight: 9 // 路径线宽度 strokeWeight: 5 ,// 路径线宽度
showDir: true // 显示箭头
}); });
this.map.add(polyline1); this.map.add(ABpolyline);
} }
if(this.bcPath && this.bcPath.length>0){ if(this.bcPath && this.bcPath.length>0){
let polyline2 = new AMap.Polyline({ BCpolyline = new AMap.Polyline({
path: [...this.bcPath], path: [...this.bcPath],
strokeColor: '#005DC7 ', // 路径线颜色 strokeColor: '#005DC7 ', // 路径线颜色
strokeWeight: 5 // 路径线宽度 strokeWeight: 5 ,// 路径线宽度
showDir: true // 显示箭头
}); });
this.map.add(polyline2); this.map.add(BCpolyline);
} }
// 车辆位置a点 // 车辆位置a点
let marker = new AMap.Marker({ let marker = new AMap.Marker({
@ -218,18 +221,7 @@ export default {
}else{ }else{
this.map.setFitView([marker,marker1]) this.map.setFitView([marker,marker1])
} }
}, },
/* setMarker(lng,lat,imgIcon){
new AMap.Marker({
position: [lng,lat],
icon: new AMap.Icon({
image: imgIcon, // 图片的相对路径
size: new AMap.Size(43, 43), // 图标的尺寸
imageSize: new AMap.Size(43, 43) // 图片的实际尺寸
})
});
},*/
async submitHandle(){ async submitHandle(){
if(!this.states){ if(!this.states){
this.$toast('审核结果必选') this.$toast('审核结果必选')
@ -250,12 +242,8 @@ export default {
}) })
console.log("ressssss",res) console.log("ressssss",res)
}, },
getValue(){
// console.log("other",this.other)
},
isUse(e){ isUse(e){
this.states=e this.states=e
// console.log("this.states",this.states)
if(this.states == 1){ if(this.states == 1){
this.state=2 this.state=2
}else if(this.states == 2){ }else if(this.states == 2){
@ -268,17 +256,15 @@ export default {
}, },
async getOrderDetail(){ async getOrderDetail(){
let res=await reimburseOrderDetail({ let res=await reimburseOrderDetail({
id:8//this.id id:this.id
}) })
this.detailInfo=res.data this.detailInfo=res.data
this.detailInfo?.gpsTrackQOsAB.forEach((item)=>{ this.detailInfo?.gpsTrackQOsAB.forEach((item)=>{
let tempArr = new AMap.LngLat(item.lon, item.lat); this.abPath.push([item.lon,item.lat])
this.abPath.push(tempArr)
}) })
this.detailInfo?.gpsTrackQOsBC.forEach((item)=>{ this.detailInfo?.gpsTrackQOsBC.forEach((item)=>{
this.bcPath.push([item.lon,item.lat]) this.bcPath.push([item.lon,item.lat])
}) })
console.log("this.abPath",this.abPath)
}, },
} }
} }