Administrator
2021-08-10 2a3bad7a886e8e0271663e74ec47d651edd18308
考试报名修改
4 files modified
1 files added
720 ■■■■■ changed files
src/api/examapi/applyexam.js 13 ●●●●● patch | view | raw | blame | history
src/views/applydetailed/index.vue 365 ●●●● patch | view | raw | blame | history
src/views/applydetailed/papers.vue 40 ●●●●● patch | view | raw | blame | history
src/views/applyexam/index.vue 300 ●●●● patch | view | raw | blame | history
src/views/companyApply/index.vue 2 ●●● patch | view | raw | blame | history
src/api/examapi/applyexam.js
@@ -50,6 +50,19 @@
    })
}
export const addExam = (ids, examTime, startTime, endTime) => {
    return request({
        url: '/api/apply/batchExam',
        method: 'post',
        params: {
            ids,
            examTime,
            startTime,
            endTime
        }
    })
}
src/views/applydetailed/index.vue
@@ -10,8 +10,8 @@
        <el-col :span="24" class="hasButOne">
            <el-card>
                <div class="exam-card-body">
                    <avue-crud v-model="obj"
          <avue-crud
            v-model="obj"
                               class="company-box"
                               :option="questionBankOption"
                               :search.sync="questionBankSearch"
@@ -26,8 +26,8 @@
                               @current-change="questionBankCurrentChange"
                               @size-change="questionBankSizeChange"
                               @row-save="questionBankRowSave"
                               @row-del="questionBankRowDel">
            @row-del="questionBankRowDel"
          >
                        <!-- 自定义按钮 -->
                        <template slot="menuLeft">
                            <el-button
@@ -36,15 +36,16 @@
                                plain
                                icon="el-icon-download"
                                @click="handleExport"
                                >导出
                >清册生成
                            </el-button>
                            <el-button
                style="display:none"
                                type="success"
                                size="small"
                                plain
                                icon="el-icon-upload2"
                icon="el-icon-receiving"
                                @click="handleImport"
                                >导入
                >清册打印
                            </el-button>
                        </template>
@@ -58,7 +59,6 @@
                            >准考证打印
                            </el-button>
                        </template>
                    </avue-crud>
                    <el-dialog
@@ -79,40 +79,34 @@
                            </template>
                        </avue-form>
                    </el-dialog>
                </div>
            </el-card>
        </el-col>
    </el-row>
