fix: 修复 cellValue 取值问题

This commit is contained in:
Orange 2021-03-16 16:57:25 +08:00 committed by 老广
parent 3367363445
commit 324db2fdae
8 changed files with 10 additions and 10 deletions

View File

@ -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')

View File

@ -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'

View File

@ -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)
}

View File

@ -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()
})

View File

@ -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')
}
}

View File

@ -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 {

View File

@ -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 {

View File

@ -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')
}
}
]