From 20c721a20e792c7cb9b328d4dd1bcf2e876ebff3 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Wed, 17 Apr 2019 13:25:14 +0800 Subject: [PATCH] updated ScheduleList --- frontend/src/views/schedule/ScheduleList.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/schedule/ScheduleList.vue b/frontend/src/views/schedule/ScheduleList.vue index 3498b3b7..3b1e3307 100644 --- a/frontend/src/views/schedule/ScheduleList.vue +++ b/frontend/src/views/schedule/ScheduleList.vue @@ -140,6 +140,7 @@ export default { this.dialogVisible = false }, onAdd () { + this.isEdit = false this.dialogVisible = true this.$store.commit('schedule/SET_SCHEDULE_FORM', {}) }, @@ -152,7 +153,7 @@ export default { } else { action = 'addSchedule' } - this.$store.dispatch('schedule/' + action) + this.$store.dispatch('schedule/' + action, this.scheduleForm._id) .then(() => { this.dialogVisible = false setTimeout(() => { @@ -167,6 +168,7 @@ export default { onEdit (row) { this.$store.commit('schedule/SET_SCHEDULE_FORM', row) this.dialogVisible = true + this.isEdit = true }, onRemove (row) { this.$store.dispatch('schedule/removeSchedule', row._id)