Browse Source

读取一次 总数

zhengkaixin 4 years ago
parent
commit
4a68cdd332
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/projects/business/views/Master/Health/Worker.vue

+ 7 - 1
src/projects/business/views/Master/Health/Worker.vue

@@ -178,7 +178,9 @@
 
 
                 this.pageList(this.selectedIndex, this.pageIndex).then(page => {
-                    this.allCount = page.recordsTotal;
+                    if(this.allCount==0){
+                        this.allCount = page.recordsTotal;
+                    }
 
                     if (this.pageIndex  == 1) {
                         this.allList = page.data;
@@ -263,6 +265,10 @@
 					this.curDate = year + "-" + month + "-" + day;
 
 					this.queryList(true);
+                    this.query().then(page => {
+                        console.log(page)
+                        this.obj=page;
+                    });
 				});
 			},