From fdea446a293abf5edad0a07d61466f616221ef25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=99=AF=E9=98=B3?= <1656488874@qq.com> Date: Mon, 9 Dec 2019 11:06:38 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=88=A0=E9=99=A4=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=B2=A1=E6=9C=89=E7=A1=AE=E8=AE=A4=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/schedule/ScheduleList.vue | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/frontend/src/views/schedule/ScheduleList.vue b/frontend/src/views/schedule/ScheduleList.vue index c7d5a4ad..0259247e 100644 --- a/frontend/src/views/schedule/ScheduleList.vue +++ b/frontend/src/views/schedule/ScheduleList.vue @@ -246,13 +246,19 @@ export default { this.$st.sendEv('定时任务', '修改', 'id', row._id) }, onRemove (row) { - this.$store.dispatch('schedule/removeSchedule', row._id) - .then(() => { - setTimeout(() => { - this.$store.dispatch('schedule/getScheduleList') - this.$message.success(`Schedule "${row.name}" has been removed`) - }, 100) - }) + this.$confirm('确定删除定时任务?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.$store.dispatch('schedule/removeSchedule', row._id) + .then(() => { + setTimeout(() => { + this.$store.dispatch('schedule/getScheduleList') + this.$message.success(`Schedule "${row.name}" has been removed`) + }, 100) + }) + }).catch(() => {}) this.$st.sendEv('定时任务', '删除', 'id', row._id) }, onCrawl (row) {