diff --git a/src/components/exportDia.vue b/src/components/exportDia.vue index 5c15425..a170ebe 100644 --- a/src/components/exportDia.vue +++ b/src/components/exportDia.vue @@ -139,20 +139,22 @@ export default { this.multipleSelection = val; }, exportData(length) { - let studentIds = []; + let studentIds = null; if (length) { studentIds = this.exportStudent.slice(0, 10).map((item) => { return item.studentId; }); } else { - studentIds = this.multipleSelection.map((item) => { - return item.studentId; - }); + if (this.exportType == 1) { + studentIds = []; + } else { + studentIds = this.multipleSelection.map((item) => { + return item.studentId; + }); + studentIds.length == 0 ? (studentIds = null) : ""; + } } - this.$emit( - "exportData", - this.downType == 1 ? null : studentIds.length == 0 ? null : studentIds - ); + this.$emit("exportData", this.downType == 1 ? null : studentIds); this.cancelSelection(); }, cancel() {