liuyg
2021-11-27 3cf33734b481bd6bf5ced2e6e24873748116332f
+培训考试成绩管理 加证书制证申请
1 files modified
122 ■■■■■ changed files
src/views/trainExam/performance.vue 122 ●●●●● patch | view | raw | blame | history
src/views/trainExam/performance.vue
@@ -2,7 +2,7 @@
 * @Author: Morpheus
 * @Date: 2021-07-05 16:31:54
 * @Last Modified by: liu
 * @Last Modified time: 2021-11-27 09:36:23
 * @Last Modified time: 2021-11-27 10:00:37
 * menu-name 成绩管理
 */
<template>
@@ -88,6 +88,15 @@
                v-if="permission.trainExam_performance_export"
                @click="handleExport"
                >成绩导出
              </el-button>
              <el-button
                type="primary"
                size="small"
                plain
                v-if="permission.securityGuard_security_paper_apply"
                icon="el-icon-collection-tag"
                @click="handleSecurityPaperApply"
                >证书制证申请
              </el-button>
            </template>
@@ -264,6 +273,7 @@
} from "@/api/examapi/performance";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
import { securityApply } from "@/api/accreditationRecords/accreditationRecords";
import Qs from "qs";
export default {
  components: {
@@ -315,11 +325,18 @@
        delBtn: false,
        editBtn: true,
        addBtn: false,
        selection: false,
        selection: true,
        // 导出按钮
        // excelBtn: true,
        // excelBtnText: "成绩导出",
        viewBtn: true,
        selectable: (row) => {
          if (row.qualified != "0") {
            return false;
          } else {
            return true;
          }
        },
        // title: '成绩',
        align: "center",
        height: "auto",
@@ -652,6 +669,7 @@
            prop: "qualified",
            type: "select",
            slot: true,
            hide: true,
            search: true,
            searchSpan: 3,
            width: 68,
@@ -683,6 +701,44 @@
            editDisabled: true,
            // 表单编辑时是否可见
            editDisplay: true,
            // 表单编辑时是否为查看模式
            editDetail: false,
          },
          {
            label: "是否合格",
            prop: "qualifieds",
            type: "select",
            // search: true,
            searchSpan: 3,
            width: 68,
            dicData: [
              {
                label: "合格",
                value: 0,
              },
              {
                label: "不合格",
                value: 1,
              },
              {
                label: "暂未录实操成绩",
                value: 2,
              },
              {
                label: "缺考,成绩无效",
                value: 3,
              },
            ],
            // 表单新增时是否禁止
            addDisabled: false,
            // 表单新增时是否可见
            addDisplay: false,
            // 表单新增时是否为查看模式
            addDetail: false,
            // 表单编辑时是否禁止
            editDisabled: false,
            // 表单编辑时是否可见
            editDisplay: false,
            // 表单编辑时是否为查看模式
            editDetail: false,
          },
@@ -751,6 +807,7 @@
          },
        ],
      },
      choiceList: [],
    };
  },
  created() {},
@@ -777,6 +834,53 @@
    },
  },
  methods: {
    selectionChange(list) {
      // this.selectionList = list;
      this.choiceList = [];
      for (let k in list) {
        this.choiceList.push({
          id: list[k].userId,
        });
      }
    },
    //证书制证申请
    handleSecurityPaperApply() {
      if (this.choiceList.length === 0) {
        this.$message.warning("请勾选至少一位持证保安员");
        return;
      }
      this.$confirm(
        "共选择制证申请人数" + this.choiceList.length + "人,确定申请制证?",
        {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }
      )
        .then(() => {
          let cho = this.choiceList;
          let str = "";
          for (let k in cho) {
            str += cho[k].id;
            if (k != cho.length - 1) {
              str += ",";
            }
          }
          const data = {
            ids: str,
            createUser: this.userInfo.user_id,
            type: 2,
          };
          return securityApply(data);
        })
        .then(() => {
          // this.$refs.crud.toggleSelection();
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        });
    },
    openzhengjian(row) {
      this.baoanzdata = {
        realName: row.securityName,
@@ -824,6 +928,12 @@
                : item.theoryGrade;
              item.learnGrade == -1 ? (item.learnGrade = "") : item.learnGrade;
            });
            for (let k in data.records) {
              data.records[k]["qualifieds"] =
                data.records[k]["qualified"] == -1
                  ? ""
                  : data.records[k]["qualified"];
            }
            that.questionBankPage.total = data.total;
            that.questionBankData = data.records;
            that.questionBankLoading = false;
@@ -919,7 +1029,13 @@
      this.$refs.questionBankCrud.toggleSelection();
    },
    questionBankSelectionChange(list) {
      this.questionBankSelectionList = list;
      // this.questionBankSelectionList = list;
      this.choiceList = [];
      for (let k in list) {
        this.choiceList.push({
          id: list[k].userId,
        });
      }
    },
    questionBankSearchChange(params, done) {
      this.questionBankQuery = params;