NEZ-3434 fix:修复Chart DataLink变量替换失效的问题
This commit is contained in:
@@ -237,7 +237,6 @@ export default {
|
|||||||
this.seriesItem = this.filterShowData(this.storedTableData, this.pageObj, 'series')
|
this.seriesItem = this.filterShowData(this.storedTableData, this.pageObj, 'series')
|
||||||
},
|
},
|
||||||
filterShowData (source, pageObj, from) {
|
filterShowData (source, pageObj, from) {
|
||||||
console.log(123123123)
|
|
||||||
let orderBy = null
|
let orderBy = null
|
||||||
let sourceData = null
|
let sourceData = null
|
||||||
if (from === 'series') {
|
if (from === 'series') {
|
||||||
@@ -252,11 +251,9 @@ export default {
|
|||||||
source = Object.assign([], sourceData)
|
source = Object.assign([], sourceData)
|
||||||
} else { // 排序之后的顺序
|
} else { // 排序之后的顺序
|
||||||
if (orderBy.order === 'ascending') {
|
if (orderBy.order === 'ascending') {
|
||||||
console.log(source)
|
|
||||||
source = source.sort(this.$tableSet.asce(orderBy.prop, true))
|
source = source.sort(this.$tableSet.asce(orderBy.prop, true))
|
||||||
}
|
}
|
||||||
if (orderBy.order === 'descending') {
|
if (orderBy.order === 'descending') {
|
||||||
console.log(source)
|
|
||||||
source = source.sort(this.$tableSet.desc(orderBy.prop, true))
|
source = source.sort(this.$tableSet.desc(orderBy.prop, true))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -607,7 +604,6 @@ export default {
|
|||||||
},
|
},
|
||||||
// 数据排序
|
// 数据排序
|
||||||
tableDataSort (item) {
|
tableDataSort (item) {
|
||||||
console.log(item)
|
|
||||||
this.orderBy = { order: item.order, prop: item.prop }
|
this.orderBy = { order: item.order, prop: item.prop }
|
||||||
this.seriesItem = this.filterShowData(this.storedTableData, this.pageObj, 'series')
|
this.seriesItem = this.filterShowData(this.storedTableData, this.pageObj, 'series')
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -190,6 +190,7 @@ export default {
|
|||||||
label: alias,
|
label: alias,
|
||||||
scale: isRight ? 'right' : 'left', // right
|
scale: isRight ? 'right' : 'left', // right
|
||||||
yAxisIndex: isRight, // right
|
yAxisIndex: isRight, // right
|
||||||
|
labels: series.metric ? series.metric : {},
|
||||||
// values: (u, v) => series.elements.name + JSON.stringify(series.metric),
|
// values: (u, v) => series.elements.name + JSON.stringify(series.metric),
|
||||||
width: 1 / devicePixelRatio,
|
width: 1 / devicePixelRatio,
|
||||||
expressionIndex: series.expressionIndex,
|
expressionIndex: series.expressionIndex,
|
||||||
@@ -680,6 +681,7 @@ export default {
|
|||||||
className = 'yAxis-icon nz-icon nz-icon-youzongzhou'
|
className = 'yAxis-icon nz-icon nz-icon-youzongzhou'
|
||||||
}
|
}
|
||||||
const color = this.colorList[params.seriesIndex]
|
const color = this.colorList[params.seriesIndex]
|
||||||
|
const showValue = chartDataFormat.getUnit(unit).compute(val, null, -1, decimals)
|
||||||
this.toolbox.tooltipHtml = `
|
this.toolbox.tooltipHtml = `
|
||||||
<div class="nz-chart__tooltip">
|
<div class="nz-chart__tooltip">
|
||||||
<div class="tooltip-title" style="margin-bottom: 5px">${bus.timeFormate(tData)}</div>
|
<div class="tooltip-title" style="margin-bottom: 5px">${bus.timeFormate(tData)}</div>
|
||||||
@@ -689,13 +691,15 @@ export default {
|
|||||||
<span>${seriesName}</span>
|
<span>${seriesName}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="row__value">
|
<div class="row__value">
|
||||||
<span>${chartDataFormat.getUnit(unit).compute(val, null, -1, decimals)}</span>
|
<span>${showValue}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
this.toolbox.show = true
|
this.toolbox.show = true
|
||||||
this.toolbox.metric.labels = this.series[params.seriesIndex].labels
|
this.toolbox.metric.labels = this.series[params.seriesIndex].labels
|
||||||
|
this.toolbox.metric.labels.showValue = showValue
|
||||||
|
this.toolbox.metric.labels.value = val
|
||||||
this.toolbox.metric.expressionIndex = this.series[params.seriesIndex].expressionIndex
|
this.toolbox.metric.expressionIndex = this.series[params.seriesIndex].expressionIndex
|
||||||
this.toolbox.clickIndex = params.seriesIndex
|
this.toolbox.clickIndex = params.seriesIndex
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user