diff --git a/src/views/index/supplierAdd.vue b/src/views/index/supplierAdd.vue index e9970da3..fafa9480 100644 --- a/src/views/index/supplierAdd.vue +++ b/src/views/index/supplierAdd.vue @@ -203,13 +203,14 @@ }, async mounted() { 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); this.$router.replace({ name, query }); return; } const urlParams = new URLSearchParams(window.location.search); - this.id = this.$route.query.id || urlParams.get('id'); + await this.getAreaTree(); if(this.id) { await this.getInfoHandler();