fix: NEZ-3383 Topo 节点悬浮图表渲染异常,加载动画一直显示

This commit is contained in:
zhangyu
2024-01-18 14:06:11 +08:00
parent 8d19b0b2fa
commit eafeebbc5e
18 changed files with 16 additions and 24 deletions

View File

@@ -191,7 +191,6 @@ export default {
fatherNowTimeType: {
immediate: true,
handler (n) {
console.log(n)
this.nowType = lodash.cloneDeep(n)
}
}

View File

@@ -123,7 +123,7 @@ export default {
const mapConfig = JSON.parse(response.data.paramValue)
mapStyle.center = [Number(mapConfig.longitude), Number(mapConfig.latitude)]
mapStyle.zoom = Number(mapConfig.zoom)
const mapId = this.mapId = this.isFullscreen ? document.getElementById('map-screen-' + this.chartInfo.id) : document.getElementById('map' + this.chartInfo.id)
const mapId = this.mapId = this.isFullscreen ? ('map-screen-' + this.chartInfo.id) : ('map' + this.chartInfo.id)
let map = getChart(mapId) || null
if (map) {
map.remove()

View File

@@ -166,7 +166,6 @@ export default {
methods: {
initChart (chartOptions = this.chartOption) {
this.setDataLink()
console.log(JSON.stringify(this.chartData))
try {
this.isStack = this.chartInfo.param.stack
} catch (e) {}

View File

@@ -243,7 +243,6 @@ export default {
plugins: [
this.tooltipPlugin({
onclick (u, seriesIdx, dataIdx) {
console.log(u, seriesIdx, dataIdx, 'nz-tooltipClick')
}
})
],
@@ -405,6 +404,7 @@ export default {
chartUplot = new UPlot(opts, data, document.getElementById(`chart-canvas-${this.chartId}`))
setChart(this.chartId, chartUplot)
this.isInit = false
this.chartLoading = false
}, 100)
},
renderMinMax (opts) {

View File

@@ -693,8 +693,6 @@ export default {
},
renderThresholds () { // 画阈值线
const u = getChart(this.chartId)
console.log(u)
const thresholdsEnable = this.$lodash.get(this.chartInfo, 'param.enable.thresholds', false)
if (!thresholdsEnable || !u) {
return

View File

@@ -103,7 +103,6 @@ export default {
if (chartInfo.param.enable.rightYAxis) {
if (chartInfo.param.rightYAxis) {
const findItem = chartInfo.param.rightYAxis.elementNames.find(item => data.elements.name == item)
console.log(findItem)
if (findItem) {
s.yAxisIndex = 1
data.yAxisIndex = 1

View File

@@ -935,7 +935,6 @@ export default {
immediate: true,
deep: true,
handler (n) {
// console.log(n)
if (window.dataJson && this.loading) {
this.loading = false
}

View File

@@ -380,9 +380,7 @@ export default {
if (this.terminalSetting.copyTrimEnd) {
str = str.replace(/(\s*$)/g, '')
}
this.$copyText(str).then((res) => {
console.log(res)
})
this.$copyText(str).then((res) => {})
},
async contextmenu (event) {
event.preventDefault()

View File

@@ -154,7 +154,6 @@ export default {
})
},
uploadAsset (row) {
console.log(row)
}
}
}

View File

@@ -38,7 +38,6 @@ export function getHexagon (key) {
export let topologyCache = {}
export function getTopology (key) {
// console.log(topologyCache, 'topologyCache')
return topologyCache[`topology${key}`]
}

View File

@@ -394,7 +394,13 @@ export default {
boxHeight = null
})
this.position.show = true
// this.$refs.meta2dTooltip.$refs.panelChart && (this.$refs.meta2dTooltip.$refs.panelChart.loading = false)
setTimeout(()=>{
if (this.$refs.meta2dTooltip && this.$refs.meta2dTooltip.$refs.panelChart) {
this.$refs.meta2dTooltip.$refs.panelChart.loading = false
// console.log(this.chartParams)
// this.$refs.meta2dTooltip.$refs.panelChart.$refs.chart.$refs['chart' + this.meta2dId + 'meta2DTooltip'].chartLoading = false
}
}, 100)
clearTimeout(this.timer3)
}, 100)
}

View File

@@ -57,6 +57,7 @@ export default {
}
this.chartInfo.type = this.params.chartType || 'line'
this.chartInfo.id = this.meta2dId + 'meta2DTooltip'
// this.chartInfo.loaded = true
const chartData = []
const elements = []
const source = this.queryValues.find(query => query.name === this.params.legend && query.parent === this.params.parent)
@@ -100,8 +101,12 @@ export default {
this.chartInfo.elements = elements
this.$refs.panelChart.chartData = chartData
this.$refs.panelChart.loading = false
if (this.$refs.panelChart.$refs.chart && this.$refs.panelChart.$refs.chart.$refs['chart' + this.chartInfo.id]) {
this.$refs.panelChart.$refs.chart.$refs['chart' + this.chartInfo.id].isInit = true
}
this.$nextTick(() => {
this.$refs.panelChart.$refs.chart.$refs['chart' + this.chartInfo.id].chartLoading = true
this.$refs.panelChart.$refs.chart.$refs['chart' + this.chartInfo.id].initChart()
this.$refs.panelChart.$refs.chart.$refs['chart' + this.chartInfo.id].resize()
})

View File

@@ -259,7 +259,6 @@ export default {
return function (record) {
// 当 state = active | silence 时duration = 当前服务器时间result.time- startAt
if (record.state == 1 || record.state == 2) {
console.log(record.startAt, this.nowTime, record.endAt)
return calcDurationByStringTimeB(record.startAt, this.nowTime)
}
if (record.endAt) {

View File

@@ -193,7 +193,6 @@ export default {
},
methods: {
fn () {
console.log(666)
},
...mapActions(['logoutSuccess']),
// 测试是否能自动播放 若不能 点击开关时弹窗
@@ -201,7 +200,6 @@ export default {
const audio = new Audio(audioUrl)
audio.muted = true
audio.play().then(() => {
console.log('autoplay')
this.operationTutorial = false
}).catch((err) => {
console.log(err)

View File

@@ -1225,7 +1225,6 @@ export default {
chartCache[key].setOption(option)
}
this.$store.commit('setCurrentMousemove', 0)
console.log(value)
if (value && value !== 'none') {
this.$store.commit('setConnect', value)
// echarts.connect('timeSeriesGroup')

View File

@@ -4178,7 +4178,6 @@ export default {
}
}
})
console.log(this.uplotChartInfo.elements, this.uplotChartData)
// this.series = series
// this.$refs.exploreChart?.setLegend(legend)
// this.$refs.exploreChart?.setRandomColors(series.length)
@@ -4420,9 +4419,7 @@ export default {
promiseArr.push('')
}
})
Promise.all(promiseArr).then(res => {
console.log(res)
})
Promise.all(promiseArr).then(res => {})
this.queryLogData()
}
}

View File

@@ -663,7 +663,6 @@ export default {
return mergedArray
}
n.forEach((data) => {
console.log(data)
data.forEach((result, i) => {
seriesItem.name = 'logs'
const values = result.values.map((item) => {

View File

@@ -588,7 +588,6 @@ export default {
if (res !== null) {
historyItems.options = historyItems.options.concat(res.options)
}
// console.log(historyItems)
return historyItems
})
}