From ef46e4b78e81418a831d4f7f21eb24d2fd4d35e1 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sat, 25 Dec 2021 15:08:54 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises
---
src/views/trainingRegistration/index.vue | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 52 insertions(+), 0 deletions(-)
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