fix: 修改projet页面 显示悬浮窗 topo不断刷新的问题
This commit is contained in:
@@ -142,7 +142,9 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
tableHeight: '100%',
|
tableHeight: '100%',
|
||||||
searchLabel: {},
|
searchLabel: {},
|
||||||
deleteBox: {}
|
deleteBox: {},
|
||||||
|
needAlertDaysData: true,
|
||||||
|
trendKey: 'assetId'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@@ -165,6 +167,25 @@ export default {
|
|||||||
this.$get(this.url, { ...this.searchLabel }).then(response => {
|
this.$get(this.url, { ...this.searchLabel }).then(response => {
|
||||||
this.tools.loading = false
|
this.tools.loading = false
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
|
if (this.needAlertDaysData) {
|
||||||
|
response.data.list.forEach(item => {
|
||||||
|
item.trendLoading = true
|
||||||
|
item.alertDaysData = [
|
||||||
|
{
|
||||||
|
metric: { priority: 'P1' },
|
||||||
|
values: [[0, 0]]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
metric: { priority: 'P2' },
|
||||||
|
values: [[0, 0]]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
metric: { priority: 'P3' },
|
||||||
|
values: [[0, 0]]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
this.tableData = response.data.list
|
this.tableData = response.data.list
|
||||||
this.deleteBox.ids = ''
|
this.deleteBox.ids = ''
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
|
|||||||
@@ -134,7 +134,9 @@ export default {
|
|||||||
searchLabel: {
|
searchLabel: {
|
||||||
|
|
||||||
},
|
},
|
||||||
deleteBox: {}
|
deleteBox: {},
|
||||||
|
needAlertDaysData: true,
|
||||||
|
trendKey: 'endpointId'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@@ -171,6 +173,25 @@ export default {
|
|||||||
d.port = JSON.parse(d.configs[0].config).port
|
d.port = JSON.parse(d.configs[0].config).port
|
||||||
d.path = JSON.parse(d.configs[0].config).protocol
|
d.path = JSON.parse(d.configs[0].config).protocol
|
||||||
})
|
})
|
||||||
|
if (this.needAlertDaysData) {
|
||||||
|
response.data.list.forEach(item => {
|
||||||
|
item.trendLoading = true
|
||||||
|
item.alertDaysData = [
|
||||||
|
{
|
||||||
|
metric: { priority: 'P1' },
|
||||||
|
values: [[0, 0]]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
metric: { priority: 'P2' },
|
||||||
|
values: [[0, 0]]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
metric: { priority: 'P3' },
|
||||||
|
values: [[0, 0]]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
this.tableData = response.data.list
|
this.tableData = response.data.list
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -550,8 +550,8 @@ export default {
|
|||||||
obj: {
|
obj: {
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler (n) {
|
handler (n, o) {
|
||||||
if (n && n.id) {
|
if (n && n.id && n.id !== o.id) {
|
||||||
// if (getTopology(this.topologyIndex)) {
|
// if (getTopology(this.topologyIndex)) {
|
||||||
// getTopology(this.topologyIndex).destroy()
|
// getTopology(this.topologyIndex).destroy()
|
||||||
// setTopology(this.topologyIndex, null)
|
// setTopology(this.topologyIndex, null)
|
||||||
|
|||||||
Reference in New Issue
Block a user