Commit 4611ba8f575bdc518cdee989ef5956c04ae6df31
1 parent
82235092
下载报表学生数据问题
Showing
1 changed file
with
10 additions
and
8 deletions
src/components/exportDia.vue
... | ... | @@ -139,20 +139,22 @@ export default { |
139 | 139 | this.multipleSelection = val; |
140 | 140 | }, |
141 | 141 | exportData(length) { |
142 | - let studentIds = []; | |
142 | + let studentIds = null; | |
143 | 143 | if (length) { |
144 | 144 | studentIds = this.exportStudent.slice(0, 10).map((item) => { |
145 | 145 | return item.studentId; |
146 | 146 | }); |
147 | 147 | } else { |
148 | - studentIds = this.multipleSelection.map((item) => { | |
149 | - return item.studentId; | |
150 | - }); | |
148 | + if (this.exportType == 1) { | |
149 | + studentIds = []; | |
150 | + } else { | |
151 | + studentIds = this.multipleSelection.map((item) => { | |
152 | + return item.studentId; | |
153 | + }); | |
154 | + studentIds.length == 0 ? (studentIds = null) : ""; | |
155 | + } | |
151 | 156 | } |
152 | - this.$emit( | |
153 | - "exportData", | |
154 | - this.downType == 1 ? null : studentIds.length == 0 ? null : studentIds | |
155 | - ); | |
157 | + this.$emit("exportData", this.downType == 1 ? null : studentIds); | |
156 | 158 | this.cancelSelection(); |
157 | 159 | }, |
158 | 160 | cancel() { | ... | ... |