liuyg
2021-12-25 ef46e4b78e81418a831d4f7f21eb24d2fd4d35e1
src/views/trainExam/index.vue
@@ -34,28 +34,20 @@
            @row-update="questionBankRowUpdate"
            @row-del="questionBankRowDel"
          >
            <!-- 自定义按钮 -->
            <!-- <template slot="menuLeft">
                            <el-button type="danger"
                                       size="mini"
                                       icon="el-icon-delete"
                                       plain
                                       @click="handleDelete">新增
                            </el-button>
                            <el-button type="danger"
                                       size="mini"
                                       icon="el-icon-delete"
                                       plain
                                       @click="handleDelete">删除
                            </el-button>
                            <el-button type="danger"
                                       size="mini"
                                       icon="el-icon-delete"
                                       plain
                                       @click="handleDelete">导出
                            </el-button>
                        </template> -->
            <template slot-scope="{ row }" slot="auditStatus">
              <el-tag class="dtype">
                {{
                  row.auditStatus == 1
                    ? "审核通过"
                    : row.auditStatus == 2
                    ? "审核不通过"
                    : "待审核"
                }}
                <i class="zc" v-if="row.auditStatus == 1"></i>
                <i class="yj" v-if="row.auditStatus == 2"></i>
                <i class="gz" v-if="row.auditStatus == 3"></i>
              </el-tag>
            </template>
            <template slot="menuLeft">
              <el-button
                style="display: none"
@@ -65,6 +57,10 @@
                @click="questionBankHandleDelete"
                >删 除
              </el-button>
              <!--图例 components-->
              <span>
                <Legend :datas="datalistLIU"></Legend>
              </span>
            </template>
            <template slot-scope="{ row }" slot="examStatus">
@@ -92,7 +88,15 @@
              <el-button
                type="text"
                size="mini"
                icon="el-icon-folder-checked"
                icon="el-icon-circle-check"
                v-if="permission.trainExam_confirm"
                @click="handleConfirm(row)"
                >考试名单确认
              </el-button>
              <el-button
                type="text"
                size="mini"
                icon="el-icon-search"
                v-if="permission.trainExam_index_examScoreViews"
                @click="examScoreViews(row)"
                >成绩查看
