Browse Source

bug#420房屋导入后首页信息没有同步,从首页选中居民分类进入居民信息后没有根据条件过滤

feature
mk 2 years ago
parent
commit
df257dbb87
  1. 23
      src/views/modules/base/resi.vue
  2. 9
      src/views/modules/home/index.vue

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

@ -558,7 +558,7 @@ export default {
ic_resi_view_real_data: true, //
},
category: this.$route.query.category,
searchForm:{}
};
},
@ -582,13 +582,13 @@ export default {
async mounted () {
this.searchH = this.$refs.myResiSearch.offsetHeight;
this.displayedBaobiaoBtn = await this.$refs.baobiao.existsTemplate({
elseParams: {
categoryKeys: ["resi_info"],
categoryKey: "resi_info",
},
});
this.getTableData()
// this.getQueryConditions();
},
@ -634,7 +634,6 @@ export default {
const { categoryKey, agencyId, level } = this.$refs.myResiSearch.form;
//
let _obj = JSON.parse(JSON.stringify(this.$refs.myResiSearch.form));
// categoryKey
if (Array.isArray(categoryKey) && categoryKey.length) {
_obj.categoryKey = categoryKey.join(",");
@ -1613,15 +1612,15 @@ export default {
watch: {
$route: {
handler: function (newVal, oldVal) {
if (newVal.name == "base-resi") {
this.getTableData({
categoryKey:
this.$store.state.categoryStr.categoryCode || "",
pageNo: this.currentPage,
pageSize: this.pageSize,
});
// this.$refs.myResiSearch.form.categoryKey.push(this.$store.state.categoryStr.categoryCode)
this.$store.commit("setCategoryCode", "");
if (newVal.name == "base-resi" && oldVal.name == 'home') {
console.log(newVal);
if( newVal.query.category){
this.$nextTick(()=>{
this.$refs.myResiSearch.form.categoryKey = []
this.$refs.myResiSearch.form.categoryKey.push(newVal.query.category)
this.handleSearchFrom()
})
}
}
},
deep: true,

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

@ -340,6 +340,15 @@ export default {
this.searchStatus = "ini";
}
},
$route: {
handler: function (newVal, oldVal) {
if (newVal.name == "home") {
this.getApiData();
}
},
deep: true,
immediate: true,
},
},
mounted() {
this.getApiData();

Loading…
Cancel
Save