From c23ac06446a9a1edc41cc13723e5d0b8eabdfd63 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期三, 16 七月 2025 17:30:50 +0800 Subject: [PATCH] 2025.7.16 动态溯源新增合并异常 --- src/model/Factor.js | 41 +++++++++++++++++++++++++---------------- 1 files changed, 25 insertions(+), 16 deletions(-) diff --git a/src/model/Factor.js b/src/model/Factor.js index b9983b1..5a720c1 100644 --- a/src/model/Factor.js +++ b/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; } } -- Gitblit v1.9.3