@@ -128,10 +132,15 @@
  remove,
  update,
  updateAudit,
  applyConfirm,
} from "@/api/examapi/examination";
import { auditColumn } from "./data";
import { mapGetters } from "vuex";
import Legend from "@/components/liu-legend/Legend";
export default {
  components: {
    Legend,
  },
  data() {
    var validatePass = (rule, value, callback) => {
      console.log(value);
@@ -149,6 +158,21 @@
    return {
      form: {},
      //legend-liu数据
      datalistLIU: [
        {
          color: "#29C093",
          text: "审核通过",
        },
        {
          color: "#F34A4A",
          text: "审核不通过",
        },
        {
          color: "#F48F57",
          text: "待审核",
        },
      ],
      Audit: {},
      dialogFormVisible: false,
      optionAudit: {
@@ -176,14 +200,12 @@
        delBtn: false,
        editBtn: true,
        addBtn: false,
        selection: true,
        // selection: true,
        menu: true,
        // 导出按钮
        excelBtn: false,
        viewBtn: false,
        // title: '题库',
        align: "center",
        height: "auto",
        calcHeight: 80,
@@ -195,7 +217,7 @@
        //dialogType: 'drawer',
        dialogClickModal: false,
        // 操作栏宽度
        menuWidth: 280,
        menuWidth: 260,
        labelWidth: 140,
        ...this.$store.state.control.clearOtherBut,
        column: [
@@ -225,27 +247,8 @@
            ],
            span: 24,
            width: 200,
            overHidden: true,
          },
          // {
          //     label: "试卷分数",
          //     prop: "totalScore",
          //     slot: true,
          //     // 表单新增时是否禁止
          //     addDisabled: false,
          //     // 表单新增时是否可见
          //     addDisplay: true,
          //     // 表单新增时是否为查看模式
          //     addDetail: false,
          //     // 表单编辑时是否禁止
          //     editDisabled: false,
          //     // 表单编辑时是否可见
          //     editDisplay: true,
          //     // 表单编辑时是否为查看模式
          //     editDetail: false,
          //     rules: [{ validator: validatePass, required: true, trigger: 'blur' }],
          //     width: 100
          // },
          {
            label: "考试时间",
            prop: "startTime",
@@ -277,7 +280,6 @@
            label: "考试开始时间",
            prop: "startTime",
            type: "datetime",
            // span: 24,
            format: "yyyy-MM-dd HH:mm",
            valueFormat: "yyyy-MM-dd HH:mm",
            // 表单新增时是否禁止
@@ -292,7 +294,7 @@
            editDisplay: false,
            // 表单编辑时是否为查看模式
            editDetail: false,
            width: 140,
            width: 120,
          },
          {
            label: "考试开始截止时间",
@@ -313,28 +315,29 @@
            editDisplay: true,
            // 表单编辑时是否为查看模式
            editDetail: false,
            width: 140,
            width: 120,
          },
          {
            label: "申请人",
            prop: "realName",
            slot: true,
            // 表单新增时是否禁止
            addDisabled: true,
            // 表单新增时是否可见
            addDisplay: false,
            // 表单新增时是否为查看模式
            addDetail: false,
            // 表单编辑时是否禁止
            editDisabled: true,
            // 表单编辑时是否可见
            editDisplay: false,
            // 表单编辑时是否为查看模式
            editDetail: false,
            // hide: true,
            display: false,
            width: 80,
          },
          // {
          //   label: "申请人",
          //   prop: "realName",
          //   slot: true,
          //   // 表单新增时是否禁止
          //   addDisabled: true,
          //   // 表单新增时是否可见
          //   addDisplay: false,
          //   // 表单新增时是否为查看模式
          //   addDetail: false,
          //   // 表单编辑时是否禁止
          //   editDisabled: true,
          //   // 表单编辑时是否可见
          //   editDisplay: false,
          //   // 表单编辑时是否为查看模式
          //   editDetail: false,
          //   // hide: true,
          //   display: false,
          //   width: 70,
          // },
          {
            label: "申请人所属学校",
            prop: "deptName",
@@ -353,6 +356,7 @@
            editDetail: false,
            // hide: true,
            display: false,
            overHidden: true,
          },
          {
            label: "备注",
@@ -412,7 +416,7 @@
            editDisplay: false,
            // 表单编辑时是否为查看模式
            editDetail: false,
            width: 80,
            width: 70,
          },
          {
            label: "考试人数",
@@ -432,13 +436,13 @@
            editDisplay: false,
            // 表单编辑时是否为查看模式
            editDetail: false,
            width: 80,
            width: 70,
          },
          {
            label: "申请时间",
            prop: "creatorDate",
            type: "datetime",
            width: 150,
            width: 130,
            editDisplay: false,
            addDisplay: false,
            format: "yyyy-MM-dd HH:mm:ss",
@@ -455,7 +459,7 @@
            label: "审核时间",
            prop: "auditTime",
            type: "datetime",
            width: 150,
            width: 130,
            editDisplay: false,
            addDisplay: false,
            format: "yyyy-MM-dd HH:mm:ss",
@@ -498,13 +502,64 @@
                value: 3,
              },
            ],
            width: 80,
            width: 110,
          },
          {
            label: "审核明细",
            editDisplay: false,
            addDisplay: false,
            prop: "auditDetail",
            width: 90,
            overHidden: true,
          },
          {
            label: "距考试开始时间",
            editDisplay: false,
            addDisplay: false,
            prop: "deadline",
            width: 110,
            overHidden: true,
          },
          {
            label: "考试名单确认人",
            prop: "confirmUserName",
            slot: true,
            // 表单新增时是否禁止
            addDisabled: true,
            // 表单新增时是否可见
            addDisplay: false,
            // 表单新增时是否为查看模式
            addDetail: false,
            // 表单编辑时是否禁止
            editDisabled: true,
            // 表单编辑时是否可见
            editDisplay: false,
            // 表单编辑时是否为查看模式
            editDetail: false,
            // hide: true,
            display: false,
            width: 80,
          },
          {
            label: "确认时间",
            prop: "confirmTime",
            type: "datetime",
            // span: 24,
            format: "yyyy-MM-dd HH:mm:ss",
            valueFormat: "yyyy-MM-dd HH:mm:ss",
            // 表单新增时是否禁止
            addDisabled: false,
            // 表单新增时是否可见
            addDisplay: false,
            // 表单新增时是否为查看模式
            addDetail: false,
            // 表单编辑时是否禁止
            editDisabled: false,
            // 表单编辑时是否可见
            editDisplay: false,
            // 表单编辑时是否为查看模式
            editDetail: false,
            width: 130,
          },
        ],
      },
@@ -694,6 +749,24 @@
          });
        });
    },
    handleConfirm(row) {
      this.$confirm("已确认当前考试申请人员名单无误?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          row["confirmUser"] = this.userInfo.Id;
          return applyConfirm(row);
        })
        .then(() => {
          this.questionBankOnLoad(this.questionBankPage);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        });
    },
    questionBankHandleDelete() {
      if (this.questionBankSelectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
@@ -725,4 +798,49 @@
</script>
<style lang="scss" scoped>
.dtype {
  width: 100%;
  padding-left: 0px;
}
.dx {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 6px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #dfdfdf;
}
.zc {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 4px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #29c093;
}
.yj {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 4px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f34a4a;
}
.gz {
  position: absolute;
  top: 50%;
  margin-top: -5px;
  margin-left: 4px;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: #f48f57;
}
</style>