Administrator
2021-12-09 45cfc3cf90a031fa2415292092f7d23c8e38abc7
报名清册信息导出
1 files modified
57 ■■■■ changed files
src/views/trainApply/index.vue 57 ●●●● patch | view | raw | blame | history
src/views/trainApply/index.vue
@@ -63,6 +63,14 @@
                @click="handleImport"
                >清册导入
              </el-button>
              <el-button
                type="warning"
                size="small"
                plain
                icon="el-icon-download"
                @click="handleApplyInfoExport"
                >报名清册信息导出
              </el-button>
            </template>
            <template slot-scope="{ type, row }" slot="menu">
@@ -97,6 +105,7 @@
                @click="auditSucess(row)"
                >审核通过
              </el-button>
            </template>
          </avue-crud>
@@ -132,7 +141,8 @@
  auditSucess,
  remove,
} from "@/api/trainingRegistration/trainingRegistration";
import Qs from "qs";
import { getToken } from "@/util/auth";
import { mapState } from "vuex";
var DIC = {
@@ -274,7 +284,7 @@
            width: 220,
          },
          {
            label: "所属公司",
            label: "所属企业",
            prop: "deptName",
            search: true,
            slot: true,
@@ -293,7 +303,7 @@
            rules: [
              {
                required: true,
                message: "请选择所属公司",
                message: "请选择所属企业",
                trigger: "blur",
              },
            ],
@@ -666,6 +676,36 @@
    },
  },
  methods: {
    //保安员证信息导出
    handleApplyInfoExport() {
      this.$confirm("是否导出考试报名信息数据?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        //获取查询条件
        // const { releaseTimeRange } = this.questionBankSearch;
        // if (releaseTimeRange) {
        //   this.questionBankSearch["startTime"] = releaseTimeRange[0];
        //   this.questionBankSearch["endTime"] = releaseTimeRange[1];
        // }
        var data = {
          cancel: this.questionBankSearch.cancel,
          auditStatus: this.questionBankSearch.auditStatus,
          deptName: this.questionBankSearch.deptName,
          isExam: this.questionBankSearch.isExam,
          realName: this.questionBankSearch.realName
        };
        data["examId"] = this.$route.query.id;
        //序列号url形式,用&拼接
        data = Qs.stringify(data);
        window.open(
          `/api/trainingRegistration/export-apply-info?${
            this.website.tokenHeader
          }=${getToken()}&` + data
        );
      });
    },
    //行样式调整
    rowStyle({ row, column, rowIndex }) {
      if (row.auditStatus == "2") {
@@ -843,17 +883,6 @@
        query: obj,
      });
    },
    //导出数据
    // handleExport() {
    //     this.$confirm("是否导出清册数据?", "提示", {
    //         confirmButtonText: "确定",
    //         cancelButtonText: "取消",
    //         type: "warning",
    //     }).then(() => {
    //         window.open(`/api/trainingRegistration/export-apply?examId=${this.$route.query.id}`);
    //     });
    // },
    handleImport() {
      this.excelBox = true;
    },