| | |
| | | }; |
| | | }, |
| | | created() { |
| | | // 获取URL参数中的车牌号 |
| | | const vehicleNo = this.$route.query.vehicleNo; |
| | | if (vehicleNo) { |
| | | this.queryParams.vehicleNo = vehicleNo; |
| | | // 获取URL参数 |
| | | const query = this.$route.query; |
| | | if (query.vehicleNo) { |
| | | this.queryParams.vehicleNo = query.vehicleNo; |
| | | } |
| | | // 设置时间范围 |
| | | if (query.startTime && query.endTime) { |
| | | this.dateRange = [query.startTime, query.endTime]; |
| | | } |
| | | this.getList(); |
| | | }, |
| | |
| | | padding: "2px 6px", |
| | | borderRadius: "3px", |
| | | }); |
| | | |
| | | marker = new BMap.Marker(bdPoint,{rotation:direction}); |
| | | marker.setLabel(label); |
| | | } else { |
| | |
| | | rotation: direction, |
| | | }); |
| | | } |
| | | //在车图标上显示车牌 |
| | | const label = new BMap.Label(currentSegment[index].vehicleNo, { |
| | | offset: new BMap.Size(0, -25), // 向上偏移25像素 |
| | | position: bdPoint, |
| | | }); |
| | | label.setStyle({ |
| | | color: "white", |
| | | fontSize: "12px", |
| | | backgroundColor: "#3388ff", |
| | | border: "none", |
| | | padding: "2px 6px", |
| | | borderRadius: "3px", |
| | | }); |
| | | marker.setLabel(label); |
| | | |
| | | |
| | | // 获取地址信息 |
| | | const geoc = new BMap.Geocoder(); |