From 9a391bd0c72f215ca701f5fd6ca6329e92eb586d Mon Sep 17 00:00:00 2001 From: zhouxueli <2841188632@qq.com> Date: Tue, 30 Jan 2024 14:24:39 +0800 Subject: [PATCH] =?UTF-8?q?task#10514,=E8=B0=83=E5=BA=A6app=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=9C=B0=E5=9B=BE=E6=8A=98=E7=BA=BF=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/http.js | 5 ++-- src/views/caseList/caseDetail.vue | 42 +++++++++++-------------------- 2 files changed, 16 insertions(+), 31 deletions(-) diff --git a/src/utils/http.js b/src/utils/http.js index e0544750..02d47f96 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -18,13 +18,12 @@ service.interceptors.request.use( let reqUrl=config.url config.data = config.contentType ? config.data : qs.stringify(config.data) 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='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzb25nIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MDY1ODU2NzIsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjU0NjU0LCJwaG9uZSI6IjE3NjMwMDM1NjU4IiwibmFtZSI6InNvbmciLCJzdXBwbGllck5hbWUiOiLkuIrmtbfmtYvor5XmnI3liqHllYYiLCJzdXBwbGllcklkIjozMzA0MSwic3VwcGxpZXJUeXBlIjoxLCJ1c2VybmFtZSI6InNvbmciLCJ1c2VyVHlwZSI6InJlc2N1ZUFwcCIsImRldmljZUlkIjoiMjJiNDljYTIwZjliODMzMGQ5ODcyMTczZjM5ZWE2OGJjIiwiYXV0aG9yaXRpZXMiOltdfSwic2NvcGUiOlsiYWxsIl0sImlzcyI6Imh0dHBzOi8vc2lub2Fzc2lzdC5jb20iLCJleHAiOjE3MDY2NzIwNzIsImlhdCI6MTcwNjU4NTY3Mn0.8pvEpomf59DxeB71s2kPB5CAvKCqxuyn2RycQ-ScYLU' + // let token='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzb25nIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MDY1ODU2NzIsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjU0NjU0LCJwaG9uZSI6IjE3NjMwMDM1NjU4IiwibmFtZSI6InNvbmciLCJzdXBwbGllck5hbWUiOiLkuIrmtbfmtYvor5XmnI3liqHllYYiLCJzdXBwbGllcklkIjozMzA0MSwic3VwcGxpZXJUeXBlIjoxLCJ1c2VybmFtZSI6InNvbmciLCJ1c2VyVHlwZSI6InJlc2N1ZUFwcCIsImRldmljZUlkIjoiMjJiNDljYTIwZjliODMzMGQ5ODcyMTczZjM5ZWE2OGJjIiwiYXV0aG9yaXRpZXMiOltdfSwic2NvcGUiOlsiYWxsIl0sImlzcyI6Imh0dHBzOi8vc2lub2Fzc2lzdC5jb20iLCJleHAiOjE3MDY2NzIwNzIsImlhdCI6MTcwNjU4NTY3Mn0.8pvEpomf59DxeB71s2kPB5CAvKCqxuyn2RycQ-ScYLU' if (reqUrl.includes("/driverApp")) { config.headers['token'] = `${token}`; } else { - console.log("调度app") config.headers['Authorization'] = `${token}`; } return config diff --git a/src/views/caseList/caseDetail.vue b/src/views/caseList/caseDetail.vue index 9fa67172..a45fa5cb 100644 --- a/src/views/caseList/caseDetail.vue +++ b/src/views/caseList/caseDetail.vue @@ -99,7 +99,7 @@ 不通过原因 - @@ -164,22 +164,25 @@ export default { }); }, mapMarkers(){ + let ABpolyline='' + let BCpolyline='' if(this.abPath && this.abPath.length>0){ - console.log("创建折现1") - let polyline1 = new AMap.Polyline({ - path: [...this.bcPath], + ABpolyline = new AMap.Polyline({ + path: [...this.abPath], strokeColor: '#005DC7', // 路径线颜色 - strokeWeight: 9 // 路径线宽度 + strokeWeight: 5 ,// 路径线宽度 + showDir: true // 显示箭头 }); - this.map.add(polyline1); + this.map.add(ABpolyline); } if(this.bcPath && this.bcPath.length>0){ - let polyline2 = new AMap.Polyline({ + BCpolyline = new AMap.Polyline({ path: [...this.bcPath], strokeColor: '#005DC7 ', // 路径线颜色 - strokeWeight: 5 // 路径线宽度 + strokeWeight: 5 ,// 路径线宽度 + showDir: true // 显示箭头 }); - this.map.add(polyline2); + this.map.add(BCpolyline); } // 车辆位置,a点 let marker = new AMap.Marker({ @@ -218,18 +221,7 @@ export default { }else{ 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(){ if(!this.states){ this.$toast('审核结果必选') @@ -250,12 +242,8 @@ export default { }) console.log("ressssss",res) }, - getValue(){ - // console.log("other",this.other) - }, isUse(e){ this.states=e - // console.log("this.states",this.states) if(this.states == 1){ this.state=2 }else if(this.states == 2){ @@ -268,17 +256,15 @@ export default { }, async getOrderDetail(){ let res=await reimburseOrderDetail({ - id:8//this.id + id:this.id }) this.detailInfo=res.data this.detailInfo?.gpsTrackQOsAB.forEach((item)=>{ - let tempArr = new AMap.LngLat(item.lon, item.lat); - this.abPath.push(tempArr) + this.abPath.push([item.lon,item.lat]) }) this.detailInfo?.gpsTrackQOsBC.forEach((item)=>{ this.bcPath.push([item.lon,item.lat]) }) - console.log("this.abPath",this.abPath) }, } }