skcj hai 3 meses
pai
achega
3cde90e854
Modificáronse 3 ficheiros con 12 adicións e 6 borrados
  1. BIN=BIN
      ruoyi-ui/public/in.png
  2. BIN=BIN
      ruoyi-ui/public/out.png
  3. 12 6
      ruoyi-ui/src/components/AmApN/index.vue

BIN=BIN
ruoyi-ui/public/in.png


BIN=BIN
ruoyi-ui/public/out.png


+ 12 - 6
ruoyi-ui/src/components/AmApN/index.vue

@@ -207,7 +207,7 @@ export default {
         this.map = new AMap.Map('containerwls', param);
         this.marker = new AMap.Marker({
           map: this.map,
-          position: this.lineArr[0],
+          position: this.lineArr[this.lineArr.length-1],
           icon: new AMap.Icon({
             image: '/nv.png',
             size: new AMap.Size(46, 52),  //图标所处区域大小
@@ -215,8 +215,11 @@ export default {
           }),
           offset: new AMap.Pixel(-23, -26),
         });
+        window.wlsmap=this.map;
         // 绘制轨迹
-
+        this.map.on('click', (e) => {
+          this.map.remove(this.wlMaker);
+        });
         this.polyline = new AMap.Polyline({
           map: this.map,
           path: this.lineArr,
@@ -237,8 +240,8 @@ export default {
           text: "Hello World",
           offset: new AMap.Pixel(-100, -100),
         });
-        this.wllabel.setPosition( this.lineArr[0]);
-        this.wllabel.setContent("<div style='border:3px dashed #0925b6; width: 200px'>时间:"+ this.lineArrSj[0]+"<br/>"+this.lineArrAdree[0]+"</div>");
+        this.wllabel.setPosition( this.lineArr[this.lineArr.length-1]);
+        this.wllabel.setContent("<div style='border:3px dashed #0925b6; width: 200px'>时间:"+ this.lineArrSj[this.lineArr.length-1]+"<br/>"+this.lineArrAdree[this.lineArr.length-1]+"</div>");
 
         this.wllabel.setMap(this.map);
         this.marker.on('moving',  (e) => {
@@ -327,11 +330,11 @@ export default {
               }
               if (this.bjdata[i][3]=="进入围栏")
               {
-                iconpath="/out.png"
+                iconpath="/in.png"
               }
               if (this.bjdata[i][3]=="离开围栏")
               {
-                iconpath="/in.png"
+                iconpath="/out.png"
               }
 
               let marker= new AMap.Marker({
@@ -351,6 +354,9 @@ export default {
                 nr: "类型:"+this.bjdata[i][3]+"<br/>时间:"+this.bjdata[i][1]+"<br/>地址:"+this.bjdata[i][6],
               })
               marker.on('click', this.markerClick);
+              marker.on("rightclick", function (e) {
+                window.wlsmap.remove(e.target);
+              })
             }
           }
         }