| | |
| | | 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, |
| | | }, |
| | |
| | | this.isCheck = false |
| | | } |
| | | }, |
| | | currentPolygons: { |
| | | immediate: true, |
| | | handler (newData, oldData) { |
| | | // console.log(newData, 5656) |
| | | if (newData.length > 0) { |
| | | |
| | | this.draw(newData) |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | |
| | | animateEnter: "animated fadeIn", |
| | | animateLeave: "animated fadeOut", |
| | | //未输入动画效果 |
| | | animateName: "custom-classes-transition", |
| | | animateEnter: "animated fadeInDown", |
| | | animateLeave: "animated fadeOut", |
| | | |
| | | |
| | | |
| | | |
| | | openTitle: "路径1", |
| | | MapDataShow: false, |
| | | fromView: false, |
| | |
| | | }, |
| | | 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) => { |
| | |
| | | .list-leave { |
| | | opacity: 1; |
| | | } |
| | | .list-enter-active, |
| | | |
| | | .list-enter-active, |
| | | .list-leave-active { |
| | | transition: all 0.3s; |
| | | } |