From 2d1477262d6dd18795f3febbb42114c4cc181770 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 17 Dec 2021 13:56:37 +0800
Subject: [PATCH] 培训报名新增导出
---
src/views/trainApply/index.vue | 2 +-
src/views/trainingRegistration/index.vue | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+), 1 deletions(-)
diff --git a/src/views/trainApply/index.vue b/src/views/trainApply/index.vue
index 75ba9b1..13066f5 100644
--- a/src/views/trainApply/index.vue
+++ b/src/views/trainApply/index.vue
@@ -676,7 +676,7 @@
},
},
methods: {
- //保安员证信息导出
+ //报名信息导出
handleApplyInfoExport() {
this.$confirm("是否导出考试报名信息数据?", "提示", {
confirmButtonText: "确定",
diff --git a/src/views/trainingRegistration/index.vue b/src/views/trainingRegistration/index.vue
index e688c72..b7c5ae3 100644
--- a/src/views/trainingRegistration/index.vue
+++ b/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;
--
Gitblit v1.9.3