lrf402788946 4 лет назад
Родитель
Сommit
871182bbe7
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      app/service/student.js

+ 7 - 0
app/service/student.js

@@ -498,7 +498,14 @@ class StudentService extends CrudService {
       condition.termid = _.head(tids);
       const r = await this.dataToExcel(condition, model);
       if (r) res.push(r);
+    } else {
+      for (const tid of tids) {
+        condition.termid = tid;
+        const r = await this.dataToExcel(condition, model);
+        if (r) res.push(r);
+      }
     }
+    console.log(res);
     if (res.length === 1) return _.head(res);
     else if (res.length > 1) {
       let fn = '学生名单';