From 5efebb555efd984f3dd35de83e465cd53aaf8175 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 26 四月 2024 10:34:51 +0800
Subject: [PATCH] 完善左上角切换监测因子后,折线图联动切换功能

---
 lib/dialog.js |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/lib/dialog.js b/lib/dialog.js
index c011b95..0166bcd 100644
--- a/lib/dialog.js
+++ b/lib/dialog.js
@@ -1,4 +1,13 @@
 var DialogUtil = {
+  show: true,
+  toggleDataDialog() {
+    this.show = !this.show;
+    if (this.show) {
+      return '鏁版嵁寮规锛氬紑';
+    } else {
+      return '鏁版嵁寮规锛氬叧';
+    }
+  },
   /**
    * 鍒涘缓寮瑰嚭妗�
    * @param {*} factorDatas 鐩戞祴鏁版嵁
@@ -64,7 +73,7 @@
     tag += "<div class='time'>" + '鏃堕棿: ' + time;
 
     // 閬嶅巻绔欑偣鏁版嵁涓殑姣忎竴椤圭洃娴嬪洜瀛愶紝鐢熸垚椤甸潰
-    content += "<table class='text-table'>";
+    content += "<div><table class='text-table'>";
     var _contents = new Map();
     factorList.forEach((f) => {
       // 鍒犻�変笉鏄剧ず鐨勫洜瀛�
@@ -122,7 +131,9 @@
       content += _contents.get(e);
     });
 
-    content += '</table>';
+    // content += 
+
+    content += '</table></div>';
 
     var info = document.createElement('div');
     // info.className = "custom-info input-card content-window-card";
@@ -223,4 +234,16 @@
     info.appendChild(bottom);
     return info;
   },
+
+  openNewWindow(factorDatas, i, map, position, onClose) {
+    if (!this.show) return
+    const window = this.createInfoWindow(factorDatas, i, onClose)
+    window.open(map, position);
+  },
+
+  openNewWindow2(factorData, map, position, onClose) {
+    if (!this.show) return
+    const window = this.createInfoWindow2(factorData, onClose)
+    window.open(map, position);
+  }
 };

--
Gitblit v1.9.3