diff --git a/src/components/AssetUserTable/index.vue b/src/components/AssetUserTable/index.vue index fe997f601..240edd26c 100644 --- a/src/components/AssetUserTable/index.vue +++ b/src/components/AssetUserTable/index.vue @@ -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 diff --git a/src/userviews/apps/DatabaseApp.vue b/src/userviews/apps/DatabaseApp.vue index c6f1da9da..9174862ef 100644 --- a/src/userviews/apps/DatabaseApp.vue +++ b/src/userviews/apps/DatabaseApp.vue @@ -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') } } ] diff --git a/src/userviews/apps/KubernetesApp.vue b/src/userviews/apps/KubernetesApp.vue index 5b531e510..129396426 100644 --- a/src/userviews/apps/KubernetesApp.vue +++ b/src/userviews/apps/KubernetesApp.vue @@ -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') } } ] diff --git a/src/userviews/apps/RemoteApp.vue b/src/userviews/apps/RemoteApp.vue index 4711ada9b..ac1f103e6 100644 --- a/src/userviews/apps/RemoteApp.vue +++ b/src/userviews/apps/RemoteApp.vue @@ -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') } } ] diff --git a/src/userviews/assets/index.vue b/src/userviews/assets/index.vue index 7fd7a8e16..c17f4171b 100644 --- a/src/userviews/assets/index.vue +++ b/src/userviews/assets/index.vue @@ -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) } ] diff --git a/src/views/assets/Asset/AssetList.vue b/src/views/assets/Asset/AssetList.vue index 8f51c5fd6..c3c6024a8 100644 --- a/src/views/assets/Asset/AssetList.vue +++ b/src/views/assets/Asset/AssetList.vue @@ -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 }}) } } ] diff --git a/src/views/sessions/SessionList/OnlineList.vue b/src/views/sessions/SessionList/OnlineList.vue index 7b593c4b0..bca8eb90d 100644 --- a/src/views/sessions/SessionList/OnlineList.vue +++ b/src/views/sessions/SessionList/OnlineList.vue @@ -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)