| | |
| | | @row-click="handleRowClick" |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot-scope="{ type, row }" slot="menu"> |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | style="display:none" |
| | | type="primary" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-folder-checked" |
| | | @click="handleImport" |
| | | >批量报名 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{ type, row }" slot="menu"> |
| | | <!-- <el-button |
| | | :type="type" |
| | | size="small" |
| | | icon="el-icon-edit" |
| | |
| | | :disabled="auditStatus" |
| | | @click="handleTrainApply(row)" |
| | | >报名 |
| | | </el-button> |
| | | </el-button> --> |
| | | <el-button |
| | | :type="type" |
| | | size="small" |
| | |
| | | @submit="submit" |
| | | ></avue-form> |
| | | </el-dialog> |
| | | <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> |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | excelBox: false, |
| | | auditStatus: false, |
| | | formTrainApply: { |
| | | num: 0 |
| | | }, |
| | | deptIds:'', |
| | | 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?deptId=" + this.deptIds |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24 |
| | | } |
| | | ] |
| | | }, |
| | | query: {}, |
| | | deptId: null, |
| | |
| | | this.formTrainApply.num = this.formTrainApply.userId.length; |
| | | } |
| | | }, |
| | | mounted(){ |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | this.deptIds = this.userInfo.dept_id; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | |
| | | "/api/blade-user/security-apply-tree?examType=2&deptId=" + |
| | | this.userInfo.dept_id; |
| | | |
| | | this.getUserDetail(); |
| | | }, |
| | | mounted() { |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | // this.getUserDetail(); |
| | | }, |
| | | methods: { |
| | | handleImport() { |
| | | this.excelBox = true; |
| | | }, |
| | | |
| | | handleTemplate() { |
| | | window.open(`/api/trainingRegistration/export-template`); |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox = false; |
| | | this.refreshChange(); |
| | | done(); |
| | | }, |
| | | //获取用户信息 |
| | | getUserDetail() { |
| | | var that = this; |
| | |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | | // if (["edit", "view"].includes(type)) { |
| | | // getDetail(this.form.id).then(res => { |
| | | // this.form = res.data.data; |
| | | // }); |
| | | // } |
| | | done(); |
| | | }, |
| | | searchReset() { |