riku
2024-02-27 7578c3ff65329b2269f099475eb687e963efac1c
history.mode.js
@@ -195,6 +195,9 @@
    if (!this.mapMaker.runStatus()) {
      this.drawMesh(false, this, this.factorDatas);
    }
    // 折线图选中对应因子
    this.choseOneFactorLineChart(factorType)
    // 表格选中对应因子
  },
  setFactorMode: function (factorMode) {
    if (this.factorMode != factorMode) {
@@ -323,6 +326,17 @@
    this.refreshLineChartData();
  },
  // 单选一个监测因子展示折线图
  choseOneFactorLineChart(index) {
    for (let i = 0; i < this.historyDatas.datas.length; i++) {
      this.historyDatas.datas[i].show = false;
      this.historyDatas.physicalQuantity[i].show = false;
    }
    this.historyDatas.datas[index].show = true;
    this.historyDatas.physicalQuantity[index].show = true;
    this.lineChartFactorType = [index];
    this.refreshLineChartData();
  },
  // 创建初始折线图
  drawLineChart: function () {
    this.lineChartOption = FChart.genLineChart(
@@ -435,8 +449,10 @@
  },
  onCheckTable: function (obj) {
    Table.onChangeTh(obj.value, obj.checked);
    DataSummary.onChangeFactor('history_table_summary', obj.value, obj.checked);
  },
  refreshTable: function () {
    DataSummary.summary('history_table_summary', this.factorDatas);
    Table.table(
      'history_table',
      this.originData,
@@ -509,13 +525,7 @@
    this.mapMaker.setOnStopCallback(
      function () {
        var f = this.factorDatas.factor[this.factorType + 1 + ''];
        MapUtil.drawMesh2(
          this.factorDatas.lnglats_GD,
          this.factorDatas.coors_GD,
          f.heights,
          f.colors,
          f.bottomColor
        );
        MapUtil.drawMesh2(this.factorDatas, f);
        callback();
      }.bind(this)
    );