Browse Source

如果从居民建议跳转到选中社区就返回到之前路由

xiaowang-feature
mk 9 months ago
parent
commit
c97918d407
  1. 1
      src/views/peoSuggestion/solicitationDaily.vue
  2. 11
      src/views/selectAgency/index.vue

1
src/views/peoSuggestion/solicitationDaily.vue

@ -176,7 +176,6 @@ export default {
}
},
},
watch: {},
}
</script>

11
src/views/selectAgency/index.vue

@ -49,6 +49,7 @@ export default {
latLng:null,
searchKey:null,
organizationName:null,
backNav:false
};
},
created() {
@ -60,6 +61,12 @@ export default {
this.getAgency()
}
},
beforeRouteEnter(to, from, next) {
if(from.fullPath === '/peoSuggestionexplain'){
this.backNav = true
}
next();
},
methods: {
search(){
this.organizationName = this.searchKey;
@ -161,8 +168,12 @@ export default {
parm.agencyName = item.label;
let res = await editUser(parm)
if (res.code === 0) {
if(this.backNav){
this.$router.push('/peoSuggestionexplain')
}else{
this.$router.replace('/')
}
}
} else {
this.organizationName = item.label;
this.getAgency()

Loading…
Cancel
Save