zjxpcyc 6 år sedan
förälder
incheckning
03b029095e

+ 1
- 0
src/pages/system/library/books/detail.vue Visa fil

155
   },
155
   },
156
   beforeRouteLeave (to, from, next) {
156
   beforeRouteLeave (to, from, next) {
157
     this.resetStore('detail')
157
     this.resetStore('detail')
158
+    this.resetStore('type.list')
158
     next()
159
     next()
159
   },
160
   },
160
   methods: {
161
   methods: {

+ 8
- 0
src/pages/system/library/borrow/borrow.vue Visa fil

83
 const {
83
 const {
84
   mapState: mapLibSate,
84
   mapState: mapLibSate,
85
   mapActions,
85
   mapActions,
86
+  mapMutations,
86
 } = createNamespacedHelpers('library')
87
 } = createNamespacedHelpers('library')
87
 
88
 
88
 export default {
89
 export default {
114
       },
115
       },
115
     },
116
     },
116
   },
117
   },
118
+  beforeRouteLeave (to, from, next) {
119
+    this.resetStore('list')
120
+    next()
121
+  },
117
   methods: {
122
   methods: {
123
+    ...mapMutations({
124
+      resetStore: 'clearData',
125
+    }),
118
     ...mapActions({
126
     ...mapActions({
119
       getBorrowHistory: 'getBorrowHistory',
127
       getBorrowHistory: 'getBorrowHistory',
120
       getList: 'getBookList',
128
       getList: 'getBookList',