Explorar o código

fix: refresh exception after submitting schedule

Casper Dai %!s(int64=3) %!d(string=hai) anos
pai
achega
ba1028295d
Modificáronse 2 ficheiros con 8 adicións e 2 borrados
  1. 1 1
      src/views/schedule/designer/index.vue
  2. 7 1
      src/views/schedule/index.vue

+ 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 () {