Browse Source

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

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

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

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

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

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

Loading…
Cancel
Save