zhengnaiwen_citu 5 mesiacov pred
rodič
commit
c8d68a9faf
1 zmenil súbory, kde vykonal 5 pridanie a 2 odobranie
  1. 5 2
      src/views/bonus/allocation/index.vue

+ 5 - 2
src/views/bonus/allocation/index.vue

@@ -121,13 +121,13 @@ export default {
       ]
     }
   },
-  async created () {
+  async mounted () {
     this.loading = true
     await this.getEmployeeCategoryItems()
     this.searchValues.organizationNo = this.employeeInfo.organizationNo
     this.query = { ...this.searchValues }
     this.$nextTick(() => {
-      this.onInit()
+      this.$refs.bonusTableRefs && this.onInit()
     })
   },
   methods: {
@@ -135,6 +135,9 @@ export default {
       this.loading = true
       await this.onCheckStatus()
       await this.onStatistics()
+      if (!this.$refs.bonusTableRefs) {
+        return
+      }
       const data = await this.$refs.bonusTableRefs.onInit(this.query, pageInfo)
       this.loading = false
       if (!data) {