|
|
@ -503,6 +503,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 执法人员点位
|
|
|
|
// 执法人员点位
|
|
|
|
getTem(){
|
|
|
|
getTem(){
|
|
|
|
|
|
|
|
this.personLine = [];
|
|
|
|
getDeviceList({imei:'861316060217211'}).then(res=>{
|
|
|
|
getDeviceList({imei:'861316060217211'}).then(res=>{
|
|
|
|
console.log('res0',res);
|
|
|
|
console.log('res0',res);
|
|
|
|
let obj = [];
|
|
|
|
let obj = [];
|
|
|
@ -527,12 +528,21 @@ export default {
|
|
|
|
this.addMark(obj);
|
|
|
|
this.addMark(obj);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
getIcons(name,src){
|
|
|
|
|
|
|
|
let icon = L.divIcon({
|
|
|
|
|
|
|
|
className: 'divIcon-marker',
|
|
|
|
|
|
|
|
html: `<div class="markers"><div class="marker-title">${name}</div><img src="${src}" /></div>`,
|
|
|
|
|
|
|
|
iconSize: [100, 50],
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return icon
|
|
|
|
|
|
|
|
},
|
|
|
|
addMark(obj) {
|
|
|
|
addMark(obj) {
|
|
|
|
this.mapEvent.mapEvent1.clearLayers();
|
|
|
|
this.mapEvent.mapEvent1.clearLayers();
|
|
|
|
let ico1 = L.icon({
|
|
|
|
let ico1 = require("../../../assets/images/icon/icon1.png")
|
|
|
|
iconUrl: require("../../../assets/images/icon/icon1.png"),
|
|
|
|
// let ico1 = L.icon({
|
|
|
|
iconSize: [52, 81],
|
|
|
|
// iconUrl: require("../../../assets/images/icon/icon1.png"),
|
|
|
|
});
|
|
|
|
// iconSize: [52, 81],
|
|
|
|
|
|
|
|
// });
|
|
|
|
let ico2 = L.icon({
|
|
|
|
let ico2 = L.icon({
|
|
|
|
iconUrl: require("../../../assets/images/icon/icon2.png"),
|
|
|
|
iconUrl: require("../../../assets/images/icon/icon2.png"),
|
|
|
|
iconSize: [44, 91],
|
|
|
|
iconSize: [44, 91],
|
|
|
@ -556,7 +566,7 @@ export default {
|
|
|
|
lng: item.longitude,
|
|
|
|
lng: item.longitude,
|
|
|
|
lat: item.latitude,
|
|
|
|
lat: item.latitude,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ icon: ico1 }
|
|
|
|
{ icon: this.getIcons(item.userName,ico1) }
|
|
|
|
)
|
|
|
|
)
|
|
|
|
.bindPopup(
|
|
|
|
.bindPopup(
|
|
|
|
`
|
|
|
|
`
|
|
|
@ -1110,7 +1120,11 @@ export default {
|
|
|
|
// 切换地图事件
|
|
|
|
// 切换地图事件
|
|
|
|
changeMap(id) {
|
|
|
|
changeMap(id) {
|
|
|
|
this.actionMap = id;
|
|
|
|
this.actionMap = id;
|
|
|
|
|
|
|
|
if(id == 1) {
|
|
|
|
|
|
|
|
this.getTem();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
this.addMark();
|
|
|
|
this.addMark();
|
|
|
|
|
|
|
|
}
|
|
|
|
// switch (id) {
|
|
|
|
// switch (id) {
|
|
|
|
// case 1:
|
|
|
|
// case 1:
|
|
|
|
// this.addMark("执法人员");
|
|
|
|
// this.addMark("执法人员");
|
|
|
|