</template>
<script>
import {
    getApplyList,
    addApply,
    remove
} from "@/api/examapi/applyexam";
import { mapState } from 'vuex'
import { getApplyList, addApply, remove } from "@/api/examapi/applyexam";
import { mapState } from "vuex";
var DIC = {
    applyStatus: [{
        label: '已报名',
        value: 2
    }, {
        label: '已取消',
        value: 4
    }]
}
  applyStatus: [
    {
      label: "已报名",
      value: 2,
    },
    {
      label: "已取消",
      value: 4,
    },
  ],
};
export default {
    data () {
        return {
            obj: {
                name: '张三',
        name: "张三",
            },
            excelBox: false,
            questionBankOption: {
@@ -128,14 +122,14 @@
                // title: '题库',
                align: 'center',
                height: 'auto',
        align: "center",
        height: "auto",
                calcHeight: 80,
                tip: false,
                searchShow: true,
                searchMenuSpan: 4,
                index: true,
                indexLabel: '序号',
        indexLabel: "序号",
                //dialogType: 'drawer',
                dialogClickModal: false,
                // 操作栏宽度
@@ -145,11 +139,11 @@
                    {
                        label: "保安姓名",
                        prop: "userId",
                        type: 'tree',
                        dicUrl: '',
                        search: true,
            type: "tree",
            dicUrl: "",
                        hide:true,
                        slot: true,
            searchSpan: 4,
                        // 表单新增时是否禁止
                        addDisabled: false,
                        // 表单新增时是否可见
@@ -158,23 +152,30 @@
                        addDetail: false,
                        // 表单编辑时是否禁止
                        editDisabled: true,
            viewDisabled: false,
                        // 表单编辑时是否可见
                        editDisplay: true,
            viewDisplay: false,
                        // 表单编辑时是否为查看模式
                        editDetail: false,
                        props: {
                            label: "title",
                            value: "id",
                        },
                        rules: [{
            rules: [
              {
                            required: true,
                            message: "请选择保安姓名",
                            trigger: "blur"
                        }]
                trigger: "blur",
              },
            ],
            width: 80,
                    },
                    {
                        label: "保安姓名",
                        prop: "name",
            prop: "realName",
            searchSpan: 4,
            search: true,
                        // 表单新增时是否禁止
                        addDisabled: false,
                        // 表单新增时是否可见
@@ -192,17 +193,19 @@
                            label: "title",
                            value: "id",
                        },
                        rules: [{
            rules: [
              {
                            required: true,
                            message: "请选择保安姓名",
                            trigger: "blur"
                        }]
                trigger: "blur",
              },
            ],
                    },
                    {
                        label: "考试名称",
                        prop: "examName",
                        type: 'tree',
                        dicUrl: '/api/exampaper/page-tree',
            type: "tree",
            dicUrl: "/api/exampaper/page-tree",
                        // search: true,
                        slot: true,
                        // 表单新增时是否禁止
@@ -221,12 +224,14 @@
                            label: "examName",
                            value: "id",
                        },
                        rules: [{
            rules: [
              {
                            required: true,
                            message: "请选择试卷名称",
                            trigger: "blur"
                        }],
                        width: 220
                trigger: "blur",
              },
            ],
            width: 220,
                    },
                    {
                        label: "所属公司",
@@ -245,12 +250,14 @@
                        editDisplay: true,
                        // 表单编辑时是否为查看模式
                        editDetail: false,
                        rules: [{
            rules: [
              {
                            required: true,
                            message: "请选择所属公司",
                            trigger: "blur"
                        }],
                        width: 220
                trigger: "blur",
              },
            ],
            width: 220,
                    },
                    {
                        label: "准考证号",
@@ -268,12 +275,14 @@
                        editDisplay: true,
                        // 表单编辑时是否为查看模式
                        editDetail: false,
                        rules: [{
            rules: [
              {
                            required: true,
                            message: "请选择准考证号",
                            trigger: "blur"
                        }],
                        width:100
                trigger: "blur",
              },
            ],
            width: 100,
                    },
                    {
                        label: "身份证号",
@@ -291,12 +300,14 @@
                        editDisplay: true,
                        // 表单编辑时是否为查看模式
                        editDetail: false,
                        rules: [{
            rules: [
              {
                            required: true,
                            message: "请选择准考证号",
                            trigger: "blur"
                        }],
                        width: 200
                trigger: "blur",
              },
            ],
            width: 200,
                    },
                    {
                        label: "报考证件",
@@ -314,11 +325,13 @@
                        editDisplay: true,
                        // 表单编辑时是否为查看模式
                        editDetail: false,
                        rules: [{
            rules: [
              {
                            required: true,
                            message: "请选择准考证号",
                            trigger: "blur"
                        }],
                trigger: "blur",
              },
            ],
                    },
                    // {
                    //     label: "试卷分数",
@@ -342,8 +355,8 @@
                        prop: "applyTime",
                        type: "datetime",
                        // span: 24,
                        format: 'yyyy-MM-dd HH:mm:ss',
                        valueFormat: 'yyyy-MM-dd HH:mm:ss',
            format: "yyyy-MM-dd HH:mm:ss",
            valueFormat: "yyyy-MM-dd HH:mm:ss",
                        // 表单新增时是否禁止
                        addDisabled: true,
                        // 表单新增时是否可见
@@ -356,71 +369,80 @@
                        editDisplay: true,
                        // 表单编辑时是否为查看模式
                        editDetail: false,
                        value: (new Date().getFullYear() + '-' + (new Date().getMonth() + 1 < 10
            value:
              new Date().getFullYear() +
              "-" +
              (new Date().getMonth() + 1 < 10
                            ? "0" + (new Date().getMonth() + 1)
                            : new Date().getMonth() + 1) + '-' + (new Date().getDate() < 10
                : new Date().getMonth() + 1) +
              "-" +
              (new Date().getDate() < 10
                                ? "0" + new Date().getDate()
                                : new Date().getDate()) + ' ' + (new Date().getHours() < 10
                : new Date().getDate()) +
              " " +
              (new Date().getHours() < 10
                                    ? "0" + new Date().getHours()
                                    : new Date().getHours()) + ':' + (new Date().getMinutes() < 10
                : new Date().getHours()) +
              ":" +
              (new Date().getMinutes() < 10
                                        ? "0" + new Date().getMinutes()
                                        : new Date().getMinutes()) + ':' + (new Date().getSeconds() < 10
                : new Date().getMinutes()) +
              ":" +
              (new Date().getSeconds() < 10
                                            ? "0" + new Date().getSeconds()
                                            : new Date().getSeconds())),
                : new Date().getSeconds()),
                        width: 160
            width: 160,
                    },
                    {
                        label: "考试时间",
                        prop: "examTime",
                        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: true,
                        // 表单编辑时是否为查看模式
                        editDetail: false,
                        width: 160
                    },{
                        label: "报名状态",
                        prop: "applyStatus",
                        slot: true,
                        // 表单新增时是否禁止
                        addDisabled: false,
                        // 表单新增时是否可见
                        addDisplay: false,
                        // 表单新增时是否为查看模式
                        addDetail: false,
                        // 表单编辑时是否禁止
                        editDisabled: false,
                        // 表单编辑时是否可见
                        editDisplay: true,
                        // 表单编辑时是否为查看模式
                        editDetail: false,
                        dicData:DIC.applyStatus,
                        search:true,
                        type:"select"
                    },
                ]
          // {
          //     label: "考试时间",
          //     prop: "examTime",
          //     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: true,
          //     // 表单编辑时是否为查看模式
          //     editDetail: false,
          //     width: 160
          // },{
          //     label: "报名状态",
          //     prop: "applyStatus",
          //     slot: true,
          //     // 表单新增时是否禁止
          //     addDisabled: false,
          //     // 表单新增时是否可见
          //     addDisplay: false,
          //     // 表单新增时是否为查看模式
          //     addDetail: false,
          //     // 表单编辑时是否禁止
          //     editDisabled: false,
          //     // 表单编辑时是否可见
          //     editDisplay: true,
          //     // 表单编辑时是否为查看模式
          //     editDetail: false,
          //     dicData:DIC.applyStatus,
          //     search:true,
          //     type:"select"
          // },
        ],
            },
            questionBankSearch: {},
            questionBankLoading: true,
            questionBankData: [
            ],
      questionBankData: [],
            questionBankPage: {
                pageSize: 10,
                currentPage: 1,
                total: 16
        total: 16,
            },
            questionBankQuery: {},
            questionBankSelectionList: [],
