| | |
| | | position += `${item[0]}, ${item[1]};` |
| | | }) |
| | | |
| | | console.log(position, 565656) |
| | | // console.log(position, 565656) |
| | | |
| | | const polyline = new global.DC.Polyline(position) |
| | | polyline.setStyle({ |
| | |
| | | that.drawLandPolyLine(positions) |
| | | }) |
| | | |
| | | console.log(item, 123) |
| | | |
| | | plotRegionLayer.addOverlay(polygon) |
| | | addPlotLayers.push({ center, name: item.landName, id: item.id }) |
| | |
| | | watch: { |
| | | '$farmId': { |
| | | handler (newName, oldName) { |
| | | this.farm.id = newName |
| | | // this.farm.id = newName |
| | | //地块页面 |
| | | this.onLoad() |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.farm.id = this.$farmId |
| | | // this.farm.id = this.$farmId |
| | | this.$EventBus.$on('getFarmObj', (farmObj)=>{ |
| | | this.$nextTick(() => { |
| | | this.$EventBus.$emit("setFarmId", farmObj.id); |
| | | }); |
| | | }) |
| | | this.onLoad(this.page) |
| | | }, |
| | | methods: { |
| | |
| | | if (typeof (page) == "undefined") { |
| | | page = this.page |
| | | } |
| | | Object.assign(params, { farmId: this.farm.id }) |
| | | Object.assign(params, { farmId: this.$farmId }) |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | |
| | | }, |
| | | //返回上一页 |
| | | goToBack () { |
| | | this.$EventBus.$emit("getFarmObj", this.farmInfo); |
| | | this.$router.go(-1) |
| | | }, |
| | | //获取农场信息 |
| | |
| | | } |
| | | |
| | | if (this.$refs.showCP) { |
| | | console.log(1) |
| | | let isSelf = this.$refs.showCP.contains(e.target) |
| | | if (!isSelf) { |
| | | this.plotClickNum = 0 |