updated ScheduleList

This commit is contained in:
Marvin Zhang
2019-04-17 13:25:14 +08:00
parent 7a41c68982
commit 20c721a20e

View File

@@ -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)