Administrator
2021-12-17 929087ce8c7cec3afe297fdfc55b3f76ec7939d9
src/views/trainExam/performance.vue
@@ -124,6 +124,14 @@
                :type="type"
                >申请修改成绩</el-button
              >
              <el-button
                icon="el-icon-edit"
                v-if="row.isPaper==6"
                @click="securityPaperApply(row)"
                :size="size"
                :type="type"
                >补证申请</el-button
              >
            </template>
          </avue-crud>
@@ -274,7 +282,7 @@
} from "@/api/examapi/performance";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
import { securityApply } from "@/api/accreditationRecords/accreditationRecords";
import { securityApply,add} from "@/api/accreditationRecords/accreditationRecords";
import Qs from "qs";
export default {
  components: {
@@ -347,7 +355,7 @@
        selection: true,
        reserveSelection: true,
        selectable: (row) => {
          if (row.qualified != "0") {
          if (row.qualified != "0" || row.isPaper==6) {
            return false;
          } else {
            return true;
@@ -366,7 +374,7 @@
        dialogClickModal: false,
        // 操作栏宽度
        menu: true,
        menuWidth: 295,
        menuWidth: 330,
        labelWidth: 120,
        ...this.$store.state.control.clearOtherBut,
@@ -488,6 +496,7 @@
            prop: "candidateNo",
            search: true,
            searchSpan: 4,
            hide:true,
            slot: true,
            // 表单新增时是否禁止
            addDisabled: false,
@@ -515,6 +524,7 @@
            prop: "avatar",
            type: "upload",
            listType: "picture-img",
            width:60,
          },
          {
            label: "所属公司",
@@ -600,7 +610,7 @@
            slot: true,
            search: true,
            searchSpan: 3,
            width: 60,
            width: 80,
            dicData: [
              {
                label: "发布成绩",
@@ -772,6 +782,32 @@
            editDisplay: true,
            // 表单编辑时是否为查看模式
            editDetail: false,
          },
          {
            label: "是否制证",
            prop: "isPaper",
            type: "select",
            search: true,
            width: 70,
            searchSpan: 3,
            addDisplay: false,
            editDisplay: false,
            // hide: true,
            display: false,
            dicData: [
              {
                label: "全部",
                value: 10,
              },
              {
                label: "已制证",
                value: 6,
              },
              {
                label: "未制证",
                value: 7,
              },
            ],
          },
          {
            label: "有无照片",
@@ -978,6 +1014,9 @@
            const data = res.data.data;
            data.records.forEach((item) => {
              if (item.isPaper == null || item.isPaper == -1) {
                item.isPaper = "";
              }
              if (item.theoryGrade == null && item.learnGrade == -1) {
                item.qualified = "";
              }
@@ -1000,6 +1039,34 @@
        });
      });
    },
    //补证申请
    securityPaperApply(row,done,loading){
      this.$confirm("当前保安员已制证,确定要继续申请制证?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        const data = {
          createUser:this.userInfo.user_id,
          type:2,
          userId:row.userId
        }
        add(data).then(
          () => {
            this.questionBankOnLoad(this.questionBankPage);
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
          },
          (error) => {
            window.console.log(error);
            loading();
          }
        );
      });
    },
    //缺考标记
    absent(row, done, loading) {
      this.$confirm("确定缺考标记?", {