Compare commits

...

2 Commits

View File

@@ -202,14 +202,15 @@
} }
}, },
async mounted() { async mounted() {
const urlParams = new URLSearchParams(window.location.search);
const lastRoute = localStorage.getItem('lastRoute'); const lastRoute = localStorage.getItem('lastRoute');
if (lastRoute) { this.id = this.$route.query.id || urlParams.get('id');
if (lastRoute && !this.id) {
const { name, query } = JSON.parse(lastRoute); const { name, query } = JSON.parse(lastRoute);
this.$router.replace({ name, query }); this.$router.replace({ name, query });
return; return;
} }
const urlParams = new URLSearchParams(window.location.search);
this.id = this.$route.query.id || urlParams.get('id');
await this.getAreaTree(); await this.getAreaTree();
if(this.id) { if(this.id) {
await this.getInfoHandler(); await this.getInfoHandler();