fix:修复 44.100表格数据显示不正确的问题
This commit is contained in:
@@ -757,7 +757,7 @@ export default {
|
|||||||
// 循环处理每个elements下获取的数据列
|
// 循环处理每个elements下获取的数据列
|
||||||
if (chartItem.type === 'singleStat') {
|
if (chartItem.type === 'singleStat') {
|
||||||
if (response.data.result.length === 1) {
|
if (response.data.result.length === 1) {
|
||||||
const statistics = chartItem.param.statistics
|
const statistics = chartItem.param.statistics || 'null'
|
||||||
if (response.data.result[0].values) {
|
if (response.data.result[0].values) {
|
||||||
singleStatRlt = bus.getSingleStatRlt(statistics, response.data.result[0].values)
|
singleStatRlt = bus.getSingleStatRlt(statistics, response.data.result[0].values)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -946,7 +946,7 @@ export default {
|
|||||||
// 循环处理每个elements下获取的数据列
|
// 循环处理每个elements下获取的数据列
|
||||||
if (chartItem.type === 'singleStat') {
|
if (chartItem.type === 'singleStat') {
|
||||||
if (response.data.result.length === 1) {
|
if (response.data.result.length === 1) {
|
||||||
const statistics = chartItem.param.statistics
|
const statistics = chartItem.param.statistics || 'null'
|
||||||
if (response.data.result[0].values) {
|
if (response.data.result[0].values) {
|
||||||
singleStatRlt = bus.getSingleStatRlt(statistics, response.data.result[0].values)
|
singleStatRlt = bus.getSingleStatRlt(statistics, response.data.result[0].values)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.data = chartItem
|
this.data = chartItem
|
||||||
this.unit = chartDataFormat.getUnit(this.data.unit)
|
this.unit = chartDataFormat.getUnit(this.data.unit)
|
||||||
const statistics = chartItem.param.statistics
|
const statistics = chartItem.param.statistics || 'null'
|
||||||
seriesItem = this.getStatisticsResult(statistics, seriesItem)
|
seriesItem = this.getStatisticsResult(statistics, seriesItem)
|
||||||
seriesItem && (seriesItem = seriesItem.map(item => {
|
seriesItem && (seriesItem = seriesItem.map(item => {
|
||||||
if (chartItem.param && chartItem.param.valueMapping && chartItem.param.valueMapping.type) {
|
if (chartItem.param && chartItem.param.valueMapping && chartItem.param.valueMapping.type) {
|
||||||
@@ -584,6 +584,17 @@ export default {
|
|||||||
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
default : {
|
||||||
|
copy.sort((x, y) => { return parseFloat(y.data[0]) - parseFloat(x.data[0]) })
|
||||||
|
result = copy.map(item => {
|
||||||
|
return {
|
||||||
|
element: item.element,
|
||||||
|
time: bus.timeFormate(new Date(item.data[0]), 'yyyy-MM-dd hh:mm:ss'),
|
||||||
|
value: item.data[1]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -470,7 +470,7 @@ export default {
|
|||||||
if (response.data.result) {
|
if (response.data.result) {
|
||||||
if (chartItem.type === 'singleStat') {
|
if (chartItem.type === 'singleStat') {
|
||||||
if (response.data.result.length === 1) {
|
if (response.data.result.length === 1) {
|
||||||
const statistics = chartItem.param.statistics
|
const statistics = chartItem.param.statistics || 'null'
|
||||||
if (response.data.result[0].values) {
|
if (response.data.result[0].values) {
|
||||||
singleStatRlt = bus.getSingleStatRlt(statistics, response.data.result[0].values)
|
singleStatRlt = bus.getSingleStatRlt(statistics, response.data.result[0].values)
|
||||||
this.noData = false
|
this.noData = false
|
||||||
|
|||||||
Reference in New Issue
Block a user