@@ -450,49 +472,19 @@
                },
                ],
            },
        }
    },
    watch: {
        "form.examname": {
            // form是表单或者表格绑定的数据集,v-model='form'
            handler (val) {
                if (val) {
                    //地址截取,从县/区开始截取,并且取从县区第一个出现的位置开始
                    var address = val.formattedAddress.toString();
                    if (address.search("县") != -1) {
                        this.form.address = address.substring(
                            address.indexOf("县") + 1,
                            address.length
                        );
                    }
                    if (address.search("区") != -1) {
                        this.form.address = address.substring(
                            address.indexOf("区") + 1,
                            address.length
                        );
                    }
                }
            },
            immediate: true,
        },
    };
    },
    created () {
    console.log(this.userInfo);
      console.log(this.userInfo)
      if (this.userInfo.role_name.indexOf('ksxtadmin') != -1) {
        this.questionBankOption.column[0].dicUrl = "/api/blade-system/dept/lazy-tree-user?parentId="
    if (this.userInfo.role_name.indexOf("ksxtadmin") != -1) {
      this.questionBankOption.column[0].dicUrl =
        "/api/blade-system/dept/lazy-tree-user?parentId=";
      } else {
        this.questionBankOption.column[0].dicUrl = "/api/blade-system/dept/lazy-tree-user?parentId=" + this.userInfo.dept_id
      this.questionBankOption.column[0].dicUrl =
        "/api/blade-system/dept/lazy-tree-user?parentId=" +
        this.userInfo.dept_id;
      }
    },
    mounted() {
        var flag = false,
@@ -513,11 +505,11 @@
    },
    computed: {
        ...mapState({
            userInfo: state => state.user.userInfo
      userInfo: (state) => state.user.userInfo,
        }),
        ids () {
            let ids = [];
            this.questionBankSelectionList.forEach(ele => {
      this.questionBankSelectionList.forEach((ele) => {
                ids.push(ele.id);
            });
            return ids.join(",");
@@ -533,11 +525,25 @@
                query: obj,
            });
        },
    //清册生成
    handleExport() {
      var obj ={};
      obj["name"] = "报名清册信息";
      obj["examId"] = this.$route.query.id;
      this.$router.push({
        path: `/applydetailed/papers`,
        query: obj,
      });
    },
        questionBankOnLoad (page, params = {}) {
            // debugger;
            params['examId'] = this.$route.query.id;
      params["examId"] = this.$route.query.id;
            this.questionBankLoading = false;
            getApplyList(page.currentPage, page.pageSize, Object.assign(params, this.questionBankQuery)).then(res => {
      getApplyList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.questionBankQuery)
      ).then((res) => {
                const data = res.data.data;
                this.questionBankPage.total = data.total;
                this.questionBankData = data.records;
@@ -571,25 +577,31 @@
        // 新增
        questionBankRowSave (row, done, loading) {
            addApply({ userId: row.name, examId: row.examName, applyTime: row.applyTime }).then(() => {
      addApply({
        userId: row.name,
        examId: row.examName,
        applyTime: row.applyTime,
      }).then(
        () => {
                this.questionBankOnLoad(this.questionBankPage);
                this.$message({
                    type: "success",
                    message: "操作成功!"
            message: "操作成功!",
                });
                done();
            }, error => {
        },
        (error) => {
                window.console.log(error);
                loading();
            });
        }
      );
        },
        questionBankRowDel (row) {
            this.$confirm("确定将选择数据删除?", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
        type: "warning",
            })
                .then(() => {
                    return remove(row.id);
@@ -598,7 +610,7 @@
                    this.questionBankOnLoad(this.questionBankPage);
                    this.$message({
                        type: "success",
                        message: "操作成功!"
            message: "操作成功!",
                    });
                });
        },
@@ -611,7 +623,7 @@
            this.$confirm("确定将选择数据删除?", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
        type: "warning",
            })
                .then(() => {
                    return remove(this.ids);
@@ -620,29 +632,18 @@
                    this.questionBankOnLoad(this.questionBankPage);
                    this.$message({
                        type: "success",
                        message: "操作成功!"
            message: "操作成功!",
                    });
                    this.$refs.questionBankCrud.toggleSelection();
                });
        },
        //导出数据
        handleExport() {
            this.$confirm("是否导出清册数据?", "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
            }).then(() => {
                window.open(`/api/apply/export-apply?examId=${this.$route.query.id}`);
            });
        },
        handleImport() {
            this.excelBox = true;
        },
        handleTemplate() {
            window.open(
                `/api/apply/export-template`
            );
      window.open(`/api/apply/export-template`);
        },
        uploadAfter(res, done, loading, column) {
            window.console.log(column);
@@ -653,8 +654,8 @@
        refreshChange() {
            this.questionBankOnLoad(this.page, this.query);
        },
    }
}
  },
};
</script>
<style lang="scss" scoped>
src/views/applydetailed/papers.vue
New file
@@ -0,0 +1,40 @@
<template>
  <!-- <iframe src="http://124.71.113.22/map/index.html?openid=PatrolManagement" style="width: 100%;height: 100%" frameborder="0"></iframe> -->
  <iframe :src="url" style="width: 100%; height: 100%" frameborder="0"></iframe>
