|
|
@@ -170,6 +170,9 @@ export default {
|
|
|
isAllSelected() {
|
|
|
return this.activeLegends.length === this.statusConfig.length;
|
|
|
},
|
|
|
+ isHomePage() {
|
|
|
+ return this.$route && this.$route.path === '/home';
|
|
|
+ },
|
|
|
legendStatusConfig() {
|
|
|
if (!this.mode) return this.statusConfig;
|
|
|
if (this.mode === '路口') {
|
|
|
@@ -691,19 +694,25 @@ export default {
|
|
|
});
|
|
|
|
|
|
marker.on('click', (e) => {
|
|
|
- if (!this.isComponentDestroyed) {
|
|
|
- this.$emit('map-crossing-click', e.target.getExtData(), e.lnglat);
|
|
|
+ if (this.isComponentDestroyed) return;
|
|
|
+ const extData = e.target.getExtData();
|
|
|
+ if (this.isHomePage) {
|
|
|
+ this.cancelCloseInfoWindow();
|
|
|
+ this.openLightInfo(extData, e.lnglat);
|
|
|
}
|
|
|
+ this.$emit('map-crossing-click', extData, e.lnglat);
|
|
|
});
|
|
|
|
|
|
marker.on('mouseover', (e) => {
|
|
|
if (this.isComponentDestroyed) return;
|
|
|
+ if (this.isHomePage) return;
|
|
|
this.cancelCloseInfoWindow();
|
|
|
this.openLightInfo(e.target.getExtData(), e.lnglat);
|
|
|
});
|
|
|
|
|
|
marker.on('mouseout', () => {
|
|
|
if (this.isComponentDestroyed) return;
|
|
|
+ if (this.isHomePage) return;
|
|
|
this.scheduleCloseInfoWindow();
|
|
|
});
|
|
|
|