fix:快照添加panel变量

This commit is contained in:
zhangyu
2022-07-25 15:36:58 +08:00
parent 00e1e97fae
commit a529001f82
3 changed files with 12 additions and 2 deletions

View File

@@ -7,11 +7,18 @@ export default {
},
methods: {
exportToHtml (name) {
const vars = this.$store.getters.getVariablesArr.map(item => {
return {
"name": item.name,
"value": item.checked.join('|')
}
})
const params = {
format: 'html',
panelId: this.showPanel.id,
start: this.$stringTimeParseToUnix(bus.formateTimeToTime(this.searchTime[0])),
end: this.$stringTimeParseToUnix(bus.formateTimeToTime(this.searchTime[1]))
end: this.$stringTimeParseToUnix(bus.formateTimeToTime(this.searchTime[1])),
vars: vars
}
this.$get('/visual/panel/snapshot', params, 'blob').then(res => {
const self = this