map menu 'action' is working
This commit is contained in:
@@ -183,8 +183,12 @@ export default {
|
||||
if (query.length) {
|
||||
// open/close all concernements
|
||||
this.openCloseConcernements(query[0].id)
|
||||
// push route
|
||||
this.$router.push({name: 'concernement', params: {id: query[0].id}});
|
||||
// push route (keep the hash for map_mode)
|
||||
this.$router.push({
|
||||
name: 'concernement',
|
||||
hash: `#${this.map_mode}`,
|
||||
params: {id: query[0].id}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,16 +204,27 @@ export default {
|
||||
});
|
||||
if (clickedEntityBodies.length) {
|
||||
// we have clicked on an entite
|
||||
this.$router.push({name: 'concernement', params: {id: this.opened.id, eid: clickedEntityBodies[0].id}});
|
||||
this.$router.push({
|
||||
name: 'concernement',
|
||||
hash: `#${this.map_mode}`,
|
||||
params: {id: this.opened.id, eid: clickedEntityBodies[0].id}
|
||||
});
|
||||
} else {
|
||||
// otherwise we close the entite and come back to the concernement
|
||||
this.$router.push({name: 'concernement', params: {id: this.opened.id}});
|
||||
this.$router.push({
|
||||
name: 'concernement',
|
||||
hash: `#${this.map_mode}`,
|
||||
params: {id: this.opened.id}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// if no concernement opened retrun to home (closing concernement contents opened)
|
||||
// and reset the opened state in concernement store
|
||||
this.resetConcernementOpened();
|
||||
this.$router.push({name: 'home'});
|
||||
this.$router.push({
|
||||
name: 'home',
|
||||
hash: `#${this.map_mode}`
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user