From 7ad521ae1e2267ebb9e0f3784ccc9fc4f8a77ca5 Mon Sep 17 00:00:00 2001
From: zhouxueli <2841188632@qq.com>
Date: Wed, 31 Jan 2024 15:00:01 +0800
Subject: [PATCH] =?UTF-8?q?task#10595,=E7=82=B9=E6=A0=87=E8=AE=B0=E4=B8=8A?=
=?UTF-8?q?=E6=96=B9=E6=98=BE=E7=A4=BA=E5=9C=B0=E5=9D=80=EF=BC=8C=E8=AE=B0?=
=?UTF-8?q?=E5=BD=95tab=E5=88=87=E7=82=B9=E5=85=A5=E8=BF=9B=E5=8E=BB?=
=?UTF-8?q?=E7=9A=84index?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/caseList/caseAuditList.vue | 19 ++++----
src/views/caseList/caseDetail.vue | 66 ++++++++++++++++++----------
2 files changed, 53 insertions(+), 32 deletions(-)
diff --git a/src/views/caseList/caseAuditList.vue b/src/views/caseList/caseAuditList.vue
index 2d3db980..3dd33619 100644
--- a/src/views/caseList/caseAuditList.vue
+++ b/src/views/caseList/caseAuditList.vue
@@ -57,6 +57,7 @@ export default {
this.id = this.$route.params.id || urlParams.get('id');
},
async mounted() {
+ this.activeIndex=this.$route.params?.activeIndex || 0
await this.batchOrderCount();
await this.getList()
},
@@ -89,7 +90,15 @@ export default {
tab.num = res.data.auditFailCount;
}
});
- console.log("数量",res)
+ },
+ goPageDetail(id){
+ this.$router.push({
+ name: 'caseDetail', // 目标路由的名称
+ params: {
+ id:id,
+ index:this.activeIndex,
+ }
+ });
},
getStatus(i){
switch (i){
@@ -126,14 +135,6 @@ export default {
return 'yelColor'
}
},
- goPageDetail(id){
- this.$router.push({
- name: 'caseDetail', // 目标路由的名称
- params: {
- id:id,
- }
- });
- },
}
}
diff --git a/src/views/caseList/caseDetail.vue b/src/views/caseList/caseDetail.vue
index 0cd6fdfc..25669025 100644
--- a/src/views/caseList/caseDetail.vue
+++ b/src/views/caseList/caseDetail.vue
@@ -8,7 +8,7 @@
:border="false"
:fixed="true"
:safe-area-inset-top="true"
- @click-left="h5GoBack"
+ @click-left="goPrePage"
/>
@@ -140,11 +140,13 @@ export default {
state:'',//审核状态
map: '',
abPath:[],
- bcPath:[]
+ bcPath:[],
+ activeIndex:'',
}
},
created() {
this.id = this.$route.params.id;
+ this.activeIndex=this.$route.params.index;
},
async mounted(){
await this.getOrderDetail()
@@ -153,6 +155,15 @@ export default {
});
},
methods:{
+ goPrePage(){
+ this.$router.push({
+ name: 'caseAuditList', // 目标路由的名称
+ params: {
+ id:this.id,
+ activeIndex:this.activeIndex,
+ }
+ });
+ },
initMap() {
this.map = new AMap.Map('container',{
zoom:14,//级别(缩放比例 3-20 )
@@ -193,11 +204,7 @@ export default {
imageSize: new AMap.Size(43, 43) // 图片的实际尺寸
}),
});
- let infoWindow = new AMap.InfoWindow({
- content: this.detailInfo?.apointAddress, // 替换为实际的地址文本
- offset: new AMap.Pixel(0, -30) // 设置信息窗体的偏移量,使其显示在点的上方
- });
- infoWindow.open(this.map, [this.detailInfo?.apointLongtitude, this.detailInfo?.apointLongtitude]);
+ this.setLabel(marker,this.detailInfo.apointAddress)
this.map.add(marker);
// 事发地,b点
let marker1 = new AMap.Marker({
@@ -208,11 +215,7 @@ export default {
imageSize: new AMap.Size(43, 43) // 图片的实际尺寸
})
});
- let infoWindow1 = new AMap.InfoWindow({
- content: this.detailInfo?.bpointAddress, // 替换为实际的地址文本
- offset: new AMap.Pixel(0, -30) // 设置信息窗体的偏移量,使其显示在点的上方
- });
- infoWindow1.open(this.map, [this.detailInfo?.bpointLongtitude, this.detailInfo?.bpointLongtitude]);
+ this.setLabel(marker1,this.detailInfo.bpointAddress)
this.map.add(marker1);
let marker2=''
if(this.detailInfo.cpointLongtitude && this.detailInfo.cpointLatitude){
@@ -224,11 +227,7 @@ export default {
imageSize: new AMap.Size(28, 28) // 图片的实际尺寸
})
});
- let infoWindow2 = new AMap.InfoWindow({
- content: this.detailInfo?.cpointAddress, // 替换为实际的地址文本
- offset: new AMap.Pixel(0, -30) // 设置信息窗体的偏移量,使其显示在点的上方
- });
- infoWindow2.open(this.map, [this.detailInfo?.cpointLongtitude, this.detailInfo?.cpointLongtitude]);
+ this.setLabel(marker2,this.detailInfo.cpointAddress)
this.map.add(marker2);
}
if(this.detailInfo.cpointLongtitude && this.detailInfo.cpointLatitude){
@@ -237,6 +236,13 @@ export default {
this.map.setFitView([marker,marker1])
}
},
+ setLabel(markerPoint,address){
+ markerPoint.setLabel({
+ offset: new AMap.Pixel(0, 0), //设置文本标注偏移量
+ content: address, //设置文本标注内容
+ direction: 'top'
+ });
+ },
async submitHandle(){
if(!this.states){
this.$toast('审核结果必选')
@@ -274,12 +280,16 @@ export default {
id:this.id
})
this.detailInfo=res.data
- this.detailInfo?.gpsTrackQOsAB.forEach((item)=>{
- this.abPath.push([item.lon,item.lat])
- })
- this.detailInfo?.gpsTrackQOsBC.forEach((item)=>{
- this.bcPath.push([item.lon,item.lat])
- })
+ if(this.detailInfo.gpsTrackQOsAB && this.detailInfo.gpsTrackQOsAB .length > 0){
+ this.detailInfo?.gpsTrackQOsAB.forEach((item)=>{
+ this.abPath.push([item.lon,item.lat])
+ })
+ }
+ if(this.detailInfo.gpsTrackQOsBC && this.detailInfo.gpsTrackQOsBC .length > 0){
+ this.detailInfo?.gpsTrackQOsBC.forEach((item)=>{
+ this.bcPath.push([item.lon,item.lat])
+ })
+ }
},
}
}
@@ -494,4 +504,14 @@ export default {
::v-deep .amap-logo{
display: none !important;
}
+::v-deep .amap-marker-label{
+ border: none;
+ padding: 0 8px;
+ @include all-height(25px);
+ @include fontWeightSize(12px,400);
+ color: #3A3A3A;
+ @include bgcolorOpa(#FFFFFF,0.98);
+ box-shadow: 0px 1px 4px 0px rgba(164,162,162,0.69);
+ border-radius: 17px;
+}