liuyg
2021-10-26 34d9a8662da32afd2c4e6dc2c5514321ed6121ca
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-09-28 15:03:18
 * @Last Modified time: 2021-10-26 15:44:52
 * menu-name 成绩管理
 */
<template>
@@ -94,6 +94,14 @@
                :type="type"
                >缺考标记</el-button
              >
              <el-button
                icon="el-icon-s-flag"
                @click="openzhengjian(row)"
                :disabled="row.qualified != 0"
                :size="size"
                :type="type"
                >打印证件</el-button
              >
            </template>
          </avue-crud>
@@ -118,15 +126,28 @@
        </div>
      </el-card>
    </el-col>
    <!-- <el-dialog
      title="打印证件"
      :visible.sync="dialogVisiblezhengjian"
      :modal-append-to-body="false"
    > -->
    <div class="dialogVisiblezhengjian" v-if="dialogVisiblezhengjian">
      <baoanz :data="baoanzdata" :close="1" @close="closezhengjian"></baoanz>
    </div>
    <!-- </el-dialog> -->
  </el-row>
</template>
<script>
import baoanz from "../securityGuard/baoanz.vue";
import { getList, update, updateAbsent } from "@/api/examapi/performance";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
import Qs from 'qs';
import Qs from "qs";
export default {
  components: {
    baoanz,
  },
  data() {
    var validatePass = (rule, value, callback) => {
      console.log(value);
@@ -145,6 +166,8 @@
    };
    return {
      dialogVisiblezhengjian: false,
      baoanzdata: {},
      obj: {
        name: "张三",
      },
@@ -172,7 +195,7 @@
        dialogClickModal: false,
        // 操作栏宽度
        menu: true,
        menuWidth: 215,
        menuWidth: 295,
        labelWidth: 120,
        column: [
          {
@@ -263,6 +286,33 @@
          {
            label: "身份证号",
            prop: "account",
            search: true,
            searchSpan: 4,
            slot: true,
            // 表单新增时是否禁止
            addDisabled: false,
            // 表单新增时是否可见
            addDisplay: true,
            // 表单新增时是否为查看模式
            addDetail: false,
            // 表单编辑时是否禁止
            editDisabled: true,
            // 表单编辑时是否可见
            editDisplay: true,
            // 表单编辑时是否为查看模式
            editDetail: false,
            rules: [
              {
                required: true,
                message: "请输入保安姓名",
                trigger: "blur",
              },
            ],
            width: 140,
          },
          {
            label: "准考证号",
            prop: "candidateNo",
            search: true,
            searchSpan: 4,
            slot: true,
@@ -417,6 +467,7 @@
            editDisplay: true,
            // 表单编辑时是否为查看模式
            editDetail: false,
            width: 68,
          },
          {
            label: "实操成绩",
@@ -434,6 +485,7 @@
            editDisplay: true,
            // 表单编辑时是否为查看模式
            editDetail: false,
            width: 68,
            rules: [
              { validator: validatePass, required: true, trigger: "blur" },
            ],
@@ -454,6 +506,7 @@
            editDisplay: true,
            // 表单编辑时是否为查看模式
            editDetail: false,
            width: 58,
            rules: [
              {
                required: true,
@@ -469,6 +522,7 @@
            slot: true,
            search: true,
            searchSpan: 3,
            width: 68,
            dicData: [
              {
                label: "合格",
@@ -487,7 +541,6 @@
                value: 3,
              },
            ],
            width: 110,
            // 表单新增时是否禁止
            addDisabled: false,
            // 表单新增时是否可见
@@ -598,6 +651,19 @@
    },
  },
  methods: {
    openzhengjian(row) {
      this.baoanzdata = {
        realName: row.securityName,
        $sex: row.sex == 1 ? "男" : "女",
        securitynumber: row.securityNumber,
        paperTime: row.paperTime,
        avatar: row.avatar,
      };
      this.dialogVisiblezhengjian = true;
    },
    closezhengjian() {
      this.dialogVisiblezhengjian = false;
    },
    questionBankOnLoad(page, params = {}) {
      //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩
      var that = this;
@@ -722,7 +788,7 @@
        type: "warning",
      }).then(() => {
        //获取查询条件
        console.log(this.questionBankSearch,456);
        console.log(this.questionBankSearch, 456);
        var data = {
          account: this.questionBankSearch.account,
          companyName: this.questionBankSearch.companyName,
@@ -747,9 +813,7 @@
        data["examType"] = 2;
        //序列号url形式,用&拼接
        data = Qs.stringify(data);
        window.open(
          `/api/examScore/export-examScore?` + data
        );
        window.open(`/api/examScore/export-examScore?` + data);
      });
    },
  },
@@ -757,4 +821,14 @@
</script>
<style lang="scss" scoped>
.morpheus-box {
  position: relative;
}
.dialogVisiblezhengjian {
  position: absolute;
  background-color: #fff;
  width: 100%;
  height: 100%;
  z-index: 10000 !important;
}
</style>