guhongwei 4 роки тому
батько
коміт
4ecc05fa1c
3 змінених файлів з 10 додано та 4 видалено
  1. 2 0
      src/store/index.js
  2. 7 3
      src/views/train-plan/print.vue
  3. 1 1
      src/views/trainVidoe/index.vue

+ 2 - 0
src/store/index.js

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

+ 7 - 3
src/views/train-plan/print.vue

@@ -38,7 +38,7 @@
       <name-card v-loading="loading" :list="studList"></name-card>
     </detail-frame>
     <detail-frame title="打印证书" v-if="view == 'certList'" :returns="toReturns">
-      <cert-card :list="studList" :startdate="startdate" :enddate="enddate"></cert-card>
+      <cert-card :list="certstuList" :startdate="startdate" :enddate="enddate"></cert-card>
     </detail-frame>
     <detail-frame title="学生报到表" v-if="view == 'signList'" :returns="toReturns">
       <sign-list v-loading="loading" :list="studList"></sign-list>
@@ -67,6 +67,7 @@ const { mapActions: util } = createNamespacedHelpers('util');
 const { mapActions: location } = createNamespacedHelpers('location'); //地点
 const { mapActions: teacher } = createNamespacedHelpers('teacher'); //教师
 const { mapActions: director } = createNamespacedHelpers('director'); //教师
+const { mapActions: cerconfirm } = createNamespacedHelpers('cerconfirm');
 
 export default {
   name: 'print',
@@ -112,6 +113,8 @@ export default {
       lth: [], //table表头
       ltr: [], //table y轴
       lessons: [], //原始课表,取出来什么样就什么样
+      // 证书列表
+      certstuList: [],
     };
   },
   created() {
@@ -125,6 +128,7 @@ export default {
     ...location({ getLocation: 'fetch' }),
     ...teacher({ getTeacher: 'fetch' }),
     ...director({ getDirector: 'fetch' }),
+    ...cerconfirm({ cerconfirmQuery: 'query' }),
     async searchinfo() {
       const res = await this.planfetch(this.defaultOption.planid);
       let terms = res.data.termnum;
@@ -187,9 +191,9 @@ export default {
     },
     async certList({ data }) {
       let { _id: classid, enddate, startdate } = data;
-      let res = await this.getStudentList({ classid });
+      let res = await this.cerconfirmQuery({ classid });
       if (this.$checkRes(res)) {
-        this.$set(this, `studList`, res.data);
+        this.$set(this, `certstuList`, res.data);
         this.$set(this, `startdate`, startdate);
         this.$set(this, `enddate`, enddate);
       }

+ 1 - 1
src/views/trainVidoe/index.vue

@@ -47,7 +47,7 @@ export default {
       ],
       fields: [
         { label: '课程名称', prop: 'subname' },
-        { label: '教师', prop: 'teacher' },
+        { label: '教师', prop: 'teacher', format: i => (i == null ? '中心提供' : i) },
         { label: '面向对象', prop: 'touser', format: i => (i === '0' ? '所有人' : i === '1' ? '教师' : i === '2' ? '学生' : i === '3' ? '班主任' : '暂无') },
         { label: '状态', prop: 'status', format: i => (i === '0' ? '待审核' : i === '1' ? '审核通过' : '审核拒绝') },
       ],