fix: 修改保存的参数

This commit is contained in:
zhangyu
2023-03-14 18:13:54 +08:00
parent a301c7e0c8
commit 488ba27f1c
4 changed files with 20 additions and 22 deletions

View File

@@ -20,20 +20,19 @@ export default {
if (this.currentProject.id) {
this.$get('monitor/project/topo', { projectId: this.currentProject.id }).then(res => {
if (res.data && res.data.topo) {
this.topoData = res.data.topo.topo || {}
this.topoData = res.data.topo || {}
if (res.data.topo.topo) {
this.topoData = res.data.topo.topo || {}
}
this.querysArray = res.data.topo.elements || []
this.params = {
timeType: res.data.topo.timeType || 5,
unit: res.data.topo.unit || 1,
statistic: res.data.topo.statistic || 'last',
timeType: res.data.topo.timeType || 5
}
} else {
this.topoData = {}
this.querysArray = []
this.params = {
timeType: 5,
unit: 1,
statistic: 'last'
timeType: 5
}
}
})