</template>
<script>
//占位路由 巡逻管理
export default {
  data() {
    return {
      url: "/papers.html",
    };
  },
  created(){
      var d = this.$route.query;
      this.url += "?data=" + JSON.stringify(d);
    //   console.log(d);
  },
  mounted() {
    var flag = false,
      i = 0,
      ind = null;
    this.$store.state.tags.tagList.forEach((item, index) => {
      if (item.label == "准考证信息") {
        if (flag == false) {
          ind = index;
          flag = true;
        }
        i++;
      }
    });
    if (i > 1) {
      this.$store.state.tags.tagList.splice(ind, 1);
    }
  },
};
</script>
<style>
</style>
src/views/applyexam/index.vue
@@ -57,13 +57,33 @@
                                       @click="questionBankHandleDelete">删 除
                            </el-button>
                        </template> -->
            <!-- 自定义按钮 -->
            <template slot="menuLeft">
              <el-button
                type="primary"
                size="small"
                plain
                icon="el-icon-folder-checked"
                @click="handleBatchExam"
                v-if="examPersission"
                >生成考试
              </el-button>
              <el-button
                type="primary"
                size="small"
                plain
                icon="el-icon-folder-checked"
               @click="handleImport"
                >清册导入
              </el-button>
            </template>
            <template slot-scope="{ type, row }" slot="menu">
              <el-button
                :type="type"
                size="small"
                icon="el-icon-refresh-left"
                :disabled="row.applyStatus == 4"
                :disabled="row.isApply == 2"
                @click="handleCancel(row)"
                >取消报名
              </el-button>
