Browse Source

首页跳转居民信息传参方式修改为params

feature
mk 2 years ago
parent
commit
736fc698ee
  1. 18
      src/views/modules/base/resi.vue
  2. 9
      src/views/modules/home/index.vue

18
src/views/modules/base/resi.vue

@ -582,8 +582,6 @@ export default {
categoryKey: "resi_info",
},
});
this.getTableData()
// this.getQueryConditions();
},
methods: {
@ -1362,20 +1360,22 @@ export default {
watch: {
$route: {
handler: function (newVal, oldVal) {
if (newVal.name == "base-resi" && oldVal.name == 'home') {
console.log(newVal);
if( newVal.query.category){
if (newVal.name == "base-resi") {
this.$nextTick(()=>{
if( newVal.params.category){
this.$refs.myResiSearch.form.categoryKey = []
this.$refs.myResiSearch.form.categoryKey.push(newVal.query.category)
this.$refs.myResiSearch.form.categoryKey.push(newVal.params.category)
this.handleSearchFrom()
})
}else{
this.$refs.myResiSearch.form.categoryKey = []
this.getTableData()
}
})
}
},
deep: true,
immediate: true,
},
immediate: true
}
},
};
</script>

9
src/views/modules/home/index.vue

@ -363,11 +363,12 @@ export default {
},
handleClickCategory(item) {
this.$router.push({
path: "/main/base-resi",
query: {
category: item.code,
},
name: "base-resi",
params: {
category: item.code
}
});
},
handleClickNotice(item) {

Loading…
Cancel
Save