feat: improve filtered exports and server pagination
This commit is contained in:
1 parent
4e37f3bb5c
commit
1ddfecbecc
26 files changed
+645
-120
No files matched your search
@@ -242,10 +242,28 @@ async function downloadTemplate() {
|
||||
|
||||
async function exportRows() {
|
||||
try {
|
||||
const params = active.value === 'classes'
|
||||
? {
|
||||
keyword: keyword.value.trim() || undefined,
|
||||
collegeId: listFilters.collegeId, majorId: listFilters.majorId,
|
||||
grade: listFilters.grade, isEnabled: listFilters.isEnabled,
|
||||
}
|
||||
: active.value === 'classrooms'
|
||||
? {
|
||||
keyword: keyword.value.trim() || undefined,
|
||||
campusId: listFilters.campusId, buildingId: listFilters.buildingId,
|
||||
minimumCapacity: listFilters.minimumCapacity,
|
||||
teachingVenueNature: listFilters.teachingVenueNature,
|
||||
isEnabled: listFilters.isEnabled,
|
||||
}
|
||||
: {
|
||||
keyword: keyword.value.trim() || undefined,
|
||||
isArchived: active.value === 'terms' ? archiveFilter.value : undefined,
|
||||
}
|
||||
await downloadApiFile(
|
||||
`/base-data/${active.value}/export`,
|
||||
`${title.value}.xlsx`,
|
||||
{ params: active.value === 'terms' ? { isArchived: archiveFilter.value, keyword: keyword.value.trim() || undefined } : undefined },
|
||||
{ params },
|
||||
)
|
||||
ElMessage.success(`${title.value}已导出`)
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user