| | |
| | | |
| | | <script> |
| | | import { mapGetters } from "vuex"; |
| | | import MapInThere from "@/components/map/mainInThere.vue"; |
| | | import MapInThere from "@/components/map/mainFarm.vue"; |
| | | export default { |
| | | name: "getMapData", |
| | | components: { |
| | | MapInThere, |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["rotesData", "pointData", "polygons"]), |
| | | ...mapGetters(["rotesData", "pointData", "polygonsFarm"]), |
| | | }, |
| | | watch: { |
| | | ourDatas: { |
| | |
| | | deep: true, |
| | | }, |
| | | polygons() { |
| | | if (this.polygons.length > 0) { |
| | | if (this.polygonsFarm.length > 0) { |
| | | this.isCheck = false; |
| | | } |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | draw(usePolygons) { |
| | | this.$store.commit("setpolygon", usePolygons); //用vuex传最终数据 |
| | | this.$store.commit("setpolygonsFarm", usePolygons); //用vuex传最终数据 |
| | | this.doThat(usePolygons) |
| | | }, |
| | | doThat(val) { |