|
@@ -135,7 +135,7 @@
|
|
<a-space class="part-action" :size="6">
|
|
<a-space class="part-action" :size="6">
|
|
<a-button
|
|
<a-button
|
|
type="text"
|
|
type="text"
|
|
- :disabled="loading || !dataList?.length"
|
|
|
|
|
|
+ :disabled="downloading || loading || !dataList?.length"
|
|
@click="toDownloadFilter"
|
|
@click="toDownloadFilter"
|
|
>
|
|
>
|
|
<template #icon>
|
|
<template #icon>
|
|
@@ -145,7 +145,7 @@
|
|
</a-button>
|
|
</a-button>
|
|
<a-button
|
|
<a-button
|
|
type="text"
|
|
type="text"
|
|
- :disabled="!multipleSelections.length"
|
|
|
|
|
|
+ :disabled="downloading || !multipleSelections.length"
|
|
@click="toDownloadSelection"
|
|
@click="toDownloadSelection"
|
|
>
|
|
>
|
|
<template #icon>
|
|
<template #icon>
|
|
@@ -176,7 +176,11 @@
|
|
{{ checkTimeFilter(record) }}
|
|
{{ checkTimeFilter(record) }}
|
|
</template>
|
|
</template>
|
|
<template #action="{ record }">
|
|
<template #action="{ record }">
|
|
- <a-button type="text" class="btn-primary" @click="toDownload(record)"
|
|
|
|
|
|
+ <a-button
|
|
|
|
+ type="text"
|
|
|
|
+ class="btn-primary"
|
|
|
|
+ :disabled="downloading"
|
|
|
|
+ @click="toDownload(record)"
|
|
>下载</a-button
|
|
>下载</a-button
|
|
>
|
|
>
|
|
</template>
|
|
</template>
|
|
@@ -323,14 +327,28 @@
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ const downloading = ref(false);
|
|
|
|
+ function dounceDownloading() {
|
|
|
|
+ downloading.value = true;
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ downloading.value = false;
|
|
|
|
+ }, 5 * 1000);
|
|
|
|
+ }
|
|
|
|
+
|
|
function toDownloadFilter() {
|
|
function toDownloadFilter() {
|
|
|
|
+ if (downloading.value) return;
|
|
|
|
+ dounceDownloading();
|
|
emit('downloadByFilter', props.rowData, searchedModel);
|
|
emit('downloadByFilter', props.rowData, searchedModel);
|
|
}
|
|
}
|
|
function toDownloadSelection() {
|
|
function toDownloadSelection() {
|
|
|
|
+ if (downloading.value) return;
|
|
|
|
+ dounceDownloading();
|
|
emit('downloadByStudents', props.rowData, multipleSelections.value);
|
|
emit('downloadByStudents', props.rowData, multipleSelections.value);
|
|
}
|
|
}
|
|
|
|
|
|
function toDownload(row: TrackExportDetailItem) {
|
|
function toDownload(row: TrackExportDetailItem) {
|
|
|
|
+ if (downloading.value) return;
|
|
|
|
+ dounceDownloading();
|
|
emit('downloadByStudents', props.rowData, [row]);
|
|
emit('downloadByStudents', props.rowData, [row]);
|
|
}
|
|
}
|
|
|
|
|