瀏覽代碼

修改百度地图鼠标移上去的滚动事件

“yueshang” 2 年之前
父節點
當前提交
546db633f0
共有 1 個文件被更改,包括 8 次插入7 次删除
  1. 8 7
      src/views/index.vue

+ 8 - 7
src/views/index.vue

@@ -91,6 +91,7 @@
               url: require('@/assets/images/org-icon.png'),
               size: { width: 150, height: 157 },
             }"
+            @mouseout="infoWindowClose"
           >
             <!-- 弹框 -->
             <bm-info-window
@@ -261,7 +262,7 @@ export default {
       console.log(items, "22222");
       this.show = true;
     },
-    //选择年月日
+    //选择周,天。。。
     choiceTime(selectedValue) {
       if (this.selectedValue == 6 && this.drillDate.length == 0) {
         return this.$modal.msg("请选择自定义时间");
@@ -269,12 +270,12 @@ export default {
         this.getInfo();
       }
     },
-    //自定义事件
+    //自定义时间
     checkDrillDate() {
       console.log("drillDate", this.drillDate);
-      this.start = this.drillDate[0];
-      this.end = this.drillDate[1];
-      this.selectedValue="6"
+      this.start = this.drillDate?this.drillDate[0]:"";
+      this.end = this.drillDate?this.drillDate[1]:"";
+      this.selectedValue=this.drillDate?"6":"1"
       this.$forceUpdate()
       this.getInfo();
     },
@@ -288,8 +289,7 @@ export default {
     infoWindowOpen(marker) {
       this.selectedMarker = marker;
       // this.show = true;
-      console.log("marker", marker, marker);
-      this.$forceUpdate();
+
     },
     goDevice() {
       //去设备
@@ -317,6 +317,7 @@ export default {
         end: this.end,
       }).then((response) => {
         this.topData = response;
+        this.$modal.msgSuccess('加载成功')
         console.log("response", response);
       });
     },