<a-table
:rowSelection="{
onChange: onSelectChange,
selectedRowKeys: id
}" rowKey="id"
style="margin-top: 20px"
:columns="columns"
:data-source="list"
>
<template #bodyCell="{ column, text }"> </template>
</a-table>
import exportDts from '@/api/classification/export';
import { useUserStore } from '@/store/modules/user';
let selection = ref([]);
function onSelectChange(params) {
console.log('🚀 onSelectChange params:', params);
selection.value = params
}
// 导出
function handleMenuClick(params) {
if (selection.value.length <= 0) {
return message.warning('请先选择数据');
}
let purchaseAdd = {
idList: selection.value,
schoolId: userStore.info.currentOrg.eduId
};
exportDts.downloadFile(
`/asset/api/consumable/storage/export`,
{},
'耗材入库导出',
'xls',
'post',
purchaseAdd
);
}