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

This commit is contained in:
Orange
2021-03-03 17:01:48 +08:00
committed by 老广
parent 159c6d8208
commit 1c39d33d43
2 changed files with 5 additions and 4 deletions

View File

@@ -20,9 +20,9 @@ export default {
can: (row, cellValue) => { can: (row, cellValue) => {
return row.can_replay return row.can_replay
}, },
callback: function({ cellValue, tableData }) { callback: function({ row, tableData }) {
// 跳转到luna页面 // 跳转到luna页面
const replayUrl = '/luna/replay/' + cellValue const replayUrl = '/luna/replay/' + row.id
window.open(replayUrl) window.open(replayUrl)
} }
}, },
@@ -33,9 +33,9 @@ export default {
can: (row, cellValue) => { can: (row, cellValue) => {
return row.can_replay return row.can_replay
}, },
callback: function({ cellValue, tableData }) { callback: function({ row, tableData }) {
// 跳转下载页面 // 跳转下载页面
const downloadUrl = `/api/v1/terminal/sessions/${cellValue}/replay/download/` const downloadUrl = `/api/v1/terminal/sessions/${row.id}/replay/download/`
const a = document.createElement('a') const a = document.createElement('a')
a.href = downloadUrl a.href = downloadUrl

View File

@@ -129,6 +129,7 @@ export default {
return () => { this.$router.push({ name: 'AccountCreate', query: { provider: provider }}) } return () => { this.$router.push({ name: 'AccountCreate', query: { provider: provider }}) }
} }
} }
} }
</script> </script>