Commit 1389ec33 authored by 李纪文's avatar 李纪文

feat: 修改历史曲线多图表统计曲线逻辑错误

parent ab1b69b4
{ {
"name": "@wisdom-components/ec_historyview", "name": "@wisdom-components/ec_historyview",
"version": "1.68.1", "version": "1.8.0",
"description": "> TODO: description", "description": "> TODO: description",
"author": "cuijiahao <15927252954@163.com>", "author": "cuijiahao <15927252954@163.com>",
"homepage": "", "homepage": "",
......
...@@ -128,10 +128,13 @@ const GridChart = memo((props) => { ...@@ -128,10 +128,13 @@ const GridChart = memo((props) => {
}); });
// 请求统计数据时,需要使用实际点去获取 // 请求统计数据时,需要使用实际点去获取
_params.nameTypeList.forEach(sensor => { _params.nameTypeList.forEach(sensor => {
if (_realSensors[sensor.name]) {
sensor.name = _realSensors[sensor.name] sensor.name = _realSensors[sensor.name]
}
}); });
// 获取数据后,将原始数据中的dataModel这部分替换掉 // 获取数据后,将原始数据中的dataModel这部分替换掉
((await getStatisticsInfo(_params))?.data?.list?.[0].dNameDataList ?? [])?.forEach(obj => { ((await getStatisticsInfo(_params))?.data?.list?.[0].dNameDataList ?? [])?.forEach(obj => {
if (_realSensorsMap[obj.dName]) {
let _v = _tempValue[`needToReplace_${item.code}_${_realSensorsMap[obj.dName]}`]; let _v = _tempValue[`needToReplace_${item.code}_${_realSensorsMap[obj.dName]}`];
_v.dataModel = obj.nameDate.map(d => { _v.dataModel = obj.nameDate.map(d => {
return { return {
...@@ -141,6 +144,7 @@ const GridChart = memo((props) => { ...@@ -141,6 +144,7 @@ const GridChart = memo((props) => {
} }
}); });
_finalData[`needToReplace_${item.code}_${_realSensorsMap[obj.dName]}`] = _v; _finalData[`needToReplace_${item.code}_${_realSensorsMap[obj.dName]}`] = _v;
}
}); });
// 替换数据 // 替换数据
_dataSource.forEach((d, index) => { _dataSource.forEach((d, index) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment