fix: 修复有些图表刷新按钮不生效的问题
This commit is contained in:
@@ -352,11 +352,12 @@ noDataDom.setAttribute('class', 'no-data')
|
|||||||
noDataDom.innerText = 'No data'
|
noDataDom.innerText = 'No data'
|
||||||
export const noData = {
|
export const noData = {
|
||||||
updated (el, binding) {
|
updated (el, binding) {
|
||||||
|
console.info(binding)
|
||||||
if (el && binding.oldValue !== binding.value) {
|
if (el && binding.oldValue !== binding.value) {
|
||||||
if (binding.value) {
|
if (binding.value) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
el.childNodes.forEach(node => {
|
el.childNodes.forEach(node => {
|
||||||
node.style.display = 'none'
|
node.style && (node.style.display = 'none')
|
||||||
})
|
})
|
||||||
el.insertBefore(noDataDom, el.childNodes[0])
|
el.insertBefore(noDataDom, el.childNodes[0])
|
||||||
})
|
})
|
||||||
@@ -370,7 +371,7 @@ export const noData = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
el.childNodes.forEach(node => {
|
el.childNodes.forEach(node => {
|
||||||
node.style.display = ''
|
node.style && (node.style.display = '')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1287,7 +1287,6 @@ export default {
|
|||||||
const queryParams = { ...this.queryTimeRange, ...this.entity }
|
const queryParams = { ...this.queryTimeRange, ...this.entity }
|
||||||
this.chartOption.series[0].tooltip = {
|
this.chartOption.series[0].tooltip = {
|
||||||
formatter: function (param) {
|
formatter: function (param) {
|
||||||
console.info(param)
|
|
||||||
return `
|
return `
|
||||||
<div class="sankey__tooltip">
|
<div class="sankey__tooltip">
|
||||||
<div class="sankey__tooltip-row">
|
<div class="sankey__tooltip-row">
|
||||||
@@ -1369,8 +1368,6 @@ export default {
|
|||||||
value: item.bytes
|
value: item.bytes
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.info(data)
|
|
||||||
console.info(link)
|
|
||||||
this.chartOption.series[0].data = data
|
this.chartOption.series[0].data = data
|
||||||
this.chartOption.series[0].links = link
|
this.chartOption.series[0].links = link
|
||||||
this.myChart.setOption(this.chartOption)
|
this.myChart.setOption(this.chartOption)
|
||||||
|
|||||||
@@ -63,7 +63,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="entity-detail__body">
|
<div class="entity-detail__body">
|
||||||
<div class="cn-panel">
|
<div class="cn-panel">
|
||||||
<chart v-for="chart in detailChartList" :key="chart.id" :chart="chart" :time-filter="timeFilter" :ref="`chart-${chart.id}`" :entity="entity"></chart>
|
<chart
|
||||||
|
v-for="chart in detailChartList"
|
||||||
|
:key="chart.id"
|
||||||
|
:chart="chart"
|
||||||
|
:time-filter="timeFilter"
|
||||||
|
:ref="`chart-${chart.id}`"
|
||||||
|
:entity="entity"
|
||||||
|
@getCurrentTimeRange="getCurrentTimeRange"
|
||||||
|
></chart>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user