From 082613d446e29e4ec1c16bfaa52345106a498b23 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Tue, 08 Nov 2022 09:03:49 +0800
Subject: [PATCH] 农事操作隐藏后四个,地图模式2d改为3d
---
src/views/land/getMapDataInThere.vue | 45 +++++++++++++++++++++++++++++++++++++++------
1 files changed, 39 insertions(+), 6 deletions(-)
diff --git a/src/views/land/getMapDataInThere.vue b/src/views/land/getMapDataInThere.vue
index e3950e0..1ac07c4 100644
--- a/src/views/land/getMapDataInThere.vue
+++ b/src/views/land/getMapDataInThere.vue
@@ -18,6 +18,13 @@
import MapInThere from "@/components/map/mainInThere.vue"
export default {
name: "getMapData",
+ props: {
+ currentPolygons: {
+ type: Array,
+ // eslint-disable-next-line vue/require-valid-default-prop
+ default: []
+ }
+ },
components: {
MapInThere,
},
@@ -38,6 +45,16 @@
this.isCheck = false
}
},
+ currentPolygons: {
+ immediate: true,
+ handler (newData, oldData) {
+ // console.log(newData, 5656)
+ if (newData.length > 0) {
+
+ this.draw(newData)
+ }
+ },
+ }
},
data () {
return {
@@ -47,9 +64,10 @@
animateEnter: "animated fadeIn",
animateLeave: "animated fadeOut",
//未输入动画效果
- animateName: "custom-classes-transition",
- animateEnter: "animated fadeInDown",
- animateLeave: "animated fadeOut",
+
+
+
+
openTitle: "路径1",
MapDataShow: false,
fromView: false,
@@ -63,8 +81,22 @@
},
methods: {
draw (usePolygons) {
- this.$store.commit("setpolygon", usePolygons) //用vuex传最终数据
- this.doThat(usePolygons)
+
+ console.log(usePolygons, 456)
+
+ let arr = []
+
+ usePolygons.forEach(item => {
+ arr.push({
+ lng: item.split(' ')[0],
+ lat: item.split(' ')[1]
+ })
+ })
+
+ console.log(arr, 23)
+
+ this.$store.commit("setpolygon", arr) //用vuex传最终数据
+ this.doThat(arr)
},
doThat (val) {
this.checkDom("getMapDataRefs", (dom) => {
@@ -319,7 +351,8 @@
.list-leave {
opacity: 1;
}
- .list-enter-active,
+
+.list-enter-active,
.list-leave-active {
transition: all 0.3s;
}
--
Gitblit v1.9.3