|
|
@ -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) |
|
|
|