|
|
@ -27,16 +27,19 @@ |
|
|
|
|
|
|
|
<swiper :current="tabIndex" @change="tabIndex=$event.detail.current"> |
|
|
|
<swiper-item> |
|
|
|
<plant-plan :plotId="plotId" @trigger="$refs.recovery.reSearch($event.plantId);tabIndex=$event.tabIndex"/> |
|
|
|
<plant-plan |
|
|
|
:plotId="plotId" |
|
|
|
@trigger="plantId=$event" |
|
|
|
@farm="farm_plantId=$event"/> |
|
|
|
</swiper-item> |
|
|
|
<swiper-item> |
|
|
|
<farmRecord :plotId="plotId"/> |
|
|
|
<farmRecord :plantId="farm_plantId" :plotId="plotId" ref="farmRecord"/> |
|
|
|
</swiper-item> |
|
|
|
<swiper-item> |
|
|
|
<recovery :plotId="plotId" ref="recovery"/> |
|
|
|
<recovery :plotId="plotId" :plantId="plantId" ref="recovery" @trigger="recoveryId=$event"/> |
|
|
|
</swiper-item> |
|
|
|
<swiper-item> |
|
|
|
<transactions :plotId="plotId" ref="transactions"/> |
|
|
|
<transactions :recoveryId="recoveryId" :plotId="plotId" ref="transactions"/> |
|
|
|
</swiper-item> |
|
|
|
</swiper> |
|
|
|
</view> |
|
|
@ -61,10 +64,38 @@ export default { |
|
|
|
{name:"交易记录"}, |
|
|
|
], |
|
|
|
plotId:"", |
|
|
|
plantId:"", |
|
|
|
farm_plantId:"", |
|
|
|
recoveryId:"", |
|
|
|
|
|
|
|
maps:null, |
|
|
|
} |
|
|
|
}, |
|
|
|
watch:{ |
|
|
|
plantId(n){ |
|
|
|
this.$nextTick(()=>{ |
|
|
|
this.$refs.recovery.reSearch() |
|
|
|
}) |
|
|
|
if(n)this.tabIndex=2; |
|
|
|
}, |
|
|
|
farm_plantId(n){ |
|
|
|
this.$nextTick(()=>{ |
|
|
|
this.$refs.farmRecord.reSearch() |
|
|
|
}) |
|
|
|
if(n)this.tabIndex=1; |
|
|
|
}, |
|
|
|
recoveryId(n){ |
|
|
|
this.$nextTick(()=>{ |
|
|
|
this.$refs.transactions.reSearch() |
|
|
|
}) |
|
|
|
if(n)this.tabIndex=3 |
|
|
|
}, |
|
|
|
tabIndex(n,o){ |
|
|
|
if(n!=2)this.plantId=""; |
|
|
|
if(n!=1)this.farm_plantId=""; |
|
|
|
if(n!=3)this.recoveryId=""; |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(options){ |
|
|
|
this.plotId=options.id |
|
|
|
}, |
|
|
|