소스 검색

读取一次 总数

zhengkaixin 4 년 전
부모
커밋
4a68cdd332
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  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;
+                    });
 				});
 			},