fix: NEZ-3383 Topo 节点悬浮图表渲染异常,加载动画一直显示
This commit is contained in:
@@ -191,7 +191,6 @@ export default {
|
||||
fatherNowTimeType: {
|
||||
immediate: true,
|
||||
handler (n) {
|
||||
console.log(n)
|
||||
this.nowType = lodash.cloneDeep(n)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -935,7 +935,6 @@ export default {
|
||||
immediate: true,
|
||||
deep: true,
|
||||
handler (n) {
|
||||
// console.log(n)
|
||||
if (window.dataJson && this.loading) {
|
||||
this.loading = false
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -154,7 +154,6 @@ export default {
|
||||
})
|
||||
},
|
||||
uploadAsset (row) {
|
||||
console.log(row)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@ export function getHexagon (key) {
|
||||
export let topologyCache = {}
|
||||
|
||||
export function getTopology (key) {
|
||||
// console.log(topologyCache, 'topologyCache')
|
||||
return topologyCache[`topology${key}`]
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -588,7 +588,6 @@ export default {
|
||||
if (res !== null) {
|
||||
historyItems.options = historyItems.options.concat(res.options)
|
||||
}
|
||||
// console.log(historyItems)
|
||||
return historyItems
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user