Commit f9916d4cc91660e4829a5d7ee25b2c90c6058b6b

Authored by 梁保满
1 parent 5f80d60e

导出摸板

src/views/basic/ask/analysis.vue
@@ -276,10 +276,10 @@ export default { @@ -276,10 +276,10 @@ export default {
276 let exportPeriodReport = "" 276 let exportPeriodReport = ""
277 if (this.id.length == 1) { 277 if (this.id.length == 1) {
278 query.periodId = this.id[0] 278 query.periodId = this.id[0]
279 - exportPeriodReport = this.$request.exportPeriodReport 279 + exportPeriodReport = this.role == "ROLE_PERSONAL" ? this.$request.pExportPhaseAnswerReport : this.$request.exportPeriodReport
280 } else { 280 } else {
281 query.periodIds = this.id 281 query.periodIds = this.id
282 - exportPeriodReport = this.role == "ROLE_PERSONAL" ? this.$request.pExportPhaseAnswerReport : this.$request.exportPhaseAnswerReport 282 + exportPeriodReport = this.$request.cTExportPhaseAnswerReport
283 } 283 }
284 const data = await exportPeriodReport({ 284 const data = await exportPeriodReport({
285 classId: this.classId, 285 classId: this.classId,
@@ -290,7 +290,10 @@ export default { @@ -290,7 +290,10 @@ export default {
290 let blob = new Blob([data], { 290 let blob = new Blob([data], {
291 type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", 291 type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
292 }); 292 });
293 - downloadFile(this.status ? "随堂问-已归档单课时报表.xlsx" : "随堂问-单课时报表.xlsx", blob); 293 + let name = this.types == 1 ? "随堂问-单课时报表.xlsx" :
  294 + this.types == 2 ? `随堂问-${this.className}-${this.subjectNames[0]}汇总分析报表.xlsx` :
  295 + `随堂问-${this.className}-多科汇总分析报表.xlsx`
  296 + downloadFile(this.status ? "随堂问-已归档单课时报表.xlsx" : name, blob);
294 } else { 297 } else {
295 this.$message.error("下载失败"); 298 this.$message.error("下载失败");
296 } 299 }
src/views/basic/test/components/multipleSubTest.vue
@@ -244,7 +244,9 @@ export default { @@ -244,7 +244,9 @@ export default {
244 } else if (studentIds.length > 0) { 244 } else if (studentIds.length > 0) {
245 query.studentIds = studentIds 245 query.studentIds = studentIds
246 } 246 }
247 - const data = await this.$request.exportExamReport({ 247 +
  248 +
  249 + const data = await this.$request.cTExportPhaseExamReport({
248 classId: this.classId, 250 classId: this.classId,
249 examIds: this.ids, 251 examIds: this.ids,
250 ...query 252 ...query
@@ -256,11 +258,11 @@ export default { @@ -256,11 +258,11 @@ export default {
256 }); 258 });
257 downloadFile( 259 downloadFile(
258 this.status 260 this.status
259 - ? "即时测-已归档单卷测练报表.xlsx"  
260 - : "即时测-单卷测练报表.xlsx", 261 + ? "即时测-已归档多科汇总报表.xlsx"
  262 + : "即时测-多科汇总报表.xlsx",
261 blob 263 blob
262 ); 264 );
263 - this.$message.error("下载成功"); 265 + this.$message.success("下载成功");
264 this.cancel() 266 this.cancel()
265 } else { 267 } else {
266 this.$message.error("下载失败"); 268 this.$message.error("下载失败");
src/views/basic/test/components/multipleTest.vue
@@ -224,7 +224,7 @@ export default { @@ -224,7 +224,7 @@ export default {
224 type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", 224 type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
225 }); 225 });
226 downloadFile("即时测-单科多卷报表.xlsx", blob); 226 downloadFile("即时测-单科多卷报表.xlsx", blob);
227 - this.$message.error("下载成功"); 227 + this.$message.success("下载成功");
228 this.cancel() 228 this.cancel()
229 } else { 229 } else {
230 this.$message.error("下载失败"); 230 this.$message.error("下载失败");