perf: 根据type生成导出文件名

This commit is contained in:
wangruidong
2024-05-10 14:23:16 +08:00
committed by 老广
parent 7602d6e270
commit 428ba49f9c
3 changed files with 4 additions and 4 deletions

View File

@@ -83,7 +83,7 @@ export default {
callback: () => {
this.xterm.selectAll()
const text = this.xterm.getSelection()
const filename = `shortcut_cmd_${this.$route.query?.taskId}.log`
const filename = `${this.$route.query?.type}_${this.$route.query?.taskId}.log`
downloadText(text, filename)
}
}

View File

@@ -420,7 +420,7 @@ export default {
this.executionInfo.timeCost = 0
this.executionInfo.status = 'running'
this.currentTaskId = res.task_id
this.$router.replace({ query: { taskId: this.currentTaskId }})
this.$router.replace({ query: { taskId: this.currentTaskId, type: 'file_upload' }})
this.setCostTimeInterval()
this.writeExecutionOutput()
}).catch(() => {

View File

@@ -446,7 +446,7 @@ export default {
this.executionInfo.timeCost = 0
this.executionInfo.status = 'running'
this.currentTaskId = res.task_id
this.$router.replace({ query: { taskId: this.currentTaskId }})
this.$router.replace({ query: { taskId: this.currentTaskId, type: 'shortcut_cmd' }})
this.setCostTimeInterval()
this.writeExecutionOutput()
this.setBtn()
@@ -455,7 +455,7 @@ export default {
stop() {
StopJob({ task_id: this.currentTaskId }).then(() => {
this.xterm.write('\x1b[31m' +
this.$tc('ops.StopLogOutput').replace('currentTaskId', this.currentTaskId) + '\x1b[0m')
this.$tc('ops.StopLogOutput').replace('currentTaskId', this.currentTaskId) + '\x1b[0m')
this.xterm.write(this.wrapperError(''))
this.getTaskStatus()
}).catch((e) => {