fix: 修复表格获取ID异常的问题

This commit is contained in:
Orange
2021-03-03 16:56:14 +08:00
committed by 老广
parent 917d95cc7b
commit 159c6d8208
7 changed files with 13 additions and 13 deletions

View File

@@ -153,7 +153,7 @@ export default {
title: this.$t('common.View'),
type: 'primary',
callback: function(val) {
this.MFAInfo.asset = val.cellValue
this.MFAInfo.asset = val.row.id
if (!this.needMFAVerify) {
this.showMFADialog = true
this.MFAConfirmed = true

View File

@@ -59,8 +59,8 @@ export default {
name: 'connect',
fa: 'fa-terminal',
type: 'primary',
callback: function({ row, col, cellValue, reload }) {
window.open(`/luna/?type=database_app&login_to=${cellValue}`, '_blank')
callback: function({ row }) {
window.open(`/luna/?type=database_app&login_to=${row.id}`, '_blank')
}
}
]

View File

@@ -59,8 +59,8 @@ export default {
name: 'connect',
fa: 'fa-terminal',
type: 'primary',
callback: function({ row, col, cellValue, reload }) {
window.open(`/luna/?type=k8s_app&login_to=${cellValue}`, '_blank')
callback: function({ row }) {
window.open(`/luna/?type=k8s_app&login_to=${row.id}`, '_blank')
}
}
]

View File

@@ -58,8 +58,8 @@ export default {
name: 'connect',
fa: 'fa-terminal',
type: 'primary',
callback: function({ row, col, cellValue, reload }) {
window.open(`/luna/?type=remote_app&login_to=${cellValue}`, '_blank')
callback: function({ row }) {
window.open(`/luna/?type=remote_app&login_to=${row.id}`, '_blank')
}
}
]

View File

@@ -121,7 +121,7 @@ export default {
return row.is_active
},
callback: function({ row, col, cellValue, reload }) {
window.open(`/luna/?login_to=${cellValue}`, '_blank')
window.open(`/luna/?login_to=${row.id}`, '_blank')
}
},
{
@@ -134,7 +134,7 @@ export default {
return 'fa-star-o'
}.bind(this),
callback: function({ row, col, cellValue, reload }) {
this.addOrDeleteFavorite(cellValue)
this.addOrDeleteFavorite(row.id)
}.bind(this)
}
]

View File

@@ -149,8 +149,8 @@ export default {
name: 'View',
title: this.$t(`common.UpdateAssetDetail`),
type: 'primary',
callback: function({ cellValue, tableData }) {
return this.$router.push({ name: 'AssetMoreInformationEdit', params: { id: cellValue }})
callback: function({ cellValue, tableData, row }) {
return this.$router.push({ name: 'AssetMoreInformationEdit', params: { id: row.id }})
}
}
]

View File

@@ -22,9 +22,9 @@ export default {
can: (row, cellValue) => {
return row.can_terminate
},
callback: function({ reload, cellValue, tableData }) {
callback: function({ reload, row }) {
// 终断 session reload
const data = [cellValue]
const data = [row.id]
terminateSession(data).then(res => {
const msg = vm.$t('sessions.TerminateTaskSendSuccessMsg')
this.$message.success(msg)