mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-01 15:11:16 +00:00
fix: 修复 cellValue 取值问题
This commit is contained in:
parent
3367363445
commit
324db2fdae
@ -178,7 +178,7 @@ export default {
|
||||
title: this.$t('common.Delete'),
|
||||
type: 'primary',
|
||||
callback: (val) => {
|
||||
this.$axios.delete(`/api/v1/assets/asset-users/${val.cellValue}/`).then(() => {
|
||||
this.$axios.delete(`/api/v1/assets/asset-users/${val.row.id}/`).then(() => {
|
||||
this.$message.success(this.$t('common.deleteSuccessMsg'))
|
||||
this.$refs.ListTable.reloadTable()
|
||||
})
|
||||
@ -189,7 +189,7 @@ export default {
|
||||
title: this.$t('common.Test'),
|
||||
callback: (val) => {
|
||||
this.$axios.post(
|
||||
`/api/v1/assets/asset-users/tasks/?id=${val.cellValue}`,
|
||||
`/api/v1/assets/asset-users/tasks/?id=${val.row.id}`,
|
||||
{ action: 'test' }
|
||||
).then(res => {
|
||||
window.open(`/#/ops/celery/task/${res.task}/log/`, '', 'width=900,height=600')
|
||||
|
@ -128,7 +128,7 @@ export default {
|
||||
name: 'favor',
|
||||
type: 'info',
|
||||
fa: function(row, cellValue) {
|
||||
if (this.checkFavorite(cellValue)) {
|
||||
if (this.checkFavorite(row.id)) {
|
||||
return 'fa-star'
|
||||
}
|
||||
return 'fa-star-o'
|
||||
|
@ -81,7 +81,7 @@ export default {
|
||||
return this.$message.error(this.$t('common.BadRequestErrorMsg'))
|
||||
} else {
|
||||
this.portInput = val.row.port
|
||||
this.cellValue = val.cellValue
|
||||
this.cellValue = val.row.id
|
||||
}
|
||||
}.bind(this)
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ export default {
|
||||
title: this.$t('common.Delete'),
|
||||
type: 'danger',
|
||||
callback: (val) => {
|
||||
this.$axios.delete(`/api/v1/assets/system-users-assets-relations/${val.cellValue}/`).then(() => {
|
||||
this.$axios.delete(`/api/v1/assets/system-users-assets-relations/${val.row.id}/`).then(() => {
|
||||
this.$message.success(this.$t('common.deleteSuccessMsg'))
|
||||
this.$refs.ListTable.reloadTable()
|
||||
})
|
||||
|
@ -42,9 +42,9 @@ export default {
|
||||
can: (row, cellValue) => {
|
||||
return row.can_join
|
||||
},
|
||||
callback: function({ cellValue, tableData }) {
|
||||
callback: function({ row, tableData }) {
|
||||
// 跳转到luna页面
|
||||
const joinUrl = '/luna/join/?shareroom=' + cellValue
|
||||
const joinUrl = '/luna/join/?shareroom=' + row.id
|
||||
window.open(joinUrl, 'height=600, width=800, top=400, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ export default {
|
||||
title: this.$t('sessions.test'),
|
||||
type: 'primary',
|
||||
callback: function({ row, col, cellValue, reload }) {
|
||||
TestCommandStorage(cellValue).then(data => {
|
||||
TestCommandStorage(row.id).then(data => {
|
||||
if (!data.is_valid) {
|
||||
this.$message.error(data.msg)
|
||||
} else {
|
||||
|
@ -93,7 +93,7 @@ export default {
|
||||
title: this.$t('sessions.test'),
|
||||
type: 'primary',
|
||||
callback: function({ row, col, cellValue, reload }) {
|
||||
TestReplayStorage(cellValue).then(data => {
|
||||
TestReplayStorage(row.id).then(data => {
|
||||
if (!data.is_valid) {
|
||||
this.$message.error(data.msg)
|
||||
} else {
|
||||
|
@ -67,7 +67,7 @@ export default {
|
||||
title: this.$t('common.View'),
|
||||
type: 'primary',
|
||||
callback: function(val) {
|
||||
window.open(`/#/ops/celery/task/${val.cellValue}/log/`, '', 'width=900,height=600')
|
||||
window.open(`/#/ops/celery/task/${val.row.id}/log/`, '', 'width=900,height=600')
|
||||
}
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user