添加前后端筛选导出excel按钮权限
This commit is contained in:
@@ -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`
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user