fix: NEZ-3383 Topo 节点悬浮图表渲染异常,加载动画一直显示
This commit is contained in:
@@ -191,7 +191,6 @@ export default {
|
|||||||
fatherNowTimeType: {
|
fatherNowTimeType: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler (n) {
|
handler (n) {
|
||||||
console.log(n)
|
|
||||||
this.nowType = lodash.cloneDeep(n)
|
this.nowType = lodash.cloneDeep(n)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ export default {
|
|||||||
const mapConfig = JSON.parse(response.data.paramValue)
|
const mapConfig = JSON.parse(response.data.paramValue)
|
||||||
mapStyle.center = [Number(mapConfig.longitude), Number(mapConfig.latitude)]
|
mapStyle.center = [Number(mapConfig.longitude), Number(mapConfig.latitude)]
|
||||||
mapStyle.zoom = Number(mapConfig.zoom)
|
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
|
let map = getChart(mapId) || null
|
||||||
if (map) {
|
if (map) {
|
||||||
map.remove()
|
map.remove()
|
||||||
|
|||||||
@@ -166,7 +166,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
initChart (chartOptions = this.chartOption) {
|
initChart (chartOptions = this.chartOption) {
|
||||||
this.setDataLink()
|
this.setDataLink()
|
||||||
console.log(JSON.stringify(this.chartData))
|
|
||||||
try {
|
try {
|
||||||
this.isStack = this.chartInfo.param.stack
|
this.isStack = this.chartInfo.param.stack
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|||||||
@@ -243,7 +243,6 @@ export default {
|
|||||||
plugins: [
|
plugins: [
|
||||||
this.tooltipPlugin({
|
this.tooltipPlugin({
|
||||||
onclick (u, seriesIdx, dataIdx) {
|
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}`))
|
chartUplot = new UPlot(opts, data, document.getElementById(`chart-canvas-${this.chartId}`))
|
||||||
setChart(this.chartId, chartUplot)
|
setChart(this.chartId, chartUplot)
|
||||||
this.isInit = false
|
this.isInit = false
|
||||||
|
this.chartLoading = false
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
renderMinMax (opts) {
|
renderMinMax (opts) {
|
||||||
|
|||||||
@@ -693,8 +693,6 @@ export default {
|
|||||||
},
|
},
|
||||||
renderThresholds () { // 画阈值线
|
renderThresholds () { // 画阈值线
|
||||||
const u = getChart(this.chartId)
|
const u = getChart(this.chartId)
|
||||||
console.log(u)
|
|
||||||
|
|
||||||
const thresholdsEnable = this.$lodash.get(this.chartInfo, 'param.enable.thresholds', false)
|
const thresholdsEnable = this.$lodash.get(this.chartInfo, 'param.enable.thresholds', false)
|
||||||
if (!thresholdsEnable || !u) {
|
if (!thresholdsEnable || !u) {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -103,7 +103,6 @@ export default {
|
|||||||
if (chartInfo.param.enable.rightYAxis) {
|
if (chartInfo.param.enable.rightYAxis) {
|
||||||
if (chartInfo.param.rightYAxis) {
|
if (chartInfo.param.rightYAxis) {
|
||||||
const findItem = chartInfo.param.rightYAxis.elementNames.find(item => data.elements.name == item)
|
const findItem = chartInfo.param.rightYAxis.elementNames.find(item => data.elements.name == item)
|
||||||
console.log(findItem)
|
|
||||||
if (findItem) {
|
if (findItem) {
|
||||||
s.yAxisIndex = 1
|
s.yAxisIndex = 1
|
||||||
data.yAxisIndex = 1
|
data.yAxisIndex = 1
|
||||||
|
|||||||
@@ -935,7 +935,6 @@ export default {
|
|||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true,
|
deep: true,
|
||||||
handler (n) {
|
handler (n) {
|
||||||
// console.log(n)
|
|
||||||
if (window.dataJson && this.loading) {
|
if (window.dataJson && this.loading) {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -380,9 +380,7 @@ export default {
|
|||||||
if (this.terminalSetting.copyTrimEnd) {
|
if (this.terminalSetting.copyTrimEnd) {
|
||||||
str = str.replace(/(\s*$)/g, '')
|
str = str.replace(/(\s*$)/g, '')
|
||||||
}
|
}
|
||||||
this.$copyText(str).then((res) => {
|
this.$copyText(str).then((res) => {})
|
||||||
console.log(res)
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
async contextmenu (event) {
|
async contextmenu (event) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|||||||
@@ -154,7 +154,6 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
uploadAsset (row) {
|
uploadAsset (row) {
|
||||||
console.log(row)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ export function getHexagon (key) {
|
|||||||
export let topologyCache = {}
|
export let topologyCache = {}
|
||||||
|
|
||||||
export function getTopology (key) {
|
export function getTopology (key) {
|
||||||
// console.log(topologyCache, 'topologyCache')
|
|
||||||
return topologyCache[`topology${key}`]
|
return topologyCache[`topology${key}`]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -394,7 +394,13 @@ export default {
|
|||||||
boxHeight = null
|
boxHeight = null
|
||||||
})
|
})
|
||||||
this.position.show = true
|
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)
|
clearTimeout(this.timer3)
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.chartInfo.type = this.params.chartType || 'line'
|
this.chartInfo.type = this.params.chartType || 'line'
|
||||||
this.chartInfo.id = this.meta2dId + 'meta2DTooltip'
|
this.chartInfo.id = this.meta2dId + 'meta2DTooltip'
|
||||||
|
// this.chartInfo.loaded = true
|
||||||
const chartData = []
|
const chartData = []
|
||||||
const elements = []
|
const elements = []
|
||||||
const source = this.queryValues.find(query => query.name === this.params.legend && query.parent === this.params.parent)
|
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.chartInfo.elements = elements
|
||||||
this.$refs.panelChart.chartData = chartData
|
this.$refs.panelChart.chartData = chartData
|
||||||
this.$refs.panelChart.loading = false
|
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.$nextTick(() => {
|
||||||
this.$refs.panelChart.$refs.chart.$refs['chart' + this.chartInfo.id].chartLoading = true
|
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].initChart()
|
||||||
this.$refs.panelChart.$refs.chart.$refs['chart' + this.chartInfo.id].resize()
|
this.$refs.panelChart.$refs.chart.$refs['chart' + this.chartInfo.id].resize()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -259,7 +259,6 @@ export default {
|
|||||||
return function (record) {
|
return function (record) {
|
||||||
// 当 state = active | silence 时,duration = 当前服务器时间(result.time)- startAt
|
// 当 state = active | silence 时,duration = 当前服务器时间(result.time)- startAt
|
||||||
if (record.state == 1 || record.state == 2) {
|
if (record.state == 1 || record.state == 2) {
|
||||||
console.log(record.startAt, this.nowTime, record.endAt)
|
|
||||||
return calcDurationByStringTimeB(record.startAt, this.nowTime)
|
return calcDurationByStringTimeB(record.startAt, this.nowTime)
|
||||||
}
|
}
|
||||||
if (record.endAt) {
|
if (record.endAt) {
|
||||||
|
|||||||
@@ -193,7 +193,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fn () {
|
fn () {
|
||||||
console.log(666)
|
|
||||||
},
|
},
|
||||||
...mapActions(['logoutSuccess']),
|
...mapActions(['logoutSuccess']),
|
||||||
// 测试是否能自动播放 若不能 点击开关时弹窗
|
// 测试是否能自动播放 若不能 点击开关时弹窗
|
||||||
@@ -201,7 +200,6 @@ export default {
|
|||||||
const audio = new Audio(audioUrl)
|
const audio = new Audio(audioUrl)
|
||||||
audio.muted = true
|
audio.muted = true
|
||||||
audio.play().then(() => {
|
audio.play().then(() => {
|
||||||
console.log('autoplay')
|
|
||||||
this.operationTutorial = false
|
this.operationTutorial = false
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
|
|||||||
@@ -1225,7 +1225,6 @@ export default {
|
|||||||
chartCache[key].setOption(option)
|
chartCache[key].setOption(option)
|
||||||
}
|
}
|
||||||
this.$store.commit('setCurrentMousemove', 0)
|
this.$store.commit('setCurrentMousemove', 0)
|
||||||
console.log(value)
|
|
||||||
if (value && value !== 'none') {
|
if (value && value !== 'none') {
|
||||||
this.$store.commit('setConnect', value)
|
this.$store.commit('setConnect', value)
|
||||||
// echarts.connect('timeSeriesGroup')
|
// echarts.connect('timeSeriesGroup')
|
||||||
|
|||||||
@@ -4178,7 +4178,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(this.uplotChartInfo.elements, this.uplotChartData)
|
|
||||||
// this.series = series
|
// this.series = series
|
||||||
// this.$refs.exploreChart?.setLegend(legend)
|
// this.$refs.exploreChart?.setLegend(legend)
|
||||||
// this.$refs.exploreChart?.setRandomColors(series.length)
|
// this.$refs.exploreChart?.setRandomColors(series.length)
|
||||||
@@ -4420,9 +4419,7 @@ export default {
|
|||||||
promiseArr.push('')
|
promiseArr.push('')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
Promise.all(promiseArr).then(res => {
|
Promise.all(promiseArr).then(res => {})
|
||||||
console.log(res)
|
|
||||||
})
|
|
||||||
this.queryLogData()
|
this.queryLogData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -663,7 +663,6 @@ export default {
|
|||||||
return mergedArray
|
return mergedArray
|
||||||
}
|
}
|
||||||
n.forEach((data) => {
|
n.forEach((data) => {
|
||||||
console.log(data)
|
|
||||||
data.forEach((result, i) => {
|
data.forEach((result, i) => {
|
||||||
seriesItem.name = 'logs'
|
seriesItem.name = 'logs'
|
||||||
const values = result.values.map((item) => {
|
const values = result.values.map((item) => {
|
||||||
|
|||||||
@@ -588,7 +588,6 @@ export default {
|
|||||||
if (res !== null) {
|
if (res !== null) {
|
||||||
historyItems.options = historyItems.options.concat(res.options)
|
historyItems.options = historyItems.options.concat(res.options)
|
||||||
}
|
}
|
||||||
// console.log(historyItems)
|
|
||||||
return historyItems
|
return historyItems
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user