Browse Source

地块管理 监听首页切换基地

master
邓宏 2 years ago
parent
commit
a77d847dfc
  1. 15
      pages/massif/index.vue

15
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<this.total){
var res=await request("/api/plantPlot/list",{
params: this.searchVal
params: {
...this.searchVal,
companyId:this.$store.getters.userInfo.companyId,
plantBaseInfoId:this.$store.state.plantBaseInfoId,
}
})
if(res.statu){
this.list=this.list.concat(res.data.records)

Loading…
Cancel
Save