Browse Source

处理员工列表出现重复问题

wangcz 7 years ago
parent
commit
6638dc5ad9
1 changed files with 7 additions and 5 deletions
  1. 7 5
      components/mobile/staffManagement/StaffList.vue

+ 7 - 5
components/mobile/staffManagement/StaffList.vue

@@ -160,7 +160,7 @@
       'staffData': {
       'staffData': {
         handler: function (val) {
         handler: function (val) {
           if (this.isChange) {
           if (this.isChange) {
-            this.staffDataList = val.content
+            this.staffDataList = []
             this.isChange = false
             this.isChange = false
           }
           }
           this.staffDataList = [...this.staffDataList, ...val.content]
           this.staffDataList = [...this.staffDataList, ...val.content]
@@ -362,10 +362,12 @@
       // 申请绑定操作事件 (同意和拒绝)
       // 申请绑定操作事件 (同意和拒绝)
       agreeEvent (type, flag) {
       agreeEvent (type, flag) {
         this.$http.get(`/basic/enterprise/auditApply?id=${type.id}&status=${Number(flag)}&userUU=${type.userUU}`)
         this.$http.get(`/basic/enterprise/auditApply?id=${type.id}&status=${Number(flag)}&userUU=${type.userUU}`)
-        this.onRemind('操作成功!')
-        this.auditSearch = ''
-        this.page = 1
-        this.auditRecord()
+          .then(() => {
+            this.onRemind('操作成功!')
+            this.auditSearch = ''
+            this.page = 1
+            this.auditRecord()
+          })
       }
       }
     }
     }
   }
   }