| | |
| | | <script> |
| | | import wx from 'weixin-js-sdk' |
| | | import clickMap from '@/components/clickMap.vue' |
| | | import { getLandIsAreaStatistic, getList, getLandList } from "@/api/index" |
| | | import { getLandIsAreaStatistic, getList, getLandList,getFarmDetail } from "@/api/index" |
| | | export default { |
| | | name: 'clickmap', |
| | | components: { |
| | |
| | | }, |
| | | data () { |
| | | return { |
| | | title: "今天", |
| | | title: "农场", |
| | | zydksb: 'zy', |
| | | choosepz: -1, |
| | | choosedk: -1, |
| | |
| | | landList: [], |
| | | farmPlantList: [], |
| | | landDetails: {}, |
| | | farmDetail:{}, |
| | | isShowLandDetails: false, |
| | | isShowFooter: true, |
| | | farmId: null, |
| | |
| | | }, |
| | | created () { |
| | | this.farmId = this.getQueryString('farmId') |
| | | |
| | | // 获取有无轮廓地块数量 |
| | | this.getLandIsAreaStatistic() |
| | | // 获取农产品列表 |
| | | this.getFarmPlantList(this.page) |
| | | //获取地块列表 |
| | | this.getLandList(this.pageLand) |
| | | //获取农场信息 |
| | | this.getFarmDetail() |
| | | }, |
| | | methods: { |
| | | // 获取url信息 |
| | |
| | | this.$refs.ClickMap.closePlotDetails() |
| | | }, |
| | | |
| | | //获取农场信息 |
| | | getFarmDetail(){ |
| | | var params = { |
| | | id:this.farmId |
| | | } |
| | | getFarmDetail(params).then((res)=>{ |
| | | this.farmDetail = res.data.data |
| | | this.title = this.farmDetail.farmName |
| | | }) |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * 根据经纬度范围计算中心点位置 |