guhongwei 4 years ago
parent
commit
783066568e
2 changed files with 8 additions and 3 deletions
  1. 2 0
      src/store/index.js
  2. 6 3
      src/views/classes/print.vue

+ 2 - 0
src/store/index.js

@@ -31,6 +31,7 @@ import personalscore from '@frame/store/personalscore';
 import groupscore from '@frame/store/groupscore';
 import groupscore from '@frame/store/groupscore';
 import uploadtask from '@frame/store/uploadtask';
 import uploadtask from '@frame/store/uploadtask';
 import trainvideo from '@frame/store/trainvideo';
 import trainvideo from '@frame/store/trainvideo';
+import cerconfirm from '@frame/store/cerconfirm';
 import * as ustate from '@frame/store/user/state';
 import * as ustate from '@frame/store/user/state';
 import * as umutations from '@frame/store/user/mutations';
 import * as umutations from '@frame/store/user/mutations';
 import * as dostate from '@frame/store/setting/state';
 import * as dostate from '@frame/store/setting/state';
@@ -70,6 +71,7 @@ export default new Vuex.Store({
     groupscore,
     groupscore,
     uploadtask,
     uploadtask,
     trainvideo,
     trainvideo,
+    cerconfirm,
   },
   },
   state: { ...ustate, ...dostate },
   state: { ...ustate, ...dostate },
   mutations: { ...umutations, ...domutations },
   mutations: { ...umutations, ...domutations },

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

@@ -10,7 +10,7 @@
           </el-row>
           </el-row>
         </el-tab-pane>
         </el-tab-pane>
         <el-tab-pane label="打印证书" name="cert" :lazy="true">
         <el-tab-pane label="打印证书" name="cert" :lazy="true">
-          <cert-card :list="studList" :startdate="startdate" :enddate="enddate"></cert-card>
+          <cert-card :list="certstuList" :startdate="startdate" :enddate="enddate"></cert-card>
         </el-tab-pane>
         </el-tab-pane>
         <el-tab-pane label="打印报到表" name="sign" :lazy="true">
         <el-tab-pane label="打印报到表" name="sign" :lazy="true">
           <sign-card v-loading="loading" :list="studList"></sign-card>
           <sign-card v-loading="loading" :list="studList"></sign-card>
@@ -39,6 +39,7 @@ const { mapActions: util } = createNamespacedHelpers('util');
 const { mapActions: location } = createNamespacedHelpers('location'); //地点
 const { mapActions: location } = createNamespacedHelpers('location'); //地点
 const { mapActions: teacher } = createNamespacedHelpers('teacher'); //教师
 const { mapActions: teacher } = createNamespacedHelpers('teacher'); //教师
 const { mapActions: director } = createNamespacedHelpers('director'); //教师
 const { mapActions: director } = createNamespacedHelpers('director'); //教师
+const { mapActions: cerconfirm } = createNamespacedHelpers('cerconfirm');
 export default {
 export default {
   name: 'print',
   name: 'print',
   props: {},
   props: {},
@@ -54,6 +55,7 @@ export default {
       lessons: [], //原始课表,取出来什么样就什么样
       lessons: [], //原始课表,取出来什么样就什么样
       startdate: '',
       startdate: '',
       enddate: '',
       enddate: '',
+      certstuList: [],
     };
     };
   },
   },
   created() {},
   created() {},
@@ -65,6 +67,7 @@ export default {
     ...location({ getLocation: 'fetch' }),
     ...location({ getLocation: 'fetch' }),
     ...teacher({ getTeacher: 'fetch' }),
     ...teacher({ getTeacher: 'fetch' }),
     ...director({ getDirector: 'fetch' }),
     ...director({ getDirector: 'fetch' }),
+    ...cerconfirm({ cerconfirmQuery: 'query' }),
     tabChange() {
     tabChange() {
       if (this.id) {
       if (this.id) {
         if (this.active == 'name') this.nameList();
         if (this.active == 'name') this.nameList();
@@ -111,9 +114,9 @@ export default {
       if (!this.$checkRes(cir)) return;
       if (!this.$checkRes(cir)) return;
       classInfo = cir.data;
       classInfo = cir.data;
       let { _id: classid, enddate, startdate } = classInfo;
       let { _id: classid, enddate, startdate } = classInfo;
-      let res = await this.getStudentList({ classid });
+      let res = await this.cerconfirmQuery({ classid });
       if (this.$checkRes(res)) {
       if (this.$checkRes(res)) {
-        this.$set(this, `studList`, res.data);
+        this.$set(this, `certstuList`, res.data);
         this.$set(this, `startdate`, startdate);
         this.$set(this, `startdate`, startdate);
         this.$set(this, `enddate`, enddate);
         this.$set(this, `enddate`, enddate);
       }
       }