diff --git a/src/frontend/src/domain/source/task-execute.js b/src/frontend/src/domain/source/task-execute.js index 4a5f9579cb..bb885fe076 100644 --- a/src/frontend/src/domain/source/task-execute.js +++ b/src/frontend/src/domain/source/task-execute.js @@ -226,10 +226,11 @@ class TaskExecute extends ModuleBase { // 下载执行日志文件 getLogFile(payload) { - const params = {}; - if (payload.ip) { - params.ip = payload.ip; - } + const params = { + ...payload, + }; + delete params.id; + return Request.download(`${this.path}/step-execution-result/${payload.id}/log-file/download`, { params, }); diff --git a/src/frontend/src/views/executive-history/step-detail/components/execution-info/index.vue b/src/frontend/src/views/executive-history/step-detail/components/execution-info/index.vue index b34fb06c14..94daaaa7fb 100644 --- a/src/frontend/src/views/executive-history/step-detail/components/execution-info/index.vue +++ b/src/frontend/src/views/executive-history/step-detail/components/execution-info/index.vue @@ -286,7 +286,7 @@ handleDownload() { TaskExecuteService.fetchStepExecutionLogFile({ id: this.stepInstanceId, - ip: this.host.hostId, + hostId: this.host.hostId, }).then(() => { this.$bkMessage({ theme: 'success', diff --git a/src/frontend/src/views/executive-history/step-detail/index.vue b/src/frontend/src/views/executive-history/step-detail/index.vue index 1077b4c5c9..dfbe0a1ed9 100644 --- a/src/frontend/src/views/executive-history/step-detail/index.vue +++ b/src/frontend/src/views/executive-history/step-detail/index.vue @@ -551,19 +551,6 @@ execCopy(fieldDataList.join('\n'), successMessage); }); }, - /** - * @desc 导出脚本执行日志 - */ - handleExportExecutionLog() { - TaskExecuteService.fetchStepExecutionLogFile({ - id: this.params.id, - }).then(() => { - this.$bkMessage({ - theme: 'success', - message: I18n.t('history.导出日志操作成功'), - }); - }); - }, /** * @desc 开始强制终止 */