CN-35 feat: traffic summary

This commit is contained in:
chenjinsong
2021-06-29 19:45:44 +08:00
parent 08f3cb17a0
commit 2ab53f24c4
520 changed files with 20430 additions and 163 deletions

View File

@@ -51,16 +51,7 @@ export default {
}
},
async mounted () {
const panels = await getPanelList({ type: this.panelType })
if (panels && panels.length > 0) {
this.panel = panels[0]
}
if (this.panel.id) {
this.chartList = (await getChartList({ panelId: this.panel.id })).map(chart => { // 记得改回mao
chart.i = chart.id
return chart
})
}
await this.init()
},
setup (props, ctx) {
// data
@@ -101,16 +92,16 @@ export default {
},
methods: {
async init () {
// const panels = await getPanelList({ type: this.panelType })
// if (panels && panels.length > 0) {
// this.panel = panels[0]
// }
// if (this.panel.id) {
// this.chartList = (await getChartList({ panelId: this.panel.id })).map(chart => {
// chart.i = chart.id
// return chart
// })
// }
const panels = await getPanelList({ type: this.panelType })
if (panels && panels.length > 0) {
this.panel = panels[0]
}
if (this.panel.id) {
this.chartList = (await getChartList({ panelId: this.panel.id, pageSize: -1 })).map(chart => {
chart.i = chart.id
return chart
})
}
},
timeRefreshChange () {
if (!this.$refs.dateTimeRange) {