fix:快照添加panel变量
This commit is contained in:
@@ -7,11 +7,18 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
exportToHtml (name) {
|
exportToHtml (name) {
|
||||||
|
const vars = this.$store.getters.getVariablesArr.map(item => {
|
||||||
|
return {
|
||||||
|
"name": item.name,
|
||||||
|
"value": item.checked.join('|')
|
||||||
|
}
|
||||||
|
})
|
||||||
const params = {
|
const params = {
|
||||||
format: 'html',
|
format: 'html',
|
||||||
panelId: this.showPanel.id,
|
panelId: this.showPanel.id,
|
||||||
start: this.$stringTimeParseToUnix(bus.formateTimeToTime(this.searchTime[0])),
|
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 => {
|
this.$get('/visual/panel/snapshot', params, 'blob').then(res => {
|
||||||
const self = this
|
const self = this
|
||||||
|
|||||||
@@ -396,6 +396,9 @@ export default {
|
|||||||
item.visible = false
|
item.visible = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
beforeDestroy () {
|
||||||
|
this.$store.dispatch('dispatchVariablesArr', [])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user