mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-15 14:24:39 +00:00
fix: 修复表格获取ID异常的问题
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 }})
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user