Commit 7bd9ddc951fef873bb1adc4722799cd66f22580a

Authored by wuxw
1 parent 980b2549

v1.9 优化定时任务提示

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