Ver código fonte

fix: refresh exception after submitting schedule

Casper Dai 3 anos atrás
pai
commit
ba1028295d

+ 1 - 1
src/views/schedule/designer/index.vue

@@ -29,7 +29,7 @@ export default {
   },
   methods: {
     onSubmit () {
-      this.$router.replace({ name: 'schedule-list' })
+      this.$router.replace({ name: 'schedule-list', params: { refresh: true }})
     }
   }
 }

+ 7 - 1
src/views/schedule/index.vue

@@ -319,7 +319,13 @@ export default {
     this.getList()
   },
   activated () {
-    this.getList()
+    if (this.$route.params.refresh) {
+      const status = this.currObj.params.status
+      if (status !== void 0) {
+        this.currObj.params.status = void 0
+      }
+      this.search()
+    }
   },
   methods: {
     search () {