| | |
| | | <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="姓名" min-width="100"> |
| | | </el-table-column> |
| | | <el-table-column prop="startTime" label="起始日期" min-width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="endTime" label="结束日期" min-width="180"> |
| | |
| | | :total="search.total"> |
| | | </el-pagination> |
| | | </div> |
| | | <el-dialog title="提示" :visible.sync="dialogVisible" width="45%"> |
| | | <el-dialog title="查看" :visible.sync="dialogVisible" width="45%"> |
| | | <div style="height: 30vh;"> |
| | | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="姓名" prop="name"> |
| | | <el-input v-model="ruleForm.name" size="small" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="起始日期" prop="startTime"> |
| | | <el-date-picker v-model="ruleForm.startTime" type="date" placeholder="选择日期" size="small" |
| | |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="工作单位" prop="placeWork"> |
| | | <el-input v-model="ruleForm.placeWork" size="small" clearable required></el-input> |
| | |
| | | <el-input v-model="ruleForm.department" size="small" clearable required></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="最高职务" prop="post"> |
| | | <el-input v-model="ruleForm.post" size="small" clearable required></el-input> |
| | |
| | | let departmentId = this.clickNodeVal.id ? this.clickNodeVal.id : null |
| | | this.$axios.get(this.$api.personnel.personTrackRecordExport + "?userId=" + userId + "&departmentId=" + departmentId, { responseType: "blob" }).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('导出成功') |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '工作履历.xlsx'; |
| | | link.click(); |
| | | //将Blob 对象转换成字符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '工作履历.xlsx'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '工作履历.xlsx'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | saveOrUpdate() { |