diff --git a/src/components/Widgets/Term/index.vue b/src/components/Widgets/Term/index.vue index 64f90afa0..0fc65252b 100644 --- a/src/components/Widgets/Term/index.vue +++ b/src/components/Widgets/Term/index.vue @@ -86,7 +86,7 @@ export default { callback: () => { this.xterm.selectAll() const text = this.xterm.getSelection() - const filename = `${this.$route.query?.type}_${this.$route.query?.taskId}.log` + const filename = `${this.xtermConfig?.type}_${this.xtermConfig?.taskId}.log` downloadText(text, filename) } } diff --git a/src/views/ops/Adhoc/QuickJob.vue b/src/views/ops/Adhoc/QuickJob.vue index 96dc58752..2540a18aa 100644 --- a/src/views/ops/Adhoc/QuickJob.vue +++ b/src/views/ops/Adhoc/QuickJob.vue @@ -98,7 +98,7 @@ export default { left: { run: { type: 'button', - name: this.$t('Run'), + name: '', align: 'left', icon: 'fa fa-play', tip: this.$t('RunCommand'), @@ -112,7 +112,7 @@ export default { }, stop: { type: 'button', - name: this.$t('Stop'), + name: '', align: 'left', icon: 'fa fa-stop', tip: this.$t('StopJob'), @@ -447,7 +447,7 @@ export default { this.executionInfo.timeCost = 0 this.executionInfo.status = 'running' this.currentTaskId = res.task_id - this.$router.replace({ query: { taskId: this.currentTaskId, type: 'shortcut_cmd' }}) + this.xtermConfig = { taskId: this.currentTaskId, type: 'shortcut_cmd' } this.setCostTimeInterval() this.writeExecutionOutput() this.setBtn() @@ -456,7 +456,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('StopLogOutput').replace('currentTaskId', this.currentTaskId) + '\x1b[0m') this.xterm.write(this.wrapperError('')) this.getTaskStatus() }).catch((e) => { diff --git a/src/views/ops/Adhoc/VariableHelpDialog.vue b/src/views/ops/Adhoc/VariableHelpDialog.vue index 2f7e3fa61..60bc99b3a 100644 --- a/src/views/ops/Adhoc/VariableHelpDialog.vue +++ b/src/views/ops/Adhoc/VariableHelpDialog.vue @@ -55,7 +55,7 @@ export default { } }, mounted() { - this.$axios.get('/api/v1/ops/variables/help').then((data) => { + this.$axios.get('/api/v1/ops/variables/help/').then((data) => { this.variables = data }) }, diff --git a/src/views/ops/File/index.vue b/src/views/ops/File/index.vue index c957ff108..325769015 100644 --- a/src/views/ops/File/index.vue +++ b/src/views/ops/File/index.vue @@ -439,7 +439,7 @@ export default { this.executionInfo.timeCost = 0 this.executionInfo.status = 'running' this.currentTaskId = res.task_id - this.$router.replace({ query: { taskId: this.currentTaskId, type: 'file_upload' }}) + this.xtermConfig = { taskId: this.currentTaskId, type: 'shortcut_cmd' } this.setCostTimeInterval() this.writeExecutionOutput() }).catch(() => {