添加前后端筛选导出excel按钮权限

This commit is contained in:
焦龙言
2026-10-10 11:39:58 +08:00
parent 3330592fbe
commit 80a71b48ce
14 changed files with 108 additions and 16 deletions
@@ -95,6 +95,10 @@ const props = defineProps({
queryParams: {
type: Object,
default: () => ({})
},
selectedIds: {
type: Array,
default: () => []
}
});
const emit = defineEmits(["imported"]);
@@ -136,9 +140,13 @@ function downloadTemplate() {
}
function handleExport() {
const exportParams = { ...props.queryParams };
if (Array.isArray(props.selectedIds) && props.selectedIds.length > 0) {
exportParams.ids = props.selectedIds.join(",");
}
proxy.download(
`master/${props.resource}/export`,
{ ...props.queryParams },
exportParams,
`${props.resource}_${new Date().getTime()}.xlsx`
);
}