diff --git a/pages/massif/index.vue b/pages/massif/index.vue index 82c9d12..8801238 100644 --- a/pages/massif/index.vue +++ b/pages/massif/index.vue @@ -114,8 +114,6 @@ import request,{host} from '@/common/request' return{ host:host('imgUrl'), searchVal:{ - companyId:this.$store.getters.userInfo.companyId, - plantBaseInfoId:this.$store.state.plantBaseInfoId, search:"", pageNo:1, pageSize:5, @@ -124,6 +122,13 @@ import request,{host} from '@/common/request' total:0, } }, + watch:{ + //监听首页切换基地 + "$store.state.plantBaseInfoId"(n){ + this.clean() + this.search() + }, + }, onLoad(){ this.search() }, @@ -149,7 +154,11 @@ import request,{host} from '@/common/request' async search(){ if(this.total==0 || this.list.length