@@ -101,6 +121,43 @@
              @reset-change="emptytChange"
              @submit="submit"
            ></avue-form>
          </el-dialog>
          <el-dialog
              title="清册数据导入"
              append-to-body
              :visible.sync="excelBox"
              width="555px"
              >
              <avue-form
                  :option="excelOption"
                  v-model="excelForm"
                  :upload-after="uploadAfter"
              >
                  <template slot="excelTemplate">
                  <el-button type="primary" @click="handleTemplate">
                      点击下载<i class="el-icon-download el-icon--right"></i>
                  </el-button>
                  </template>
              </avue-form>
          </el-dialog>
          <el-dialog
            title="考试生成"
            append-to-body
            :visible.sync="dialogExamFormVisible"
            width="1000px"
            @close='closeDialog'
          >
            <avue-form
              ref="formExamApply"
              v-model="examApply"
              :option="optionExamApply"
              @reset-change="emptytChange"
              @submit="submitExamApply"
            ></avue-form>
          </el-dialog>
        </div>
      </el-card>
@@ -114,6 +171,7 @@
  addApply,
  updateApply,
  remove,
  addExam
} from "@/api/examapi/applyexam";
import { mapState } from "vuex";
@@ -134,7 +192,37 @@
  data() {
    return {
      dialogFormVisible: false,
      dialogExamFormVisible: false,
      examPersission:false,
      applyExport:false,
      excelBox:false,
      Audit: {},
      excelForm: {},
      excelOption: {
          submitBtn: false,
          emptyBtn: false,
          column: [
          {
              label: "模板上传",
              prop: "excelFile",
              type: "upload",
              drag: true,
              loadText: "模板上传中,请稍等",
              span: 24,
              propsHttp: {
              res: "data",
              },
              tip: "请上传 .xls,.xlsx 标准格式文件",
              action: "/api/apply/import-apply",
          },
          {
              label: "模板下载",
              prop: "excelTemplate",
              formslot: true,
              span: 24,
          },
          ],
      },
      optionAudit: {
        height: "auto",
        calcHeight: 30,
@@ -188,16 +276,64 @@
          },
        ],
      },
      optionExamApply: {
        height: "auto",
        filterBtn: true,
        calcHeight: 30,
        dialogWidth: 950,
        tip: false,
        searchShow: true,
        searchMenuSpan: 6,
        border: false,
        index: true,
        stripe: true,
        viewBtn: true,
        selection: true,
        excelBtn: false,
        menuWidth: 380,
        dialogClickModal: false,
        column: [
          {
            label: "考试时间",
            prop: "examTime",
            type: "daterange",
            format: "yyyy-MM-dd HH:mm:ss",
            valueFormat: "yyyy-MM-dd HH:mm:ss",
            startPlaceholder: "考试开始时间",
            endPlaceholder: "考试结束时间",
            // 表单新增时是否禁止
            addDisabled: false,
            // 表单新增时是否可见
            addDisplay: true,
            // 表单新增时是否为查看模式
            addDetail: false,
            // 表单编辑时是否禁止
            editDisabled: false,
            // 表单编辑时是否可见
            editDisplay: true,
            // 表单编辑时是否为查看模式
            editDetail: false,
            rules: [
              {
                required: true,
                message: "请选择考试时间",
                trigger: "blur",
              },
            ],
            span: 24,
          },
        ],
      },
      questionBankOption: {
        // 操作栏多余按钮去除
        delBtn: false,
        editBtn: false,
        addBtn: true,
        addBtn: false,
        selection: true,
        menu: true,
        // 导出按钮
        // excelBtn: true,
        viewBtn: false,
        viewBtn: true,
        // title: '题库',
@@ -214,7 +350,7 @@
        //tree 默认展开
        defaultExpandAll: true,
        // 操作栏宽度
        menuWidth: 200,
        menuWidth: 300,
        column: [
          {
@@ -222,7 +358,6 @@
            prop: "userId",
            type: "tree",
            dicUrl: "",
            search: true,
            hide: true,
            slot: true,
            searchSpan: 4,
@@ -234,8 +369,10 @@
            addDetail: false,
            // 表单编辑时是否禁止
            editDisabled: true,
            viewDisabled: false,
            // 表单编辑时是否可见
            editDisplay: true,
            viewDisplay: false,
            // 表单编辑时是否为查看模式
            editDetail: false,
            props: {
@@ -253,7 +390,9 @@
          },
          {
            label: "保安姓名",
            prop: "name",
            prop: "realName",
            searchSpan: 4,
            search: true,
            // 表单新增时是否禁止
            addDisabled: false,
            // 表单新增时是否可见
@@ -316,7 +455,7 @@
            prop: "deptName",
            search: true,
            slot: true,
            searchSpan: 4,
            searchSpan: 6,
            // 表单新增时是否禁止
            addDisabled: false,
            // 表单新增时是否可见
@@ -473,48 +612,48 @@
            width: 150,
          },
          {
            label: "考试时间",
            prop: "examTime",
            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: true,
            // 表单编辑时是否为查看模式
            editDetail: false,
            width: 150,
          },
          {
            label: "报名状态",
            prop: "applyStatus",
            slot: true,
            searchSpan: 4,
            // 表单新增时是否禁止
            addDisabled: false,
            // 表单新增时是否可见
            addDisplay: false,
            // 表单新增时是否为查看模式
            addDetail: false,
            // 表单编辑时是否禁止
            editDisabled: false,
            // 表单编辑时是否可见
            editDisplay: true,
            // 表单编辑时是否为查看模式
            editDetail: false,
            dicData: DIC.applyStatus,
            search: true,
            type: "select",
          },
          // {
          //   label: "考试时间",
          //   prop: "examTime",
          //   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: true,
          //   // 表单编辑时是否为查看模式
          //   editDetail: false,
          //   width: 150,
          // },
          // {
          //   label: "报名状态",
          //   prop: "applyStatus",
          //   slot: true,
          //   searchSpan: 4,
          //   // 表单新增时是否禁止
          //   addDisabled: false,
          //   // 表单新增时是否可见
          //   addDisplay: false,
          //   // 表单新增时是否为查看模式
          //   addDetail: false,
          //   // 表单编辑时是否禁止
          //   editDisabled: false,
          //   // 表单编辑时是否可见
          //   editDisplay: true,
          //   // 表单编辑时是否为查看模式
          //   editDetail: false,
          //   dicData: DIC.applyStatus,
          //   search: true,
          //   type: "select",
          // },
          // {
          //     label: "审核状态",
          //     prop: "examinationType",
@@ -592,12 +731,7 @@
    console.log(this.userInfo);
    if (this.userInfo.role_name.indexOf("ksxtadmin") != -1) {
      this.questionBankOption.column[0].dicUrl =
        "/api/blade-system/dept/lazy-tree-user?parentId=";
    } else {
      this.questionBankOption.column[0].dicUrl =
        "/api/blade-system/dept/lazy-tree-user?parentId=" +
        this.userInfo.dept_id;
        this.examPersission = true;
    }
  },
  mounted() {},
@@ -696,6 +830,42 @@
      );
    },
    //生成考试弹窗
    handleBatchExam(){
      this.dialogExamFormVisible = true;
      if (this.questionBankSelectionList.length === 0) {
        this.ids = "";
      }
    },
    //生成考试
    submitExamApply(row, done, loading){
      var that = this;
      var startTime = row.examTime[0];
      var endTime = row.examTime[1];
      var examTime = JSON.stringify(row.examTime);
      console.log(this.ids,111);
      addExam(this.ids, examTime, startTime, endTime).then(
        () => {
          this.questionBankOnLoad(this.questionBankPage);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          that.$refs.formExamApply.resetFields();
          that.dialogExamFormVisible = false;
          done();
        },
        (error) => {
          window.console.log(error);
          loading();
        }
      );
    },
    //关闭窗口清除数据
    closeDialog(){
      this.$refs.formExamApply.resetFields();
    },
    questionBankRowDel(row) {
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
@@ -760,6 +930,26 @@
      this.dialogFormVisible = true;
      this.Audit = row;
    },
    handleImport() {
      this.excelBox = true;
    },
    handleTemplate() {
        window.open(
            `/api/apply/export-template`
        );
    },
    uploadAfter(res, done, loading, column) {
        window.console.log(column);
        this.excelBox = false;
        this.refreshChange();
        done();
    },
    refreshChange() {
        this.questionBankOnLoad(this.page, this.query);
    },
  },
};
</script>
src/views/companyApply/index.vue
@@ -36,7 +36,7 @@
                plain
                icon="el-icon-folder-checked"
                @click="handleBatchApply"
                >报 名
                >批量报名
              </el-button>
            </template>