lrf402788946 4 years ago
parent
commit
3a16ae9ba2
1 changed files with 6 additions and 2 deletions
  1. 6 2
      parts/print/certCard.vue

+ 6 - 2
parts/print/certCard.vue

@@ -148,9 +148,13 @@ export default {
     // 计算优秀学员
     async toComputIsFine() {
       let msg = this.$message({ duration: 0, message: '正在计算,设置优秀学员,请稍后...' });
-      const res = await this.computedIsFine(this.defaultOption.classid);
+      let classid = this.defaultOption.classid;
+      if (!classid) classid = this.classid;
+      const res = await this.computedIsFine(classid);
       msg.close();
-      if (this.$checkRes(res, '优秀学员设置成功', res.errmsg || '优秀学员设置失败')) this.search();
+      if (this.$checkRes(res, '优秀学员设置成功', res.errmsg || '优秀学员设置失败')) {
+        this.$emit('research', { classid: this.classid });
+      }
     },
     // 过滤几号学生
     // getnum(index) {