接口字段调整,及相应的逻辑修改,将 sourceId 换成hostId

处理 overView 页面跳转 instances 页面失败的问题
This commit is contained in:
任珮宇 2023-09-27 09:42:41 +08:00
parent 4f73b1b5b2
commit 11d8d0bd4d
2 changed files with 7 additions and 4 deletions

View File

@ -466,9 +466,10 @@ export default {
this.ipagination.total = res.result.total
this.dataSource = res.result.records
if (this.$route.query.serverId) {
this.currId = this.$route.query.serverId
this.currIndex = this.dataSource.findIndex((item) => item.hostId === this.currId)
this.currItemId = this.dataSource.find((item) => item.hostId === this.currId).cpuUsedItemId
this.serverId = this.$route.query.serverId
this.currIndex = this.dataSource.findIndex((item) => item.sourceId === this.serverId)
this.currId = this.dataSource.find((item) => item.sourceId === this.serverId).hostId
this.currItemId = this.dataSource.find((item) => item.sourceId === this.serverId).cpuUsedItemId
} else {
this.currId = this.dataSource[0].hostId
this.currItemId = this.dataSource[0].cpuUsedItemId

View File

@ -353,7 +353,9 @@ export default {
value: item.hostId,
}
})
this.queryParams.server = this.$route.query.serverId || res.result[0].hostId
let serverId = this.$route.query.serverId
this.queryParams.server = '10483'
// this.serverOptions.find((item) => item.sourceId === serverId).hostId || res.result[0].hostId
this.getRankProcesses()
} else {
this.$message.warning('This operation fails. Contact your system administrator')