Browse Source

1.修改选择账号bug

lirui 2 years ago
parent
commit
c320ea42b1
1 changed files with 6 additions and 3 deletions
  1. 6 3
      src/components/User/dmUserindex.vue

+ 6 - 3
src/components/User/dmUserindex.vue

@@ -107,7 +107,7 @@ export default {
       multipleSelection: crud.selectData || [],
       checkInfo: '',
       code: '',
-      size: 0,
+      size: 20,
       page: 0,
       total: 0
 
@@ -122,7 +122,6 @@ export default {
     'crud.selectData': {
       handler: function(datainfo) {
         this.$nextTick(function() {
-          this.toggleSelection()
           this.users.forEach((item, i) => {
             datainfo.forEach(row => {
               if (this.users[i].id === row * 1) {
@@ -151,7 +150,10 @@ export default {
   },
   methods: {
     getUsers() {
-      crudUser.getAll({ blurry: this.code, page: this.page, size: this.size }).then(res => {
+      if (this.code !== '') {
+        this.page = 0
+      }
+      crudUser.getAll({ blurry: this.code, page: this.page - 1, size: this.size }).then(res => {
         this.total = res.totalElements
         this.users = res.content.map(function(obj) {
           return obj
@@ -166,6 +168,7 @@ export default {
       } else {
         this.$refs.multipleTable.clearSelection()
       }
+      this.crud.doCloseDmUser()
     },
     handleSelectionChange(val) {
       var selectOne = this.crud.selectOne