|  |  |  | 
|---|
|  |  |  | <div style="display: flex; overflow: hidden"> | 
|---|
|  |  |  | <div class="left"> | 
|---|
|  |  |  | <div class="left-one"> | 
|---|
|  |  |  | <a-range-picker | 
|---|
|  |  |  | v-model="timevalue" | 
|---|
|  |  |  | show-time | 
|---|
|  |  |  | @ok="change1()" | 
|---|
|  |  |  | valueFormat="yyyy-MM-DD HH:MM:SS" | 
|---|
|  |  |  | style="width: 175px" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <a-select | 
|---|
|  |  |  | ref="select" | 
|---|
|  |  |  | v-model="carvalue" | 
|---|
|  |  |  | style="width: 180px; margin-left: 10px" | 
|---|
|  |  |  | style="width: 180px" | 
|---|
|  |  |  | placeholder="请选择走航车" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <a-select-option | 
|---|
|  |  |  | 
|---|
|  |  |  | >{{ item.name }}</a-select-option | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </a-select> | 
|---|
|  |  |  | <a-range-picker | 
|---|
|  |  |  | v-model="timevalue" | 
|---|
|  |  |  | show-time | 
|---|
|  |  |  | @ok="change1()" | 
|---|
|  |  |  | valueFormat="yyyy-MM-DD HH:MM:SS" | 
|---|
|  |  |  | style="width: 175px; margin-left: 10px" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <a-button type="primary" style="margin-left: 10px" @click="selectCar" | 
|---|
|  |  |  | >查询</a-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | 
|---|
|  |  |  | import axios from "axios"; | 
|---|
|  |  |  | import { jsonp }  from 'vue-jsonp' | 
|---|
|  |  |  | import any = jasmine.any; | 
|---|
|  |  |  | import { da } from "date-fns/locale"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Component({ | 
|---|
|  |  |  | 
|---|
|  |  |  | coordinateId:this.recordid, | 
|---|
|  |  |  | data:this.dataList | 
|---|
|  |  |  | }).then((res)=>{ | 
|---|
|  |  |  | console.log(res); | 
|---|
|  |  |  | this.$message.success(res.data.message) | 
|---|
|  |  |  | this.upa='' | 
|---|
|  |  |  | this.dataList=[] | 
|---|
|  |  |  | 
|---|
|  |  |  | private carDataList:any=[] | 
|---|
|  |  |  | private starttime:any='' | 
|---|
|  |  |  | private endtime:any='' | 
|---|
|  |  |  | private InfoWindow = null | 
|---|
|  |  |  | private startstate:any='none' | 
|---|
|  |  |  | private  setMarker(res) { | 
|---|
|  |  |  | const that=this | 
|---|
|  |  |  | 
|---|
|  |  |  | 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}; | 
|---|
|  |  |  | var infoWindow =''; | 
|---|
|  |  |  | //that.marker[i].name = that.carDate[i].time; | 
|---|
|  |  |  | that.marker[i].on('mouseover', function (e) { | 
|---|
|  |  |  | infoWindow = new BMapGL.InfoWindow("当前时间:"+that.carDate[i].time); | 
|---|
|  |  |  | that.map.openInfoWindow(infoWindow, statePoint); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | that.marker[i].on('mouseout', function (e) { | 
|---|
|  |  |  | that.map.closeInfoWindow(infoWindow, statePoint); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // that.marker.setTitle(that.carDate[i].time); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //在地图中添加marker | 
|---|
|  |  |  | that.map.addOverlay(that.marker[i]); | 
|---|
|  |  |  | // if(that.check===false){ | 
|---|
|  |  |  | that.marker[i].addEventListener("click",function(){ | 
|---|
|  |  |  | console.log(that.carDate[i].data,'that.carDate[i].data'); | 
|---|
|  |  |  | switch(that.carDate[i].state){ | 
|---|
|  |  |  | case '1': | 
|---|
|  |  |  | that.marker[i].setIcon(new BMapGL.Icon(require("@/assets/fb259ce2e368f6853a58b91d6f6b293.png"), new BMapGL.Size(50, 50) | 
|---|
|  |  |  | 
|---|
|  |  |  | // } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | for (let i = 0; i < that.carDataList.length; i++) { | 
|---|
|  |  |  | // console.log(that.carDataList[i],'that.carDataList[i]'); | 
|---|
|  |  |  | //创建单个point | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //  private showInfoOver(data){ | 
|---|
|  |  |  | //    // alert(data); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private setZoom(bPoints) { | 
|---|
|  |  |  | var view = this.map.getViewport(eval(bPoints)); | 
|---|
|  |  |  | var mapZoom = view.zoom; | 
|---|