feat: 补充图表刷新反馈
This commit is contained in:
@@ -255,7 +255,9 @@ export default {
|
||||
const _this = this
|
||||
echartsData = echartsData.filter(t => t.show === true)
|
||||
const dom = document.getElementById('chart')
|
||||
this.myChart = echarts.init(dom)
|
||||
if (!this.myChart) {
|
||||
this.myChart = echarts.init(dom)
|
||||
}
|
||||
this.chartOption = stackedLineChartOption
|
||||
const chartOption = this.chartOption.series[0]
|
||||
this.chartOption.series = echartsData.map((t, i) => {
|
||||
|
||||
@@ -145,6 +145,7 @@ export default {
|
||||
// 获取table后三列内容
|
||||
const currentTrafficRequest = get(api.npm.overview.appTrafficAnalysis, { ...params, cycle: 0 })
|
||||
const lastCycleTrafficRequest = get(api.npm.overview.appTrafficAnalysis, { ...params, cycle: 1 })
|
||||
this.toggleLoading(true)
|
||||
Promise.all([currentTrafficRequest, lastCycleTrafficRequest]).then(res => {
|
||||
const prevData = res[1].data.result
|
||||
const data = res[0].data.result
|
||||
|
||||
@@ -29,6 +29,14 @@ export default {
|
||||
}
|
||||
},
|
||||
mixins: [chartMixin],
|
||||
watch: {
|
||||
timeFilter: {
|
||||
deep: true,
|
||||
handler (n) {
|
||||
this.loadAm4ChartMap(this.polygonSeries, this.worldImageSeries)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async initMap () {
|
||||
// 初始化插件
|
||||
@@ -102,6 +110,7 @@ export default {
|
||||
t.score = 6
|
||||
}
|
||||
})
|
||||
console.info(mapData)
|
||||
this.loadMarkerData(imageSeries, mapData)
|
||||
})
|
||||
}).finally(() => {
|
||||
|
||||
@@ -105,6 +105,12 @@ export default {
|
||||
this.country = n
|
||||
this.init()
|
||||
}
|
||||
},
|
||||
timeFilter: {
|
||||
deep: true,
|
||||
handler (n) {
|
||||
this.init()
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -192,7 +198,9 @@ export default {
|
||||
echartsInit (data, chartData, type) {
|
||||
const dom = document.getElementById(`chart${chartData.name}`)
|
||||
if (dom) {
|
||||
this.myChart = echarts.init(dom)
|
||||
if (!this.myChart) {
|
||||
this.myChart = echarts.init(dom)
|
||||
}
|
||||
this.chartOption = npmLineChartOption
|
||||
const seriesTemplate = this.chartOption.series[0]
|
||||
this.chartOption.color = this.chartData.params.color
|
||||
|
||||
@@ -35,6 +35,16 @@ export default {
|
||||
chartData: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
timeFilter: {
|
||||
deep: true,
|
||||
handler (n) {
|
||||
this.npmNetworkCycleData = []
|
||||
this.npmNetworkLastCycleData = []
|
||||
this.npmNetworkCycleQuery()
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
npmNetworkCycleQuery () {
|
||||
let condition = ''
|
||||
|
||||
@@ -62,6 +62,14 @@ export default {
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
timeFilter: {
|
||||
deep: true,
|
||||
handler (n) {
|
||||
this.recentEventsListData()
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
recentEventsListData () {
|
||||
const condition = this.$store.getters.getQueryCondition.split(/["|'](.*?)["|']/)
|
||||
|
||||
@@ -50,6 +50,14 @@ export default {
|
||||
chartData: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
timeFilter: {
|
||||
deep: true,
|
||||
handler (n) {
|
||||
this.init()
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init () {
|
||||
let condition = ''
|
||||
@@ -126,7 +134,9 @@ export default {
|
||||
},
|
||||
echartsInit (echartsData) {
|
||||
const dom = document.getElementById(this.chartData.name)
|
||||
this.myChart = echarts.init(dom)
|
||||
if (!this.myChart) {
|
||||
this.myChart = echarts.init(dom)
|
||||
}
|
||||
this.chartOption = trafficLineChartOption
|
||||
const chartOption = this.chartOption.series[0]
|
||||
this.chartOption.series = echartsData.map((t, i) => {
|
||||
|
||||
@@ -49,6 +49,14 @@ export default {
|
||||
serverSessions: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
timeFilter: {
|
||||
deep: true,
|
||||
handler (n) {
|
||||
this.relatedSessionsData()
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
relatedSessionsData () {
|
||||
const condition = this.$store.getters.getQueryCondition.split(/["|'](.*?)["|']/)
|
||||
|
||||
Reference in New Issue
Block a user