소스 검색

Merge branch 'master' of http://git.huaml.com/zhh/front-end

jf 5 년 전
부모
커밋
57c26af254
1개의 변경된 파일35개의 추가작업 그리고 1개의 파일을 삭제
  1. 35 1
      ghsApp/src/pagesArrears/details.vue

+ 35 - 1
ghsApp/src/pagesArrears/details.vue

@@ -74,7 +74,8 @@ export default {
 			totalAmount: "",
 			num: "",
 			detailsList: [],
-			listLoading: false
+			listLoading: false,
+      isAllCheck: false
 		};
 	},
 	onPullDownRefresh() {
@@ -112,6 +113,15 @@ export default {
 			return amount;
 		}
 	},
+  watch: {
+    selectList () {
+      if (this.selectList.length === this.detailsList.length) {
+        this.isAllCheck = true
+      } else {
+        this.isAllCheck = false
+      }
+    }
+  },
 	methods: {
 		async initData() {
 			try {
@@ -133,6 +143,19 @@ export default {
 				this.listLoading = false;
 			}
 		},
+    // 全选
+    allCheck () {
+      this.isAllCheck = !this.isAllCheck
+      if (this.isAllCheck) {
+        this.detailsList.map(ele => {
+          ele.checked = true
+        });
+      } else {
+        this.detailsList.map(ele => {
+          ele.checked = false
+        });
+      }
+    },
 		checkItemEvent(item) {
 			for (let index = 0; index < this.detailsList.length; index++) {
 				const element = this.detailsList[index].id;
@@ -279,5 +302,16 @@ export default {
 			}
 		}
 	}
+  .details-select {
+    margin-right: 20upx;
+    display: inline-block;
+    .iconweixuanzhong,
+    .iconxuanzhong {
+      font-size: 40upx !important;
+    }
+    .iconxuanzhong {
+      color: $mainColor !important;
+    }
+  }
 }
 </style>