From 72a9cd305aeea587c813bd2325552ab0b952471b Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Wed, 08 Nov 2023 17:09:17 +0800
Subject: [PATCH] Merge branch 'feature_1.0'

---
 src/views/list/road.vue |   38 ++++++++++++++++++++++++++++----------
 1 files changed, 28 insertions(+), 10 deletions(-)

diff --git a/src/views/list/road.vue b/src/views/list/road.vue
index c3bffa3..fe9ac86 100644
--- a/src/views/list/road.vue
+++ b/src/views/list/road.vue
@@ -302,11 +302,11 @@
     this.check=false
     this.startstate='batch'
     this.batchshow=true
-    this.selectCar();
+    // this.selectCar();
     this.batchid=record.coordinateId
   }
   private handlebatch(){
-    this.selectCar()
+    // this.selectCar()
     this.batchshow=false
     this.handlenull();
   }
@@ -325,15 +325,17 @@
       this.$message.success(res.data.message)
       this.starttime=''
       this.endtime=''
-      this.selectCar()
+      // this.selectCar()
     }))
   }
   private upa=''
   private recordid:any=0
-  private handleEditModalVisible(record){
+  private handleEditModalVisible(record) {
+    console.log('dataList',this.dataList)
     this.check=false
     this.handlebatch()
-    this.startstate='none'
+    this.startstate = 'none'
+    this.dataList=[]
     this.upa='upa'
     this.recordid=record.coordinateId
     if(this.carvalue==='������������������'){
@@ -371,7 +373,7 @@
   }
   private inupa(){
     this.upa=''
-    this.selectCar()
+    // this.selectCar()
   }
   private carvalue:any='������������������'
   private carIndex:any=[]
@@ -449,7 +451,7 @@
   private endtime:any=''
   private InfoWindow = null
   private startstate:any='none'
-  private  setMarker(res) {
+  private setMarker(res) {
     const that=this
      that.carDate=[]
      that.carDataList=[]
@@ -467,10 +469,25 @@
           //������������point
           var myIcon = new BMapGL.Icon(require("@/assets/723cd95f31481a502d495b2d814d658.png"), new BMapGL.Size(50, 50), {
             });
+          var startIcon = new BMapGL.Icon(require("@/assets/start.png"), new BMapGL.Size(50, 50), {
+            });
+          var endIcon = new BMapGL.Icon(require("@/assets/end.png"), new BMapGL.Size(50, 50), {
+            });
           const statePoint = new BMapGL.Point(that.carDate[i].flylon,that.carDate[i].flylat);
           bPoints.push(statePoint)
-          that.marker[i] = new BMapGL.Marker(statePoint,{icon:myIcon});
-          that.marker[i].customData = {data: that.carDate[i].data,state: that.carDate[i].state};
+          if (i === 0) {
+            that.marker[i] = new BMapGL.Marker(statePoint, { icon: startIcon });
+            that.marker[i].customData = { data: that.carDate[i].data, state: that.carDate[i].state };
+            that.marker[i].iconPng='startIcon'
+          } else if (i === that.carDate.length - 1) { 
+            that.marker[i] = new BMapGL.Marker(statePoint, { icon: endIcon });
+            that.marker[i].customData = { data: that.carDate[i].data, state: that.carDate[i].state };
+            that.marker[i].iconPng='endIcon'
+          } else {
+            that.marker[i] = new BMapGL.Marker(statePoint,{icon:myIcon});
+            that.marker[i].customData = { data: that.carDate[i].data, state: that.carDate[i].state };
+            that.marker[i].iconPng='myIcon'
+          }
           var infoWindow ='';
           //that.marker[i].name = that.carDate[i].time;
           that.marker[i].on('mouseover', function (e) {
@@ -489,6 +506,7 @@
           that.marker[i].addEventListener("click",function(){
             switch(that.carDate[i].state){
               case '1':
+                console.log('that.marker',that.marker[i])
                   that.marker[i].setIcon(new BMapGL.Icon(require("@/assets/fb259ce2e368f6853a58b91d6f6b293.png"), new BMapGL.Size(50, 50)
               ));
                 that.carDate[i].state='2'
@@ -601,7 +619,7 @@
       }).then((res)=>{
         this.dataSource=res.data.data
       })
-    }
+  }
   private created () {
     this.car()  
     this.selectLu()

--
Gitblit v1.8.0