From 7c20fd15b7fbc2bd5756b39d5ab655cc849ffcc3 Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期三, 16 七月 2025 22:39:23 +0800 Subject: [PATCH] 添加时间筛选 --- src/components/map/index.vue | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/components/map/index.vue b/src/components/map/index.vue index 2311dae..838a51d 100644 --- a/src/components/map/index.vue +++ b/src/components/map/index.vue @@ -12,6 +12,7 @@ }; }, created() { + // if (this.point) { // this._point = this.point; // } @@ -22,10 +23,11 @@ methods: { locationMap() { const that = this; - setTimeout(() => { - console.log("_zoom---", that._zoom); - console.log("_point---", JSON.stringify(that._point)); - that.map.setZoomAndCenter(that._zoom, [that._point.x, that._point.y]); + + + // console.log("_zoom---", that.zoom); + // console.log("_point---", JSON.stringify(that.point)); + that.map.setZoomAndCenter(that.zoom, [that.point.x, that.point.y]); if (that.mark) { // 鍒涘缓涓�涓� Marker 瀹炰緥锛� var marker = new AMap.Marker({ @@ -35,8 +37,14 @@ // 灏嗗垱寤虹殑鐐规爣璁版坊鍔犲埌宸叉湁鐨勫湴鍥惧疄渚嬶細 that.map.add(marker); + marker.on('click',function(e){ + console.log('666') + that.$emit('fatherMethod') + // that.$parent.fatherMethod(); + + }) } - }, 1000); + }, }, mounted() { @@ -54,7 +62,6 @@ console.log(e); }); // const that = this; - // debugger // that.map.setZoomAndCenter(that._zoom, [that._point.x, that._point.y]); // if (that.mark) { // // 鍒涘缓涓�涓� Marker 瀹炰緥锛� -- Gitblit v1.8.0