feature_0521
郑皇 5 years ago
parent ffb2a4ce39
commit 38dfb57675

@ -71,20 +71,33 @@ export default {
}, },
methods: { methods: {
handleCheckAll() { handleCheckAll() {
let _this = this;
if (this.indeterminate) { if (this.indeterminate) {
this.allSelect = false; this.allSelect = false;
} else { } else {
this.allSelect = !this.allSelect; this.allSelect = !this.allSelect;
} }
this.indeterminate = false; this.indeterminate = false;
if (this.allSelect) { if (this.allSelect) {
this.isSelect = [];
this.shopList.forEach((item) => { this.shopList.forEach((item) => {
if (this.isSelect.indexOf(item.value) < 0 && item.value) {
this.isSelect.push(item.value); this.isSelect.push(item.value);
}
}); });
} else { } else {
this.isSelect = []; this.isSelect = [];
} }
console.log(11, this.allSelect, this.isSelect);
store.getters.useData.stores = [];
this.isSelect.forEach((item) => {
const s = _this._.find(_this.shopListData, (shop) => shop.id == item);
if (s) {
store.getters.useData.stores.push(
_this._.find(_this.shopListData, (shop) => shop.id == item)
);
}
});
}, },
doSearch(e) { doSearch(e) {
const keyword = e.target.value; const keyword = e.target.value;

Loading…
Cancel
Save