|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
* @Author: JC9527
|
|
|
|
|
* @Date: 2024-01-09 23:08:15
|
|
|
|
|
* @LastEditors: JC9527
|
|
|
|
|
* @LastEditTime: 2024-05-14 10:07:33
|
|
|
|
|
* @LastEditTime: 2024-05-27 10:16:44
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
|
<div class="map-main">
|
|
|
|
@ -974,11 +974,12 @@ export default {
|
|
|
|
|
// 人员非聚合自定义样式及点击事件
|
|
|
|
|
_personRenderMarker(context){
|
|
|
|
|
let imgSrc
|
|
|
|
|
if(this.onIcon && this.offIcon){
|
|
|
|
|
imgSrc = context.data[0].imgSrc == '1' ? this.onIcon : this.offIcon
|
|
|
|
|
} else {
|
|
|
|
|
// if(this.onIcon && this.offIcon){
|
|
|
|
|
// imgSrc = context.data[0].imgSrc == '1' ? this.onIcon : this.offIcon
|
|
|
|
|
// } else {
|
|
|
|
|
// imgSrc = context.data[0].imgSrc == '1' ? require("../../../assets/images/icon/icon1.png") : require("../../../assets/images/icon/offLine1.png")
|
|
|
|
|
// }
|
|
|
|
|
imgSrc = context.data[0].imgSrc == '1' ? require("../../../assets/images/icon/icon1.png") : require("../../../assets/images/icon/offLine1.png")
|
|
|
|
|
}
|
|
|
|
|
var content = `<div class="markerStyles"><div class="marker-Text" style="width:${context.data[0].text.length * 15}px">${context.data[0].text}</div><img src="${imgSrc}" alt=""></div>`;
|
|
|
|
|
var offset = new AMap.Pixel(-32.5, -48.5);
|
|
|
|
|
context.marker.setContent(content);
|
|
|
|
@ -2738,7 +2739,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
|
this.getPersonIcon();
|
|
|
|
|
// this.getPersonIcon();
|
|
|
|
|
this.getCarList();
|
|
|
|
|
this.getrobotToken();
|
|
|
|
|
window.addEventListener('beforeunload', e => this.beforeunloadHandler(e));
|
|
|
|
|