| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="map-view"> |
| | | <img src="../../../public/img/map.png" /> |
| | | <div class="map-view" @click="goToMapModel"> |
| | | <img src="../../../public/img/map.png" /> |
| | | <div class="title">农场地图→</div> |
| | | </div> |
| | | </div> |
| | |
| | | ...mapGetters(["userInfo","$farmId"]), |
| | | }, |
| | | created () { |
| | | |
| | | this.$EventBus.$on('getFarmObj', (farmObj)=>{ |
| | | this.$nextTick(() => { |
| | | console.log(farmObj.id,444444) |
| | | this.$EventBus.$emit("setFarmId", farmObj.id); |
| | | }); |
| | | // setTimeout(() => { |
| | | // this.$EventBus.$emit("setFarmId", farmObj.id); |
| | | // }, 2000); |
| | | }) |
| | | |
| | | |
| | | //初始化农场信息 |
| | | // let farmId = this.userInfo.$farmId |
| | | this.farm.id = this.$farmId |
| | |
| | | //本年农事操作记录,分组 |
| | | this.getFarmingStatis() |
| | | this.StockCount() |
| | | |
| | | }, |
| | | watch: { |
| | | '$farmId':{ |
| | |
| | | query: data, |
| | | }) |
| | | }, |
| | | //进入地图模式 |
| | | goToMapModel () { |
| | | this.$router.push({ |
| | | path: `/mapPattern`, |
| | | // query: row, |
| | | }) |
| | | } |
| | | }, |
| | | }; |
| | | </script> |