From 746bdcb49d537de9f1654bc365c3f12bbeaa54a0 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 04 Aug 2021 08:56:29 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises
---
src/views/trainApply/index.vue | 76 +++++++++++++++++++++++++++++++++++++-
1 files changed, 74 insertions(+), 2 deletions(-)
diff --git a/src/views/trainApply/index.vue b/src/views/trainApply/index.vue
index 429e3e8..57af7a2 100644
--- a/src/views/trainApply/index.vue
+++ b/src/views/trainApply/index.vue
@@ -6,7 +6,7 @@
* menu-name 报名考试
*/
<template>
- <el-row class="morpheus-box-apply-exam">
+ <el-row class="morpheus-box-apply-exam-1">
<el-col :span="24" class="hasButOne">
<el-card>
<div class="exam-card-body">
@@ -38,6 +38,14 @@
@click="handleExport"
>导出
</el-button>
+ <el-button
+ type="success"
+ size="small"
+ plain
+ icon="el-icon-upload2"
+ @click="handleImport"
+ >导入
+ </el-button>
</template>
<template slot-scope="{ type,row }" slot="menu">
@@ -52,6 +60,25 @@
</template>
</avue-crud>
+
+ <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>
</div>
@@ -82,6 +109,7 @@
data () {
return {
+ excelBox: false,
questionBankOption: {
// 操作栏多余按钮去除
delBtn: false,
@@ -239,7 +267,8 @@
required: true,
message: "请选择准考证号",
trigger: "blur"
- }]
+ }],
+ width:100,
},
{
label: "身份证号",
@@ -390,6 +419,32 @@
},
questionBankQuery: {},
questionBankSelectionList: [],
+ 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/trainingRegistration/import-trainingRegistration",
+ },
+ {
+ label: "模板下载",
+ prop: "excelTemplate",
+ formslot: true,
+ span: 24,
+ },
+ ],
+ },
}
},
@@ -576,6 +631,23 @@
window.open(`/api/trainingRegistration/export-apply?examId=${this.$route.query.id}`);
});
},
+ 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>
--
Gitblit v1.9.3