|
|
@ -15,7 +15,7 @@ |
|
|
|
</template> |
|
|
|
</el-auto-resizer> |
|
|
|
<div class="mt-15px float-left" style='height:32px;line-height:32px'>已选{{ selections.length }}条数据</div> |
|
|
|
<el-pagination v-model:current-page="currentPageRef" v-model:page-size="pageSizeRef" class="float-right mt-15px" layout="total, sizes, prev, pager, next, jumper" :total="total" :page-sizes="[200,500,1000,2000]"/> |
|
|
|
<el-pagination v-model:current-page="currentPageRef" v-model:page-size="pageSizeRef" class="float-right mt-15px" layout="total, sizes, prev, pager, next, jumper" :total="total" :page-sizes="[200,500,1000]"/> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
@ -172,18 +172,22 @@ const selections = ref([]) |
|
|
|
// const selections = computed(()=>mData.value.filter(item=>item.checked)) |
|
|
|
// 切换全选/不全选 |
|
|
|
const toggleAllSelection = (isAll)=>{ |
|
|
|
mData.value.forEach((row) => { |
|
|
|
row.checked = isAll |
|
|
|
}) |
|
|
|
//全选 |
|
|
|
selections.value = selections.value.filter(item=>mData.value.findIndex(item1=>item1.id==item.id)==-1) |
|
|
|
if(isAll){ |
|
|
|
//全选 |
|
|
|
mData.value.forEach((row) => { |
|
|
|
row.checked = isAll |
|
|
|
}) |
|
|
|
selections.value = [...selections.value,...mData.value] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const togglePageSelection = (isAll)=>{ |
|
|
|
selections.value = selections.value.filter(item=>mData.value.findIndex(item1=>item1.id==item.id)==-1) |
|
|
|
mData.value.forEach((row) => { |
|
|
|
row.checked = !row.checked |
|
|
|
}) |
|
|
|
selections.value = [...selections.value,...mData.value.filter(item=>item.checked)] |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|