riku
2024-02-27 7578c3ff65329b2269f099475eb687e963efac1c
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);
  }
};