Commit 7bd9ddc951fef873bb1adc4722799cd66f22580a

Authored by wuxw
1 parent 980b2549

v1.9 优化定时任务提示

src/views/dev/taskLang.js
... ... @@ -56,7 +56,8 @@ export const messages = {
56 56 },
57 57 fetchError: 'Failed to fetch task list',
58 58 start: 'start',
59   - stop: 'stop'
  59 + stop: 'stop',
  60 + timeout: 'Submitted task, please check the result later'
60 61 }
61 62 },
62 63 zh: {
... ... @@ -116,7 +117,8 @@ export const messages = {
116 117 },
117 118 fetchError: '获取定时任务列表失败',
118 119 start: '启动',
119   - stop: '停止'
  120 + stop: '停止',
  121 + timeout: '已提交任务,请稍后查看结果'
120 122 }
121 123 }
122 124 }
123 125 \ No newline at end of file
... ...
src/views/dev/taskList.vue
... ... @@ -118,7 +118,7 @@ export default {
118 118 await startTask(row.taskId)
119 119 this.getList()
120 120 } catch (error) {
121   - this.$message.error(this.$t('task.fetchError'))
  121 + this.$message.error(error)
122 122 } finally {
123 123 this.loading = false
124 124 }
... ... @@ -129,7 +129,7 @@ export default {
129 129 await stopTask(row.taskId)
130 130 this.getList()
131 131 } catch (error) {
132   - this.$message.error(this.$t('task.fetchError'))
  132 + this.$message.error(error)
133 133 } finally {
134 134 this.loading = false
135 135 }
... ... @@ -155,7 +155,7 @@ export default {
155 155 await runTask(row.taskId)
156 156 this.getList()
157 157 } catch (error) {
158   - this.$message.error(this.$t('task.fetchError'))
  158 + this.$message.error(this.$t('task.timeout'))
159 159 } finally {
160 160 this.loading = false
161 161 }
... ...