riku
2024-08-29 6b6eff08baa3d052b66fd2e68f1ac0d8495f6f8a
src/views/historymode/HistoryMode.vue
@@ -157,16 +157,17 @@
        sector.clearSector();
      });
    },
    onFetchData(type, data) {
    onFetchData(deviceType, data) {
      // todo 根据设备类型切换地图监测因子展示单选框、折线图复选框、数据表格复选框的因子类型
      this.deviceType = type;
      this.deviceType = deviceType;
      this.factorDatas.setData(data, this.drawMode, () => {
        this.factorDatas.refreshHeight(this.factorType);
        this.draw();
      });
    },
    fetchHistroyData(option) {
      const { deviceCode, type, timeArray } = option;
      const { deviceType, deviceCode, timeArray } = option;
      this.deviceType = deviceType;
      this.deviceCode = deviceCode;
      let startTime, endTime;
      if (timeArray && timeArray.length == 2) {
@@ -175,12 +176,13 @@
      }
      this.fetchData((page, pageSize) => {
        return fetchHistoryData({
          deviceType,
          deviceCode,
          startTime,
          endTime,
          page,
          perPage: pageSize
        }).then((res) => this.onFetchData(type, res.data));
        }).then((res) => this.onFetchData(deviceType, res.data));
      });
    }
    // fetchRealTimeData() {