| | |
| | | @click="handleExportPaper" |
| | | >证书打印信息导出 |
| | | </el-button> |
| | | <el-button type="success" size="small" plain icon="el-icon-upload2" v-if="permission.accreditationRecords_paperTimeImport || check" |
| | | @click="handleImport1">发证时间导入 |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | |
| | | @submit="submitBatchAudit" |
| | | ></avue-form> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="发证时间导入" append-to-body :visible.sync="excelBox1" width="555px"> |
| | | <avue-form :option="excelOption1" v-model="excelForm1" :upload-after="uploadAfter1"> |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" @click="handleTemplate1"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | |
| | | <div style="position: fixed; top: 9999px; width: 100%; height: 100%"> |
| | | <div class="certificate_box" id="certificateDom"> |
| | | <div class="security_main" ref="certificateBox"> |
| | |
| | | } |
| | | ] |
| | | }, |
| | | data: [] |
| | | data: [], |
| | | |
| | | excelBox1: false, |
| | | excelForm1: {}, |
| | | excelOption1: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [ |
| | | { |
| | | label: "文件上传", |
| | | prop: "excelFile", |
| | | type: "upload", |
| | | drag: true, |
| | | loadText: "文件上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data" |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/blade-user/import-security-paperTime?deptId=" + this.deptIds |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24 |
| | | } |
| | | ] |
| | | }, |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | handleTemplate1() { |
| | | window.open( |
| | | `/api/blade-user/export-template-security-paperTime?${this.website.tokenHeader |
| | | }=${getToken()}` |
| | | ); |
| | | }, |
| | | |
| | | uploadAfter1(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox1 = false; |
| | | |
| | | this.$message({ |
| | | type: "success", |
| | | message: "导入成功!" |
| | | }); |
| | | |
| | | this.refreshChange(); |
| | | done(); |
| | | }, |
| | | |
| | | handleImport1() { |
| | | this.excelBox1 = true; |
| | | }, |
| | | |
| | | //获取当前用户部门信息 |
| | | getDeptInfo(deptId) { |
| | | var that = this; |
| | |
| | | //行点击事件 |
| | | certificateClick(row) { |
| | | if (row) { |
| | | var time = this.getNewTime(); |
| | | this.certificateYear = time[0]; |
| | | this.certificateMonth = time[1]; |
| | | this.certificateObj = row; |
| | | //说明导入了制证时间 |
| | | if (row.userPaperTime != null && row.userPaperTime != ""){ |
| | | let date = row.userPaperTime.split(" ")[0] |
| | | let dateArr = date.split("-") |
| | | |
| | | this.certificateYear = dateArr[0]; |
| | | this.certificateMonth = dateArr[1]; |
| | | this.certificateObj = row; |
| | | |
| | | }else{ |
| | | var time = this.getNewTime(); |
| | | this.certificateYear = time[0]; |
| | | this.certificateMonth = time[1]; |
| | | this.certificateObj = row; |
| | | } |
| | | |
| | | setTimeout(() => { |
| | | this.Print(); |
| | | }, 500); |
| | |
| | | // console.log('打印开始', Date.parse(new Date())); |
| | | }, |
| | | onEnd: () => { |
| | | this.updateUserInfo(); |
| | | //说明导入了制证时间 |
| | | if (this.certificateObj.userPaperTime != "" || this.certificateObj.userPaperTime != null){ |
| | | |
| | | }else{ |
| | | //更新制证时间 |
| | | this.updateUserInfo(); |
| | | } |
| | | // console.log('打印完成', Date.parse(new Date())); |
| | | } |
| | | }); |