guhongwei 4 years ago
parent
commit
b75c35c89e
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/views/classes/print.vue

+ 6 - 2
src/views/classes/print.vue

@@ -10,7 +10,7 @@
           </el-row>
         </el-tab-pane>
         <el-tab-pane label="打印证书" name="cert" :lazy="true">
-          <cert-card :list="certstuList" :startdate="startdate" :enddate="enddate"></cert-card>
+          <cert-card :list="certstuList" :startdate="startdate" :enddate="enddate" :classname="classname" :term="term"></cert-card>
         </el-tab-pane>
         <el-tab-pane label="打印报到表" name="sign" :lazy="true">
           <sign-card v-loading="loading" :list="studList"></sign-card>
@@ -55,6 +55,8 @@ export default {
       lessons: [], //原始课表,取出来什么样就什么样
       startdate: '',
       enddate: '',
+      classname: '',
+      term: '',
       certstuList: [],
     };
   },
@@ -113,12 +115,14 @@ export default {
       let cir = await this.getClass(this.id);
       if (!this.$checkRes(cir)) return;
       classInfo = cir.data;
-      let { _id: classid, enddate, startdate } = classInfo;
+      let { _id: classid, enddate, startdate, name: classname, term } = classInfo;
       let res = await this.cerconfirmQuery({ classid });
       if (this.$checkRes(res)) {
         this.$set(this, `certstuList`, res.data);
         this.$set(this, `startdate`, startdate);
         this.$set(this, `enddate`, enddate);
+        this.$set(this, `classname`, classname);
+        this.$set(this, `term`, term);
       }
       this.loading = false;
     },