riku
2025-07-03 e895212fa4215c50ce79ce4b448e064caf394776
src/model/Factor.js
@@ -60,24 +60,33 @@
  this.standardMin = -1; //监测因子类型对应的标准最小值
  this.standardMax = -1; //监测因子类型对应的标准最大值
  // this.legendType = Legend.S_TYPE; //图例模式
  this.legendType = Legend.D_TYPE; //图例模式
  this.legendType = Legend.S_TYPE; //图例模式
  // this.legendType = Legend.D_TYPE; //图例模式
  if (options != undefined) {
    this.datas = options.datas;
    this.heights = options.heights;
    this.min = options.min;
    this.max = options.max;
    this.originMin = options.originMin;
    this.originMax = options.originMax;
  if (typeof options === 'object') {
    for (const key in options) {
      if (Object.prototype.hasOwnProperty.call(options, key)) {
        const value = options[key];
        this[key] = value;
      }
    }
    this.factorName = options.factorName;
    this.factorId = options.factorId;
    this.colors = options.colors;
    this.bottomColors = options.bottomColors;
    this.bottomColor = options.bottomColor;
    this.standardMin = options.standardMin;
    this.standardMax = options.standardMax;
    // this.datas = options.datas;
    // this.heights = options.heights;
    // this.min = options.min;
    // this.max = options.max;
    // this.originMin = options.originMin;
    // this.originMax = options.originMax;
    // this.factorName = options.factorName;
    // this.factorId = options.factorId;
    // this.colors = options.colors;
    // this.bottomColors = options.bottomColors;
    // this.bottomColor = options.bottomColor;
    // this.standardMin = options.standardMin;
    // this.standardMax = options.standardMax;
    // this.legendType = options.legendType;
  }
}