Administrator
2021-12-17 2d1477262d6dd18795f3febbb42114c4cc181770
培训报名新增导出
2 files modified
54 ■■■■■ changed files
src/views/trainApply/index.vue 2 ●●● patch | view | raw | blame | history
src/views/trainingRegistration/index.vue 52 ●●●●● patch | view | raw | blame | history
src/views/trainApply/index.vue
@@ -676,7 +676,7 @@
    },
  },
  methods: {
    //保安员证信息导出
    //报名信息导出
    handleApplyInfoExport() {
      this.$confirm("是否导出考试报名信息数据?", "提示", {
        confirmButtonText: "确定",
src/views/trainingRegistration/index.vue
@@ -53,6 +53,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, size, row }" slot="menu">
        <el-button
@@ -133,6 +141,9 @@
} from "@/api/trainingRegistration/trainingRegistration";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
import Qs from "qs";
import { getToken } from "@/util/auth";
export default {
  data() {
    return {
@@ -382,6 +393,47 @@
    // }
  },
  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.search.cancel,
          auditStatus: this.search.auditStatus,
          deptName: this.search.deptName,
          isExam: this.search.isExam,
          realName: this.search.realName,
        };
        if (
          this.userInfo.role_name == "保安公司管理员" ||
          this.userInfo.role_name == "保安" ||
          this.userInfo.role_name == "分公司管理员"
        ) {
          //如果是保安公司管理员
          data["deptId"] = this.userInfo.dept_id;
        }
        if (this.userInfo.role_name == "培训公司管理员") {
          //如果是培训公司管理员
          data["trainingUnitId"] = this.userInfo.dept_id;
        }
        //序列号url形式,用&拼接
        data = Qs.stringify(data);
        window.open(
          `/api/trainingRegistration/export-apply-info?${
            this.website.tokenHeader
          }=${getToken()}&` + data
        );
      });
    },
    //准考证查看
    handlePrint(row) {
      var obj = row;